Public Member Functions | List of all members
totalPressureFvPatchScalarField Class Reference

This boundary condition provides a total pressure condition. Four variants are possible: More...

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

Public Member Functions

 TypeName ("totalPressure")
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
const wordUName () const
 
wordUName ()
 
const wordphiName () const
 
wordphiName ()
 
const wordrhoName () const
 
wordrhoName ()
 
const wordpsiName () const
 
wordpsiName ()
 
scalar gamma () const
 
scalar & gamma ()
 
const scalarFieldp0 () const
 
scalarFieldp0 ()
 
virtual void autoMap (const fvPatchFieldMapper &)
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 
virtual void updateCoeffs (const scalarField &p0p, const vectorField &Up)
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 

Detailed Description

This boundary condition provides a total pressure condition. Four variants are possible:

1. incompressible subsonic:

\[ p_p = p_0 - 0.5 |U|^2 \]

where

$ p_p $ = incompressible pressure at patch [m2/s2]
$ p_0 $ = incompressible total pressure [m2/s2]
$ U $ = velocity

2. compressible subsonic:

\[ p_p = p_0 - 0.5 \rho |U|^2 \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ \rho $ = density [kg/m3]
$ U $ = velocity

3. compressible transonic ( $\gamma = 1$):

\[ p_p = \frac{p_0}{1 + 0.5 \psi |U|^2} \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ G $ = coefficient given by $\frac{\gamma}{1-\gamma}$

4. compressible supersonic ( $\gamma > 1$):

\[ p_p = \frac{p_0}{(1 + 0.5 \psi G |U|^2)^{\frac{1}{G}}} \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = total pressure [Pa]
$ \gamma $ = ratio of specific heats (Cp/Cv)
$ \psi $ = compressibility [m2/s2]
$ G $ = coefficient given by $\frac{\gamma}{1-\gamma}$

The modes of operation are set by the dimensions of the pressure field to which this boundary condition is applied, the psi entry and the value of gamma:

Mode dimensions psi gamma
incompressible subsonic p/rho
compressible subsonic p none
compressible transonic p psi 1
compressible supersonic p psi > 1
Usage
Property Description Required Default value
U Velocity field name no U
phi Flux field name no phi
rho Density field name no rho
psi Compressibility field name no none
gamma (Cp/Cv) no 1
p0 Total pressure yes

Example of the boundary condition specification:

    <patchName>
    {
        type            totalPressure;
        p0              uniform 1e5;
    }
See also
Foam::fixedValueFvPatchField
Source files

Definition at line 252 of file totalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ totalPressureFvPatchScalarField() [1/5]

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

Definition at line 32 of file totalPressureFvPatchScalarField.C.

Referenced by totalPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ totalPressureFvPatchScalarField() [2/5]

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

Definition at line 48 of file totalPressureFvPatchScalarField.C.

References dict, and p.

◆ totalPressureFvPatchScalarField() [3/5]

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

Definition at line 77 of file totalPressureFvPatchScalarField.C.

◆ totalPressureFvPatchScalarField() [4/5]

Definition at line 95 of file totalPressureFvPatchScalarField.C.

◆ totalPressureFvPatchScalarField() [5/5]

Definition at line 110 of file totalPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "totalPressure"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

◆ clone() [2/2]

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

◆ UName() [1/2]

const word& UName ( ) const
inline

◆ UName() [2/2]

word& UName ( )
inline

Definition at line 358 of file totalPressureFvPatchScalarField.H.

◆ phiName() [1/2]

const word& phiName ( ) const
inline

Definition at line 364 of file totalPressureFvPatchScalarField.H.

Referenced by fanPressureFvPatchScalarField::updateCoeffs().

Here is the caller graph for this function:

◆ phiName() [2/2]

word& phiName ( )
inline

Definition at line 371 of file totalPressureFvPatchScalarField.H.

◆ rhoName() [1/2]

const word& rhoName ( ) const
inline

Definition at line 377 of file totalPressureFvPatchScalarField.H.

Referenced by fanPressureFvPatchScalarField::updateCoeffs().

Here is the caller graph for this function:

◆ rhoName() [2/2]

word& rhoName ( )
inline

Definition at line 384 of file totalPressureFvPatchScalarField.H.

◆ psiName() [1/2]

const word& psiName ( ) const
inline

Definition at line 390 of file totalPressureFvPatchScalarField.H.

◆ psiName() [2/2]

word& psiName ( )
inline

Definition at line 397 of file totalPressureFvPatchScalarField.H.

◆ gamma() [1/2]

scalar gamma ( ) const
inline

Definition at line 403 of file totalPressureFvPatchScalarField.H.

◆ gamma() [2/2]

scalar& gamma ( )
inline

Definition at line 409 of file totalPressureFvPatchScalarField.H.

◆ p0() [1/2]

const scalarField& p0 ( ) const
inline

◆ p0() [2/2]

scalarField& p0 ( )
inline

Definition at line 421 of file totalPressureFvPatchScalarField.H.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

Definition at line 128 of file totalPressureFvPatchScalarField.C.

◆ rmap()

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

Definition at line 138 of file totalPressureFvPatchScalarField.C.

◆ updateCoeffs() [1/2]

void updateCoeffs ( const scalarField p0p,
const vectorField Up 
)
virtual

◆ updateCoeffs() [2/2]

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 239 of file totalPressureFvPatchScalarField.C.

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

Referenced by rotatingTotalPressureFvPatchScalarField::write(), and fanPressureFvPatchScalarField::write().

Here is the call graph for this function:
Here is the caller graph for this function:

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