This boundary condition provides a phase-based hydrostatic pressure condition, calculated as: More...
#include <phaseHydrostaticPressureFvPatchScalarField.H>


Public Member Functions | |
| TypeName ("phaseHydrostaticPressure") | |
| Runtime type information. | |
| phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
| Construct from patch and internal field. | |
| phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
| Construct from patch, internal field and dictionary. | |
| phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
| Construct by mapping given. | |
| phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &) | |
| Construct as copy. | |
| phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
| Construct as copy setting internal field reference. | |
| virtual tmp< fvPatchField< scalar > > | clone () const |
| Return a clone. | |
| virtual tmp< fvPatchField< scalar > > | clone (const DimensionedField< scalar, volMesh > &iF) const |
| Clone with an internal field reference. | |
| virtual bool | assignable () const |
| True: this patch field is altered by assignment. | |
| const word & | phaseFraction () const |
| Return the phaseFraction. | |
| word & | phaseFraction () |
| Return reference to the phaseFraction to allow adjustment. | |
| scalar | rho () const |
| Return the constant density in the far-field. | |
| scalar & | rho () |
| Return reference to the constant density in the far-field. | |
| scalar | pRefValue () const |
| Return the reference pressure. | |
| scalar & | pRefValue () |
| Return reference to the reference pressure to allow adjustment. | |
| const vector & | pRefPoint () const |
| Return the pressure reference location. | |
| vector & | pRefPoint () |
| Return reference to the pressure reference location. | |
| virtual void | updateCoeffs () |
| Update the coefficients associated with the patch field. | |
| virtual void | write (Ostream &) const |
| Write. | |
| virtual void | operator= (const fvPatchScalarField &pvf) |
Protected Attributes | |
| word | phaseFraction_ |
| Name of phase-fraction field. | |
| scalar | rho_ |
| Constant density in the far-field. | |
| scalar | pRefValue_ |
| Reference pressure. | |
| vector | pRefPoint_ |
| Reference pressure location. | |
This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:
![\[ p_{hyd} = p_{ref} + \rho g (x - x_{ref})
\]](form_158.png)
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 31 of file phaseHydrostaticPressureFvPatchScalarField.C.
References p, phaseFraction_, pRefPoint_, pRefValue_, rho_, and Foam::Zero.
Referenced by phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), and TypeName().

| phaseHydrostaticPressureFvPatchScalarField | ( | const fvPatch & | p, |
| const DimensionedField< scalar, volMesh > & | iF, | ||
| const dictionary & | dict ) |
Construct from patch, internal field and dictionary.
Definition at line 50 of file phaseHydrostaticPressureFvPatchScalarField.C.
References dict, fvPatchField< scalar >::operator=(), p, phaseFraction_, pRefPoint_, pRefValue_, fvPatchFieldBase::readDict(), and rho_.

| 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 78 of file phaseHydrostaticPressureFvPatchScalarField.C.
References p, phaseFraction_, phaseHydrostaticPressureFvPatchScalarField(), pRefPoint_, pRefValue_, and rho_.

| phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf | ) |
Construct as copy.
Definition at line 95 of file phaseHydrostaticPressureFvPatchScalarField.C.
References phaseFraction_, and phaseHydrostaticPressureFvPatchScalarField().

| phaseHydrostaticPressureFvPatchScalarField | ( | const phaseHydrostaticPressureFvPatchScalarField & | ptf, |
| const DimensionedField< scalar, volMesh > & | iF ) |
Construct as copy setting internal field reference.
Definition at line 106 of file phaseHydrostaticPressureFvPatchScalarField.C.
References phaseFraction_, phaseHydrostaticPressureFvPatchScalarField(), pRefPoint_, pRefValue_, and rho_.

| TypeName | ( | "phaseHydrostaticPressure" | ) |
Runtime type information.
References phaseHydrostaticPressureFvPatchScalarField().

|
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 237 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 phaseFraction_.
|
inline |
Return reference to the phaseFraction to allow adjustment.
Definition at line 267 of file phaseHydrostaticPressureFvPatchScalarField.H.
References phaseFraction_.
|
inline |
Return the constant density in the far-field.
Definition at line 275 of file phaseHydrostaticPressureFvPatchScalarField.H.
References rho_.
|
inline |
Return reference to the constant density in the far-field.
to allow adjustment
Definition at line 285 of file phaseHydrostaticPressureFvPatchScalarField.H.
References rho_.
|
inline |
Return the reference pressure.
Definition at line 293 of file phaseHydrostaticPressureFvPatchScalarField.H.
References pRefValue_.
|
inline |
Return reference to the reference pressure to allow adjustment.
Definition at line 301 of file phaseHydrostaticPressureFvPatchScalarField.H.
References pRefValue_.
|
inline |
Return the pressure reference location.
Definition at line 309 of file phaseHydrostaticPressureFvPatchScalarField.H.
References pRefPoint_.
|
inline |
Return reference to the pressure reference location.
to allow adjustment
Definition at line 319 of file phaseHydrostaticPressureFvPatchScalarField.H.
References pRefPoint_.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 123 of file phaseHydrostaticPressureFvPatchScalarField.C.
References Foam::clamp(), g, gravity::New(), phaseFraction_, pRefPoint_, pRefValue_, and rho_.

|
virtual |
Write.
Definition at line 149 of file phaseHydrostaticPressureFvPatchScalarField.C.
References os(), phaseFraction_, pRefPoint_, pRefValue_, rho_, fvPatchField< Type >::write(), and fvPatchField< Type >::writeValueEntry().

|
virtual |
Definition at line 162 of file phaseHydrostaticPressureFvPatchScalarField.C.
References Foam::lerp().

|
protected |
Name of phase-fraction field.
Definition at line 149 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseFraction(), phaseFraction(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), updateCoeffs(), and write().
|
protected |
Constant density in the far-field.
Definition at line 154 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), rho(), rho(), updateCoeffs(), and write().
|
protected |
Reference pressure.
Definition at line 159 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), pRefValue(), pRefValue(), updateCoeffs(), and write().
|
protected |
Reference pressure location.
Definition at line 164 of file phaseHydrostaticPressureFvPatchScalarField.H.
Referenced by phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), phaseHydrostaticPressureFvPatchScalarField(), pRefPoint(), pRefPoint(), updateCoeffs(), and write().