45 mixedFvPatchScalarField(
p, iF),
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")),
67 rho_(
dict.get<scalar>(
"rho")),
68 pRefValue_(
dict.get<scalar>(
"pRefValue")),
75 if (!this->readValueEntry(
dict))
80 this->refGrad() = 0.0;
81 this->valueFraction() = 0.0;
88 const phaseHydrostaticPressureFvPatchScalarField& ptf,
90 const DimensionedField<scalar, volMesh>& iF,
91 const fvPatchFieldMapper& mapper
94 mixedFvPatchScalarField(ptf,
p, iF, mapper),
108 mixedFvPatchScalarField(ptf),
120 mixedFvPatchScalarField(ptf, iF),
121 phaseFraction_(ptf.phaseFraction_),
146 valueFraction() =
clamp(alphap, zero_one{});
152 mixedFvPatchScalarField::updateCoeffs();
159 os.writeEntryIfDifferent<
word>(
"phaseFraction",
"alpha", phaseFraction_);
160 os.writeEntry(
"rho", rho_);
161 os.writeEntry(
"pRefValue", pRefValue_);
169void Foam::phaseHydrostaticPressureFvPatchScalarField::operator=
174 fvPatchScalarField::operator=
176 lerp(ptf, refValue(), valueFraction())
188 phaseHydrostaticPressureFvPatchScalarField
Macros for easy insertion into run-time selection tables.
const uniformDimensionedVectorField & g
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void readDict(const dictionary &dict)
Read dictionary entries.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void operator=(const UList< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:
word phaseFraction_
Name of phase-fraction field.
virtual void write(Ostream &) const
Write.
scalar rho_
Constant density in the far-field.
vector pRefPoint_
Reference pressure location.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
phaseHydrostaticPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
scalar pRefValue_
Reference pressure.
Lookup type of boundary radiation properties.
A class for handling words, derived from Foam::string.
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
UniformDimensionedField< vector > uniformDimensionedVectorField
static constexpr const zero Zero
Global zero (0).
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
fvPatchField< scalar > fvPatchScalarField