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