[FLASH-USERS] Error of physical units in the eos_idealGamma implementation
RIGON Gabriel
gabriel.rigon at nagoya-u.jp
Mon Feb 15 05:57:21 EST 2021
Hi,
I found what seems to be an error in the eos_idealGamma subroutine
(physics/Eos/EosMain/Gamma/eos_idealGamma.F90).
In the case of (mode == MODE_DENS_TEMP), the energy is defined as :
Eint = Na k / (gamma - 1) * T / A
this is the same formula as the one in the user guide - formula 16.6 p.236
If we look at its units, we have :
Na k : in cm^2 g / (s^2 K mol)
T : in Kelvin
Eint : in cm^2 / s^2
so A should be in g / mol
According to the user guide: "A is the average atomic mass", actually it
should be the average molar mass (but the value is the same in cgs).
The problem here is the actual definition of A in the code.
A is defined using the eos_singleSpeciesA variable which is initialized
in rp_initParameters to a dimensionless constant "1". The problem is the
absence of dimension.
If you choose to change your units system with "pc_unitsbase" going from
CGS to MKS (in PhysicalConstant), the value of Na and k will change as
well as the unit of Eint but not the unit of A. As a results you will
obtain a Eint 10^3 to low compare to its actual value.
Best regards,
Gabriel Rigon
--
Gabriel Rigon
Laboratory for Theoretical Astronomy & Astrophysics (TA-Lab)
Graduate School of Science
Division of Particle and Astrophysical Science
Nagoya University, Japan
More information about the flash-users
mailing list