Skip to content
Snippets Groups Projects
Commit 880ca7dc authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Rename MD and MB to diskfraction and bulgefraction

parent 86f88acb
No related branches found
No related tags found
1 merge request!681Add example of isolated galaxy and change hernquist potential configuration
......@@ -49,8 +49,8 @@ HernquistPotential:
M200: 30.0 # M200 of the galaxy disk
h: 0.704 # reduced Hubble constant (value does not specify the used units!)
concentration: 7.1 # concentration of the Halo
MD: 0.0434370991372 # Disk mass fraction
MB: 0.00705852860979 # Bulge mass fraction
diskfraction: 0.0434370991372 # Disk mass fraction
bulgefraction: 0.00705852860979 # Bulge mass fraction
timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration
epsilon: 0.030 # Softening size (internal units)
......@@ -202,8 +202,8 @@ HernquistPotential:
R200: 10. # (Optional 1c) R200 of the galaxy+halo (when used M200 and V200 are not used, if M200 or V200 are given they are used)
h: 0.704 # (Optional 1) reduced Hubble constant
concentration: 7.1 # (Optional 1) concentration of the Halo
MD: 0.0434370991372 # (Optional 1) Disk mass fraction
MB: 0.00705852860979 # (Optional 1) Bulge mass fraction
diskfraction: 0.0434370991372 # (Optional 1) Disk mass fraction (equal to MD in MakeNewDisk and GalIC)
bulgefraction: 0.00705852860979 # (Optional 1) Bulge mass fraction (equal to MB in MakeNewDisk and GalIC)
timestep_mult: 0.01 # Dimensionless pre-factor for the time-step condition, basically determines the fraction of the orbital time we use to do the time integration
epsilon: 0.1 # Softening size (internal units)
......
......@@ -259,13 +259,13 @@ static INLINE void potential_init_backend(
/* Depending on the disk mass and and the bulge mass the halo
* gets a different mass, because of this we read the fractions
* from the parameter file and calculate the absolute mass*/
const double MD =
parser_get_param_double(parameter_file, "HernquistPotential:MD");
const double MB =
parser_get_param_double(parameter_file, "HernquistPotential:MB");
/* Calculate the mass of the bulge and disk from the parameters */
const double Mdisk = M200 * MD;
const double Mbulge = M200 * MB;
const double diskfraction =
parser_get_param_double(parameter_file, "HernquistPotential:diskfraction");
const double bulgefraction =
parser_get_param_double(parameter_file, "HernquistPotential:bulgefraction");
/* Calculate the mass of the bulge and disk from the parameters */
const double Mdisk = M200 * diskfraction;
const double Mbulge = M200 * bulgefraction;
/* Store the mass of the DM halo */
potential->mass = M200 - Mdisk - Mbulge;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment