45 radialActuationDiskSource,
46 "radialActuationDiskSource"
53 void Foam::fv::radialActuationDisk::readCoeffs(
const dictionary&
dict)
55 dict.lookup(
"coeffs") >> radialCoeffs_;
60 template<
class RhoFieldType>
61 void Foam::fv::radialActuationDisk::
62 addRadialActuationDiskAxialInertialResistance
67 const RhoFieldType&
rho,
71 scalar a = 1.0 - Cp_/Ct_;
73 const vector uniDiskDir = diskDir_/
mag(diskDir_);
76 E.xx() = uniDiskDir.x();
77 E.yy() = uniDiskDir.y();
78 E.zz() = uniDiskDir.z();
80 const Field<vector> zoneCellCentres(
mesh().cellCentres(),
cells);
81 const Field<scalar> zoneCellVolumes(
mesh().cellVolumes(),
cells);
83 const vector avgCentre =
gSum(zoneCellVolumes*zoneCellCentres)/zone_.V();
84 const scalar maxR =
gMax(
mag(zoneCellCentres - avgCentre));
88 + radialCoeffs_[1]*
sqr(maxR)/2.0
89 + radialCoeffs_[2]*
pow4(maxR)/3.0;
92 scalar upRho = vGreat;
93 if (upstreamCellId_ != -1)
95 upU =
U[upstreamCellId_];
96 upRho =
rho[upstreamCellId_];
98 reduce(upU, minOp<vector>());
99 reduce(upRho, minOp<scalar>());
101 scalar
T = 2.0*upRho*diskArea_*
mag(upU)*a*(1.0 - a);
108 *(radialCoeffs_[0] + radialCoeffs_[1]*r2 + radialCoeffs_[2]*
sqr(r2))
111 Usource[
cells[i]] += ((Vcells[
cells[i]]/zone_.V())*Tr[i]*E) & upU;
117 <<
"Average centre: " << avgCentre <<
nl
118 <<
"Maximum radius: " << maxR <<
endl;
128 const word& modelType,
148 addRadialActuationDiskAxialInertialResistance
166 addRadialActuationDiskAxialInertialResistance
181 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.
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 dictionary.
Actuation disk source including radial thrust.
virtual void addSup(const volVectorField &U, fvMatrix< vector > &eqn) const
Source term to momentum equation.
radialActuationDisk(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components.
virtual bool read(const dictionary &dict)
Read dictionary.
A class representing the concept of a GeometricField of 1 used to avoid unnecessary manipulations for...
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
addToRunTimeSelectionTable(fvConstraint, bound, dictionary)
defineTypeNameAndDebug(bound, 0)
addBackwardCompatibleToRunTimeSelectionTable(fvConstraint, fixedTemperature, dictionary, fixedTemperatureConstraint, "fixedTemperatureConstraint")
Type gSum(const FieldField< Field, Type > &f)
List< label > labelList
A List of labels.
Tensor< scalar > tensor
Tensor of scalars.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
void pow4(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
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)
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)
Type gMax(const FieldField< Field, Type > &f)