CoolProp 7.2.0
An open-source fluid property and humid air property database
CoolProp.h
Go to the documentation of this file.
1/*
2This header file includes the high level API that is meant to be accessed via C++. Functions may accept C++ types like std::vector
3
4For 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
23namespace CoolProp {
24
28double Props1SI(std::string FluidName, std::string Output);
36std::vector<std::vector<double>> Props1SImulti(const std::vector<std::string>& Outputs, const std::string& backend,
37 const std::vector<std::string>& fluids, const std::vector<double>& fractions);
45double PropsSI(const std::string& Output, const std::string& Name1, double Prop1, const std::string& Name2, double Prop2,
46 const std::string& FluidName);
47
59std::vector<std::vector<double>> PropsSImulti(const std::vector<std::string>& Outputs, const std::string& Name1, const std::vector<double>& Prop1,
60 const std::string& Name2, const std::vector<double>& Prop2, const std::string& backend,
61 const std::vector<std::string>& fluids, const std::vector<double>& fractions);
62
65int get_debug_level();
68void set_debug_level(int level);
69
72void set_error_string(const std::string& error);
75void set_warning_string(const std::string& warning);
76
77/* \brief Extract a value from the saturation ancillary
78 *
79 * @param fluid_name The name of the fluid to be used - HelmholtzEOS backend only
80 * @param output The desired output variable ("P" for instance for pressure)
81 * @param Q The quality, 0 or 1
82 * @param input The input variable ("T")
83 * @param value The input value
84 */
85double saturation_ancillary(const std::string& fluid_name, const std::string& output, int Q, const std::string& input, double value);
86
90std::string get_global_param_string(const std::string& ParamName);
91
92/*/// Get a long that represents the fluid type
95 long getFluidType(std::string FluidName);*/
96
115std::string get_fluid_param_string(const std::string& FluidName, const std::string& ParamName);
116
124bool is_valid_fluid_string(const std::string& fluidstring);
125
132bool add_fluids_as_JSON(const std::string& backend, const std::string& fluidstring);
133
154void set_reference_stateS(const std::string& FluidName, const std::string& reference_state);
155
162void set_reference_stateD(const std::string& FluidName, double T, double rhomolar, double hmolar0, double smolar0);
163
171std::string PhaseSI(const std::string& Name1, double Prop1, const std::string& Name2, double Prop2, const std::string& FluidName);
172
179void extract_backend(std::string fluid_string, std::string& backend, std::string& fluid);
180
187std::string extract_fractions(const std::string& fluid_string, std::vector<double>& fractions);
188
192std::string phase_lookup_string(phases Phase);
193
194} /* namespace CoolProp */
195#endif