totalPressureFvPatchScalarField Class Reference

Inflow, outflow and entrainment pressure boundary condition based on a constant total pressure assumption. 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 > &, 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 &)=delete
 Disallow copy without setting internal field reference. More...
 
 totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from dynamicPressureFvPatchScalarField
 TypeName ("dynamicPressure")
 Runtime type information. More...
 
 dynamicPressureFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given dynamicPressureFvPatchScalarField. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &)=delete
 Disallow copy without setting internal field reference. More...
 
 dynamicPressureFvPatchScalarField (const dynamicPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual void map (const fvPatchScalarField &, const fvPatchFieldMapper &)
 Map the given fvPatchField onto this fvPatchField. More...
 
virtual void reset (const fvPatchScalarField &)
 Reset the fvPatchField to the given fvPatchField. More...
 

Protected Attributes

const word UName_
 Name of the velocity field. More...
 
const word phiName_
 Name of the flux field. More...
 
- Protected Attributes inherited from dynamicPressureFvPatchScalarField
const word rhoName_
 Name of the density field used to normalise the mass flux. More...
 
const word psiName_
 Name of the compressibility field used to calculate the wave speed. More...
 
const scalar gamma_
 Heat capacity ratio. More...
 
scalarField p0_
 Reference pressure. More...
 

Additional Inherited Members

- Protected Member Functions inherited from dynamicPressureFvPatchScalarField
void updateCoeffs (const scalarField &p0p, const scalarField &K0mKp)
 Update the coefficients associated with the patch field. More...
 

Detailed Description

Inflow, outflow and entrainment pressure boundary condition based on a constant total pressure assumption.

For outflow the patch pressure is set to the external static pressure.

For inflow the patch pressure is evaluated from the patch velocity and the external total pressure obtained from the external static pressure p_0 and external velocity U_0 which is looked-up from the the optional tangentialVelocity entry in the pressureInletOutletVelocity velocity boundary condition for the patch if that boundary condition is used, otherwise U_0 is assumed zero and the external total pressure is equal to the external static pressure.

The patch pressure is evaluated from the external conditions using one of the following expressions depending on the flow conditions and specification of compressibility:

1. incompressible subsonic:

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

where

$ p_p $ = pressure at patch [m^2/s^2]
$ p_0 $ = external static pressure [m^2/s^2]
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

2. compressible subsonic:

\[ p_p = p_0 + \rho (0.5 |U_0|^2 - 0.5 |U|^2) \]

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = external static pressure [Pa]
$ \rho $ = density [kg/m^3]
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

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

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

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = external static pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ \rho $ = density [kg/m^3]
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

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

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

where

$ p_p $ = pressure at patch [Pa]
$ p_0 $ = external static pressure [Pa]
$ \psi $ = compressibility [m^2/s^2]
$ \rho $ = density [kg/m^3]
$ G $ = coefficient given by $\frac{\gamma}{1-\gamma}$ []
$ \gamma $ = ratio of specific heats (Cp/Cv) []
$ U $ = velocity [m/s]
$ U_0 $ = external velocity [m/s]

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 External pressure yes

Example of the boundary condition specification:

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

Definition at line 307 of file totalPressureFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ totalPressureFvPatchScalarField() [1/4]

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

Construct from patch, internal field and dictionary.

Definition at line 35 of file totalPressureFvPatchScalarField.C.

Referenced by totalPressureFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ totalPressureFvPatchScalarField() [2/4]

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 48 of file totalPressureFvPatchScalarField.C.

◆ totalPressureFvPatchScalarField() [3/4]

Disallow copy without setting internal field reference.

◆ totalPressureFvPatchScalarField() [4/4]

Copy constructor setting internal field reference.

Definition at line 62 of file totalPressureFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "totalPressure"  )

Runtime type information.

◆ clone()

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

Construct and return a clone setting internal field reference.

Reimplemented in rotatingTotalPressureFvPatchScalarField, and fanPressureFvPatchScalarField.

Definition at line 362 of file totalPressureFvPatchScalarField.H.

References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Reimplemented in rotatingTotalPressureFvPatchScalarField, and fanPressureFvPatchScalarField.

Definition at line 76 of file totalPressureFvPatchScalarField.C.

References Foam::magSqr(), Foam::neg(), pressureInletOutletVelocityFvPatchVectorField::tangentialVelocity(), and dynamicPressureFvPatchScalarField::updateCoeffs().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from dynamicPressureFvPatchScalarField.

Reimplemented in rotatingTotalPressureFvPatchScalarField, and fanPressureFvPatchScalarField.

Definition at line 112 of file totalPressureFvPatchScalarField.C.

References dynamicPressureFvPatchScalarField::write().

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

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

Member Data Documentation

◆ UName_

const word UName_
protected

Name of the velocity field.

Definition at line 316 of file totalPressureFvPatchScalarField.H.

◆ phiName_

const word phiName_
protected

Name of the flux field.

Definition at line 319 of file totalPressureFvPatchScalarField.H.


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