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 :
- Solve via conjugate gradient
- Update
- 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 usedWhen to Use This vs. Stream Functions
| Property | Stream function | Killing + AL |
|---|---|---|
| Dimension | 2-manifolds only | Any dimension |
| Solve type | Direct (LDL^T) | Iterative (CG) |
| Speed | Faster (amortised factorisation) | Slower (CG per step) |
| Incompressibility | Exact (by construction) | Approximate (to tolerance) |
| Implementation | volterra-dec CurvedStokesSolver | cartan-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.