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... | |
virtual tmp< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy 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... | |
const word & | phaseName () const |
Return the phaseName. More... | |
word & | phaseName () |
Return reference to the phaseName 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 | phaseName_ |
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/s2] |
The values are assigned according to the phase-fraction field:
Patch usage
Property | Description | Required | Default value |
---|---|---|---|
phaseName | phase 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:
myPatch { type phaseHydrostaticPressure; phaseName alpha1; rho rho; pRefValue 1e5; pRefPoint (0 0 0); value uniform 0; // optional initial value }
Definition at line 140 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().
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 dict, p, and scalarField().
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.
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf | ) |
Construct as copy.
Definition at line 106 of file phaseHydrostaticPressureFvPatchScalarField.C.
phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy 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 202 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 219 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseHydrostaticPressureFvPatchScalarField().
|
inline |
Return the phaseName.
Definition at line 235 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseName_.
|
inline |
Return reference to the phaseName to allow adjustment.
Definition at line 241 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::phaseName_.
|
inline |
Return the constant density in the far-field.
Definition at line 247 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::rho_.
|
inline |
Return reference to the constant density in the far-field.
to allow adjustment
Definition at line 254 of file phaseHydrostaticPressureFvPatchScalarField.H.
|
inline |
Return the reference pressure.
Definition at line 260 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return reference to the reference pressure to allow adjustment.
Definition at line 266 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefValue_.
|
inline |
Return the pressure reference location.
Definition at line 272 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseHydrostaticPressureFvPatchScalarField::pRefPoint_.
|
inline |
Return reference to the pressure reference location.
to allow adjustment
Definition at line 279 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::phaseName_, phaseHydrostaticPressureFvPatchScalarField::pRefPoint_, phaseHydrostaticPressureFvPatchScalarField::pRefValue_, and phaseHydrostaticPressureFvPatchScalarField::rho_.
|
virtual |
Write.
Definition at line 161 of file phaseHydrostaticPressureFvPatchScalarField.C.
References token::END_STATEMENT, Foam::nl, fvPatchField::write(), and Ostream::writeKeyword().
|
virtual |
Definition at line 179 of file phaseHydrostaticPressureFvPatchScalarField.C.
References fvPatchField::operator.
|
protected |
Name of phase-fraction field.
Definition at line 150 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::phaseName(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Constant density in the far-field.
Definition at line 153 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::rho(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Reference pressure.
Definition at line 156 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefValue(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
|
protected |
Reference pressure location.
Definition at line 159 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField::pRefPoint(), and phaseHydrostaticPressureFvPatchScalarField::updateCoeffs().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.