CoolProp  6.6.1dev
An open-source fluid property and humid air property database
CoolProp.h
Go to the documentation of this file.
1 /*
2 This header file includes the high level API that is meant to be accessed via C++. Functions may accept C++ types like std::vector
3 
4 For the C-style wrapper, refer to CoolPropLib.h
5 
6 \sa CoolPropLib.h
7 */
8 
16 #ifndef CoolProp_H
17 #define CoolProp_H
18 
19 #include <string>
20 #include <vector>
21 #include "DataStructures.h"
22 
23 namespace CoolProp {
24 
28 double Props1SI(std::string FluidName, std::string Output);
36 std::vector<std::vector<double>> Props1SImulti(const std::vector<std::string>& Outputs, const std::string& backend, const std::vector<std::string>& fluids, const std::vector<double>& fractions);
44 double PropsSI(const std::string& Output, const std::string& Name1, double Prop1, const std::string& Name2, double Prop2,
45  const std::string& FluidName);
46 
58 std::vector<std::vector<double>> PropsSImulti(const std::vector<std::string>& Outputs, const std::string& Name1, const std::vector<double>& Prop1,
59  const std::string& Name2, const std::vector<double>& Prop2, const std::string& backend,
60  const std::vector<std::string>& fluids, const std::vector<double>& fractions);
61 
64 int get_debug_level();
67 void set_debug_level(int level);
68 
71 void set_error_string(const std::string& error);
74 void set_warning_string(const std::string& warning);
75 
76 /* \brief Extract a value from the saturation ancillary
77  *
78  * @param fluid_name The name of the fluid to be used - HelmholtzEOS backend only
79  * @param output The desired output variable ("P" for instance for pressure)
80  * @param Q The quality, 0 or 1
81  * @param input The input variable ("T")
82  * @param value The input value
83  */
84 double saturation_ancillary(const std::string& fluid_name, const std::string& output, int Q, const std::string& input, double value);
85 
89 std::string get_global_param_string(const std::string& ParamName);
90 
91 /*/// Get a long that represents the fluid type
94  long getFluidType(std::string FluidName);*/
95 
114 std::string get_fluid_param_string(const std::string& FluidName, const std::string& ParamName);
115 
123 bool is_valid_fluid_string(const std::string& fluidstring);
124 
131 bool add_fluids_as_JSON(const std::string& backend, const std::string& fluidstring);
132 
153 void set_reference_stateS(const std::string& FluidName, const std::string& reference_state);
154 
161 void set_reference_stateD(const std::string& FluidName, double T, double rhomolar, double hmolar0, double smolar0);
162 
170 std::string PhaseSI(const std::string& Name1, double Prop1, const std::string& Name2, double Prop2, const std::string& FluidName);
171 
178 void extract_backend(std::string fluid_string, std::string& backend, std::string& fluid);
179 
186 std::string extract_fractions(const std::string& fluid_string, std::vector<double>& fractions);
187 
191 std::string phase_lookup_string(phases Phase);
192 
193 } /* namespace CoolProp */
194 #endif