Skip to main content

MachNo

Description

The MachNo function object computes the Mach number as a volScalarField.

The Mach number is a dimensionless quantity representing the ratio of flow velocity past a boundary to the local speed of sound:

M=uγp/ρ M = \frac{|\u|}{\sqrt{\gamma p/\rho}}

where:

MM : Mach number

u\u : Velocity

γ\gamma : The ratio of specific heat of a gas at a constant pressure to heat at a constant volume

pp : Static pressure

ρ\rho : Fluid density

Operands

OperandTypeLocation
inputvolVectorField$FOAM_CASE/<time>/<inpField>
output file--
output fieldvolScalarField$FOAM_CASE/<time>/<outField>

Usage

Example of the MachNo function object by using functions sub-dictionary in system/controlDict file:

MachNo1
{
// Mandatory entries (unmodifiable)
type MachNo;
libs (fieldFunctionObjects);

// Optional (inherited) entries
field <inpField>;
result <fieldResult>;
region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval 1;
}

where the entries mean:

PropertyDescriptionTypeRequiredDefault
typeType name: MachNowordyes-
libsLibrary name: fieldFunctionObjectswordyes-

The inherited entries are elaborated in:

Example by using the postProcess utility:

postProcess -func MachNo

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1606+