Skip to content

Commit

Permalink
Merge pull request #139 from newcleo-dev-team/135_si_units
Browse files Browse the repository at this point in the history
Updated all quantities to be expressed in SI units
  • Loading branch information
panDanieleN authored Feb 21, 2024
2 parents 3ab88a7 + 4b7012a commit 24dfc60
Show file tree
Hide file tree
Showing 11 changed files with 568 additions and 568 deletions.
8 changes: 4 additions & 4 deletions lbh15/_commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
LEAD_MELTING_LATENT_HEAT: float = 23.07e3 # [J/kg]
LEAD_BOILING_TEMPERATURE: float = 2021 # [K]
LEAD_VAPORISATION_HEAT: float = 858.6e3 # [J/kg]
LEAD_MOLAR_MASS: float = 207.20 # [g/mol]
LEAD_MOLAR_MASS: float = 0.20720 # [kg/mol]

# BISMUTH CONSTANTS
BISMUTH_MELTING_TEMPERATURE: float = 544.6 # [K]
BISMUTH_MELTING_LATENT_HEAT: float = 53.3e3 # [J/kg]
BISMUTH_BOILING_TEMPERATURE: float = 1831 # [K]
BISMUTH_VAPORISATION_HEAT: float = 856.2e3 # [J/kg]
BISMUTH_MOLAR_MASS: float = 208.98 # [g/mol]
BISMUTH_MOLAR_MASS: float = 0.20898 # [kg/mol]

# LEAD-BISMUTH-EUTECTIC CONSTANTS
LBE_MELTING_TEMPERATURE: float = 398.0 # [K]
LBE_MELTING_LATENT_HEAT: float = 38.6e3 # [J/kg]
LBE_BOILING_TEMPERATURE: float = 1927 # [K]
LBE_VAPORISATION_HEAT: float = 856.6e3 # [J/kg]
LBE_MOLAR_MASS: float = 0.55*BISMUTH_MOLAR_MASS \
+ 0.45*LEAD_MOLAR_MASS # [g/mol]
+ 0.45*LEAD_MOLAR_MASS # [kg/mol]

# OXYGEN CONSTANT
OXYGEN_MOLAR_MASS: float = 16 # [g/mol]
OXYGEN_MOLAR_MASS: float = 0.016 # [kg/mol]
4 changes: 2 additions & 2 deletions lbh15/bismuth.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class Bismuth(LiquidMetalInterface):
- **ni_sol** (float) : Nickel solubility :math:`[wt.\\%]`
- **cr_sol** (float) : Chromium solubility :math:`[wt.\\%]`
- **o_sol** (float) : Oxygen solubility :math:`[wt.\\%]`
- **o_dif** (float) : Oxygen diffusivity :math:`[cm^2 / s]`
- **o_dif** (float) : Oxygen diffusivity :math:`[m^2 / s]`
- **o_pp** (float) : Oxygen partial pressure divided by Oxygen \
concentration squared :math:`[atm / wt.\\%^2]`
concentration squared :math:`[Pa / wt.\\%^2]`
Example
-------
Expand Down
6 changes: 3 additions & 3 deletions lbh15/lbe.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class LBE(LiquidMetalInterface):
- **ni_sol** (float) : Nickel solubility :math:`[wt.\\%]`
- **cr_sol** (float) : Chromium solubility :math:`[wt.\\%]`
- **o_sol** (float) : Oxygen solubility :math:`[wt.\\%]`
- **o_dif** (float) : Oxygen diffusivity :math:`[cm^2 / s]`
- **fe_dif** (float) : Iron diffusivity :math:`[cm^2 / s]`
- **o_dif** (float) : Oxygen diffusivity :math:`[m^2 / s]`
- **fe_dif** (float) : Iron diffusivity :math:`[m^2 / s]`
- **o_pp** (float) : Oxygen partial pressure divided by Oxygen \
concentration squared :math:`[atm / wt.\\%^2]`
concentration squared :math:`[Pa / wt.\\%^2]`
- **lim_fe_sat** (float) : Lower limit of Oxygen concentration with \
Iron at saturation :math:`[wt.\\%]`
- **lim_cr_sat** (float) : Lower limit of Oxygen concentration with \
Expand Down
14 changes: 7 additions & 7 deletions lbh15/lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ class Lead(LiquidMetalInterface):
- **cr_sol** (float) : Chromium solubility :math:`[wt.\\%]`
- **si_sol** (float) : Silicon solubility :math:`[wt.\\%]`
- **o_sol** (float) : Oxygen solubility :math:`[wt.\\%]`
- **o_dif** (float) : Oxygen diffusivity :math:`[cm^2 / s]`
- **fe_dif** (float) : Iron diffusivity :math:`[cm^2 / s]`
- **co_dif** (float) : Cobalt diffusivity :math:`[cm^2 / s]`
- **se_dif** (float) : Selenium diffusivity :math:`[cm^2 / s]`
- **in_dif** (float) : Indium diffusivity :math:`[cm^2 / s]`
- **te_dif** (float) : Tellurium diffusivity :math:`[cm^2 / s]`
- **o_dif** (float) : Oxygen diffusivity :math:`[m^2 / s]`
- **fe_dif** (float) : Iron diffusivity :math:`[m^2 / s]`
- **co_dif** (float) : Cobalt diffusivity :math:`[m^2 / s]`
- **se_dif** (float) : Selenium diffusivity :math:`[m^2 / s]`
- **in_dif** (float) : Indium diffusivity :math:`[m^2 / s]`
- **te_dif** (float) : Tellurium diffusivity :math:`[m^2 / s]`
- **o_pp** (float) : Oxygen partial pressure divided by Oxygen \
concentration squared :math:`[atm / wt.\\%^2]`
concentration squared :math:`[Pa / wt.\\%^2]`
- **lim_fe_sat** (float) : Lower limit of Oxygen concentration with \
Iron at saturation :math:`[wt.\\%]`
- **lim_cr_sat** (float) : Lower limit of Oxygen concentration with \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def initialization_helper(self,
property_value : float
oxygen partial pressure in liquid bismuth divided by the
oxygen concentration in liquid bismuth squared
in :math:`[atm. /wt.\\%^2]`
in :math:`[Pa /wt.\\%^2]`
Returns
-------
float
Temperature guess value in :math:`[K]`
"""
if property_value < 1e-4:
if property_value < 10.1325:
return 1200
return 1500

Expand All @@ -56,7 +56,7 @@ def units(self) -> str:
str : Oxygen partial pressure in liquid bismuth divided by the
Oxygen concentration in liquid bismuth squared unit
"""
return "[atm.wt.%^-2]"
return "[Pa.wt.%^-2]"

@property
def long_name(self) -> str:
Expand Down Expand Up @@ -105,10 +105,10 @@ def correlation(self, T: float, p: float = atm,
-------
float:
Oxygen partial pressure divided by Oxygen concentration
squared in :math:`[atm. / wt.\\%^2]`
squared in :math:`[Pa / wt.\\%^2]`
"""
return np.power(10, 2 / 2.3 / R * (-95502 / T + 9.69))\
* M * M / M_O / M_O
* M * M / M_O / M_O * 101325

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -156,10 +156,10 @@ def correlation(self, T: float, p: float = atm,
-------
float:
Oxygen partial pressure divided by Oxygen concentration
squared in :math:`[atm. / wt.\\%^2]`
squared in :math:`[Pa / wt.\\%^2]`
"""
return np.power(10, 2 / 2.3 / R * (-101098 / T + 15.66))\
* M * M / M_O / M_O
* M * M / M_O / M_O * 101325

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -207,10 +207,10 @@ def correlation(self, T: float, p: float = atm,
-------
float:
Oxygen partial pressure divided by Oxygen concentration
squared in :math:`[atm. / wt.\\%^2]`
squared in :math:`[Pa / wt.\\%^2]`
"""
return np.power(10, 2 / 2.3 / R * (-68156 / T + 14.14))\
* M * M / M_O / M_O
* M * M / M_O / M_O * 101325

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -258,10 +258,10 @@ def correlation(self, T: float, p: float = atm,
-------
float:
Oxygen partial pressure divided by Oxygen concentration
squared in :math:`[atm. / wt.\\%^2]`
squared in :math:`[Pa / wt.\\%^2]`
"""
return np.power(10, 2 / 2.3 / R * (-95437 / T + 3.78))\
* M * M / M_O / M_O
* M * M / M_O / M_O * 101325

@property
def correlation_name(self) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def units(self) -> str:
"""
str : Oxygen diffusivity unit
"""
return "[cm^2.s^-1]"
return "[m^2.s^-1]"

@property
def long_name(self) -> str:
Expand Down Expand Up @@ -67,9 +67,9 @@ def correlation(self, T: float, p: float = atm,
Returns
-------
float:
diffusivity in :math:`[cm^2 / s]`
diffusivity in :math:`[m^2 / s]`
"""
return np.exp(-49229 / R / T) * 1.07e-2
return np.exp(-49229 / R / T) * 1.07e-6

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -113,9 +113,9 @@ def correlation(self, T: float, p: float = atm,
Returns
-------
float:
diffusivity in :math:`[cm^2 / s]`
diffusivity in :math:`[m^2 / s]`
"""
return np.exp(-26610 / R / T) * 1.98e-4
return np.exp(-26610 / R / T) * 1.98e-8

@property
def correlation_name(self) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def units(self) -> str:
"""
str : Oxygen diffusivity unit
"""
return "[cm^2.s^-1]"
return "[m^2.s^-1]"

@property
def long_name(self) -> str:
Expand Down Expand Up @@ -66,9 +66,9 @@ def correlation(self, T: float, p: float = atm,
Returns
-------
float:
diffusivity in :math:`[cm^2 / s]`
diffusivity in :math:`[m^2 / s]`
"""
return np.exp(-43073 / R / T) * 2.39e-2
return np.exp(-43073 / R / T) * 2.39e-6

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -112,9 +112,9 @@ def correlation(self, T: float, p: float = atm,
Returns
-------
float:
diffusivity in :math:`[cm^2 / s]`
diffusivity in :math:`[m^2 / s]`
"""
return np.exp(-69069 / R / T) * 0.154
return np.exp(-69069 / R / T) * 0.154e-4

@property
def correlation_name(self) -> str:
Expand Down Expand Up @@ -157,9 +157,9 @@ def correlation(self, T: float, p: float = atm,
Returns
-------
float:
diffusivity in :math:`[cm^2 / s]`
diffusivity in :math:`[m^2 / s]`
"""
return np.power(10, - 2.31 - 2295 / T)
return np.power(10, - 2.31 - 2295 / T) * 1.0e-4

@property
def name(self) -> str:
Expand All @@ -173,7 +173,7 @@ def units(self) -> str:
"""
str : Iron diffusivity unit
"""
return "[cm^2.s^-1]"
return "[m^2.s^-1]"

@property
def range(self) -> List[float]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def initialization_helper(self,
property_value : float
oxygen partial pressure in liquid lbe divided by the
oxygen concentration in liquid lbe squared
in :math:`[atm. /wt.\\%^2]`
in :math:`[Pa /wt.\\%^2]`
Returns
-------
Expand Down Expand Up @@ -64,10 +64,10 @@ def correlation(self, T: float, p: float = atm,
-------
float:
Oxygen partial pressure divided by Oxygen concentration
squared in :math:`[atm. / wt.\\%^2]`
squared in :math:`[Pa / wt.\\%^2]`
"""
return np.power(10, 2 / 2.3 / R * (-127398 / T + 27.938))\
* M * M / M_O / M_O
* M * M / M_O / M_O * 101325

@property
def name(self) -> str:
Expand All @@ -82,7 +82,7 @@ def units(self) -> str:
str : Oxygen partial pressure in liquid lbe divided by the
Oxygen concentration in liquid lbe squared unit
"""
return "[atm.wt.%^-2]"
return "[Pa.wt.%^-2]"

@property
def range(self) -> List[float]:
Expand Down
Loading

0 comments on commit 24dfc60

Please sign in to comment.