You run a straight pipe, expect a clean parabola, and get a flat top, an M-shape, or something asymmetric instead. It is one of the most common "is my case wrong?" questions in OpenFOAM — and the profile shape is usually telling you something real about the physics, not a bug. This guide walks through the handful of causes — laminar versus turbulent, developing flow, buoyancy, inlet conditions, convergence — and, for each, the one test that confirms it.
Before debugging, decide what the right answer is, because "flat" is not automatically wrong:
Which is correct is set entirely by the Reynolds number, Re = U·D/ν: laminar below ≈ 2300, turbulent above ≈ 4000, transitional in between. So the first thing to compute is your Re. A flat profile at Re = 50 000 is correct; the same flat profile at Re = 2000 is a bug.
This is the most frequent one. You set momentumTransport to RAS with kOmegaSST (or kEpsilon), your Re is around 2000, and the profile comes out flat instead of parabolic. The turbulence model is generating eddy viscosity that flattens the profile toward the turbulent shape — but at this Re the flow is laminar and should be a parabola.
The test: look at the nut field along a line across the pipe core. If nut is much larger than the molecular viscosity ν, the turbulence model is active and is what is flattening the profile.
The fix: if Re < ~2300, run the fluid region laminar:
// constant/momentumTransport (.org v8+; turbulenceProperties on ESI/older)
simulationType laminar;
You will never recover a laminar parabola out of an active turbulence model. If you genuinely sit in the transitional band and care about it, use a transition model (kOmegaSST with the γ-Reθ equations) rather than plain kOmegaSST.
If the profile is M-shaped or flat near the inlet and becomes parabolic downstream, you are looking at the developing region. The parabola only forms after the hydrodynamic entrance length:
Laminar: L_e ≈ 0.05 · Re · D
Turbulent: L_e ≈ 1.36 · Re^(1/4) · D (often quoted as ~10-40 D)
For a laminar case at Re = 2000 in a 10 mm pipe, L_e ≈ 0.05 · 2000 · 0.01 ≈ 1 m. If the pipe is only 0.5 m it never fully develops, and any profile read near the inlet is an entrance-region profile, not the answer.
The fix (any of): read the profile at the outlet, not the inlet; lengthen the pipe past L_e; or impose a fully developed inlet — a mapped/cyclic inlet that recycles the outlet profile, or a parabolic profile set directly with codedFixedValue.
If the profile is right in simpleFoam but wrong in chtMultiRegionFoam (or buoyantSimpleFoam) with the same boundary conditions, suspect buoyancy. Those solvers carry gravity and a temperature-dependent density through p_rgh; an isothermal incompressible simpleFoam does not. In a heated pipe the hot, low-density near-wall fluid is accelerated by buoyancy, which in a vertical pipe produces an M-shaped profile (mixed convection) and in a horizontal pipe a top-to-bottom asymmetry.
The test: set constant/g to (0 0 0) and rerun. If the distortion disappears, it is buoyancy. A symmetric M points to a vertical pipe; an asymmetric profile points to a horizontal one.
A uniform fixedValue inlet imposes a flat profile that then has to develop (see §3). If you want a developed profile immediately, supply it at the inlet rather than waiting for the pipe to grow it: a recycled (mapped) inlet, a cyclic streamwise pair, or an analytic parabola via codedFixedValue. Conversely, if your inlet already carries turbulence intensity / k and ω, that turbulence can sustain a flat profile even at modest Re — another reason to check Re and nut together.
A half-converged steady run shows a profile that is simply wrong rather than physically meaningful. Before trusting the shape, confirm the residuals have flattened and the residualControl targets are met. For a developing internal flow, also confirm the mass flow in equals the mass flow out.
Re — is a parabola even the right answer?nut in the core — is the turbulence model flattening it? If laminar, run laminar.L_e — is it just developing?simpleFoam, run g = (0 0 0) — is it buoyancy?A flat profile is the turbulent shape. If you expected a laminar parabola, a turbulence model is active and flattening it. Check Re (laminar below ~2300) and the nut field; if the flow is laminar, set momentumTransport to laminar.
Laminar → a parabola with centreline = 2 × mean. Turbulent → a flatter 1/7-power profile with centreline ≈ 1.2 × mean. The Reynolds number decides which.
That is the developing region. The parabola forms only after L_e ≈ 0.05·Re·D (laminar). Measure at the outlet, lengthen the pipe, or impose a developed inlet.
It solves p_rgh with gravity and variable density, so a heated pipe develops buoyancy (mixed convection) that simpleFoam never shows. Rerun with g = (0 0 0) to isolate it, and run laminar to isolate turbulence.
No — that is laminar, and the answer is a parabola. kOmegaSST is unreliable at transitional Re and can spuriously flatten the profile. Run laminar, or use a transition model if you truly expect transition.
CFDpilot is an AI agent for OpenFOAM — it reads your case from the terminal, checks your Reynolds number against your turbulence model, your entrance length, and your inlet BC, and tells you why the profile is flat, M-shaped or asymmetric.
See how CFDpilot works →