40 fixedJumpFvPatchScalarField(
p, iF,
dict, true),
44 ?
dict.lookupOrDefault<
word>(
"phi",
"phi")
50 ?
dict.lookupOrDefault<
word>(
"rho",
"rho")
55 reverse_(
dict.lookupOrDefault<
Switch>(
"reverse", false))
57 if (cyclicPatch().owner())
59 if (!
dict.found(
"fanCurve") &&
dict.found(
"jumpTable"))
95 fixedJumpFvPatchScalarField(ptf,
p, iF, mapper),
96 phiName_(ptf.phiName_),
97 rhoName_(ptf.rhoName_),
98 fanCurve_(ptf.fanCurve_, false),
99 jumpTable_(ptf.jumpTable_, false),
100 reverse_(ptf.reverse_)
110 fixedJumpFvPatchScalarField(ptf, iF),
111 phiName_(ptf.phiName_),
112 rhoName_(ptf.rhoName_),
113 fanCurve_(ptf.fanCurve_, false),
114 jumpTable_(ptf.jumpTable_, false),
115 reverse_(ptf.reverse_)
128 if (cyclicPatch().owner())
133 const scalar
sign = reverse_ ? -1 : 1;
135 if (fanCurve_.valid())
139 scalar volFlowRate = 0;
143 volFlowRate =
gSum(phip);
153 volFlowRate =
gSum(phip/rhop);
158 <<
"dimensions of phi are not correct"
159 <<
"\n on patch " << patch().name()
160 <<
" of field " << internalField().name()
161 <<
" in file " << internalField().objectPath() <<
nl
165 jumpRef() =
sign*
max(fanCurve_->value(
max(
sign*volFlowRate, 0)), 0);
190 <<
"dimensions of phi are not correct"
191 <<
"\n on patch " << patch().name()
192 <<
" of field " << internalField().name()
193 <<
" in file " << internalField().objectPath() <<
nl
197 jumpRef() =
sign*
max(jumpTable_->value(Un), scalar(0));
201 fixedJumpFvPatchScalarField::updateCoeffs();
209 if (cyclicPatch().owner())
211 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
212 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
214 if (fanCurve_.valid())
223 writeEntryIfDifferent<Switch>(os,
"reverse",
false, reverse_);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
static autoPtr< Function1< Type > > New(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Select from dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
This boundary condition provides a fan pressure jump condition, using the cyclic condition as a base....
virtual void write(Ostream &) const
Write.
fanPressureJumpFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Abstract base class for field mapping.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
const DimensionedField< Type, surfaceMesh > & internalField() const
Return dimensioned internal field reference.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar sign(const dimensionedScalar &ds)
const dimensionSet dimMassFlux
const dimensionSet dimVolumetricFlux
SurfaceField< scalar > surfaceScalarField
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimVelocity
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)