This boundary condition provides a phase-based hydrostatic pressure condition, calculated as: More...
Public Member Functions | |
TypeName ("phaseHydrostaticPressure") | |
Runtime type information. More... | |
phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
Construct from patch and internal field. More... | |
phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
Construct by mapping given. More... | |
phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &) | |
Construct as copy. More... | |
phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchField< scalar > > | clone () const |
Return a clone. More... | |
virtual tmp< fvPatchField< scalar > > | clone (const DimensionedField< scalar, volMesh > &iF) const |
Clone with an internal field reference. More... | |
virtual bool | assignable () const |
True: this patch field is altered by assignment. More... | |
const word & | phaseFraction () const |
Return the phaseFraction. More... | |
word & | phaseFraction () |
Return reference to the phaseFraction to allow adjustment. More... | |
scalar | rho () const |
Return the constant density in the far-field. More... | |
scalar & | rho () |
Return reference to the constant density in the far-field. More... | |
scalar | pRefValue () const |
Return the reference pressure. More... | |
scalar & | pRefValue () |
Return reference to the reference pressure to allow adjustment. More... | |
const vector & | pRefPoint () const |
Return the pressure reference location. More... | |
vector & | pRefPoint () |
Return reference to the pressure reference location. More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
virtual void | operator= (const fvPatchScalarField &pvf) |
Protected Attributes | |
word | phaseFraction_ |
Name of phase-fraction field. More... | |
scalar | rho_ |
Constant density in the far-field. More... | |
scalar | pRefValue_ |
Reference pressure. More... | |
vector | pRefPoint_ |
Reference pressure location. More... | |
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:
where
= | hyrostatic pressure [Pa] | |
= | reference pressure [Pa] | |
= | reference point in Cartesian coordinates | |
= | density (assumed uniform) | |
= | acceleration due to gravity [m/s2] |
The values are assigned according to the phase-fraction field:
Property | Description | Required | Default value |
---|---|---|---|
phaseFraction | phase-fraction field name | no | alpha |
rho | density field name | no | rho |
pRefValue | reference pressure [Pa] | yes | |
pRefPoint | reference pressure location | yes |
Example of the boundary condition specification:
<patchName> { type phaseHydrostaticPressure; phaseFraction alpha1; rho rho; pRefValue 1e5; pRefPoint (0 0 0); value uniform 0; // optional initial value }
Definition at line 137 of file phaseHydrostaticPressureFvPatchScalarField.H.
phaseHydrostaticPressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 33 of file phaseHydrostaticPressureFvPatchScalarField.C.
phaseHydrostaticPressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 52 of file phaseHydrostaticPressureFvPatchScalarField.C.
References dict.
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf, |
const fvPatch & | p, | ||
const DimensionedField< scalar, volMesh > & | iF, | ||
const fvPatchFieldMapper & | mapper | ||
) |
Construct by mapping given.
phaseHydrostaticPressureFvPatchScalarField onto a new patch
Definition at line 80 of file phaseHydrostaticPressureFvPatchScalarField.C.
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf | ) |
Construct as copy.
Definition at line 97 of file phaseHydrostaticPressureFvPatchScalarField.C.
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 108 of file phaseHydrostaticPressureFvPatchScalarField.C.
TypeName | ( | "phaseHydrostaticPressure" | ) |
Runtime type information.
|
inlinevirtual |
Return a clone.
Definition at line 229 of file phaseHydrostaticPressureFvPatchScalarField.H.
References fvPatchField< Type >::Clone().
|
inlinevirtual |
Clone with an internal field reference.
Definition at line 238 of file phaseHydrostaticPressureFvPatchScalarField.H.
References fvPatchField< Type >::Clone().
|
inlinevirtual |
True: this patch field is altered by assignment.
Definition at line 251 of file phaseHydrostaticPressureFvPatchScalarField.H.
|
inline |
Return the phaseFraction.
Definition at line 259 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseFraction_.
|
inline |
Return reference to the phaseFraction to allow adjustment.
Definition at line 267 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseFraction_.
|
inline |
Return the constant density in the far-field.
Definition at line 275 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::rho_.
|
inline |
Return reference to the constant density in the far-field.
to allow adjustment
Definition at line 285 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::rho_.
|
inline |
Return the reference pressure.
Definition at line 293 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return reference to the reference pressure to allow adjustment.
Definition at line 301 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return the pressure reference location.
Definition at line 309 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefPoint_.
|
inline |
Return reference to the pressure reference location.
to allow adjustment
Definition at line 319 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefPoint_.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 123 of file phaseHydrostaticPressureFvPatchScalarField.C.
References Foam::clamp(), g, gravity::New(), Foam::foamVersion::patch, phaseHydrostaticPressureFvPatchScalarField::phaseFraction_, phaseHydrostaticPressureFvPatchScalarField::pRefPoint_, phaseHydrostaticPressureFvPatchScalarField::pRefValue_, and phaseHydrostaticPressureFvPatchScalarField::rho_.
|
virtual |
Write.
Definition at line 149 of file phaseHydrostaticPressureFvPatchScalarField.C.
References os(), fvPatchField< Type >::write(), Ostream::writeEntry(), Ostream::writeEntryIfDifferent(), and fvPatchField< Type >::writeValueEntry().
|
virtual |
Definition at line 163 of file phaseHydrostaticPressureFvPatchScalarField.C.
References Foam::lerp(), and fvPatchField< scalar >::operator.
|
protected |
Name of phase-fraction field.
Definition at line 149 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::phaseFraction(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Constant density in the far-field.
Definition at line 154 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::rho(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Reference pressure.
Definition at line 159 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefValue(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Reference pressure location.
Definition at line 164 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().