Hydro.jl

A modular hydrodynamic code written in pure Julia
Author chongchonghe
Popularity
13 Stars
Updated Last
7 Months Ago
Started In
July 2022

Hydro

Stable Dev Build Status Coverage

Hydro.jl is a modular hydrodynamic code written in pure Julia.

Installation

This package can be installed using the Julia package manager from the Julia command line:

julia> using Pkg; Pkg.add("Hydro")

Tests and Demo

Sod tube shock wave

img

Run:

using Hydro
hydro(1, 128, 0.1, "/tmp/Hydro/sod-128", init_sod; solver=hllc, dtout=0.01, plotit=plot_standard_sod)

Kelvin-Helmholz instability

Click on the gif to see a full video on vimeo.com. Click here to download a lossless video (34 MB).

gif

hydro(1, 512, 1.0, "/tmp/Hydro/KH-512", init_KH; dtout=0.005, verbose=true)

Technical Description

  • 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.

Usage

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.

Help

Authors

ChongChjong He (che1234 @ umd.edu) (https://www.astro.umd.edu/~chongchong/)

Version History

Used By Packages

No packages found.