mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-02-05 11:25:09 -05:00
Brought back surface tension support
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -279,6 +279,8 @@ double AbstractState::keyed_output(int key)
|
||||
return viscosity();
|
||||
case iconductivity:
|
||||
return conductivity();
|
||||
case isurface_tension:
|
||||
return surface_tension();
|
||||
case iPhase:
|
||||
return phase();
|
||||
case iZ:
|
||||
|
||||
@@ -271,6 +271,9 @@ long double HelmholtzEOSMixtureBackend::calc_saturation_ancillary(parameters par
|
||||
return components[0]->ancillaries.rhoV.invert(value);
|
||||
}
|
||||
}
|
||||
else if (param == isurface_tension && given == iT){
|
||||
return components[0]->ancillaries.surface_tension.evaluate(value);
|
||||
}
|
||||
else{
|
||||
throw ValueError(format("calc of %s given %s is invalid in calc_saturation_ancillary",
|
||||
get_parameter_information(param,"short").c_str(),
|
||||
@@ -296,6 +299,15 @@ long double HelmholtzEOSMixtureBackend::calc_melting_line(int param, int given,
|
||||
throw NotImplementedError(format("calc_melting_line not implemented for mixtures"));
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_surface_tension(void)
|
||||
{
|
||||
if (is_pure_or_pseudopure){
|
||||
return components[0]->ancillaries.surface_tension.evaluate(T());
|
||||
}
|
||||
else{
|
||||
throw NotImplementedError(format("surface tension not implemented for mixtures"));
|
||||
}
|
||||
}
|
||||
long double HelmholtzEOSMixtureBackend::calc_viscosity_dilute(void)
|
||||
{
|
||||
if (is_pure_or_pseudopure)
|
||||
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
long double calc_d3alpha0_dDelta_dTau2(void);
|
||||
long double calc_d3alpha0_dTau3(void);
|
||||
|
||||
//long double calc_surface_tension(void);
|
||||
long double calc_surface_tension(void);
|
||||
long double calc_viscosity(void);
|
||||
long double calc_viscosity_dilute(void);
|
||||
long double calc_viscosity_background(void);
|
||||
@@ -203,6 +203,7 @@ public:
|
||||
long double calc_conductivity(void);
|
||||
long double calc_conductivity_background(void);
|
||||
|
||||
|
||||
long double calc_Tmin(void);
|
||||
long double calc_Tmax(void);
|
||||
long double calc_pmax(void);
|
||||
|
||||
@@ -135,6 +135,7 @@ public:
|
||||
index_map.insert(std::pair<std::string, int>("molemass", imolar_mass));
|
||||
index_map.insert(std::pair<std::string, int>("molarmass", imolar_mass));
|
||||
index_map.insert(std::pair<std::string, int>("A", ispeed_sound));
|
||||
index_map.insert(std::pair<std::string, int>("I", isurface_tension));
|
||||
|
||||
std::map<std::string,int>::iterator it;
|
||||
for(it = index_map.begin(); it != index_map.end(); ++it )
|
||||
|
||||
Reference in New Issue
Block a user