This is an implementation of the framework described in the Matura Thesis of S. K. and D. I.
If you are reading this offline, a GitHub repo is available at: https://github.com/HyperRays/HydroFramework
There are three parts to the framework:
- Configuration (
config.py
) - Simulation (
sim_<simulation_type>
) - Simulation Space (
sim_<simulation_space>
, base class:space.py
)
All these are composed and defined in the tests.py
file.
To get started, install the dependencies from requirements.txt
using the command:
pip install -r requirements.txt
Documentation is provided under docs
If you want to use torch simulations, please follow the instructions on the PyTorch website to install it.
Saves of various tests are provided in the saves
folder. Please note that, other than tests_final.7z
, none of the other saved tests are defined in tests.py
.
To visualize the data, use a tool like Jupyter to open LoadSave.ipynb
.
Quad
,Q...
, ortree
refer toQuadtree
StdRes
orHomogeneous Resolution Space
refer to aRegular Grid
blast
,sedov
, ortaylor
refer to theSedov-Taylor Blast
testtube
orsod
refer to theSod Shock Tube
test
config.py
: Contains a class to define any configuration.gen_quadtree.py
: Contains classes for a Quadtree and helper functions to flatten it.LoadSave.ipynb
: Interactive Python notebook to visualize outputted data from the simulation runs.quadtree_helper.py
: Contains helper functions to load a flattened Quadtree.sim_grid.py
: Implementation of a regular grid space.sim_quadtree.py
: Implementation of a quadtree space.sim_upwind_simple.py
: First-order implementation of Upwind in NumPy.sim_upwind_simple_torch.py
: PyTorch implementation ofsim_upwind_simple.py
.sim_upwind_TVD.py
: Second-order implementation of Upwind using TVD in NumPy.sim_upwind_TVD_torch.py
: PyTorch implementation ofsim_TVD_simple.py
.space.py
: Contains a base class for any space.tests.py
: Contains procedures for all test runs.
The following tests are defined in tests.py
:
Test | Space Type | Simulation Type | Depth Function (only quadtree) |
---|---|---|---|
blast | stdres | no tvd | |
tvd | |||
quadtree | no tvd | sedov | |
tvd | sedov | ||
tube | stdres | no tvd | |
tvd | |||
quadtree | no tvd | sod | |
sod 2 | |||
sod 3 | |||
tvd | sod | ||
sod 2 | |||
sod 3 |