Implemented access to mixture binary pairs in get_global_param_string

See https://github.com/CoolProp/CoolProp/issues/152

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-09-24 16:53:51 +02:00
parent ccca000535
commit 07cd616c38
3 changed files with 24 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
namespace CoolProp{
/** \brief A library of binary pair parameters for the mixture
*
* Each entry in the binary pair library includes reducing parameters as well as the name of the reducing function to be used and
@@ -91,6 +92,16 @@ public:
};
static MixtureBinaryPairLibrary mixturebinarypairlibrary;
std::string get_csv_mixture_binary_pairs()
{
std::vector<std::string> out;
for (std::map< std::vector<std::string>, std::vector<Dictionary> >::iterator it = mixturebinarypairlibrary.binary_pair_map.begin(); it != mixturebinarypairlibrary.binary_pair_map.end(); ++it)
{
out.push_back(strjoin(it->first, "&"));
}
return strjoin(out, ",");
}
std::string get_reducing_function_name(std::string CAS1, std::string CAS2)
{
std::vector<std::string> CAS;

View File

@@ -4,6 +4,14 @@
#include "HelmholtzEOSMixtureBackend.h"
namespace CoolProp{
/** \brief Get a comma-separated list of CAS code pairs separated by commas
*
* Each of the pairs will be CAS1&CAS2 ("&" delimited)
*/
std::string get_csv_mixture_binary_pairs();
std::string get_mixing_pair_info(std::string CAS1, std::string CAS2, std::string key);
class MixtureParameters
{