jet_movie.mp4
shocktube2d.mp4
rt_creamer.mp4
moving_shocktube.mp4
- gcc >= gcc5 or clang >= clang5 (for c++17 support at the very least)
- Cython
- meson,
pip install meson
will usually suffice - A build system like
make
or ninja - HDF5 libraries
- mypy, a static type checker
- Python >= 3.10
- HIP/ROCm if wanting to run on NVIDIA or AMD GPUs, or just CUDA if running purely NVIDIA
a) CMasher for richer set of colormaps, blends into matplotlib
b) rich-argparse for pretty-print argparse
c) rich for pretty-printing console outputs
Easy Install
- Run
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> python dev.py install [options]
Manual Install
-
Run
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> meson setup <build_dir> -D<some_option>
from project root. It is important that this directory is not named
build
because theinstall
call with createbuild
dir for thepip
installation part. For the-D<build_option>
part, check themeson_options.txt
file for available build options. -
Run
$ ninja -v -C <build_dir> install
or
$ meson install -C <build_dir>
-
If
meson
detectedhip
orcuda
, the install script will install both the cpu and gpu extensions into thesimbi/libs
directory.
When compiling on a GPU, you must provide your GPU's respective architecture identifier. That is to say, if I am compiling on an NVIDIA V100 device with compute capability 7.0, I would build with:
# note the lack of a decimal
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> python dev.py install --gpu-compilation --dev-arch 70 [options]
# or if manually installing
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> meson setup <build_dir> -Dgpu_arch=70 -Dgpu_compilation=enabled [options]
Also, the meson.build script assumes c++20 by default. If your compiler does not support this, one must do a clean build - i.e., delete the original build directory generated by meson(!) - and run
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> python dev.py install --cpp17
# or if manually installing
$ CC=<your_c_compiler> CXX=<your_cpp_compiler> meson setup <build_dir> -Dcpp_std=c++17 [options]
Running a Configuration
-
If all is well, we can test. To test, try running the configuration scripts provided. For example:
$ simbi run simbi_configs/examples/marti_muller.py --mode gpu --nzones 100 --ad-gamma 1.4 # or one could do $ simbi run marti_muller --mode gpu --nzones 100 --ad-gamma 1.4 # or $ simbi run marti-muller --mode gpu --nzones 100 --ad-gamma 1.4 # since the entry point is built to recursively search the simbi_configs/ folder for valid .py scripts # and dash-cased searches for file matches with underscores
where
--mode
is a global command line option available for every config script, and--nzones
and--ad-gamma
are problem-specific options that are dynamically parsed based on whateverDynamicArg
variables exist in the config script you create. Check out how to create one of these configuration scripts in thesimbi_configs/examples/
folder! When creating your own configuration file, you must place it in a directory entitledsimbi_configs/
and runsimbi
from yoursimbi_configs/
parent directory andsimbi
should auto detect your configuration and run the simulation.You can plot the above output by running
$ simbi plot data/1000.chkpt.000_100.h5 "Marti \& Muller Problem 1" --field rho v p --tex
The usual formula for plotting a checkpoint file is like so:
$ simbi plot <checkpoint_file> "<name_of_physics_setup>" --field <field_string> [options]
One can also do
simbi clone --name <name_of_setup>
, and a new skeleton configuration script will appear in thesimbi_configs
directory named<name_of_setup>
that you can build off of. -
???
-
Profit
- Special Relativistic and Newtonian Hydro up to 3D (set the
regime
property toclassical
orrelativistic
) - Supports user-defined mesh expansion / contraction (
scale_factor
&scale_factor_derivative
methods) - Supports user-defined density, momentum, and energy density terms outside of grid (Implementing the
dens_outer
,mom_outer
, ANDedens_outer
methods sets this) - Supports source terms in the Euler equations (implementing the
sources
property sets this) - Support source terms at the boundaries (implementing the
boundary_sources
property sets this) - Boundary conditions given as array of strings like so
[bc_x1min, bc_x1max, bc_x2min, bc_x2max, bc_x3min, bc_x3max]
where the supported boundary conditions areperiodic, reflecting, outflow, inflow
. If an inflow boundary condition is set, but no inflow boundary source terms are given, the code will switch to outflow boundary conditions to prevent crashes. - Can track a single passive scalar (implementing the
passive_scalars
property sets this) - Can insert an immersed boundary (Peskin 2002). It is impermeable by default. (Implementing the
object_cells
property sets this) - Gravity source terms (Implementing the
gravity_sources
property sets this)
TODO:
- Explore general IB in greater detail for sources and sinks!
- multi-gpu support
- MPI support