Public Member Functions | List of all members
uniformDensityHydrostaticPressureFvPatchScalarField Class Reference

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

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

Public Member Functions

 TypeName ("uniformDensityHydrostaticPressure")
 
 uniformDensityHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 uniformDensityHydrostaticPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 uniformDensityHydrostaticPressureFvPatchScalarField (const uniformDensityHydrostaticPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
scalar rho () const
 
scalar & rho ()
 
scalar pRefValue () const
 
scalar & pRefValue ()
 
const vectorpRefPoint () const
 
vectorpRefPoint ()
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 

Detailed Description

This boundary condition provides a 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]
Usage
Property Description Required Default value
rho uniform density [kg/m3] yes
pRefValue reference pressure [Pa] yes
pRefPoint reference pressure location yes

Example of the boundary condition specification:

    <patchName>
    {
        type            uniformDensityHydrostaticPressure;
        rho             rho;
        pRefValue       1e5;
        pRefPoint       (0 0 0);
        value           uniform 0; // optional initial value
    }
Source files

Definition at line 123 of file uniformDensityHydrostaticPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [1/5]

Definition at line 32 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

Referenced by uniformDensityHydrostaticPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [2/5]

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

Definition at line 46 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References dict, Foam::stringOps::evaluate(), and p.

Here is the call graph for this function:

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [3/5]

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [4/5]

◆ uniformDensityHydrostaticPressureFvPatchScalarField() [5/5]

Member Function Documentation

◆ TypeName()

TypeName ( "uniformDensityHydrostaticPressure"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

◆ clone() [2/2]

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

◆ 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

Definition at line 116 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

References g, gravity::New(), and Foam::foamVersion::patch.

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Definition at line 137 of file uniformDensityHydrostaticPressureFvPatchScalarField.C.

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

Here is the call graph for this function:

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