Skip to content

Latest commit

 

History

History
69 lines (57 loc) · 2.84 KB

README.md

File metadata and controls

69 lines (57 loc) · 2.84 KB

SOftwaRe valiDatIonN suitE (SORDINE)

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

Requirements

Numpy, scipy, astropy. Any versions fine. Pytest for testing.

TODO

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 $\rho(r) = \rho_{0} r^{-w}$. Supports planar (j = 1), cylindrical (j = 2), and spherical (j = 3) geometries. There are constraints on the density power law index. See the paper.

Usage

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

Testing

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.

TODO:

  • Some solutions, such as velocity, still need implementation.

Self similar density profiles

See the paper. Computes post-shock similarity variables and pressure, etc. Assumes density profiles of the from $\rho(r) \propto r^{-k}$.

Usage

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

Thermal Equilibrium

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 Style

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.