33 void Foam::fanPressureJumpFvPatchScalarField::calcFanJump()
35 const fvsPatchField<scalar>& phip =
38 const bool massBasedFlux =
41 const scalar dir = reverse_ ? -1 : 1;
44 if(jumpTable_.valid())
51 const fvPatchField<scalar>& rhop =
57 jump_ = dir*
max(jumpTable_->value(Un), scalar(0));
61 scalar volFlowRate = 0;
68 volFlowRate =
gSum(phip/rhop);
72 volFlowRate =
gSum(phip);
76 jump_ = dir*
max(fanCurve_->value(
max(dir*volFlowRate, 0)), 0);
89 fixedJumpFvPatchScalarField(p, iF),
105 fixedJumpFvPatchScalarField(p, iF),
112 if (cyclicPatch().owner())
114 if (dict.
found(
"jumpTable"))
125 if (dict.
found(
"value"))
147 fixedJumpFvPatchScalarField(ptf, p, iF, mapper),
148 fanCurve_(ptf.fanCurve_,
false),
149 jumpTable_(ptf.jumpTable_,
false),
150 reverse_(ptf.reverse_),
151 phiName_(ptf.phiName_),
152 rhoName_(ptf.rhoName_)
161 fixedJumpFvPatchScalarField(ptf),
162 fanCurve_(ptf.fanCurve_,
false),
163 jumpTable_(ptf.jumpTable_,
false),
164 reverse_(ptf.reverse_),
165 phiName_(ptf.phiName_),
166 rhoName_(ptf.rhoName_)
176 fixedJumpFvPatchScalarField(ptf, iF),
177 fanCurve_(ptf.fanCurve_,
false),
178 jumpTable_(ptf.jumpTable_,
false),
179 reverse_(ptf.reverse_),
180 phiName_(ptf.phiName_),
181 rhoName_(ptf.rhoName_)
194 if (cyclicPatch().owner())
199 fixedJumpFvPatchScalarField::updateCoeffs();
207 if (jumpTable_.valid())
writeEntry(os, jumpTable_());
208 if (fanCurve_.valid())
writeEntry(os, fanCurve_());
210 writeEntryIfDifferent<Switch>(os,
"reverse",
false, reverse_);
211 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
212 writeEntryIfDifferent<word>(os,
"rho",
"rho", rhoName_);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
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 > &)
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Macros for easy insertion into run-time selection tables.
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet & dimensions() const
Return dimensions.
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
virtual void write(Ostream &) const
Write.
virtual label size() const
Return size.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
This boundary condition provides a pressure jump condition, using the cyclic condition as a base...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
const dimensionSet dimDensity
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static autoPtr< Function1< Type > > New(const word &entryName, const dictionary &dict)
Selector.
fanPressureJumpFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity