58 if (
dict.found(
"centre"))
71 n_ =
dict.lookup<scalar>(
"n");
111 const scalar r2 =
gMax(
magSqr(zoneCellCentres - centre));
133 const scalar Uref = VUn/zone_.V();
135 return mag(Uref/(n_*dProp_));
144 const word& modelType,
151 phaseName_(
word::null),
167 zone_.read(coeffs(
dict));
168 readCoeffs(coeffs(
dict));
192 addActuationDiskAxialInertialResistance
208 addActuationDiskAxialInertialResistance
225 addActuationDiskAxialInertialResistance
244 zone_.topoChange(map);
259 zone_.distribute(map);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Generic GeometricField class.
static word groupName(Name name, const word &group)
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
static bool master(const label communicator=0)
Am I the master process.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
functionObject support for writing log files
scalar V() const
Return const access to the total cell volume.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
const DimensionedField< scalar, volMesh > & V() const
Return cell volumes.
Finite volume model abstract base class.
static const dictionary & coeffs(const word &modelType, const dictionary &)
Return the coefficients sub-dictionary for a given model type.
virtual bool read(const dictionary &dict)
Read source dictionary.
const fvMesh & mesh() const
Return const access to the mesh database.
const word & name() const
Return const access to the source name.
Disk momentum source which approximates a propeller based on a given propeller curve.
scalar dProp_
Propeller diameter.
virtual bool movePoints()
Update for mesh motion.
virtual void addSup(const volVectorField &U, fvMatrix< vector > &eqn) const
Source term to momentum equation.
virtual wordList addSupFields() const
Return the list of fields for which the fvModel adds source term.
vector centre_
Propeller disk centre.
word UName_
Name of the velocity field.
virtual void readCoeffs(const dictionary &dict)
Read the model coefficients.
word phaseName_
The name of the phase to which this fvModel applies.
fvCellZone zone_
The cellZone the fvConstraint applies to.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
vector normal_
Propeller disk normal direction.
scalar dHub_
Hub diameter.
virtual bool read(const dictionary &dict)
Read dictionary.
scalar diskThickness(const vector ¢re) const
Computes the thickness of the disk in streamwise direction.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
autoPtr< Function1< vector2D > > propellerFunction_
Propeller function.
scalar rotationDir_
Rotation direction (obtained from the sign of n_)
scalar J(const vectorField &U, const vector &nHat) const
Return the normalised flow-rate through the disk.
propellerDisk(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
autoPtr< functionObjects::logFile > logFile_
Optional log file.
scalar n_
Rotation speed [1/s].
Switch log_
Optional switch to enable logging of integral properties.
const cellZone & zone() const
Return const access to the cell set.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
List< word > wordList
A List of words.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar sign(const dimensionedScalar &ds)
const dimensionSet dimless
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensionSet normalised(const dimensionSet &)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Type gMax(const FieldField< Field, Type > &f)