A musical mute and also a repository of Python 3.x self-similar solutions that I've needed, and so written.
Contributions welcome.
Minimally working environment configurations are provided (environment.yml
and requirements.txt
).
Numpy, scipy, astropy. Any versions fine. Pytest for testing.
Would be nice to unify APIs for different tests, eventually...
Self-similar solution for the Sedov-Taylor non-relativistic blast wave.
Based on work by James R. Kamm and Kamm & Timmes.
Supports density profiles of the from j = 1
), cylindrical (j = 2
), and spherical (j = 3
) geometries.
There are constraints on the density power law index.
See the paper.
from sedov import Sedov
sedov_solution = Sedov(j, w, E, rho0, gamma, t_end, r_model)
r = sedov.r
rho_sol = sedov.rho_sol
# plot away
We include test.py
that implements tests for the Sedov-Taylor solutions.
For this test we set up a grid in geometry, density power law space.
To test, we download and compile the sedov3
code
provided by Frank Timmes.
We compare our solution to his.
This is triggered on every push / PR, and you can invoke by, e.g., pytest src/test.py
.
In the future it should test other solutions.
- Some solutions, such as velocity, still need implementation.
See the paper.
Computes post-shock similarity variables and pressure, etc.
Assumes density profiles of the from
from bmk import BMK
bmk_solution = BMK(k, W, t, P0, t_shock, rad)
rad = bmk_solution.r
pressure = bmk_solution.p # see also bmk_solution.f for similarity variable
Radiation hydrodynamic problem testing rad-hydro coupling in a static, homogenous medium. Solution can be simplified to an ordinary differential equation under some assumptions. See Turner and Stone.
Code linting and formatting is done with ruff.
Rules are listed in ruff.toml.
To check all python in the current directory, you may ruff .
.
To format a given file according to ruff.toml
, run ruff format file.py
.
Checks for formatting are performed on each push / PR.
We (try to) adhere to semantic versioning and conventional commits.