54 void Foam::fv::actuationDisk::readCoeffs(
const dictionary&
dict)
59 dict.lookupOrDefault<word>
69 <<
"disk direction vector is approximately zero"
73 Cp_ =
dict.lookup<scalar>(
"Cp");
74 Ct_ =
dict.lookup<scalar>(
"Ct");
75 if (
Cp_ <= vSmall ||
Ct_ <= vSmall)
78 <<
"Cp and Ct must be greater than zero"
86 <<
"diskArea is approximately zero"
101 template<
class AlphaFieldType,
class RhoFieldType>
102 void Foam::fv::actuationDisk::addActuationDiskAxialInertialResistance
107 const AlphaFieldType&
alpha,
108 const RhoFieldType&
rho,
112 const scalar a = 1 - Cp_/Ct_;
113 const vector dHat(diskDir_/
mag(diskDir_));
115 scalar dHatUo(vGreat);
116 if (upstreamCellId_ != -1)
118 dHatUo = dHat &
U[upstreamCellId_];
120 reduce(dHatUo, minOp<scalar>());
122 const vector T = 2*diskArea_*
sqr(dHatUo)*a*(1 - a)*dHat;
137 const word& modelType,
144 phaseName_(
word::null),
146 diskDir_(
vector::uniform(NaN)),
150 upstreamPoint_(
vector::uniform(NaN)),
171 addActuationDiskAxialInertialResistance
190 addActuationDiskAxialInertialResistance
210 addActuationDiskAxialInertialResistance
231 zone_.topoChange(map);
243 zone_.distribute(map);
251 zone_.read(coeffs(
dict));
252 readCoeffs(coeffs(
dict));
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
static word groupName(Name name, const word &group)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
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.
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.
scalar Cp_
Power coefficient.
word UName_
Name of the velocity field.
word phaseName_
The name of the phase to which this fvModel applies.
vector diskDir_
Disk area normal.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
virtual bool read(const dictionary &dict)
Read dictionary.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
point upstreamPoint_
Upstream point sample.
actuationDisk(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
label upstreamCellId_
Upstream cell ID.
scalar diskArea_
Disk area.
scalar Ct_
Thrust coefficient.
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.
label findCell(const point &p, const cellDecomposition=CELL_TETS) const
Find cell enclosing this location and return index.
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)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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)
addBackwardCompatibleToRunTimeSelectionTable(fvConstraint, fixedTemperature, dictionary, fixedTemperatureConstraint, "fixedTemperatureConstraint")
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
List< label > labelList
A List of labels.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
vector point
Point is a vector.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Vector< scalar > vector
A scalar version of the templated Vector.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Field< vector > vectorField
Specialisation of Field<T> for vector.
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)