45 mixedFvPatchScalarField(
p, iF),
46 phaseFraction_(
"alpha"),
51 this->refValue() = 0.0;
52 this->refGrad() = 0.0;
53 this->valueFraction() = 0.0;
65 mixedFvPatchScalarField(
p, iF),
66 phaseFraction_(
dict.getOrDefault<
word>(
"phaseFraction",
"alpha")),
68 pRefValue_(
dict.
get<scalar>(
"pRefValue")),
75 if (!this->readValueEntry(
dict))
80 this->refGrad() = 0.0;
81 this->valueFraction() = 0.0;
94 mixedFvPatchScalarField(ptf,
p, iF, mapper),
95 phaseFraction_(ptf.phaseFraction_),
97 pRefValue_(ptf.pRefValue_),
98 pRefPoint_(ptf.pRefPoint_)
108 mixedFvPatchScalarField(ptf),
109 phaseFraction_(ptf.phaseFraction_)
120 mixedFvPatchScalarField(ptf, iF),
121 phaseFraction_(ptf.phaseFraction_),
123 pRefValue_(ptf.pRefValue_),
124 pRefPoint_(ptf.pRefPoint_)
146 valueFraction() =
clamp(alphap, zero_one{});
152 mixedFvPatchScalarField::updateCoeffs();
169 void Foam::phaseHydrostaticPressureFvPatchScalarField::operator=
176 lerp(ptf, refValue(), valueFraction())
188 phaseHydrostaticPressureFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const Type & value() const noexcept
Return const reference to value.
UniformDimensionedField< vector > uniformDimensionedVectorField
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.
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
Lookup type of boundary radiation properties.
Macros for easy insertion into run-time selection tables.
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as: ...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
phaseHydrostaticPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const uniformDimensionedVectorField & g
OBJstream os(runTime.globalPath()/outputName)
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
virtual void operator=(const UList< scalar > &)
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.
scalar pRefValue_
Reference pressure.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual void write(Ostream &) const
Write.
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
static constexpr const zero Zero
Global zero (0)