danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
https://phantomsph.github.io
Other
103 stars 223 forks source link

(#402) added warning if R < 6GM/c^2 for star in GR #421

Closed danieljprice closed 1 year ago

danieljprice commented 1 year ago

Type of PR: new warning + star mass and radii now always specified in solar radii

Description:

For example, if one naively chooses default values M=R=1 in code units when using the GR code this produces a star smaller than its Schwarzschild radius, giving errors like the following when you run phantom:

 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 1

 WARNING! cons2primsolver [in step_extern_sph_gr (a)]: enthalpy did not converge on particle 836

Testing:

~/phantom/scripts/writemake.sh grstar > Makefile
make setup
make
./phantomsetup star
./phantomsetup star
./phantom star

Did you run the bots? no

Did you update relevant documentation in the docs directory? no