cartan

Stokes Solver

The stokes module solves the incompressible Stokes equations on a triangle mesh in using the augmented Lagrangian method.

Governing Equations

where is the Killing operator, is the velocity, is the pressure, and is the body force (e.g., from active stress divergence).

Augmented Lagrangian Method

The solver iterates until :

  1. Solve via conjugate gradient
  2. Update
  3. Project out Killing vector fields (rigid motions)

The inner system is symmetric positive definite (after regularisation), so CG converges reliably. The penalty parameter controls the speed/conditioning trade-off.

Killing Vector Projection

On a closed surface in , the Stokes system has a 6-dimensional kernel of Killing vector fields (3 translations + 3 rotations). These are precomputed and projected out after each inner solve.

Usage

use cartan_dec::stokes::StokesSolverAL;
 
let solver = StokesSolverAL::new(
    &mesh,
    1e4,    // penalty parameter k
    1e-6,   // divergence tolerance
    100,    // max AL iterations
    1000,   // max CG iterations per inner solve
);
 
let result = solver.solve(&force);
// result.velocity:      R^3-valued per vertex (length 3*nv)
// result.pressure:      scalar per vertex (length nv)
// result.div_residual:  ||DIV u||
// result.al_iterations: number of outer iterations used

When to Use This vs. Stream Functions

PropertyStream functionKilling + AL
Dimension2-manifolds onlyAny dimension
Solve typeDirect (LDL^T)Iterative (CG)
SpeedFaster (amortised factorisation)Slower (CG per step)
IncompressibilityExact (by construction)Approximate (to tolerance)
Implementationvolterra-dec CurvedStokesSolvercartan-dec StokesSolverAL

The stream function approach is preferred on 2-manifolds for performance. The Killing operator approach is required for 3-manifolds and is useful on 2-manifolds for cross-validation.

References

  • Zhu, Saintillan, Chern. "Active nematic fluids on Riemannian 2-manifolds." arXiv:2405.06044, 2024. Section 3.6, Algorithm 3.