Understanding the Spalart–Allmaras Turbulence Model (and How to Use It in OpenFOAM)

Turbulence modeling sits at the heart of practical Computational Fluid Dynamics (CFD). While the Navier–Stokes equations describe fluid motion exactly, directly resolving all turbulent scales (Direct Numerical Simulation) is computationally infeasible for most real-world engineering problems. This is where Reynolds-Averaged Navier–Stokes (RANS) models—and in particular, eddy-viscosity models like Spalart–Allmaras—play a crucial role.

In this article, we will build intuition for the Spalart–Allmaras (SA) model starting from the Navier–Stokes equations, understand why modeling is required, and then walk through how to use the Spalart–Allmaras model in OpenFOAM, step by step.

This blog also reflects the philosophy of our Turbulence Modeling with OpenFOAM course: connect theory to practice, without unnecessary complexity.

2. Starting Point: The Navier–Stokes Equations

For an incompressible flow, the Navier–Stokes equations are written as:

  • Continuity (or mass conservation):
𝐮=0\nabla \cdot \mathbf{u} = 0
  • Momemtum balance:
𝐮t+𝐮𝐮=1ρp+ν2𝐮\frac{\partial \mathbf{u}}{\partial t} + \mathbf{u}\cdot\nabla \mathbf{u} = -\frac{1}{\rho}\nabla p + \nu \nabla^2 \mathbf{u}
𝐮=0\nabla \cdot \bar{\mathbf{u}} = 0

Here, the velocity field u contains all scales of motion—from large energetic eddies to very small dissipative ones.

Resolving all of them directly is not practical for most engineering flows.

2. Reynolds Decomposition: Mean and Fluctuations

To make the problem tractable, we split the velocity and pressure fields into mean and fluctuating components:

𝐮=𝐮+𝐮\mathbf{u} = \overline{\mathbf{u}} + \mathbf{u}’
p=p+pp = \overline{p} + p’

This is known as Reynolds decomposition.

Substituting this decomposition into the Navier–Stokes equations and applying Reynolds averaging leads to the RANS equations.

It is often misunderstood that Reynolds averaging directly leads to the velocity decomposition. In fact, the flow variables are first decomposed into mean and fluctuating components, and Reynolds averaging is applied afterward. During the derivation of the RANS equations, the averaging operation is used twice—once to remove the mean of the fluctuations and again when averaging nonlinear terms—leading to the appearance of Reynolds stresses.

3. Where Modeling Is Required: The Closure Problem

After averaging, the momentum equation becomes:

𝐮t+𝐮𝐮=1ρp+ν2𝐮𝐮𝐮\frac{\partial \bar{\mathbf{u}}}{\partial t} + \bar{\mathbf{u}}\cdot\nabla \bar{\mathbf{u}} = -\frac{1}{\rho}\nabla \overline{p} + \nu \nabla^2 \bar{\mathbf{u}} – \nabla \cdot \bar{\mathbf{u}’\mathbf{u}’}

The new term

𝛕ij=𝐮i𝐮j\mathbf{\tau}_{ij} = -\bar{\mathbf{u}_i’ \mathbf{u}_j’}

is the Reynolds stress tensor.

This is where modeling is required.

We now have more unknowns than equations, and turbulence models are introduced to close the system.

Note: In numerical simulations, we seek solutions for the mean (averaged) velocity 𝐮\bar{\mathbf{u}} and mean pressure p\bar{p} ​, not the instantaneous fields 𝐮\mathbf{u} and pp. As a result, the Reynolds stress tensor 𝛕\mathbf{\tau} appears as an additional unknown in the averaged momentum equations, necessitating turbulence modeling to close the system.

4. A Quick Note on Zero-Equation Models

Before moving to Spalart–Allmaras, it’s useful to briefly mention zero-equation (algebraic) models, such as:

  • Mixing-length models
  • Baldwin–Lomax model

These models:

  • Do not solve additional transport equations
  • Are simple and inexpensive
  • Work reasonably well for attached boundary-layer flows

However, they struggle with:

  • Flow separation
  • Complex geometries
  • Strong pressure gradients

This motivated the development of one-equation models, the most famous of which is Spalart–Allmaras.

5. The Spalart–Allmaras Turbulence Model

The Spalart–Allmaras (SA) model is a one-equation eddy-viscosity model originally developed for aerodynamic flows.

Instead of solving directly for turbulent viscosity 𝛎t\mathbf{\nu}_t the model solves a transport equation for a modified variable:

𝛎~\tilde{\mathbf{\nu}}

The turbulent viscosity is then computed algebraically as:

𝛎t=𝛎~fv1\mathbf{\nu}_t = \tilde{\mathbf{\nu}} f_{v1}
Why SA is Popular?
  • Only one additional PDE → computationally efficient
  • Robust and stable
  • Excellent for:
    • External aerodynamic flows
    • Attached boundary layers
    • Mild separation
Known Limitations
  • Not well suited for:
    • Strongly separated flows
    • Complex recirculation
    • Highly unsteady turbulence

Understanding when to use SA is just as important as knowing how to use it.

6. When Should You Use Spalart–Allmaras?

The Spalart–Allmaras model is a good choice for:

  • Airfoil and wing simulations
  • External vehicle aerodynamics
  • Turbomachinery blades (with care)
  • Boundary-layer-dominated flows

If your flow is dominated by near-wall physics with limited separation, SA is often a very efficient and reliable option.

7. Using Spalart–Allmaras in OpenFOAM

Let’s now move from theory to practical implementation in OpenFOAM. If you are new to OpenFOAM, we recommend our course “Hands-On CFD Analysis Using Open-Source Tools”, which walks you through a complete, real-world CFD workflow using fully open-source software.

7.1 Activating Turbulence Modeling

In OpenFOAM, turbulence models are specified in the constant/turbulenceProperties file.

simulationType      RAS;
RAS
{
    RASModel        SpalartAllmaras;
    turbulence      on;
}

This tells OpenFOAM:

  • We are using RANS
  • The selected model is Spalart–Allmaras

7.2 Required Fields: nut and nuTilda

The SA model requires two turbulence-related fields:

  • nut – turbulent viscosity
  • nuTilda – working variable solved by the SA equation

These must be present in the 0/ directory. Boundary conditions for nuTilda are particularly important:

  • Zero gradient at walls
  • Appropriate inlet values based on flow conditions

7.3 Wall Distance: A Critical Requirement

The Spalart–Allmaras model explicitly depends on the distance to the nearest wall. In OpenFOAM, this is handled internally using wall-distance calculations.

wallDist
{
    method          meshWave;
}

However:

  • Your mesh must have properly defined wall patches
  • Near-wall resolution matters

Poor wall definition = poor SA performance.

This is why SA is often paired with wall-resolved meshes rather than wall functions.

7.4 Discretization and Solver Settings

The transport equation for nuTilda must be discretized properly.

div(phi,nuTilda) bounded Gauss limitedLinear 1;

The SA equation is solved alongside the momentum and pressure equations.

nuTilda
{
    solver          smoothSolver;
    smoother        symGaussSeidel;
    tolerance       1e-10;
    relTol          0.1;
}

8. Why Learn This Properly? (And Not Just Copy-Paste)

It’s easy to copy an OpenFOAM case and “make it run.”

It’s much harder—but far more valuable—to understand

  • Why a turbulence model behaves the way it does
  • When its assumptions break down
  • How numerical and modeling errors interact

That gap between theory and practical CFD usage is exactly what our course is designed to bridge.

9. Learn Turbulence Modeling the Right Way (Course Overview)

Our course offers a structured, beginner-friendly introduction to RANS turbulence modeling using OpenFOAM, covering:

  • RANS fundamentals and closure problem
  • Eddy-viscosity hypothesis
  • Detailed coverage of:
    • Spalart–Allmaras
    • k–ε
    • k–ω
    • SST k–ω
  • Practical simulations using the backward-facing step
  • Mesh resolution, near-wall treatment, and validation
  • A brief introduction to Reynolds Stress Models (RSM)

You’ll get:

  • Step-by-step explanation of why things are done—not just how
  • Fully working OpenFOAM case files
  • Downloadable PDF notes

Final Thoughts

The Spalart–Allmaras model is one of the most elegant and efficient turbulence models ever developed—but only when used with proper understanding.

If you’re serious about using OpenFOAM for real engineering simulations, learning turbulence modeling systematically will save you years of trial-and-error.

If this blog helped clarify the SA model for you, the full course will take you much further.