HARTMAX¶
HARTMAX simulates liquid metal flowing through strong magnetic fields, the physics of fusion blanket channels. It solves fully developed ducts and pipes and checks them against analytical references. It also solves three-dimensional ducts and pipes, ducts with an inlet and an outlet in a field that changes along them, heat transfer, and a depth-averaged (Q2D) model with Hartmann-layer damping. HARTMAX is written in JAX, so you can differentiate its solutions and run them on a CPU or a GPU. HARTMAX builds the physics, and SOLVAX supplies the numerical solvers.
HARTMAX was called LMhdX until 2.0. If you used lmhdx, install hartmax instead and read
Migrating from 1.x to 2.0.
After python -m pip install hartmax, a first duct takes three lines:
import hartmax
solution = hartmax.solve(hartmax.duct(20.0, 24)) # Hartmann number 20, 24 x 24 cells
print(float(solution.flow_rate)) # 0.15614...
The model is inductionless, which means the flow does not change the applied field.
Start here¶
Install HARTMAX, select a JAX backend, and check the command line.
Solve and validate a Hartmann duct from Python or TOML.
Solve the flow through the ANL fringe with an inlet and an outlet, and differentiate its pressure drop.
Evolve a depth-averaged strong-field model and reproduce its poster and movie.
See the analytical, numerical, and FreeMHD evidence for every claim.