shamrock.model_ramses.InstantBarotropic#
- class shamrock.model_ramses.InstantBarotropic#
Bases:
pybind11_objectInstantaneous barotropic cooling (RAMSES-like), to be given to
cfg.set_cooling_mode.At the end of each timestep, before the CFL condition, the internal energy of every cell is overwritten by \(P_{\rm baro}(\rho) / (\gamma - 1)\), with \(\gamma\) the adiabatic index of the equation of state and \(P_{\rm baro}(\rho) = c_{s,0}^2 \rho (1 + (\rho / \rho_0)^{\gamma_0 - 1})\).
Parameters#
- rho0float
Density of the isothermal to adiabatic transition of the barotrope (> 0)
- gamma0float
Adiabatic index of the barotrope above
rho0- cs0float
Isothermal sound speed of the barotrope below
rho0(> 0)
Usage#
>>> from shamrock.model_ramses import InstantBarotropic >>> cfg.set_cooling_mode(InstantBarotropic(rho0=1e-13, gamma0=1.4, cs0=0.2))
Methods
Attributes
cs0gamma0rho0
Barotropic collapse of a uniform sphere in RAMSES solver
Barotropic collapse of a uniform sphere in RAMSES solver