Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: turbulence_validation_demo

Figure 5.3 — Example: Turbulence Validation Demo

Crate: cfd-suite (workspace root)
Run: cargo run --example turbulence_validation_demo
Source: examples/turbulence_validation_demo.rs

What This Example Demonstrates

Runs the comprehensive turbulence validation suite for k-ε, k-ω SST, and Spalart-Allmaras via run_turbulence_validation::<f64>().

ValidationMethodTarget
Homogeneous turbulence decayAnalytical k-ε decay< 1 % error
Wall boundary conditionsNear-wall k, ω, νtMatch literature
Numerical stabilityNaN/inf check over iterationNone
ConvergenceMonotonic physical evolutionPass

Key Code Snippet

use cfd_2d::physics::turbulence::run_turbulence_validation;

// Runs all four validation passes in sequence
run_turbulence_validation::<f64>();

Physics Background

Homogeneous turbulence decay follows k(t) = k₀ (1 + t/t₀)^(−n) where n depends on the turbulence model constants. The k-ε model with standard constants should reproduce n ≈ 1.2 – 1.4 over the initial decay period.

Near-wall boundary conditions: at the wall, k = 0 (no-slip), ω_wall = 6ν / (β₁ Δy²) (k-ω SST), and νt_wall = 0.

Book Chapter

← Turbulence Models and Cavitation