mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-13 15:25:22 -05:00
Removed old-style gas constant normalization
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -15,8 +15,6 @@ bool get_config_bool(configuration_keys key)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case NORMALIZE_GAS_CONSTANTS:
|
||||
return false;
|
||||
case NORMALIZE_GAS_CONSTANTS2:
|
||||
return true;
|
||||
default:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Exceptions.h"
|
||||
#include "CoolPropTools.h"
|
||||
|
||||
enum configuration_keys {NORMALIZE_GAS_CONSTANTS, NORMALIZE_GAS_CONSTANTS2};
|
||||
enum configuration_keys {NORMALIZE_GAS_CONSTANTS2};
|
||||
|
||||
namespace CoolProp
|
||||
{
|
||||
|
||||
@@ -51,7 +51,6 @@ protected:
|
||||
assert(n.size() == t.size());
|
||||
assert(n.size() == l.size());
|
||||
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){for(std::size_t i = 0; i < n.size(); ++i){n[i] *= EOS.R_u/R_u_CODATA;}}
|
||||
EOS.alphar.GenExp.add_Power(n,d,t,l);
|
||||
}
|
||||
else if (!type.compare("ResidualHelmholtzGaussian"))
|
||||
@@ -69,7 +68,6 @@ protected:
|
||||
assert(n.size() == epsilon.size());
|
||||
assert(n.size() == beta.size());
|
||||
assert(n.size() == gamma.size());
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){for(std::size_t i = 0; i < n.size(); ++i){n[i] *= EOS.R_u/R_u_CODATA;}}
|
||||
EOS.alphar.GenExp.add_Gaussian(n,d,t,eta,epsilon,beta,gamma);
|
||||
}
|
||||
else if (!type.compare("ResidualHelmholtzNonAnalytic"))
|
||||
@@ -90,7 +88,6 @@ protected:
|
||||
assert(n.size() == B.size());
|
||||
assert(n.size() == C.size());
|
||||
assert(n.size() == D.size());
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){for(std::size_t i = 0; i < n.size(); ++i){n[i] *= EOS.R_u/R_u_CODATA;}}
|
||||
EOS.alphar.NonAnalytic = ResidualHelmholtzNonAnalytic(n,a,b,beta,A,B,C,D);
|
||||
}
|
||||
else if (!type.compare("ResidualHelmholtzLemmon2005"))
|
||||
@@ -104,7 +101,6 @@ protected:
|
||||
assert(n.size() == t.size());
|
||||
assert(n.size() == l.size());
|
||||
assert(n.size() == m.size());
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){for(std::size_t i = 0; i < n.size(); ++i){n[i] *= EOS.R_u/R_u_CODATA;}}
|
||||
EOS.alphar.GenExp.add_Lemmon2005(n,d,t,l,m);
|
||||
}
|
||||
else if (!type.compare("ResidualHelmholtzExponential"))
|
||||
@@ -118,7 +114,6 @@ protected:
|
||||
assert(n.size() == t.size());
|
||||
assert(n.size() == g.size());
|
||||
assert(n.size() == l.size());
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){for(std::size_t i = 0; i < n.size(); ++i){n[i] *= EOS.R_u/R_u_CODATA;}}
|
||||
EOS.alphar.GenExp.add_Exponential(n,d,t,g,l);
|
||||
}
|
||||
else if (!type.compare("ResidualHelmholtzAssociating"))
|
||||
@@ -374,10 +369,6 @@ protected:
|
||||
|
||||
// Validate the equation of state that was just created
|
||||
EOS.validate();
|
||||
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS)){
|
||||
EOS.R_u = R_u_CODATA;
|
||||
}
|
||||
}
|
||||
|
||||
/// Parse the list of possible equations of state
|
||||
|
||||
@@ -171,7 +171,7 @@ long double HelmholtzEOSMixtureBackend::calc_gas_constant(void)
|
||||
return components[0]->gas_constant();
|
||||
}
|
||||
else{
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS) || get_config_bool(NORMALIZE_GAS_CONSTANTS2)){
|
||||
if (get_config_bool(NORMALIZE_GAS_CONSTANTS2)){
|
||||
return R_u_CODATA;
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user