77 direction_(fanFlowDirectionNames_.read(dict.
lookup(
"direction")))
90 fanCurve_(pfopsf.fanCurve_,
false),
91 direction_(pfopsf.direction_)
102 fanCurve_(pfopsf.fanCurve_,
false),
103 direction_(pfopsf.direction_)
122 const int sign = direction_ ? +1 : -1;
125 scalar volFlowRate = 0;
128 volFlowRate = sign*
gSum(phip);
138 volFlowRate = sign*
gSum(phip/rhop);
143 <<
"dimensions of phi are not correct" 144 <<
"\n on patch " << patch().name()
145 <<
" of field " << internalField().name()
146 <<
" in file " << internalField().objectPath() <<
nl 151 const scalar dp0 = fanCurve_->value(
max(volFlowRate, scalar(0)));
165 writeEntry(os,
"direction", fanFlowDirectionNames_[direction_]);
dimensionedScalar sign(const dimensionedScalar &ds)
Run-time selectable general function of one variable.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition can be applied to assign either a pressure inlet or outlet total pressure con...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Initialise the NamedEnum HashTable from the static list of names.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Type gSum(const FieldField< Field, Type > &f)
Foam::fvPatchFieldMapper.
const dimensionSet dimFlux
void updateCoeffs(const scalarField &p0p, const scalarField &K0mKp)
Update the coefficients associated with the patch field.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
fanFlowDirection
Fan flow direction.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
const dimensionSet dimMassFlux
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const DimensionedField< Type, surfaceMesh > & internalField() const
Return dimensioned internal field reference.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static const NamedEnum< fanFlowDirection, 2 > fanFlowDirectionNames_
Fan flow directions names.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
fanPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Inflow, outflow and entrainment pressure boundary condition based on a constant total pressure assump...