Description🔗
The pressure
function object
provides several methods to convert an input pressure
field into derived forms, including:
- Static pressure, \(p\):
- Total pressure, \(p_t\):
- Pressure coefficient, static or total, \(C_p\):
- Isentropic pressure, \(p_i\):
where:
- \(\rho\)
- Density [kg/m3]
- \(\u\)
- Velocity [m/s]
- \(\rho_{\inf}\)
- Freestream density [kg/m3]
- \(p_{\inf}\)
- Freestream pressure [Pa]
- \(\u_{\inf}\)
- Freestream velocity [m/s]
- \(p_k\)
- Kinematic pressure (p/rho) [m2/s2]
- \(p_s\)
- Static pressure [Pa]
- \(p_0\)
- Total pressure [Pa]
- \(p_{\ref}\)
- Reference pressure level [Pa]
- \(p_i\)
- Total isentropic pressure
- \(C_p\)
- Pressure coefficient
- \(C_{p_0}\)
- Total pressure coefficient
- \(\gamma\)
- Specific heat ratio
For incompressible cases, the kinematic pressure (pressure divided by density) can be converted to pressure via a user-specified reference density.
Operands🔗
Operand | Type | Location |
---|---|---|
input | volScalarField |
$FOAM_CASE/<time>/<inpField> |
output file | - | - |
output field | volScalarField |
$FOAM_CASE/<time>/<outField> |
Usage🔗
Example of the pressure
function object
by using functions
sub-dictionary in system/controlDict
file:
pressure1
{
// Mandatory entries (unmodifiable)
type pressure;
libs (fieldFunctionObjects);
// Mandatory entries (runtime modifiable)
mode <option>;
// Optional entries (runtime modifiable)
p <pName>;
U <UName>;
rho <rhoName>;
rhoInf 1.0; // enabled if rho=rhoInf
pRef 0.0;
hydroStaticMode none;
g (0 -9.81 0); // enabled if hydroStaticMode != none
hRef 0.0; // enabled if hydroStaticMode != none
pInf 0.0;
UInf (1 0 0);
}
where the entries mean:
Property | Description | Type | Required | Default |
---|---|---|---|---|
type | Type name: pressure | word | yes | - |
libs | Library name: fieldFunctionObjects | word | yes | - |
mode | Calculation mode (see below) | word | yes | - |
p | Name of the pressure field | word | no | p |
U | Name of the velocity field | word | no | U |
rho | Name of the density field | word | no | rho |
rhoInf | Freestream density for coefficient calculation | scalar | conditional | - |
pRef | Reference pressure for total pressure | scalar | no | 0 |
hydrostaticMode | Hydrostatic contributions (see below) | word | no | none |
g | Gravity vector (see below) | vector | no | - |
hRef | Reference height (see below) | scalar | no | - |
pInf | Freestream pressure for coefficient calculation | scalar | no | - |
UInf | Freestream velocity for coefficient calculation | vector | no | - |
Options for the mode
entry:
static | static pressure
total | total pressure
isentropic | isentropic pressure
staticCoeff | static pressure coefficient
totalCoeff | total pressure coefficient
The hydrostaticMode
entry provides handling for the term
\(\rho (\vec{g} \cdot \vec{h})\) where options include
none | not included
add | add the term, e.g. to convert from p_rgh to p
subtract | subtract the term, e.g. to convert from p to p_rgh
If the hydrostaticMode
is active, values are also required for
gravity, g
, and reference height, hRef
. By default these will be
retrieved from the database. When these values are not available
the user must provide them, e.g.
g (0 -9.81 0);
hRef 0;
Default behaviour assumes that the case is compressible. For incompressible cases, i.e. solved using the kinematic pressure:
\[p_k = \frac{p}{\rho} \qquad [\mathrm{m}^2 \mathrm{s}^{-2}]\]The rho
entry can be used to set the freestream density:
rho rhoInf;
rhoInf 100000;
The inherited entries are elaborated in:
Usage by the postProcess
utility is not available.
Stored properties🔗
Fields🔗
The derived pressure is stored on the mesh database, using the default name:
- static pressure:
static(p)
- static pressure coefficient:
static(p)_coeff
- total pressure:
total(p)
- total pressure coefficient:
total(p)_coeff
This can be overridden using the result
entry.
Further information🔗
Tutorial:
Source code:
API:
History: