43 mixedFvPatchScalarField(
p, iF,
dict, false),
44 phaseFraction_(
dict.lookupOrDefault<
word>(
"phaseFraction",
"alpha")),
51 if (
dict.found(
"value"))
63 this->refGrad() = 0.0;
64 this->valueFraction() = 0.0;
77 mixedFvPatchScalarField(ptf,
p, iF, mapper),
78 phaseFraction_(ptf.phaseFraction_),
80 pRefValue_(ptf.pRefValue_),
81 pRefPoint_(ptf.pRefPoint_)
92 mixedFvPatchScalarField(ptf, iF),
93 phaseFraction_(ptf.phaseFraction_),
95 pRefValue_(ptf.pRefValue_),
96 pRefPoint_(ptf.pRefPoint_)
115 const uniformDimensionedVectorField& g =
116 db().lookupObject<uniformDimensionedVectorField>(
"g");
121 valueFraction() =
max(
min(alphap, scalar(1)), scalar(0));
125 + rho_*((g.value() & patch().Cf()) - (g.value() & pRefPoint_));
127 mixedFvPatchScalarField::updateCoeffs();
134 if (phaseFraction_ !=
"alpha")
136 writeEntry(os,
"phaseFraction", phaseFraction_);
147 void Foam::phaseHydrostaticPressureFvPatchScalarField::operator=
154 valueFraction()*refValue() + (1 - valueFraction())*ptf
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base class for field mapping.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
virtual void operator=(const UList< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
phaseHydrostaticPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
scalar pRefValue_
Reference pressure.
A class for handling words, derived from string.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
const dimensionSet & dimLength
makePatchTypeField(fvPatchScalarField, atmosphericBoundaryLayerTurbulentEpsilonFvPatchScalarField)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
VolField< scalar > volScalarField
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimDensity
const dimensionSet & dimPressure
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)