CoolProp  4.2.5
An open-source fluid property and humid air property database
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CoolProp.h
Go to the documentation of this file.
1 /*
2 Add some pre-processor directives to this file so that it can either be built as
3 usual, or if the COOLPROP_LIB macro is defined, it will export the functions in
4 this file for building a static or dynamic library.
5 
6 The __stdcall calling convention is used by default. By providing the macro CONVENTION, the
7 calling convention can be changed at build time.
8 
9 Any functions that are exported to DLL must also add the "EXPORT_CODE function_name CONVENTION ..." code
10 to the CoolProp.cpp implementation. See the Props function for instance
11 */
12 
20 #ifndef CoolProp_H
21 #define CoolProp_H
22 
23  #include "FluidClass.h"
24  #include "CoolPropDLL.h"
25  #include "Units.h"
26 
31  double Props1(std::string FluidName,std::string Output);
39  double Props(std::string Output,std::string Name1, double Prop1, std::string Name2, double Prop2, std::string FluidName);
40 
48  double Props(char Output,char Name1, double Prop1, char Name2, double Prop2, char * FluidName);
56  double Props(std::string Output,char Name1, double Prop1, char Name2, double Prop2, std::string FluidName);
61  double Props1SI(std::string FluidName,std::string Output);
69  double PropsSI(std::string Output,std::string Name1, double Prop1, std::string Name2, double Prop2, std::string FluidName);
70 
76  double DerivTerms(std::string Term, double T, double rho, std::string FluidName);
82  double DerivTerms(long iTerm, double T, double rho, Fluid * pFluid);
83 
87  long getFluidType(std::string FluidName);
88 
92  std::string get_global_param_string(std::string ParamName);
97  std::string get_fluid_param_string(std::string FluidName, std::string ParamName);
103  std::string Phase(std::string FluidName, double T, double p);
109  std::string Phase_Trho(std::string FluidName, double T, double rho);
115  std::string Phase_Tp(std::string FluidName, double T, double p);
120  std::string get_BibTeXKey(std::string FluidName, std::string item);
122  bool add_REFPROP_fluid(std::string FluidName);
126  long get_param_index(std::string param);
130  long get_Fluid_index(std::string FluidName);
134  Fluid * get_fluid(long iFluid);
137  void set_err_string(std::string err_string);
141  int set_reference_stateP(Fluid *pFluid, std::string reference_state);
145  int set_reference_stateS(std::string FluidName, std::string reference_state);
152  int set_reference_stateD(std::string FluidName, double T, double rho, double h0, double s0);
158  void _set_standard_unit_system(int);
161  void set_warning(std::string warning);
162  // Define some constants that will be used throughout
163  #include "GlobalConstants.h"
164 
165  // **************** DEPRECATION WARNING ***********************
167  void set_phase(std::string Phase_str);
168 
169 #endif
170 
int set_reference_stateS(std::string FluidName, std::string reference_state)
Definition: CoolProp.cpp:1037
long getFluidType(std::string FluidName)
Definition: CoolProp.cpp:369
double DerivTerms(std::string Term, double T, double rho, std::string FluidName)
Definition: CoolProp.cpp:1004
double Props1(std::string FluidName, std::string Output)
Definition: CoolProp.cpp:586
bool add_REFPROP_fluid(std::string FluidName)
Add a REFPROP fluid to the fluid listing in CoolProp.
Definition: CoolProp.cpp:253
long get_param_index(std::string param)
Definition: CoolProp.cpp:288
void _set_standard_unit_system(int)
Definition: CoolProp.cpp:62
int set_reference_stateP(Fluid *pFluid, std::string reference_state)
Definition: CoolProp.cpp:1049
void set_warning(std::string warning)
Definition: CoolProp.cpp:59
void set_err_string(std::string err_string)
Definition: CoolProp.cpp:191
std::string Phase(std::string FluidName, double T, double p)
Definition: CoolProp.cpp:490
Fluid is the abstract base class that is employed by all the other fluids.
Definition: FluidClass.h:147
std::string Phase_Trho(std::string FluidName, double T, double rho)
Definition: CoolProp.cpp:476
int _get_standard_unit_system()
Definition: CoolProp.cpp:61
int set_reference_stateD(std::string FluidName, double T, double rho, double h0, double s0)
Definition: CoolProp.cpp:1100
std::string Phase_Tp(std::string FluidName, double T, double p)
Definition: CoolProp.cpp:504
std::string get_global_param_string(std::string ParamName)
Definition: CoolProp.cpp:1142
Fluid * get_fluid(long iFluid)
Definition: CoolProp.cpp:236
long get_Fluid_index(std::string FluidName)
Definition: CoolProp.cpp:239
double PropsSI(std::string Output, std::string Name1, double Prop1, std::string Name2, double Prop2, std::string FluidName)
Definition: CoolProp.cpp:886
std::string get_BibTeXKey(std::string FluidName, std::string item)
Definition: CoolProp.cpp:1122
void set_phase(std::string Phase_str)
Nearly deprecated function.
Definition: CoolProp.cpp:196
std::string get_fluid_param_string(std::string FluidName, std::string ParamName)
Definition: CoolProp.cpp:1173
double Props1SI(std::string FluidName, std::string Output)
Definition: CoolProp.cpp:570
double Props(std::string Output, std::string Name1, double Prop1, std::string Name2, double Prop2, std::string FluidName)
Definition: CoolProp.cpp:902