Skip to content

Commit

Permalink
Brought back surface tension support
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
  • Loading branch information
ibell committed Dec 4, 2014
1 parent d7f86a8 commit 707ee47
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/AbstractState.cpp
Expand Up @@ -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:
Expand Down
12 changes: 12 additions & 0 deletions src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp
Expand Up @@ -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(),
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h
Expand Up @@ -195,14 +195,15 @@ class HelmholtzEOSMixtureBackend : public AbstractState {
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);
long double calc_viscosity_background(long double eta_dilute);
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);
Expand Down
1 change: 1 addition & 0 deletions src/DataStructures.cpp
Expand Up @@ -135,6 +135,7 @@ class ParameterInformation
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 )
Expand Down

0 comments on commit 707ee47

Please sign in to comment.