54 void Foam::fv::actuationDisk::readCoeffs()
69 <<
"disk direction vector is approximately zero"
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,
143 set_(mesh, coeffs()),
144 phaseName_(
word::null),
146 diskDir_(
vector::uniform(NaN)),
150 upstreamPoint_(
vector::uniform(NaN)),
171 addActuationDiskAxialInertialResistance
190 addActuationDiskAxialInertialResistance
210 addActuationDiskAxialInertialResistance
231 set_.topoChange(map);
243 set_.distribute(map);
#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 keyword definitions, which are a keyword followed by any number of values (e....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
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.
const dictionary & coeffs() const
Return dictionary.
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.
#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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
word name(const bool)
Return a word representation of a bool.
vector point
Point is a vector.
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)
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< scalar > magSqr(const dimensioned< Type > &)