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 (
dict.found(
"value"))
87 this->refGrad() = 0.0;
88 this->valueFraction() = 0.0;
101 mixedFvPatchScalarField(ptf,
p, iF, mapper),
102 phaseFraction_(ptf.phaseFraction_),
104 pRefValue_(ptf.pRefValue_),
105 pRefPoint_(ptf.pRefPoint_)
115 mixedFvPatchScalarField(ptf),
116 phaseFraction_(ptf.phaseFraction_)
127 mixedFvPatchScalarField(ptf, iF),
128 phaseFraction_(ptf.phaseFraction_),
130 pRefValue_(ptf.pRefValue_),
131 pRefPoint_(ptf.pRefPoint_)
156 valueFraction() =
max(
min(alphap, scalar(1)), scalar(0));
162 mixedFvPatchScalarField::updateCoeffs();
173 writeEntry(
"value",
os);
179 void Foam::phaseHydrostaticPressureFvPatchScalarField::operator=
186 valueFraction()*refValue() + (1 - valueFraction())*ptf
198 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 > &)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void write(Ostream &) const
Write.
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.
static const word null
An empty word.
static const gravity & New(const Time &runTime)
Return cached object or construct on Time.
phaseHydrostaticPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
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)
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.
static constexpr const zero Zero
Global zero (0)