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

Inheritance diagram for totalPressureFvPatchScalarField:
Collaboration diagram for totalPressureFvPatchScalarField:

Public Member Functions

 TypeName ("totalPressure")
 Runtime type information. More...
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 totalPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given totalPressureFvPatchScalarField. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, 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 wordUName () const
 Return the name of the velocity field. More...
 
wordUName ()
 Return reference to the name of the velocity field. More...
 
const wordphiName () const
 Return the name of the flux field. More...
 
wordphiName ()
 Return reference to the name of the flux field. More...
 
const wordrhoName () const
 Return the name of the density field. More...
 
wordrhoName ()
 Return reference to the name of the density field. More...
 
const wordpsiName () const
 Return the name of the compressibility field. More...
 
wordpsiName ()
 Return reference to the name of the compressibility field. More...
 
scalar gamma () const
 Return the heat capacity ratio. More...
 
scalar & gamma ()
 Return reference to the heat capacity ratio to allow adjustment. 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 (const scalarField &p0p, const vectorField &Up)
 Update the coefficients associated with the patch field. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

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 ( <= 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 ( > 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 via the combination of phi, rho, and psi entries:

Mode phi rho psi
incompressible subsonic phi none none
compressible subsonic phi rho none
compressible transonic phi none psi
compressible supersonic phi none psi


Patch usage

Property Description Required Default value
U velocity field name no U
phi flux field name no phi
rho density field name no none
psi compressibility field name no none
gamma ratio of specific heats (Cp/Cv) yes
p0 total pressure yes

Example of the boundary condition specification:

    myPatch
    {
        type            totalPressure;
        U               U;
        phi             phi;
        rho             none;
        psi             none;
        gamma           1.4;
        p0              uniform 1e5;
    }
Note
The default boundary behaviour is for subsonic, incompressible flow.
See Also
Foam::fixedValueFvPatchField
Source files

Definition at line 263 of file totalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

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

Construct from patch and internal field.

Definition at line 36 of file totalPressureFvPatchScalarField.C.

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

Construct from patch, internal field and dictionary.

Definition at line 52 of file totalPressureFvPatchScalarField.C.

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

Here is the call graph for this function:

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

Construct by mapping given totalPressureFvPatchScalarField.

onto a new patch

Definition at line 81 of file totalPressureFvPatchScalarField.C.

Construct as copy.

Definition at line 99 of file totalPressureFvPatchScalarField.C.

Construct as copy setting internal field reference.

Definition at line 114 of file totalPressureFvPatchScalarField.C.

Member Function Documentation

TypeName ( "totalPressure"  )

Runtime type information.

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 329 of file totalPressureFvPatchScalarField.H.

References totalPressureFvPatchScalarField::updateCoeffs().

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.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 346 of file totalPressureFvPatchScalarField.H.

const word& UName ( ) const
inline

Return the name of the velocity field.

Definition at line 362 of file totalPressureFvPatchScalarField.H.

word& UName ( )
inline

Return reference to the name of the velocity field.

to allow adjustment

Definition at line 369 of file totalPressureFvPatchScalarField.H.

const word& phiName ( ) const
inline

Return the name of the flux field.

Definition at line 375 of file totalPressureFvPatchScalarField.H.

word& phiName ( )
inline

Return reference to the name of the flux field.

to allow adjustment

Definition at line 382 of file totalPressureFvPatchScalarField.H.

const word& rhoName ( ) const
inline

Return the name of the density field.

Definition at line 388 of file totalPressureFvPatchScalarField.H.

word& rhoName ( )
inline

Return reference to the name of the density field.

to allow adjustment

Definition at line 395 of file totalPressureFvPatchScalarField.H.

const word& psiName ( ) const
inline

Return the name of the compressibility field.

Definition at line 401 of file totalPressureFvPatchScalarField.H.

word& psiName ( )
inline

Return reference to the name of the compressibility field.

to allow adjustment

Definition at line 408 of file totalPressureFvPatchScalarField.H.

scalar gamma ( ) const
inline

Return the heat capacity ratio.

Definition at line 414 of file totalPressureFvPatchScalarField.H.

scalar& gamma ( )
inline

Return reference to the heat capacity ratio to allow adjustment.

Definition at line 420 of file totalPressureFvPatchScalarField.H.

const scalarField& p0 ( ) const
inline

Return the total pressure.

Definition at line 426 of file totalPressureFvPatchScalarField.H.

scalarField& p0 ( )
inline

Return reference to the total pressure to allow adjustment.

Definition at line 432 of file totalPressureFvPatchScalarField.H.

void autoMap ( const fvPatchFieldMapper m)
virtual

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

Definition at line 132 of file totalPressureFvPatchScalarField.C.

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 142 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::rmap().

Referenced by totalPressureFvPatchScalarField::rmap().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Update the coefficients associated with the patch field.

using the given patch total pressure and velocity fields

Definition at line 157 of file totalPressureFvPatchScalarField.C.

References dimensionedInternalField(), Foam::exit(), FatalErrorIn, magSqr(), Foam::operator==(), pos(), Foam::pow(), and rho.

Referenced by totalPressureFvPatchScalarField::clone(), and totalPressureFvPatchScalarField::updateCoeffs().

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.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 225 of file totalPressureFvPatchScalarField.C.

References totalPressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:

void write ( Ostream os) const
virtual

Write.

Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.

Definition at line 235 of file totalPressureFvPatchScalarField.C.

References write().

Here is the call graph for this function:


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