Navier-Stokes (RANS) Calculator
Two-dimensional Reynolds-averaged flow solver with wall functions, velocity and pressure fields, and a laminar baseline for comparison.
A clear path from inputs to results.
Reynolds averaging turns the Navier-Stokes equations into a solvable system by modelling the turbulent stress term. This solver computes a two-dimensional mean flow field with a wall-function closure, and shows the laminar solution alongside so the effect of turbulence is visible rather than asserted.
How to use
- Choose the geometry preset — cavity or channel.
- Set the fluid density and dynamic viscosity.
- Enter the driving pressure gradient.
- Tune the wall-function constants κ and A⁺, or leave the standard values.
- Set the grid resolution, iteration count, tolerance and relaxation factor.
- Compare the turbulent field with the laminar baseline and check convergence.
The formula
Reference: Reynolds (1895) averaging; Launder & Spalding (1974) wall-function treatment.
Worked example
Channel flow at ρ = 1.225, μ = 1.81×10⁻⁵
- Air at 1.225 kg/m³ and 1.81×10⁻⁵ Pa·s.
- Unit velocity and length scale.
- κ = 0.41, A⁺ = 26.
- 1
Reynolds number: ρUL/μ = 1.225 × 1 × 1 / 1.81×10⁻⁵ = 67,680.
- 2
That is well above 4,000, so the flow is turbulent and a closure is required.
- 3
Log-law velocity at y⁺ = 100: u⁺ = (1/0.41)·ln(100) + 26 = 37.2.
- 4
The viscous sublayer (y⁺ < 5) instead follows u⁺ = y⁺.
- 5
The solver iterates the mean momentum equations until the residual falls below the tolerance.
Re 67,680 · u⁺ = 37.2 at y⁺ = 100 · turbulent mean field distinct from the laminar baseline.
Interpreting the result
The wall function is the part that matters most: it bridges the viscous sublayer, where the grid cannot afford cells, to the log region. Choosing A⁺ or κ badly shifts the entire near-wall profile. The laminar baseline is there to show that at this Reynolds number the two solutions differ substantially — turbulence is not a small correction.
Assumptions & limitations
- Two-dimensional, steady, incompressible flow.
- Boussinesq eddy-viscosity closure with wall functions rather than a full low-Re turbulence model.
- Constant fluid properties.
- The grid is coarse enough that wall functions are appropriate; resolving y⁺ < 1 would need a different closure.
Frequently asked questions
What does Reynolds averaging actually do?
It splits each quantity into a mean and a fluctuating part, then averages the equations. The nonlinear term produces the Reynolds stress, which is unknown — hence the need for a closure model.
Is RANS accurate enough for design?
For attached, statistically steady flows it is the workhorse of industrial CFD. It struggles with separation, swirl and transient phenomena, where LES or hybrid methods are needed.
What is a wall function?
An algebraic bridge that imposes the known log-law profile between the wall and the first grid cell, avoiding the need to resolve the viscous sublayer.
Why compare against a laminar baseline?
Because at low Reynolds numbers the laminar solution is correct, and at high ones the difference quantifies how much the turbulence model is doing. Without that reference the output is hard to sanity-check.
Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.