This boundary condition provides a total pressure condition. Four variants are possible: More...
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< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
totalPressureFvPatchScalarField (const totalPressureFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchScalarField > | clone (const DimensionedField< scalar, volMesh > &iF) const |
Construct and return a clone setting internal field reference. More... | |
const word & | UName () const |
Return the name of the velocity field. More... | |
word & | UName () |
Return reference to the name of the velocity field. More... | |
const word & | phiName () const |
Return the name of the flux field. More... | |
word & | phiName () |
Return reference to the name of the flux field. More... | |
const word & | rhoName () const |
Return the name of the density field. More... | |
word & | rhoName () |
Return reference to the name of the density field. More... | |
const word & | psiName () const |
Return the name of the compressibility field. More... | |
word & | psiName () |
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 scalarField & | p0 () const |
Return the total pressure. More... | |
scalarField & | p0 () |
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... | |
Private Attributes | |
word | UName_ |
Name of the velocity field. More... | |
word | phiName_ |
Name of the flux transporting the field. More... | |
word | rhoName_ |
Name of the density field used to normalise the mass flux. More... | |
word | psiName_ |
Name of the compressibility field used to calculate the wave speed. More... | |
scalar | gamma_ |
Heat capacity ratio. More... | |
scalarField | p0_ |
Total pressure. More... | |
This boundary condition provides a total pressure condition. Four variants are possible:
where
![]() | = | incompressible pressure at patch [m2/s2] |
![]() | = | incompressible total pressure [m2/s2] |
![]() | = | velocity |
2. compressible subsonic:
where
![]() | = | pressure at patch [Pa] |
![]() | = | total pressure [Pa] |
![]() | = | density [kg/m3] |
![]() | = | velocity |
3. compressible transonic (\gamma <= 1):
where
![]() | = | pressure at patch [Pa] |
![]() | = | total pressure [Pa] |
![]() | = | coefficient given by ![]() |
4. compressible supersonic (\gamma > 1):
where
![]() | = | pressure at patch [Pa] |
![]() | = | total pressure [Pa] |
![]() | = | ratio of specific heats (Cp/Cv) |
![]() | = | compressibility [m2/s2] |
![]() | = | coefficient given by ![]() |
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; }
Definition at line 262 of file totalPressureFvPatchScalarField.H.
totalPressureFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 36 of file totalPressureFvPatchScalarField.C.
Referenced by totalPressureFvPatchScalarField::clone().
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 dict, p, and scalarField().
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.
totalPressureFvPatchScalarField | ( | const totalPressureFvPatchScalarField & | tppsf | ) |
Construct as copy.
Definition at line 99 of file totalPressureFvPatchScalarField.C.
totalPressureFvPatchScalarField | ( | const totalPressureFvPatchScalarField & | tppsf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 114 of file totalPressureFvPatchScalarField.C.
TypeName | ( | "totalPressure" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.
Definition at line 328 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.
Definition at line 345 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::totalPressureFvPatchScalarField().
|
inline |
Return the name of the velocity field.
Definition at line 361 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::UName_.
Referenced by rotatingTotalPressureFvPatchScalarField::updateCoeffs(), fanPressureFvPatchScalarField::updateCoeffs(), and totalPressureFvPatchScalarField::updateCoeffs().
|
inline |
Return reference to the name of the velocity field.
to allow adjustment
Definition at line 368 of file totalPressureFvPatchScalarField.H.
|
inline |
Return the name of the flux field.
Definition at line 374 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::phiName_.
Referenced by fanPressureFvPatchScalarField::updateCoeffs().
|
inline |
Return reference to the name of the flux field.
to allow adjustment
Definition at line 381 of file totalPressureFvPatchScalarField.H.
|
inline |
Return the name of the density field.
Definition at line 387 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::rhoName_.
Referenced by fanPressureFvPatchScalarField::updateCoeffs().
|
inline |
Return reference to the name of the density field.
to allow adjustment
Definition at line 394 of file totalPressureFvPatchScalarField.H.
|
inline |
Return the name of the compressibility field.
Definition at line 400 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::psiName_.
|
inline |
Return reference to the name of the compressibility field.
to allow adjustment
Definition at line 407 of file totalPressureFvPatchScalarField.H.
|
inline |
Return the heat capacity ratio.
Definition at line 413 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::gamma_.
|
inline |
Return reference to the heat capacity ratio to allow adjustment.
Definition at line 419 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::gamma_.
|
inline |
Return the total pressure.
Definition at line 425 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::p0_.
Referenced by rotatingTotalPressureFvPatchScalarField::updateCoeffs(), fanPressureFvPatchScalarField::updateCoeffs(), and totalPressureFvPatchScalarField::updateCoeffs().
|
inline |
Return reference to the total pressure to allow adjustment.
Definition at line 431 of file totalPressureFvPatchScalarField.H.
References totalPressureFvPatchScalarField::p0_.
|
virtual |
Map (and resize as needed) from self given a mapping object.
Definition at line 132 of file totalPressureFvPatchScalarField.C.
|
virtual |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 142 of file totalPressureFvPatchScalarField.C.
References totalPressureFvPatchScalarField::p0_.
|
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(), Foam::FatalError, FatalErrorInFunction, Foam::magSqr(), Foam::nl, Foam::operator==(), Foam::pos(), Foam::pow(), and rho.
|
virtual |
Update the coefficients associated with the patch field.
Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.
Definition at line 223 of file totalPressureFvPatchScalarField.C.
References totalPressureFvPatchScalarField::p0(), and totalPressureFvPatchScalarField::UName().
Referenced by rotatingTotalPressureFvPatchScalarField::updateCoeffs(), and fanPressureFvPatchScalarField::updateCoeffs().
|
virtual |
Write.
Reimplemented in fanPressureFvPatchScalarField, and rotatingTotalPressureFvPatchScalarField.
Definition at line 233 of file totalPressureFvPatchScalarField.C.
References token::END_STATEMENT, Foam::nl, fvPatchField::write(), and Ostream::writeKeyword().
Referenced by rotatingTotalPressureFvPatchScalarField::write(), and fanPressureFvPatchScalarField::write().
|
private |
Name of the velocity field.
Definition at line 269 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::UName().
|
private |
Name of the flux transporting the field.
Definition at line 272 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::phiName().
|
private |
Name of the density field used to normalise the mass flux.
if neccessary
Definition at line 276 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::rhoName().
|
private |
Name of the compressibility field used to calculate the wave speed.
Definition at line 279 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::psiName().
|
private |
Heat capacity ratio.
Definition at line 282 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::gamma().
|
private |
Total pressure.
Definition at line 285 of file totalPressureFvPatchScalarField.H.
Referenced by totalPressureFvPatchScalarField::p0(), and totalPressureFvPatchScalarField::rmap().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.