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_)
121 int sign = direction_ ? +1 : -1;
124 scalar volFlowRate = 0;
127 volFlowRate = sign*
gSum(phip);
137 volFlowRate = sign*
gSum(phip/rhop);
142 <<
"dimensions of phi are not correct" 143 <<
"\n on patch " << patch().name()
144 <<
" of field " << internalField().name()
145 <<
" in file " << internalField().objectPath() <<
nl 150 const scalar dp0 = fanCurve_->value(
max(volFlowRate, scalar(0)));
160 writeEntry(os,
"direction", fanFlowDirectionNames_[direction_]);
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
dimensionedScalar sign(const dimensionedScalar &ds)
Run-time selectable general function of one variable.
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...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#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.
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
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.
This boundary condition provides a total pressure condition. Four variants are possible: ...