180 #ifndef rotorDiskSource_H 181 #define rotorDiskSource_H 205 class rotorDiskSource
207 public fv::cellSetOption
287 autoPtr<tensorField>
Rcyl_;
293 autoPtr<trimModel>
trim_;
325 const bool writeNow =
false 341 const word& modelType,
362 inline scalar
rhoRef()
const;
366 inline scalar
omega()
const;
379 template<
class RhoFieldType>
386 const bool divideVolume =
true,
scalar tipEffect_
Tip effect [0-1].
List< scalar > area_
Area [m2].
virtual void correct(volScalarField &field)
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
A cylindrical coordinate system (r-theta-z). The coordinate system angle theta is always in radians...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual ~rotorDiskSource()=default
Destructor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const List< point > & x() const
Return the cell centre positions in local rotor frame.
virtual bool read(const dictionary &dict)
Read source dictionary.
const coordSystem::cylindrical & coordSys() const
Return the rotor coordinate system (r-theta-z)
List< tensor > Rcone_
Rotation tensor for flap angle.
scalar rhoRef_
Reference density for incompressible case.
GeometricField< vector, fvPatchField, volMesh > volVectorField
void operator=(const rotorDiskSource &)=delete
No copy assignment.
scalar omega() const
Return the rotational speed [rad/s].
rotorDiskSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
void constructGeometry()
Construct geometry.
geometryModeType
Options for the geometry type specification.
scalar omega_
Rotational speed [rad/s].
label nBlades_
Number of blades.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Applies cell-based momentum sources on velocity (i.e. U) within a specified cylindrical region to app...
autoPtr< tensorField > Rcyl_
Cached rotation tensors for cylindrical coordinates.
scalar rMax_
Maximum radius.
vector inletVelocity_
Inlet velocity for specified inflow.
A class for handling words, derived from Foam::string.
static const Enum< inletFlowType > inletFlowTypeNames_
Names for inletFlowType.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
const word & name() const noexcept
Return const access to the source name.
scalar rhoRef() const
Return the reference density for incompressible case.
inletFlowType inletFlow_
Inlet flow type.
autoPtr< trimModel > trim_
Trim model.
virtual void addSup(fvMatrix< vector > &eqn, const label fieldi)
Add explicit contribution to momentum equation.
inletFlowType
Options for the inlet flow type specification.
void checkData()
Check data.
profileModelList profiles_
Profile data.
static const Enum< geometryModeType > geometryModeTypeNames_
Names for geometryModeType.
Mesh data needed to do the Finite Volume discretisation.
bladeModel blade_
Blade data.
flapData flap_
Blade flap coefficients [rad/s].
static Ostream & output(Ostream &os, const IntRange< T > &range)
List< point > x_
Cell centre positions in local rotor frame.
void writeField(const word &name, const List< Type > &values, const bool writeNow=false) const
Helper function to write rotor values.
void calculate(const RhoFieldType &rho, const vectorField &U, const scalarField &thetag, vectorField &force, const bool divideVolume=true, const bool output=true) const
Calculate forces.
void setFaceArea(vector &axis, const bool correct)
Set the face areas per cell, and optionally correct the rotor axis.
void createCoordinateSystem()
Create the coordinate system.
tmp< vectorField > inflowVelocity(const volVectorField &U) const
Return the inlet flow field.
TypeName("rotorDisk")
Runtime type information.
coordSystem::cylindrical coordSys_
Rotor local cylindrical coordinate system (r-theta-z)