34 template<
class RhoFieldType>
35 void Foam::fv::radialActuationDiskSource::
36 addRadialActuationDiskAxialInertialResistance
41 const RhoFieldType&
rho,
50 E.xx() = uniDiskDir.x();
51 E.yy() = uniDiskDir.y();
52 E.zz() = uniDiskDir.z();
54 const Field<vector> zoneCellCentres(
mesh().cellCentres(),
cells);
55 const Field<scalar> zoneCellVolumes(
mesh().cellVolumes(),
cells);
57 const vector avgCentre =
gSum(zoneCellVolumes*zoneCellCentres)/
set_.
V();
58 const scalar maxR =
gMax(
mag(zoneCellCentres - avgCentre));
62 + radialCoeffs_[1]*
sqr(maxR)/2.0
63 + radialCoeffs_[2]*
pow4(maxR)/3.0;
66 scalar upRho = vGreat;
72 reduce(upU, minOp<vector>());
73 reduce(upRho, minOp<scalar>());
82 *(radialCoeffs_[0] + radialCoeffs_[1]*r2 + radialCoeffs_[2]*
sqr(r2))
91 <<
"Average centre: " << avgCentre <<
nl
92 <<
"Maximum radius: " << maxR <<
endl;
#define forAll(list, i)
Loop across all elements in list.
scalar V() const
Return const access to the total cell volume.
const fvMesh & mesh() const
Return const access to the mesh database.
const word & name() const
Return const access to the source name.
scalar Cp_
Power coefficient.
vector diskDir_
Disk area normal.
fvCellSet set_
The set of cells the fvConstraint applies to.
label upstreamCellId_
Upstream cell ID.
scalar diskArea_
Disk area.
scalar Ct_
Thrust coefficient.
volScalarField scalarField(fieldObject, mesh)
volVectorField vectorField(fieldObject, mesh)
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.
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)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Type gMax(const FieldField< Field, Type > &f)