Skip to content

ADAMAccelerated fluid Dynamics on Adaptive Mesh refinement grids

A physics-agnostic Fortran SDK and its solvers, from a laptop to GPU clusters.

ADAM, a brushed bow shock over an adaptive meshADAM, a brushed bow shock over an adaptive mesh

In a nutshell ​

Build FLUME, run the Sod shock tube on two ranks and check it against the exact solution (the first run explains each step):

bash
fobis fetch && fobis build --mode flume-cpu-gnu
mkdir -p run/sod && cp src/tests/flume/regression/sod-x/input.ini run/sod/
cd run/sod && mpirun -np 2 ../../exe/adam_flume_cpu input.ini > log.txt
grep '^\[mpi-00000\]' log.txt
txt
…
[mpi-00000]t:            1
[mpi-00000]nodes number: 64
[mpi-00000]time step:    0.21128856368212916E-002
[mpi-00000]time:         0.21128856368212916E-002
[mpi-00000]progress:     1%
…
[mpi-00000]t:            174
[mpi-00000]nodes number: 64
[mpi-00000]time step:    0.40494782553279762E-003
[mpi-00000]time:         0.20000000000000001E+000
[mpi-00000]progress:     100%
[mpi-00000]
[mpi-00000]save HDF5 files t: 174, time: 0.20000000000000001E+000
[mpi-00000]ADAM run complete: all realms finalized, entering MPI_Finalize
bash
../../exe/.regression-venv/bin/python ../../src/tests/flume/verification/sod/sod_oracle.py input.ini . --l1-max 3.31e-3
txt
/sod-x: axis x, it 174, cells 200, L1(rho) = 3.244140e-03  PASS

The run writes one HDF5 file per rank and one XDMF index per save, for ParaView. The oracle compares the density with the exact Riemann solution. Next: the tutorials.

See it run ​

Orszag–Tang vortex, ideal MHD with GLM cleaning: density to t = 0.5 on 128², the blocks outlined. FLUME case MV-12.
Rayleigh–Taylor single mode under constant gravity, density to t = 5 on 128²: hydrodynamics (left) and MHD with a horizontal field at half the critical value of the mode (right). FLUME case GV-4.
Woodward–Colella Mach 3 step, density to t = 4 on a forest of three quadtree realms, base spacing 1/80 with static refined boxes; the inter-realm seams dashed. FLUME case EV-step.
A Gaussian pulse in vacuum meets the x faces of the box. Left to right: PEC, first-order Silver–Müller, Silver–Müller with a classic PML (outlined). log₁₀ of √(|E|² + c²|B|²) relative to the initial peak, plane z ≈ 0. PRISM tutorials 2 and 3.

Verification figures, each linked to its case in the FLUME and PRISM verification catalogs:

The animations are made by docs/scripts/make_gallery_runs.sh, which runs committed verification and tutorial inputs with only the checkpoint period changed, and docs/scripts/make_gallery.py, which renders each one on both grounds. The verification figures are drawn by make_doc_figures.py in src/tests/flume/verification/ and src/tests/prism/regression/. The nutshell output above was captured from exe/adam_flume_cpu (gfortran 16.2.0, Open MPI 5.0.11, 2 ranks), not typed.

Applications ​

ApplicationDescription
FLUMECompressible Euler and MHD solver
PRISMMaxwell equations solver for electromagnetic and plasma (PIC) simulations
RIPPLE (src/app/ripple)Scalar advection, the application of the build-your-own tutorial

NASTO, CHASE and PATCH are in the source tree but unmaintained, and not documented on this site. ASCOT is the slice-file converter (cookbook IO). The concepts explain the realm, the forest and the library objects.

Authors ​

Andrea Di Mascio, Federico Negro, Giacomo Rossi, Francesco Salvadore, Stefano Zaghi (contacts).

If you use ADAM in published work, please cite it. ADAM is dual-licensed under MIT or LGPLv3.