SpectraSim Documentation
Parameter · 05 Boundary Conditions

Inlet density

velocity_inlet.rho_inlet Unit: kg/m³ Step 05 · Boundary Conditions

The density that turns a mass-flow inlet into a volume flow for the incompressible solver. Shown only for a mass-flow inlet of an incompressible case; it starts at the density of the Material step.

Last updated

Theory

The incompressible solver works with a constant density and a kinematic pressure; it has no density field. A mass-flow inlet is written as OpenFOAM's flowRateInletVelocity with massFlowRate and rhoInlet (OpenFOAM user guide, 2026), which imposes the volume flow of equation (1). The same density converts the mass flow wherever the program needs a velocity (Mach estimate, turbulence estimate, mesh plan).

The box defaults to the density a run uses, computed on the Material step from the temperature and the ambient pressure (ideal gas). A value typed here overrides the Material density for this inlet only.

For a compressible case the field is hidden and not stored: the compressible solver divides the mass flow by the solved density on the inlet face, so the mass flow is imposed exactly, independent of any inlet density (in a validation run the solved inlet mass flux equals the requested value).

Equations

Q=m˙ρinQ = \frac{\dot m}{\rho_{in}}
(1)
wheremeaningunit
QQVolume flow rate imposed at the inletm³/s
m˙\dot mMass flow rate enteredkg/s
ρin\rho_{in}Inlet densitykg/m³

Default and rule

Default
the density of the Material step
Rule

The Material step's density (computed, or the manual override there).

Source

Behaviour of OpenFOAM's flow-rate inlet as documented (OpenFOAM user guide, 2026); the compressible behaviour is confirmed by a validation run of the program.

Valid range > 0; incompressible mass-flow inlets only

Values

Positive. Keep it equal to the Material density unless the inlet gas really differs from the rest of the domain; the incompressible solver itself uses one density everywhere.

Different from the Material density

The solver's pressure is converted to pascals with the Material density, so a different inlet density changes the imposed volume flow but not the density of the solved flow.

References 1

  1. OpenCFD Ltd. (2026). OpenFOAM user guide. openfoam.com. Web page