38Foam::phaseHydrostaticPressureFvPatchScalarField::
39phaseHydrostaticPressureFvPatchScalarField
45 mixedFvPatchScalarField(
p, iF),
46 phaseFraction_(
"alpha"),
51 this->refValue() = 0.0;
52 this->refGrad() = 0.0;
53 this->valueFraction() = 0.0;
57Foam::phaseHydrostaticPressureFvPatchScalarField::
58phaseHydrostaticPressureFvPatchScalarField
65 mixedFvPatchScalarField(
p, iF),
66 phaseFraction_(
dict.getOrDefault<
word>(
"phaseFraction",
"alpha")),
67 rho_(
dict.get<scalar>(
"rho")),
68 pRefValue_(
dict.get<scalar>(
"pRefValue")),
87 this->refGrad() = 0.0;
88 this->valueFraction() = 0.0;
92Foam::phaseHydrostaticPressureFvPatchScalarField::
93phaseHydrostaticPressureFvPatchScalarField
101 mixedFvPatchScalarField(ptf,
p, iF, mapper),
102 phaseFraction_(ptf.phaseFraction_),
104 pRefValue_(ptf.pRefValue_),
105 pRefPoint_(ptf.pRefPoint_)
109Foam::phaseHydrostaticPressureFvPatchScalarField::
110phaseHydrostaticPressureFvPatchScalarField
115 mixedFvPatchScalarField(ptf),
116 phaseFraction_(ptf.phaseFraction_)
120Foam::phaseHydrostaticPressureFvPatchScalarField::
121phaseHydrostaticPressureFvPatchScalarField
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));
160 + rho_*((
g.
value() & patch().Cf()) - (
g.
value() & pRefPoint_));
162 mixedFvPatchScalarField::updateCoeffs();
173 writeEntry(
"value",
os);
186 valueFraction()*refValue() + (1 - valueFraction())*ptf
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,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
const Type & value() const
Return const reference to value.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< scalar > &)
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
scalar pRefValue_
Reference pressure.
Lookup type of boundary radiation properties.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.