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 &) | |
Copy constructor. More... | |
virtual tmp< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Copy constructor setting internal field reference. More... | |
virtual tmp< fvPatchScalarField > | clone (const DimensionedField< scalar, volMesh > &iF) const |
Construct and return a clone setting internal field reference. More... | |
virtual bool | assignable () const |
Return 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 co-ordinates | |
= | density (assumed uniform) | |
= | acceleration due to gravity [m/s^2] |
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 136 of file phaseHydrostaticPressureFvPatchScalarField.H.
phaseHydrostaticPressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 37 of file phaseHydrostaticPressureFvPatchScalarField.C.
Referenced by phaseHydrostaticPressureFvPatchScalarField::clone(), and phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
phaseHydrostaticPressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 56 of file phaseHydrostaticPressureFvPatchScalarField.C.
References dictionary::found(), phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField(), scalarField(), and fvPatch::size().
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 89 of file phaseHydrostaticPressureFvPatchScalarField.C.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf | ) |
Copy constructor.
Definition at line 106 of file phaseHydrostaticPressureFvPatchScalarField.C.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Copy constructor setting internal field reference.
Definition at line 117 of file phaseHydrostaticPressureFvPatchScalarField.C.
TypeName | ( | "phaseHydrostaticPressure" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 198 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 215 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
|
inlinevirtual |
Return true: this patch field is altered by assignment.
Definition at line 231 of file phaseHydrostaticPressureFvPatchScalarField.H.
|
inline |
Return the phaseFraction.
Definition at line 240 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseFraction_.
|
inline |
Return reference to the phaseFraction to allow adjustment.
Definition at line 246 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseFraction_.
|
inline |
Return the constant density in the far-field.
Definition at line 252 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::rho_.
|
inline |
Return reference to the constant density in the far-field.
to allow adjustment
Definition at line 259 of file phaseHydrostaticPressureFvPatchScalarField.H.
|
inline |
Return the reference pressure.
Definition at line 265 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return reference to the reference pressure to allow adjustment.
Definition at line 271 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return the pressure reference location.
Definition at line 277 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::operator=(), phaseHydrostaticPressureFvPatchScalarField::pRefPoint_, phaseHydrostaticPressureFvPatchScalarField::updateCoeffs(), and phaseHydrostaticPressureFvPatchScalarField::write().
|
inline |
Return reference to the pressure reference location.
to allow adjustment
Definition at line 284 of file phaseHydrostaticPressureFvPatchScalarField.H.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 132 of file phaseHydrostaticPressureFvPatchScalarField.C.
References g, Foam::max(), Foam::min(), phaseHydrostaticPressureFvPatchScalarField::phaseFraction_, phaseHydrostaticPressureFvPatchScalarField::pRefPoint_, phaseHydrostaticPressureFvPatchScalarField::pRefValue_, and phaseHydrostaticPressureFvPatchScalarField::rho_.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint().
|
virtual |
Write.
Definition at line 161 of file phaseHydrostaticPressureFvPatchScalarField.C.
References phaseHydrostaticPressureFvPatchScalarField::phaseFraction_, phaseHydrostaticPressureFvPatchScalarField::pRefPoint_, phaseHydrostaticPressureFvPatchScalarField::pRefValue_, phaseHydrostaticPressureFvPatchScalarField::rho_, fvPatchField< Type >::write(), and Foam::writeEntry().
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint().
|
virtual |
Definition at line 178 of file phaseHydrostaticPressureFvPatchScalarField.C.
References Foam::makePatchTypeField(), and fvPatchField< Type >::operator.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint().
|
protected |
Name of phase-fraction field.
Definition at line 146 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::phaseFraction(), phaseHydrostaticPressureFvPatchScalarField::updateCoeffs(), and phaseHydrostaticPressureFvPatchScalarField::write().
|
protected |
Constant density in the far-field.
Definition at line 149 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::rho(), phaseHydrostaticPressureFvPatchScalarField::updateCoeffs(), and phaseHydrostaticPressureFvPatchScalarField::write().
|
protected |
Reference pressure.
Definition at line 152 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefValue(), phaseHydrostaticPressureFvPatchScalarField::updateCoeffs(), and phaseHydrostaticPressureFvPatchScalarField::write().
|
protected |
Reference pressure location.
Definition at line 155 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint(), phaseHydrostaticPressureFvPatchScalarField::updateCoeffs(), and phaseHydrostaticPressureFvPatchScalarField::write().