Added unit_mass

This commit is contained in:
Miikka Vaisala
2019-08-02 13:48:09 +08:00
parent 99d80f7175
commit 3c87fe0b48
2 changed files with 14 additions and 5 deletions

View File

@@ -123,6 +123,7 @@
/* Additional helper params */\ /* Additional helper params */\
/* (deduced from other params do not set these directly!) */\ /* (deduced from other params do not set these directly!) */\
FUNC(AC_G_const),\ FUNC(AC_G_const),\
FUNC(AC_unit_mass),\
FUNC(AC_GM_star),\ FUNC(AC_GM_star),\
FUNC(AC_sq2GM_star),\ FUNC(AC_sq2GM_star),\
FUNC(AC_cs2_sound), \ FUNC(AC_cs2_sound), \

View File

@@ -137,11 +137,19 @@ update_config(AcMeshInfo* config)
6.674e-8); // g/cm3/s GGS definition //TODO define in a separate module 6.674e-8); // g/cm3/s GGS definition //TODO define in a separate module
AcReal M_sun = AcReal(1.989e33); // g solar mass AcReal M_sun = AcReal(1.989e33); // g solar mass
config->real_params[AC_M_sink] = config->real_params[AC_M_sink_Msun] * M_sun /
((config->real_params[AC_unit_length] * config->real_params[AC_unit_mass] = (config->real_params[AC_unit_length] *
config->real_params[AC_unit_length] * config->real_params[AC_unit_length] *
config->real_params[AC_unit_length]) * config->real_params[AC_unit_length]) *
config->real_params[AC_unit_density]); config->real_params[AC_unit_density];
config->real_params[AC_M_sink] = config->real_params[AC_M_sink_Msun] * M_sun /
config->real_params[AC_unit_mass];
config->real_params[AC_G_const] = G_CONST_CGS / ((config->real_params[AC_unit_velocity] * config->real_params[AC_G_const] = G_CONST_CGS / ((config->real_params[AC_unit_velocity] *
config->real_params[AC_unit_velocity]) / config->real_params[AC_unit_velocity]) /