78 meanValue_(ptf.meanValue_.clone())
89 meanValue_(ptf.meanValue_.clone())
101 meanValue_(ptf.meanValue_.clone())
115 const scalar t = this->db().time().timeOutputValue();
116 Type meanValue = meanValue_->value(t);
118 Field<Type> newValues(this->patchInternalField());
124 if (
mag(meanValue) > SMALL &&
mag(meanValuePsi) > 0.5*
mag(meanValue))
126 newValues *=
mag(meanValue)/
mag(meanValuePsi);
130 newValues += (meanValue - meanValuePsi);
133 this->refValue() = newValues;
143 meanValue_->writeData(
os);
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &) const
Write.
virtual Field< Type > & refValue()
Type gSum(const FieldField< Field, Type > &f)
A class for handling words, derived from Foam::string.
virtual scalarField & valueFraction()
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
fixedMeanOutletInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
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...
const std::string patch
OpenFOAM patch number as a std::string.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
word phiName_
Name of flux field (default: phi)
virtual Field< Type > & refGrad()
This boundary condition provides a generic inflow condition, with specified outflow for the case of r...
static constexpr const zero Zero
Global zero (0)
This boundary condition extrapolates field to the patch using the near-cell values and adjusts the di...