mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-12 23:05:18 -05:00
Fixed missing trivial parameters to Props1SI
Closes https://github.com/CoolProp/CoolProp/issues/223 Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -526,6 +526,51 @@ std::string HelmholtzEOSMixtureBackend::calc_name(void)
|
||||
return components[0]->name;
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_ODP(void)
|
||||
{
|
||||
if (components.size() != 1){
|
||||
throw ValueError(format("For now, calc_ODP is only valid for pure and pseudo-pure fluids, %d components", components.size()));
|
||||
}
|
||||
else{
|
||||
long double v = components[0]->environment.ODP;
|
||||
if (!ValidNumber(v) || v < 0){ throw ValueError(format("ODP value is not specified or invalid")); }
|
||||
return v;
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_GWP20(void)
|
||||
{
|
||||
if (components.size() != 1){
|
||||
throw ValueError(format("For now, calc_GWP20 is only valid for pure and pseudo-pure fluids, %d components", components.size()));
|
||||
}
|
||||
else{
|
||||
long double v = components[0]->environment.GWP20;
|
||||
if (!ValidNumber(v) || v < 0){ throw ValueError(format("GWP20 value is not specified or invalid"));}
|
||||
return v;
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_GWP100(void)
|
||||
{
|
||||
if (components.size() != 1){
|
||||
throw ValueError(format("For now, calc_GWP100 is only valid for pure and pseudo-pure fluids, %d components", components.size()));
|
||||
}
|
||||
else{
|
||||
long double v = components[0]->environment.GWP100;
|
||||
if (!ValidNumber(v) || v < 0){ throw ValueError(format("GWP100 value is not specified or invalid")); }
|
||||
return v;
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_GWP500(void)
|
||||
{
|
||||
if (components.size() != 1){
|
||||
throw ValueError(format("For now, calc_GWP500 is only valid for pure and pseudo-pure fluids, %d components", components.size()));
|
||||
}
|
||||
else{
|
||||
long double v = components[0]->environment.GWP500;
|
||||
if (!ValidNumber(v) || v < 0){ throw ValueError(format("GWP500 value is not specified or invalid")); }
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
long double HelmholtzEOSMixtureBackend::calc_T_critical(void)
|
||||
{
|
||||
if (components.size() != 1){
|
||||
|
||||
@@ -63,6 +63,10 @@ public:
|
||||
long double calc_saturation_ancillary(parameters param, int Q, parameters given, double value);
|
||||
void calc_ssat_max(void);
|
||||
void calc_hsat_max(void);
|
||||
long double calc_GWP20();
|
||||
long double calc_GWP500();
|
||||
long double calc_GWP100();
|
||||
long double calc_ODP();
|
||||
|
||||
const CoolProp::SimpleState &calc_state(const std::string &state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user