SkillAgentSearch skills...

MFC

Exascale multiphase flow solver — 2025 Gordon Bell Prize Finalist | 200T grid points on 43K+ GPUs

Install / Use

/learn @MFlowCode/MFC

README

<p align="center"> <a href="http://mflowcode.github.io/"> <img src="docs/res/readme.png" alt="MFC Banner" width="500"/> </a> </p> <h3 align="center">An exascale many-physics flow solver</h3> <p align="center"> <a href="https://github.com/MFlowCode/MFC/actions"> <img src="https://img.shields.io/github/actions/workflow/status/mflowcode/mfc/test.yml?style=flat&label=Tests&color=slateblue" alt="Tests"/> </a> <a href="https://github.com/MFlowCode/MFC/blob/master/.github/CONTRIBUTING.md"> <img src="https://img.shields.io/github/contributors-anon/mflowcode/mfc?style=flat&color=darkslategrey" alt="Contributors"/> </a> <a href="https://join.slack.com/t/mflowcode/shared_invite/zt-y75wibvk-g~zztjknjYkK1hFgCuJxVw"> <img src="https://img.shields.io/badge/slack-MFC-purple.svg?logo=slack" alt="Slack"/> </a> <a href="https://lbesson.mit-license.org/"> <img src="https://img.shields.io/badge/License-MIT-crimson.svg" alt="License"/> </a> <a href="https://codecov.io/github/MFlowCode/MFC" target="_blank"> <img src="https://codecov.io/github/MFlowCode/MFC/graph/badge.svg?token=8SY043QND4" alt="Codecov"/> </a> <a href="https://github.com/MFlowCode/MFC/blob/master/.github/CONTRIBUTING.md" target="_blank"> <img src="https://img.shields.io/badge/Contributing-Guide-orange?style=flat" alt="Contributing"/> </a> </p> <p align="center"> <a href="https://mflowcode.github.io/"> <img src="https://img.shields.io/badge/docs-mflowcode.github.io-blue" alt="Docs"/> </a> <a href="https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=MFlowCode%2FMFC"> <img src="https://img.shields.io/badge/Codespaces-Open-2ea44f?logo=github" alt="Codespaces"/> </a> <a href="https://hub.docker.com/r/sbryngelson/mfc"> <img src="https://img.shields.io/badge/dockerhub-images-important.svg?logo=Docker&style=flat" alt="DockerHub"/> </a> <a href="https://github.com/MFlowCode/homebrew-mfc"> <img src="https://img.shields.io/badge/homebrew-mflowcode%2Fmfc%2Fmfc-brown?logo=homebrew&style=flat" alt="Homebrew"/> </a> <a href="https://www.youtube.com/@MFlowCode" target="_blank"> <img src="https://img.shields.io/badge/YouTube-MFlowCode-red?logo=youtube&style=flat" alt="YouTube"/> </a> </p>

2025 Gordon Bell Prize Finalist - MFC simulates compressible multi-phase flows at exascale, using Fypp metaprogramming in ~40K lines of Fortran. It conducted the largest known public CFD simulation at 200 trillion grid points and 1 quadrillion degrees of freedom, scaling ideally to >43K AMD APUs on El Capitan and >33K AMD GPUs on Frontier.

<div align="center"> <video src="https://github.com/user-attachments/assets/4ad20dc2-0920-4ba0-9c95-0949768f8332" width="700" controls autoplay loop muted playsinline></video> </div>

Why MFC?

  • Exascale GPU performance - Ideal weak scaling to 43K+ GPUs. Near compute-roofline behavior. Compile-time case optimization for up to 10x speedup.
  • Compact codebase - ~40K lines of Fortran with Fypp metaprogramming. Small enough to read and modify; powerful enough for Gordon Bell.
  • Native multi-phase - 4, 5, and 6-equation models, phase change, surface tension, bubble dynamics, and Euler-Lagrange particle tracking, all built in.
  • Portable - NVIDIA and AMD GPUs, CPUs, laptops to exascale. Docker, Codespaces, Homebrew, and 16+ HPC system templates.
  • Tested - 500+ regression tests per PR with line-level coverage across GNU, Intel, Cray, and NVIDIA compilers.
  • Truly open - MIT license, active Slack, and responsive development team.

If MFC is useful to your work, please ⭐ star the repo and cite it!

Try MFC

| Path | Command | | --- | --- | | Codespaces (fastest) 💨 | Open a Codespace - pre-built, zero install | | Docker 🐳 | docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu | | Homebrew (macOS) 🍺 | brew install mflowcode/mfc/mfc | | From source 💻 | git clone https://github.com/MFlowCode/MFC && cd MFC && ./mfc.sh build -j $(nproc) |

Your first simulation:

./mfc.sh run examples/3D_shockdroplet/case.py -n $(nproc)

Visualize the output in examples/3D_shockdroplet/silo_hdf5/ with ParaView, VisIt, or your favorite tool. For detailed build instructions (Linux, macOS, Windows/WSL, HPC clusters), see the Getting Started guide.

MFC is developed by the Computational Physics Group at Georgia Tech and collaborators. Get in touch with <a href="mailto:shb@gatech.edu">Spencer</a> if you have questions! We have an active Slack channel and development team. MFC has high- and low-level documentation, visualizations, and more on its website.

Examples

MFC ships with 137+ example cases. Here is a high-Mach flow over an airfoil (see examples/2D_ibm_airfoil/):

<p align="center"> <img src="docs/res/airfoil.png" alt="High-Mach airfoil flow" width="700"/><br/> </p>

And a high-amplitude acoustic wave reflecting and emerging through a circular orifice:

<p align="center"> <img src="docs/res/orifice.png" alt="Acoustic wave through orifice" width="700"/><br/> </p>

Toolchain

| Command | Description | |---------|-------------| | ./mfc.sh build | Build MFC and its dependencies | | ./mfc.sh run case.py | Run a simulation case (interactive or batch: SLURM/PBS/LSF) | | ./mfc.sh test | Run the test suite | | ./mfc.sh validate case.py | Check a case file for errors before running | | ./mfc.sh new my_case | Create a new case from a template | | ./mfc.sh clean | Remove build artifacts | | ./mfc.sh interactive | Launch interactive menu-driven interface |

Run ./mfc.sh <command> --help for detailed options, or see the full documentation. Tab completion for bash and zsh is auto-installed after you have run ./mfc.sh generate (or any non-new command) at least once. Play with the examples in examples/ (showcased here).

Is this really exascale?

MFC weak scales to the full machines on El Capitan (MI300A), Frontier (MI250X), and Alps (GH200) with near-ideal efficiency. MFC is a SPEChpc benchmark candidate, part of the JSC JUPITER Early Access Program, and used OLCF Frontier and LLNL El Capitan early access systems.

<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/res/weakScaling/weakscaling-dark.png"/> <source media="(prefers-color-scheme: light)" srcset="docs/res/weakScaling/weakscaling.png"/> <img src="docs/res/weakScaling/weakscaling.png" alt="Weak scaling on El Capitan, Frontier, and Alps" width="400"/> </picture> </p>

What else can this thing do?

Physics

  • 1-3D
  • Compressible
    • Low Mach number treatment available
  • Multi- and single-component
    • 4, 5, and 6 equation models for multi-component/phase features
    • Kapila and Allaire models 5-equation models
  • Multi- and single-phase
    • Phase change via p, pT, and pTg schemes
  • Grids
    • 1-3D Cartesian, cylindrical, axisymmetric.
    • Arbitrary grid stretching for multiple domain regions.
    • Complex/arbitrary geometries via immersed boundary method
    • STL geometry files supported
  • Surface tension for multiphase cases
  • Sub-grid bubble dynamics
    • Euler-Euler volume-averaged bubble models
    • Euler-Lagrange particle tracking
    • Quadrature-based moment methods (QBMM)
  • Viscous effects (high-order accurate representations)
  • Hypoelastic and hyperelastic material models
  • Ideal and stiffened gas equations of state
  • Body forces
  • Acoustic wave generation (one- and two-way sound sources)
  • Chemistry and multi-species transport via Pyrometheus
  • Magnetohydrodynamics (MHD)
  • Relativistic Magnetohydrodynamics (RMHD)

Numerics

  • Shock and interface capturing schemes
    • First-order upwinding
    • MUSCL (order 2)
      • Slope limiters: minmod, monotonized central, Van Albada, Van Leer, superbee
    • WENO reconstructions (orders 3, 5, and 7)
    • WENO variants: WENO-JS, WENO-M, WENO-Z, TENO
    • Monotonicity-preserving reconstructions
    • Reliable handling of large density ratios
  • Exact and approximate (e.g., HLL, HLLC, HLLD) Riemann solvers
  • Boundary conditions
    • Periodic, reflective, extrapolation/Neumann
    • Slip and no-slip
    • Thompson-based characteristic BCs: non-reflecting sub/supersonic buffers, inflows, outflows
    • Generalized characteristic relaxation boundary conditions
  • Runge-Kutta orders 1-3 (SSP TVD), adaptive time stepping
  • RK4-5 operator splitting for Euler-Lagrange modeling
  • Interface sharpening (THINC-like)
  • Information geometric regularization (IGR)
    • Shock capturing without WENO and Riemann solvers

Large-scale and accelerated simulation

  • GPU compatible on NVIDIA ([P/V/A/H]100, GH200, etc.) and AMD (MI[1/2/3]00+) GPU and APU hardware
  • Ideal weak scaling to 100% of the largest GPU and superchip su

Related Skills

View on GitHub
GitHub Stars339
CategoryDevelopment
Updated2d ago
Forks133

Languages

Fortran

Security Score

100/100

Audited on Mar 22, 2026

No findings