Hydro.jl is a modular hydrodynamic code written in pure Julia.
This package can be installed using the Julia package manager from the Julia command line:
julia> using Pkg; Pkg.add("Hydro")
Run:
using Hydro
hydro(1, 128, 0.1, "/tmp/Hydro/sod-128", init_sod; solver=hllc, dtout=0.01, plotit=plot_standard_sod)
Click on the gif to see a full video on vimeo.com. Click here to download a lossless video (34 MB).
hydro(1, 512, 1.0, "/tmp/Hydro/KH-512", init_KH; dtout=0.005, verbose=true)
- Riemann solver - HLL - HLLC - Lax
- Integrator - Euler - RK2 - RK3
- Initial conditions - 2D Kelvin-Helmholtz instability - 1D and 2D sod shock tube
- Boundary condition - Transimissive - Periodic
TODO: add descriptions to the Riemann solvers, interpolation method, etc.
julia> using Hydro
julia> hydro(1, 512, 0.1, "tmp", init_sod)
julia> hydro(1, 512, 0.2, "tmp2", init_sod, restart=10)
For a complete documentation, run ?hydro
.
Once a run is finished, a reloadable data file for the last snapshot is stored in [folder]/data
. You can reload the simulation by setting restart
and increasing tend
. You may also interrupt a simulation with Ctrl-c and the most recent snapshot will be saved.
ChongChjong He (che1234 @ umd.edu) (https://www.astro.umd.edu/~chongchong/)