Reference

Honghu

A three-dimensional radiation-magnetohydrodynamics code in pure Julia.

The Euler equations are solved with an unsplit finite-volume method-of-lines scheme: piecewise-constant, -linear or -parabolic reconstruction of the primitive variables, a choice of Riemann solver (HLLC or LLF), and a strong-stability-preserving Runge-Kutta integrator. With mhd = true it solves ideal MHD instead, with the field face-centred and advanced by constrained transport (HLLD or LLF, the Q26 EMF and LD04 averaging).

Radiation is treated with the two-moment (M1) approximation, grey or resolved into NG frequency groups (see RadiationGroups). Transport uses an HLL solver built on the M1 closure, and the stiff matter-radiation coupling is solved implicitly, the two being combined by the second-order, asymptotic-preserving IMEX PD-ARS scheme. Radiation subcycles inside each hydro step at the reduced speed of light.

The algorithms follow Quokka (Wibking & Krumholz 2022; He, Wibking & Krumholz 2024).

Getting started

using Honghu

sim = Simulation(n = (256, 1, 1), boundaries = Boundaries(Outflow()),
                 eos = IdealGas(gamma = 1.4))
set_initial_conditions!(sim) do x, y, z
    x < 0.5 ? (rho = 1.0, p = 1.0) : (rho = 0.125, p = 0.1)
end
run!(sim, tmax = 0.2)

or start from one of the built-in problems:

sim = Honghu.Problems.kelvin_helmholtz(n = 256)
run!(sim, tmax = 2.0, outdir = "kh", dtout = 0.02)

Pages