From b98d24892d51606d4e3eaeafe382992d320ebba5 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Thu, 2 Oct 2014 17:02:54 +0200 Subject: [PATCH] Oops, forgot CoolProp.cpp See also 2f6b083aff63ba61822e6f75539366dc24a9760a Signed-off-by: Ian Bell --- src/CoolProp.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/CoolProp.cpp b/src/CoolProp.cpp index 9fc28731..56053088 100644 --- a/src/CoolProp.cpp +++ b/src/CoolProp.cpp @@ -906,9 +906,36 @@ std::string get_fluid_param_string(std::string FluidName, std::string ParamName) { return fluid->REFPROPname; } + else if (ParamName.find("BibTeX") == 0) // Starts with "BibTeX" + { + std::vector parts = strsplit(ParamName,'-'); + // + std::string item = parts[1]; + if (item == "EOS"){ + return fluid->pEOS->BibTeX_EOS; + } + else if (item == "CP0"){ + return fluid->pEOS->BibTeX_CP0; + } + else if (item == "SURFACE_TENSION"){ + return fluid->ancillaries.surface_tension.BibTeX; + } + else if (item == "MELTING_LINE"){ + return fluid->ancillaries.melting_line.BibTeX; + } + else if (item == "VISCOSITY"){ + return fluid->transport.BibTeX_viscosity; + } + else if (item == "CONDUCTIVITY"){ + return fluid->transport.BibTeX_conductivity; + } + else{ + return format("Could not match BibTeX item: %s", item.c_str()); + } + } else { - return format("Input value [%s] is invalid for Fluid [%s]",ParamName.c_str(),FluidName.c_str()).c_str(); + return format("Input value [%s] is invalid for Fluid [%s]",ParamName.c_str(),FluidName.c_str()); } } catch(std::exception &e)