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

CFDrs Computational Fluid Dynamics Simulation Suite

CFDrs is a high-performance, pure-Rust computational fluid dynamics library built on the Atlas physics stack. It covers the full simulation pipeline – governing equations, discretisation schemes, solver kernels, validation oracles, and GPU acceleration – with a consistent zero-copy, zero-cost-abstraction design.

Architecture at a Glance

                +-----------------------------------------------------+
                |  cfd-validation  |  cfd-optim  |  cfd-python       |
                |  benchmarks, planning, Python bindings            |
                +-----------------------------------------------------+
                                 |
                +-----------------------------------------------------+
                |  cfd-3d  |  cfd-2d  |  cfd-1d  |  cfd-schematics    |
                |  dimensional scheme matrices, biomedical networks  |
                +-----------------------------------------------------+
                                 |
                +-----------------------------------------------------+
                |  cfd-core  |  cfd-math  |  cfd-io                  |
                |  traits, scalar/math utilities, persistence        |
                +-----------------------------------------------------+
                                 |
                +-----------------------------------------------------+
                |  Atlas: leto | hephaestus | coeus | eunomia | hermes |
                |  moirai | mnemosyne | themis | ritk                 |
                +-----------------------------------------------------+
                                 |
                +-----------------------------------------------------+
                |  CPU: leto + hermes + moirai + eunomia              |
                |  GPU: hephaestus-wgpu + coeus + ritk                |
                |  managed alloc: mnemosyne + themis                 |
                +-----------------------------------------------------+

Atlas Dependencies

CFDrs needAtlas crate
Scalar field traitseunomia (RealField, FloatElement)
Linear algebra, SpMVleto / leto-ops (Point, Vector, Array1/2, CsrMatrix)
GPU tensorshephaestus-core / hephaestus-wgpu
Autodiff tensorscoeus
SIMD kernelshermes-simd
Parallel iterationmoirai-parallel
Memory allocationmnemosyne / themis
Optimisation / GAapollo-optim

Getting Started

cargo run --example cavity_validation                  # lid-driven cavity, Re ~ 100
cargo run --example pipe_flow_validation               # Hagen-Poiseuille 1-D benchmark
cargo run --example mesh_3d_integration                # structured 16 x 4 mesh + CSG
cargo run -p cfd-validation --example richardson_convergence   # validation oracle

Note: cfd-suite examples run at the workspace root via cargo run --example <name>; cfd-validation is a workspace member, so the run form is cargo run -p cfd-validation --example richardson_convergence. See the **Run**: line on each example’s docs/book/examples/<name>.md page for the canonical invocation.

API excerpts in this book are marked rust,ignore when they require the workspace’s Cargo dependency graph or a runtime fixture. Their canonical implementations are the linked Rust source files; the package and example targets remain the compilation gate. Untyped fences are explicitly text or console so diagrams, equations, and commands cannot be misread as doctests.

Chapters

This book progresses from the architectural overview (Chapter 1) through governing equations, turbulence, biomedical flows, numerical methods, geometry, 3-D flows, validation, performance, and optimisation. Each chapter links to runnable examples that exercise the described functionality.

Figures

The figures linked from the chapter tables of contents are deterministically generated SVG assets committed with the chapter text. Each entry names the example that the figure mirrors; reproducibility is enforced by the xtask prebook manifest at figures/MANIFEST.json.

Run commands below mirror the **Crate**: / **Run**: headers on the linked example .md page. All entries point to either cfd-suite (workspace root, run via cargo run --example ...) or cfd-validation (member crate, run via cargo run -p cfd-validation --example ...).