59 if (
dict.found(
"centre"))
72 n_ =
dict.lookup<scalar>(
"n");
105 bool adjustment(
dict.lookupOrDefault<
Switch>(
"adjustment",
false));
130 const scalar r2 =
gMax(
magSqr(zoneCellCentres - centre));
152 const scalar Uref = VUn/zone_.V();
154 return mag(Uref/(n_*dProp_));
160 if (adjustment_.valid())
162 return adjustment_->n();
173 if (adjustment_.valid())
175 adjustment_->correctn(
T);
185 const word& modelType,
192 phaseName_(
word::null),
214 zone_.read(coeffs(
dict));
215 readCoeffs(coeffs(
dict));
239 addActuationDiskAxialInertialResistance
255 addActuationDiskAxialInertialResistance
272 addActuationDiskAxialInertialResistance
291 zone_.topoChange(map);
306 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::unitSets &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, fvMesh > & 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 ~propellerDisk()
Destructor.
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.
friend class propellerDiskAdjustment
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< propellerDiskAdjustment > adjustment_
autoPtr< Function1< vector2D > > propellerFunction_
Propeller function.
scalar rotationDir_
Rotation direction (obtained from the sign of n_)
scalar n() const
Return the rotation speed.
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.
void correctn(const scalar T) const
Rotation speed correction.
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.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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.
const dimensionSet & dimless
dimensionedScalar sign(const dimensionedScalar &ds)
Type gSum(const UList< Type > &f, const label comm)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
dimensionSet normalised(const dimensionSet &)
Type gMax(const UList< Type > &f, const label comm)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)