45 radialActuationDiskSource,
46 "radialActuationDiskSource"
53 void Foam::fv::radialActuationDisk::readCoeffs()
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)/set_.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);
104 scalar r2 =
magSqr(mesh().cellCentres()[
cells[i]] - avgCentre);
108 *(radialCoeffs_[0] + radialCoeffs_[1]*r2 + radialCoeffs_[2]*
sqr(r2))
111 Usource[
cells[i]] += ((Vcells[
cells[i]]/set_.V())*Tr[i]*E) & upU;
117 <<
"Average centre: " << avgCentre <<
nl
118 <<
"Maximum radius: " << maxR <<
endl;
128 const word& modelType,
148 addRadialActuationDiskAxialInertialResistance
166 addRadialActuationDiskAxialInertialResistance
#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 keyword definitions, which are a keyword followed by any number of values (e....
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 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.
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Tensor< scalar > tensor
Tensor of scalars.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
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)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionedScalar pow4(const dimensionedScalar &ds)
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 > &)
Type gMax(const FieldField< Field, Type > &f)