danieljprice / phantom

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

(grtde) BUG FIX with units in GR tidal disruption event setup #432

Closed danieljprice closed 1 year ago

danieljprice commented 1 year ago

Type of PR: Bug fix (thanks to Martina Toscani for reporting)

Description: Mass and radius of star in .setup file for SETUP=grtde was messed up because of incorrect unit conversions

Testing:

make SETUP=grtde
./phantomsetup grtde

this works now without getting very small values of Mstar and Rstar in the .setup file. The issue was that for the GR setup the central mass needs to be 1 in code units, but we take mhole as an input parameter, so the units need to be set immediately AFTER mhole is read, but BEFORE the star options are read from the .setup file.

Did you run the bots? no

Did you update relevant documentation in the docs directory? no