Reference
Markdown: this page · all pages in one file
HonghuA 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
- Simulation and grid:
Diagnostics,reset_diagnostics!,SourceOrder,Simulation,set_initial_conditions!,timestep,step!,nrepaired,run!,conserved_totals,primitives,gas_temperature,radiation_temperature,CartesianGrid,Periodic,Outflow,Reflecting,Fixed,FunctionBC,Boundaries,ForwardEuler,SSPRK2,SSPRK3 - Hydrodynamics:
IdealGas,cv_from_mu,Floors,MinMod,MonotonizedCentral,VanLeer,Sweby,PCM,PLM,PPM,HLLMHD,LLF,LLFMHD,HydroState,HLLD,HLLC,AbstractRiemannSolver,AbstractMHDRiemannSolver,riemann_flux - Magnetohydrodynamics:
MagneticField - Radiation transport:
RadiationPhysics,ngroups,LevermoreClosure,EddingtonClosure,planck_integral,RadiationGroups,planck_fractions,ConstantOpacity,PowerLawOpacity,UserOpacity,FrequencyOpacity - Reduced speed of light:
AbstractChatLimiter,ConstantChat,StabilityBound,OpticalDepthFit,per_group,flux_form - Matter-radiation coupling:
AbstractCoupling,QuokkaCoupling,BracketedCoupling,AdaptiveCoupling,AbstractDustModel,NoDust,BateKetoDust,AbstractJacobianSolve,DenseSolve,ArrowheadSolve - Photoionization chemistry:
AbstractNetwork,NetworkOptions,nspecies,nbands,species_names,species_masses,network_reactions,band_edges,AbstractChemSolver,RosenbrockChem,BackwardEulerChem,Photochemistry,HydrogenIliev1,HydrogenIliev2 - Output, plotting and comparison:
write_vtk,write_line,save_checkpoint,load_checkpoint!,coordinates,available_fields,field,plotstate,plotpanels,animate_run,plotcompare,relative_l1,relative_l2,default_metrics,ComparisonTable,compare,write_comparison,read_comparison,convergence_rate - Test problems:
sod_shock_tube,radiation_streaming,radhydro_shock_exact,brio_wu,smooth_advection,stromgren_iliev,ryu_jones_2a,kelvin_helmholtz,radiation_diffusion,orszag_tang,interpolate_to,sedov_blast,alfven_wave,diffusion_exact,sod_exact,matter_coupling,rad_dust,ionized_radius,rad_dust_reference,stromgren_radius_analytic,stromgren_radius_finite_c,marshak_wave,radhydro_shock,radhydro_shock_super,radiation_shadow,marshak_vaytet,total_erad,radhydro_pulse_dyn - Utilities and constants:
CGS.c_light,CGS.k_B,CGS.m_u,CGS.m_H,CGS.h_planck,CGS.sigma_SB,CGS.a_rad,CGS.G_grav,CGS.M_sun,CGS.parsec,CGS.au,CGS.year,CGS.eV