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

This boundary condition provides static pressure condition for p_rgh, calculated as: More...

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

Public Member Functions

 TypeName ("prghTotalPressure")
 Runtime type information. More...
 
 prghTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 prghTotalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 prghTotalPressureFvPatchScalarField (const prghTotalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
const scalarFieldp0 () const
 Return the total pressure. More...
 
scalarFieldp0 ()
 Return reference to the total pressure to allow adjustment. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Protected Attributes

word UName_
 Name of the velocity field. More...
 
word phiName_
 Name of the flux transporting the field. More...
 
word rhoName_
 Name of phase-fraction field. More...
 
scalarField p0_
 Total pressure. More...
 

Detailed Description

This boundary condition provides static pressure condition for p_rgh, calculated as:

\[ p_rgh = p - \rho g (h - hRef) p = p0 - 0.5 \rho |U|^2 \]

where

$ p_rgh $ = Pseudo hydrostatic pressure [Pa]
$ p $ = Static pressure [Pa]
$ p0 $ = Total pressure [Pa]
$ h $ = Height in the opposite direction to gravity
$ hRef $ = Reference height in the opposite direction to gravity
$ \rho $ = density
$ g $ = acceleration due to gravity [m/s^2]


Patch usage

Property Description Required Default value
U velocity field name no U
phi flux field name no phi
rho density field name no rho
p0 total pressure yes

Example of the boundary condition specification:

    myPatch
    {
        type            prghTotalPressure;
        U               U;
        phi             phi;
        rho             rho;
        p0              uniform 0;
        value           uniform 0; // optional initial value
    }
See also
Foam::fixedValueFvPatchScalarField
Source files

Definition at line 147 of file prghTotalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

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

Construct from patch and internal field.

Definition at line 37 of file prghTotalPressureFvPatchScalarField.C.

Referenced by prghTotalPressureFvPatchScalarField::clone(), and prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the caller graph for this function:

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

Construct from patch, internal field and dictionary.

Definition at line 52 of file prghTotalPressureFvPatchScalarField.C.

References dictionary::found(), prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField(), scalarField(), and fvPatch::size().

Here is the call graph for this function:

prghTotalPressureFvPatchScalarField ( const prghTotalPressureFvPatchScalarField ptf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given.

prghTotalPressureFvPatchScalarField onto a new patch

Definition at line 80 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

Construct as copy.

Definition at line 97 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

Construct as copy setting internal field reference.

Definition at line 111 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::autoMap().

Here is the call graph for this function:

Member Function Documentation

TypeName ( "prghTotalPressure"  )

Runtime type information.

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 209 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

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

Construct and return a clone setting internal field reference.

Definition at line 226 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

const scalarField& p0 ( ) const
inline

Return the total pressure.

Definition at line 242 of file prghTotalPressureFvPatchScalarField.H.

References prghTotalPressureFvPatchScalarField::p0_.

scalarField& p0 ( )
inline
void autoMap ( const fvPatchFieldMapper m)
virtual

Map (and resize as needed) from self given a mapping object.

Definition at line 127 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::rmap().

Referenced by prghTotalPressureFvPatchScalarField::p0(), and prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField().

Here is the call graph for this function:

Here is the caller graph for this function:

void rmap ( const fvPatchScalarField ptf,
const labelList addr 
)
virtual

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 137 of file prghTotalPressureFvPatchScalarField.C.

References prghTotalPressureFvPatchScalarField::p0_, and prghTotalPressureFvPatchScalarField::rmap().

Referenced by prghTotalPressureFvPatchScalarField::autoMap(), prghTotalPressureFvPatchScalarField::p0(), and prghTotalPressureFvPatchScalarField::rmap().

Here is the call graph for this function:

Here is the caller graph for this function:

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 151 of file prghTotalPressureFvPatchScalarField.C.

References Foam::cmptMag(), Foam::dimLength, g, Foam::mag(), Foam::magSqr(), prghTotalPressureFvPatchScalarField::p0_, prghTotalPressureFvPatchScalarField::phiName_, Foam::pos(), prghTotalPressureFvPatchScalarField::rhoName_, and prghTotalPressureFvPatchScalarField::UName_.

Referenced by prghTotalPressureFvPatchScalarField::p0().

Here is the call graph for this function:

Here is the caller graph for this function:

void write ( Ostream os) const
virtual

Member Data Documentation

word UName_
protected
word phiName_
protected

Name of the flux transporting the field.

Definition at line 160 of file prghTotalPressureFvPatchScalarField.H.

Referenced by prghTotalPressureFvPatchScalarField::updateCoeffs(), and prghTotalPressureFvPatchScalarField::write().

word rhoName_
protected
scalarField p0_
protected

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