From d0ff7204fadde8cb986385fe9097155aa5bf2b8a Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Fri, 22 Apr 2016 21:09:13 -0600 Subject: [PATCH] Fix(?) issues with loading multiple predefined mixtures in REFPROP; see #1023 --- src/Backends/REFPROP/REFPROPMixtureBackend.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp index 13a066e2..7caf742a 100644 --- a/src/Backends/REFPROP/REFPROPMixtureBackend.cpp +++ b/src/Backends/REFPROP/REFPROPMixtureBackend.cpp @@ -79,7 +79,7 @@ std::string get_REFPROP_fluid_path_prefix() throw CoolProp::ValueError(format("ALTERNATIVE_REFPROP_PATH [%s] must end with a slash character", alt_refprop_path.c_str())); } // The alternative path has been set, so we give all fluid paths as relative to this directory - return alt_refprop_path + "/fluids/"; + return alt_refprop_path + "fluids/"; } #if defined(__ISWINDOWS__) return rpPath; @@ -100,7 +100,7 @@ std::string get_REFPROP_mixtures_path_prefix() throw CoolProp::ValueError(format("ALTERNATIVE_REFPROP_PATH [%s] must end with a slash character", alt_refprop_path.c_str())); } // The alternative path has been set - rpPath = alt_refprop_path + "mixtures/"; + return alt_refprop_path + "mixtures/"; } #if defined(__ISWINDOWS__) return rpPath; @@ -331,13 +331,7 @@ void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector &f LoadedREFPROPRef = mix; cached_component_string = mix; this->fluid_names.clear(); - for (long i = 1; i < N+1; ++i){ - char hnam[12] = " ", hn80[80], hcasn[12]; - NAMEdll(&i, hnam, hn80, hcasn, 12, 80, 12); - std::string as_string = std::string(hnam, hnam + 12); - std::string name = upper(strrstrip(as_string)); - this->fluid_names.push_back(name); - } + this->fluid_names.push_back(components_joined_raw); if (CoolProp::get_debug_level() > 5){ std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); } if (dbg_refprop) std::cout << format("%s:%d: Successfully loaded REFPROP fluid: %s\n",__FILE__,__LINE__, components_joined.c_str()); if (get_config_bool(REFPROP_DONT_ESTIMATE_INTERACTION_PARAMETERS) && ierr == -117){