Public Member Functions | Protected Attributes | List of all members
phaseHydrostaticPressureFvPatchScalarField Class Reference

This boundary condition provides a phase-based hydrostatic pressure condition, calculated as: More...

Inheritance diagram for phaseHydrostaticPressureFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for phaseHydrostaticPressureFvPatchScalarField:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("phaseHydrostaticPressure")
 
 phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 phaseHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 phaseHydrostaticPressureFvPatchScalarField (const phaseHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
virtual bool assignable () const
 
const wordphaseFraction () const
 
wordphaseFraction ()
 
scalar rho () const
 
scalar & rho ()
 
scalar pRefValue () const
 
scalar & pRefValue ()
 
const vectorpRefPoint () const
 
vectorpRefPoint ()
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 
virtual void operator= (const fvPatchScalarField &pvf)
 

Protected Attributes

word phaseFraction_
 
scalar rho_
 
scalar pRefValue_
 
vector pRefPoint_
 

Detailed Description

This boundary condition provides a phase-based hydrostatic pressure condition, calculated as:

\[ p_{hyd} = p_{ref} + \rho g (x - x_{ref}) \]

where

$ p_{hyd} $ = hyrostatic pressure [Pa]
$ p_{ref} $ = reference pressure [Pa]
$ x_{ref} $ = reference point in Cartesian coordinates
$ \rho $ = density (assumed uniform)
$ g $ = acceleration due to gravity [m/s2]

The values are assigned according to the phase-fraction field:

Usage
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
    }
See also
Foam::mixedFvPatchScalarField
Source files

Definition at line 137 of file phaseHydrostaticPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ phaseHydrostaticPressureFvPatchScalarField() [1/5]

phaseHydrostaticPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Definition at line 33 of file phaseHydrostaticPressureFvPatchScalarField.C.

Referenced by phaseHydrostaticPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ phaseHydrostaticPressureFvPatchScalarField() [2/5]

phaseHydrostaticPressureFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Definition at line 52 of file phaseHydrostaticPressureFvPatchScalarField.C.

References dict, and p.

◆ phaseHydrostaticPressureFvPatchScalarField() [3/5]

Definition at line 87 of file phaseHydrostaticPressureFvPatchScalarField.C.

◆ phaseHydrostaticPressureFvPatchScalarField() [4/5]

◆ phaseHydrostaticPressureFvPatchScalarField() [5/5]

Member Function Documentation

◆ TypeName()

TypeName ( "phaseHydrostaticPressure"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

◆ clone() [2/2]

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

◆ assignable()

virtual bool assignable ( ) const
inlinevirtual

◆ phaseFraction() [1/2]

const word& phaseFraction ( ) const
inline

◆ phaseFraction() [2/2]

word& phaseFraction ( )
inline

◆ rho() [1/2]

scalar rho ( ) const
inline

◆ rho() [2/2]

scalar& rho ( )
inline

◆ pRefValue() [1/2]

scalar pRefValue ( ) const
inline

◆ pRefValue() [2/2]

scalar& pRefValue ( )
inline

◆ pRefPoint() [1/2]

const vector& pRefPoint ( ) const
inline

◆ pRefPoint() [2/2]

vector& pRefPoint ( )
inline

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Definition at line 159 of file phaseHydrostaticPressureFvPatchScalarField.C.

References os(), fvPatchField::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

◆ operator=()

void operator= ( const fvPatchScalarField pvf)
virtual

Member Data Documentation

◆ phaseFraction_

word phaseFraction_
protected

◆ rho_

scalar rho_
protected

◆ pRefValue_

scalar pRefValue_
protected

◆ pRefPoint_

vector pRefPoint_
protected

The documentation for this class was generated from the following files: