SpectraSim Documentation
Parameter · 05 Boundary Conditions

Inlet mode

velocity_inlet.mode Step 05 · Boundary Conditions

What is imposed on an inlet: a uniform velocity normal to the inlet, a volume flow rate, a mass flow rate, or a velocity vector in global components. The choice decides which OpenFOAM boundary condition the program writes into 0/U.

Last updated

Theory

The inlet patch is the set of CAD faces assigned to it in the Geometry step. The program reads the exported surface of the patch and computes its area AA and its area-weighted mean outward normal n\mathbf{n}; every mode is turned into a velocity on the faces of the meshed patch:

modeboundary condition in 0/Uwhat is exact
VelocityfixedValue, U=−U n\mathbf{U} = -U\,\mathbf{n} (uniform, along the inward mean normal)the velocity; the flow rate is UU times the meshed area
Volume flowflowRateInletVelocity, volumetricFlowRate QQthe flow rate, whatever the meshed area
Mass flowflowRateInletVelocity, massFlowRate m˙\dot m (incompressible: with rhoInlet)the mass flow
Velocity vectorfixedValue, U=(Ux,Uy,Uz)\mathbf{U} = (U_x, U_y, U_z) as typedthe vector; the flow rate is its inward normal component times the meshed area

A flow-rate inlet spreads the flow uniformly over the meshed faces, normal to each face. Because the mesher does not reproduce a port's area exactly, a velocity inlet delivers its flow through the meshed area, not the CAD area: with the default implicit feature snapping the meshed port areas are 99.5-99.97 % of the CAD on straight pipes (Edge snapping); a flow-rate inlet is exact either way. Volume or mass flow is therefore the better choice when the flow rate is the known quantity, as it usually is for an engine.

For a compressible run the mass flow is divided by the solved density on the inlet face; no inlet density is entered (Inlet density).

The same velocity also starts the potential-flow initialisation: a flow-rate inlet writes the vector −n Q/A-\mathbf{n}\,Q/A as the starting value, because the potential-flow solver builds its inlet flux from that entry.

Equations

Q=UA  (velocity),Q=m˙ρin  (mass flow),Q=(−U⋅n) A  (vector)Q = U A \ \ (\text{velocity}), \qquad Q = \frac{\dot m}{\rho_{in}} \ \ (\text{mass flow}), \qquad Q = (-\mathbf{U}\cdot\mathbf{n})\,A \ \ (\text{vector})
(1)
wheremeaningunit
QQVolume flow rate into the domainm³/s
UUInlet velocity (velocity mode)m/s
AAArea of the inlet patchm²
m˙\dot mMass flow ratekg/s
ρin\rho_{in}Inlet densitykg/m³
n\mathbf{n}Area-weighted mean outward unit normal of the patch-

Default and rule

Default
Velocity (uniform_velocity)
Rule

Velocity, 10 m/s (Inlet velocity / flow rate).

Source

Boundary conditions as documented for OpenFOAM (OpenFOAM user guide, 2026). The port-area comparison (meshed against CAD area) comes from the program's validation runs on straight pipes and on case V2 (a two-inlet single-chamber muffler with internal inlet and outlet tubes; explicit snapping: 95-96 % of the CAD area; implicit: 99.5-99.97 % on pipes, 99.83-99.88 % on V2).

Valid range Velocity | Volume flow | Mass flow | Velocity vector

Which mode

Use volume or mass flow when the flow rate is known; use velocity when the velocity itself is the specification (for example a reference case defined by a bulk velocity).

High Mach number

Saving asks for confirmation when an inlet's estimated Mach number exceeds 0.3 for an incompressible case or 0.6 for a compressible one.

Velocity vector

The vector mode has not yet been validated on the solver; see Inlet velocity vector, x component.

References 1

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