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

Chapter 3 — Pressure-Velocity Coupling and Time Integration

Figure 4.1 — Pressure-Velocity Coupling and Time Integration

CFDrs implements two families of pressure-velocity coupling algorithms: segregated (SIMPLE/PIMPLE family) and monolithic (coupled solver). Time integration covers both explicit and implicit strategies.

Pressure-Velocity Coupling

SIMPLE (Semi-Implicit Method for Pressure-Linked Equations)

SIMPLE alternates momentum and pressure-correction sweeps until convergence:

1. Solve momentum equation with current pressure: u* from A·u* = b − ∇p
2. Solve pressure-correction equation: ∇·(1/A · ∇p') = ∇·u*
3. Correct: p ← p + p', u ← u* − (1/A)·∇p'
4. Repeat until ‖∇·u‖ < ε
```text

```rust
use cfd_core::solver::{SimpleSolver, SolverConfig};

let solver = SimpleSolver::new(SolverConfig { max_iter: 200, tolerance: 1e-5 });
let state = solver.solve(&mesh, &boundary_conditions, &initial_conditions)?;

PIMPLE (SIMPLE with outer loops)

PIMPLE extends SIMPLE with outer corrector loops, enabling large Courant numbers in transient simulations:

use cfd_core::solver::{PimpleSolver, PimpleConfig};

let pimple = PimpleSolver::new(PimpleConfig {
    n_outer_loops: 3,
    n_correctors: 2,
    ..Default::default()
});

SIMPLEC (SIMPLE-Consistent)

SIMPLEC modifies the momentum under-relaxation to improve convergence for mildly non-linear problems:

use cfd_core::solver::{SimplecSolver};

Time Integration

Explicit Schemes

For hyperbolic-dominated flows:

SchemeOrderCFL limit
Forward Euler1st1
4th-order Runge-Kutta4th~2.8
Low-storage RK44th~2.8
use cfd_math::time_stepping::runge_kutta::RK4;

let rk4 = RK4::new(dt);

Implicit Schemes

For diffusion-dominated and stiff problems:

SchemeOrderStability
Crank-Nicolson2ndA-stable
BDF22ndA-stable
Runge-Kutta Chebyshev (RKC)2ndExplicit, extended stability

Adaptive Time Stepping

cfd-math monitors the spectral radius and adjusts dt to maintain the target CFL number:

use cfd_math::time_stepping::AdaptiveTimeStepper;

let ts = AdaptiveTimeStepper::new()
    .cfl_target(0.8)
    .dt_min(1e-8)
    .dt_max(0.01);

Examples