mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-23 04:47:57 -05:00
Fix stack overflow (and bug) with TTSE and mass-based units; closes #843
This commit is contained in:
@@ -136,7 +136,7 @@ void CoolProp::TTSEBackend::update(CoolProp::input_pairs input_pair, double val1
|
||||
}
|
||||
case DmassP_INPUTS:{
|
||||
// Call again, but this time with molar units; D: [kg/m^3] / [kg/mol] -> [mol/m^3]
|
||||
update(DmassP_INPUTS, val1 / AS->molar_mass(), val2); return;
|
||||
update(DmolarP_INPUTS, val1 / AS->molar_mass(), val2); return;
|
||||
}
|
||||
case PUmass_INPUTS:{
|
||||
// Call again, but this time with molar units; U: [J/kg] * [kg/mol] -> [J/mol]
|
||||
@@ -174,11 +174,11 @@ void CoolProp::TTSEBackend::update(CoolProp::input_pairs input_pair, double val1
|
||||
}
|
||||
case DmassT_INPUTS:{
|
||||
// Call again, but this time with molar units; D: [kg/m^3] / [kg/mol] -> [mol/m^3]
|
||||
update(DmassP_INPUTS, val1 / AS->molar_mass(), val2); return;
|
||||
update(DmolarT_INPUTS, val1 / AS->molar_mass(), val2); return;
|
||||
}
|
||||
case SmassT_INPUTS:{
|
||||
// Call again, but this time with molar units; S: [J/kg/K] * [kg/mol] -> [J/mol/K]
|
||||
update(PSmolar_INPUTS, val1*AS->molar_mass(),val2); return;
|
||||
update(SmolarT_INPUTS, val1*AS->molar_mass(), val2); return;
|
||||
}
|
||||
case SmolarT_INPUTS:
|
||||
case DmolarT_INPUTS:{
|
||||
|
||||
Reference in New Issue
Block a user