CoolProp  6.1.0
An open-source fluid property and humid air property database
Macros | Functions
CoolPropLib.h File Reference

Go to the source code of this file.

Macros

#define EXPORT_CODE
 This file defines an interface for shared library (DLL) wrapping. More...
 
#define CONVENTION
 

Functions

EXPORT_CODE double CONVENTION Props1SI (const char *FluidName, const char *Output)
 
EXPORT_CODE double CONVENTION PropsSI (const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char *Ref)
 
EXPORT_CODE long CONVENTION PhaseSI (const char *Name1, double Prop1, const char *Name2, double Prop2, const char *Ref, char *phase, int n)
 
EXPORT_CODE long CONVENTION get_global_param_string (const char *param, char *Output, int n)
 
EXPORT_CODE long CONVENTION get_parameter_information_string (const char *key, char *Output, int n)
 
EXPORT_CODE long CONVENTION get_mixture_binary_pair_data (const char *CAS1, const char *CAS2, const char *key)
 
EXPORT_CODE long CONVENTION get_fluid_param_string (const char *fluid, const char *param, char *Output, int n)
 
EXPORT_CODE void CONVENTION set_config_string (const char *key, const char *val)
 Set configuration string. More...
 
EXPORT_CODE int CONVENTION set_reference_stateS (const char *Ref, const char *reference_state)
 
EXPORT_CODE int CONVENTION set_reference_stateD (const char *Ref, double T, double rhomolar, double hmolar0, double smolar0)
 
EXPORT_CODE void CONVENTION propssi_ (const char *Output, const char *Name1, const double *Prop1, const char *Name2, const double *Prop2, const char *Ref, double *output)
 FORTRAN 77 style wrapper of the PropsSI function This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
EXPORT_CODE double CONVENTION F2K (double T_F)
 Convert from degrees Fahrenheit to Kelvin (useful primarily for testing) More...
 
EXPORT_CODE double CONVENTION K2F (double T_K)
 Convert from Kelvin to degrees Fahrenheit (useful primarily for testing) More...
 
EXPORT_CODE long CONVENTION get_param_index (const char *param)
 Get the index for a parameter "T", "P", etc. More...
 
EXPORT_CODE long CONVENTION get_input_pair_index (const char *param)
 Get the index for an input pair for AbstractState.update function. More...
 
EXPORT_CODE long CONVENTION redirect_stdout (const char *file)
 Redirect all output that would go to console (stdout) to a file. More...
 
EXPORT_CODE int CONVENTION get_debug_level ()
 
EXPORT_CODE void CONVENTION set_debug_level (int level)
 
EXPORT_CODE double CONVENTION saturation_ancillary (const char *fluid_name, const char *output, int Q, const char *input, double value)
 
EXPORT_CODE double CONVENTION HAPropsSI (const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char *Name3, double Prop3)
 DLL wrapper of the HAPropsSI function. More...
 
EXPORT_CODE double CONVENTION cair_sat (double T)
 DLL wrapper of the cair_sat function. More...
 
EXPORT_CODE void CONVENTION hapropssi_ (const char *Output, const char *Name1, const double *Prop1, const char *Name2, const double *Prop2, const char *Name3, const double *Prop3, double *output)
 FORTRAN 77 style wrapper of the HAPropsSI function. More...
 
EXPORT_CODE double CONVENTION HAProps (const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char *Name3, double Prop3)
 DLL wrapper of the HAProps function. More...
 
EXPORT_CODE void CONVENTION haprops_ (const char *Output, const char *Name1, const double *Prop1, const char *Name2, const double *Prop2, const char *Name3, const double *Prop3, double *output)
 FORTRAN 77 style wrapper of the HAProps function. More...
 
EXPORT_CODE long CONVENTION AbstractState_factory (const char *backend, const char *fluids, long *errcode, char *message_buffer, const long buffer_length)
 Generate an AbstractState instance, return an integer handle to the state class generated to be used in the other low-level accessor functions. More...
 
EXPORT_CODE void CONVENTION AbstractState_free (const long handle, long *errcode, char *message_buffer, const long buffer_length)
 Release a state class generated by the low-level interface wrapper. More...
 
EXPORT_CODE void CONVENTION AbstractState_set_fractions (const long handle, const double *fractions, const long N, long *errcode, char *message_buffer, const long buffer_length)
 Set the fractions (mole, mass, volume) for the AbstractState. More...
 
EXPORT_CODE void CONVENTION AbstractState_update (const long handle, const long input_pair, const double value1, const double value2, long *errcode, char *message_buffer, const long buffer_length)
 Update the state of the AbstractState. More...
 
EXPORT_CODE void CONVENTION AbstractState_specify_phase (const long handle, const char *phase, long *errcode, char *message_buffer, const long buffer_length)
 Specify the phase to be used for all further calculations. More...
 
EXPORT_CODE void CONVENTION AbstractState_unspecify_phase (const long handle, long *errcode, char *message_buffer, const long buffer_length)
 Unspecify the phase to be used for all further calculations. More...
 
EXPORT_CODE double CONVENTION AbstractState_keyed_output (const long handle, const long param, long *errcode, char *message_buffer, const long buffer_length)
 Get an output value from the AbstractState using an integer value for the desired output value. More...
 
EXPORT_CODE double CONVENTION AbstractState_first_saturation_deriv (const long handle, const long Of, const long Wrt, long *errcode, char *message_buffer, const long buffer_length)
 Calculate a saturation derivative from the AbstractState using integer values for the desired parameters. More...
 
EXPORT_CODE double CONVENTION AbstractState_first_partial_deriv (const long handle, const long Of, const long Wrt, const long Constant, long *errcode, char *message_buffer, const long buffer_length)
 Calculate the first partial derivative in homogeneous phases from the AbstractState using integer values for the desired parameters. More...
 
EXPORT_CODE void CONVENTION AbstractState_update_and_common_out (const long handle, const long input_pair, const double *value1, const double *value2, const long length, double *T, double *p, double *rhomolar, double *hmolar, double *smolar, long *errcode, char *message_buffer, const long buffer_length)
 Update the state of the AbstractState and get an output value five common outputs (temperature, pressure, molar density, molar enthalpy and molar entropy) More...
 
EXPORT_CODE void CONVENTION AbstractState_update_and_1_out (const long handle, const long input_pair, const double *value1, const double *value2, const long length, const long output, double *out, long *errcode, char *message_buffer, const long buffer_length)
 Update the state of the AbstractState and get one output value (temperature, pressure, molar density, molar enthalpy and molar entropy) More...
 
EXPORT_CODE void CONVENTION AbstractState_update_and_5_out (const long handle, const long input_pair, const double *value1, const double *value2, const long length, long *outputs, double *out1, double *out2, double *out3, double *out4, double *out5, long *errcode, char *message_buffer, const long buffer_length)
 Update the state of the AbstractState and get an output value five common outputs (temperature, pressure, molar density, molar enthalpy and molar entropy) More...
 
EXPORT_CODE void CONVENTION AbstractState_set_binary_interaction_double (const long handle, const long i, const long j, const char *parameter, const double value, long *errcode, char *message_buffer, const long buffer_length)
 Set binary interraction parrameter for mixtures. More...
 
EXPORT_CODE void CONVENTION AbstractState_set_fluid_parameter_double (const long handle, const long i, const char *parameter, const double value, long *errcode, char *message_buffer, const long buffer_length)
 Set some fluid parameter (ie volume translation for cubic) More...
 
EXPORT_CODE void CONVENTION AbstractState_build_phase_envelope (const long handle, const char *level, long *errcode, char *message_buffer, const long buffer_length)
 Build the phase envelope. More...
 
EXPORT_CODE void CONVENTION AbstractState_get_phase_envelope_data (const long handle, const long length, double *T, double *p, double *rhomolar_vap, double *rhomolar_liq, double *x, double *y, long *errcode, char *message_buffer, const long buffer_length)
 Get data from the phase envelope for the given mixture composition. More...
 
EXPORT_CODE void CONVENTION AbstractState_build_spinodal (const long handle, long *errcode, char *message_buffer, const long buffer_length)
 Build the spinodal. More...
 
EXPORT_CODE void CONVENTION AbstractState_get_spinodal_data (const long handle, const long length, double *tau, double *delta, double *M1, long *errcode, char *message_buffer, const long buffer_length)
 Get data for the spinodal curve. More...
 
EXPORT_CODE void CONVENTION AbstractState_all_critical_points (const long handle, const long length, double *T, double *p, double *rhomolar, long *stable, long *errcode, char *message_buffer, const long buffer_length)
 Calculate all the critical points for a given composition. More...
 
EXPORT_CODE double CONVENTION PropsS (const char *Output, const char *Name1, double Prop1, const char *Name2, double Prop2, const char *Ref)
 
EXPORT_CODE double CONVENTION Props (const char *Output, const char Name1, double Prop1, const char Name2, double Prop2, const char *Ref)
 
EXPORT_CODE double CONVENTION Props1 (const char *FluidName, const char *Output)
 
EXPORT_CODE double CONVENTION IPropsSI (long iOutput, long iName1, double Prop1, long iName2, double Prop2, long iFluid)
 
EXPORT_CODE double CONVENTION IProps (long iOutput, long iName1, double Prop1, long iName2, double Prop2, long iFluid)
 

Macro Definition Documentation

#define CONVENTION

Definition at line 58 of file CoolPropLib.h.

#define EXPORT_CODE

This file defines an interface for shared library (DLL) wrapping.

In general the functions defined here take strings which are 0-terminated (C-style), vectors of doubles are passed as double* and length These functions pass directly to equivalently named functions in CoolProp.h in the CoolProp namespace that take std::string, vector<double> etc.

Functions with the call type like EXPORT_CODE void CONVENTION AFunction(double, double); will be exported to the DLL

The exact symbol that will be exported depends on the values of the preprocessor macros COOLPROP_LIB, EXPORT_CODE, CONVENTION, etc.

In order to have 100% control over the export macros, you can specify EXPORT_CODE and CONVENTION directly. Check out CMakeLists.txt in the repo root to see some examples.

Definition at line 55 of file CoolPropLib.h.

Function Documentation

EXPORT_CODE void CONVENTION AbstractState_all_critical_points ( const long  handle,
const long  length,
double *  T,
double *  p,
double *  rhomolar,
long *  stable,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Calculate all the critical points for a given composition.

Parameters
handleThe integer handle for the state class stored in memory
lengthThe length of the buffers passed to this function
TThe pointer to the array of temperature (K)
pThe pointer to the array of pressure (Pa)
rhomolarThe pointer to the array of molar density (m^3/mol)
stableThe pointer to the array of boolean flags for whether the critical point is stable (1) or unstable (0)
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 660 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_build_phase_envelope ( const long  handle,
const char *  level,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Build the phase envelope.

Parameters
handleThe integer handle for the state class stored in memory
levelHow much refining of the phase envelope ("none" to skip refining (recommended))
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 594 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_build_spinodal ( const long  handle,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Build the spinodal.

Parameters
handleThe integer handle for the state class stored in memory
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 630 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION AbstractState_factory ( const char *  backend,
const char *  fluids,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Generate an AbstractState instance, return an integer handle to the state class generated to be used in the other low-level accessor functions.

Parameters
backendThe backend you will use, "HEOS", "REFPROP", etc.
fluids'&' delimited list of fluids
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
A handle to the state class generated

Definition at line 386 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION AbstractState_first_partial_deriv ( const long  handle,
const long  Of,
const long  Wrt,
const long  Constant,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Calculate the first partial derivative in homogeneous phases from the AbstractState using integer values for the desired parameters.

Parameters
handleThe integer handle for the state class stored in memory
OfThe parameter of which the derivative is being taken
WrtThe derivative with with respect to this parameter
ConstantThe parameter that is not affected by the derivative
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 487 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION AbstractState_first_saturation_deriv ( const long  handle,
const long  Of,
const long  Wrt,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Calculate a saturation derivative from the AbstractState using integer values for the desired parameters.

Parameters
handleThe integer handle for the state class stored in memory
OfThe parameter of which the derivative is being taken
WrtThe derivative with with respect to this parameter
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 474 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_free ( const long  handle,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Release a state class generated by the low-level interface wrapper.

Parameters
handleThe integer handle for the state class stored in memory
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 398 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_get_phase_envelope_data ( const long  handle,
const long  length,
double *  T,
double *  p,
double *  rhomolar_vap,
double *  rhomolar_liq,
double *  x,
double *  y,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Get data from the phase envelope for the given mixture composition.

Parameters
handleThe integer handle for the state class stored in memory
lengthThe number of elements stored in the arrays (both inputs and outputs MUST be the same length)
TThe pointer to the array of temperature (K)
pThe pointer to the array of pressure (Pa)
rhomolar_vapThe pointer to the array of molar density for vapor phase (m^3/mol)
rhomolar_liqThe pointer to the array of molar density for liquid phase (m^3/mol)
xThe compositions of the "liquid" phase (WARNING: buffer should be Ncomp*Npoints in length, at a minimum, but there is no way to check buffer length at runtime)
yThe compositions of the "vapor" phase (WARNING: buffer should be Ncomp*Npoints in length, at a minimum, but there is no way to check buffer length at runtime)
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 605 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_get_spinodal_data ( const long  handle,
const long  length,
double *  tau,
double *  delta,
double *  M1,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Get data for the spinodal curve.

Parameters
handleThe integer handle for the state class stored in memory
lengthThe number of elements stored in the arrays (all outputs MUST be the same length)
tauThe pointer to the array of reciprocal reduced temperature
deltaThe pointer to the array of reduced density
M1The pointer to the array of M1 values (when L1=M1=0, critical point)
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error, no change in the output arrays will be made

Definition at line 641 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION AbstractState_keyed_output ( const long  handle,
const long  param,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Get an output value from the AbstractState using an integer value for the desired output value.

Parameters
handleThe integer handle for the state class stored in memory
paramThe integer value for the parameter you want
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 461 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_set_binary_interaction_double ( const long  handle,
const long  i,
const long  j,
const char *  parameter,
const double  value,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Set binary interraction parrameter for mixtures.

Parameters
handleThe integer handle for the state class stored in memory
iindice of the first fluid of the binary pair
jindice of the second fluid of the binary pair
parameterstring wit the name of the parameter
valuethe value of the binary interaction parameter
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 571 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_set_fluid_parameter_double ( const long  handle,
const long  i,
const char *  parameter,
const double  value,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Set some fluid parameter (ie volume translation for cubic)

Parameters
handleThe integer handle for the state class stored in memory
iindice of the fluid the parramter should be applied too (for mixtures)
parameterthe string specifying the parameter to use, ex "cm" for volume translation
valuethe value of the parameter
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 583 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_set_fractions ( const long  handle,
const double *  fractions,
const long  N,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Set the fractions (mole, mass, volume) for the AbstractState.

Parameters
handleThe integer handle for the state class stored in memory
fractionsThe array of fractions
NThe length of the fractions array
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 408 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_specify_phase ( const long  handle,
const char *  phase,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Specify the phase to be used for all further calculations.

Parameters
handleThe integer handle for the state class stored in memory
phaseThe string with the phase to use
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 439 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_unspecify_phase ( const long  handle,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Unspecify the phase to be used for all further calculations.

Parameters
handleThe integer handle for the state class stored in memory
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 450 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_update ( const long  handle,
const long  input_pair,
const double  value1,
const double  value2,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Update the state of the AbstractState.

Parameters
handleThe integer handle for the state class stored in memory
input_pairThe integer value for the input pair obtained from XXXXXXXXXXXXXXXX
value1The first input value
value2The second input value
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns

Definition at line 428 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_update_and_1_out ( const long  handle,
const long  input_pair,
const double *  value1,
const double *  value2,
const long  length,
const long  output,
double *  out,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Update the state of the AbstractState and get one output value (temperature, pressure, molar density, molar enthalpy and molar entropy)

from the AbstractState using pointers as inputs and output to allow array computation.

Parameters
handleThe integer handle for the state class stored in memory
input_pairThe integer value for the input pair obtained from get_input_pair_index
value1The pointer to the array of the first input parameters
value2The pointer to the array of the second input parameters
lengthThe number of elements stored in the arrays (both inputs and outputs MUST be the same length)
outputThe indice for the output desired
outThe pointer to the array for output
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 525 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_update_and_5_out ( const long  handle,
const long  input_pair,
const double *  value1,
const double *  value2,
const long  length,
long *  outputs,
double *  out1,
double *  out2,
double *  out3,
double *  out4,
double *  out5,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Update the state of the AbstractState and get an output value five common outputs (temperature, pressure, molar density, molar enthalpy and molar entropy)

from the AbstractState using pointers as inputs and output to allow array computation.

Parameters
handleThe integer handle for the state class stored in memory
input_pairThe integer value for the input pair obtained from get_input_pair_index
value1The pointer to the array of the first input parameters
value2The pointer to the array of the second input parameters
lengthThe number of elements stored in the arrays (both inputs and outputs MUST be the same length)
outputsThe 5-element vector of indices for the outputs desired
out1The pointer to the array for the first output
out2The pointer to the array for the second output
out3The pointer to the array for the third output
out4The pointer to the array for the fourth output
out5The pointer to the array for the fifth output
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 546 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION AbstractState_update_and_common_out ( const long  handle,
const long  input_pair,
const double *  value1,
const double *  value2,
const long  length,
double *  T,
double *  p,
double *  rhomolar,
double *  hmolar,
double *  smolar,
long *  errcode,
char *  message_buffer,
const long  buffer_length 
)

Update the state of the AbstractState and get an output value five common outputs (temperature, pressure, molar density, molar enthalpy and molar entropy)

from the AbstractState using pointers as inputs and output to allow array computation.

Parameters
handleThe integer handle for the state class stored in memory
input_pairThe integer value for the input pair obtained from get_input_pair_index
value1The pointer to the array of the first input parameters
value2The pointer to the array of the second input parameters
lengthThe number of elements stored in the arrays (both inputs and outputs MUST be the same length)
TThe pointer to the array of temperature
pThe pointer to the array of pressure
rhomolarThe pointer to the array of molar density
hmolarThe pointer to the array of molar enthalpy
smolarThe pointer to the array of molar entropy
errcodeThe errorcode that is returned (0 = no error, !0 = error)
message_bufferA buffer for the error code
buffer_lengthThe length of the buffer for the error code
Returns
Note
If there is an error in an update call for one of the inputs, no change in the output array will be made

Definition at line 500 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION cair_sat ( double  T)

DLL wrapper of the cair_sat function.

See also
HumidAir::cair_sat(double);

Definition at line 334 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION F2K ( double  T_F)

Convert from degrees Fahrenheit to Kelvin (useful primarily for testing)

Definition at line 251 of file CoolPropLib.cpp.

EXPORT_CODE int CONVENTION get_debug_level ( )

Get the debug level

Returns
level The level of the verbosity for the debugging output (0-10) 0: no debgging output

Definition at line 61 of file CoolProp.cpp.

EXPORT_CODE long CONVENTION get_fluid_param_string ( const char *  fluid,
const char *  param,
char *  Output,
int  n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::get_fluid_param_string
Returns
error_code 1 = Ok 0 = error

Definition at line 311 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION get_global_param_string ( const char *  param,
char *  Output,
int  n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::get_global_param_string
Returns
error_code 1 = Ok 0 = error
Note
This function returns the output string in pre-allocated char buffer. If buffer is not large enough, no copy is made

Definition at line 276 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION get_input_pair_index ( const char *  param)

Get the index for an input pair for AbstractState.update function.

Returns
index The index as a long. If input is invalid, returns -1

Definition at line 268 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION get_mixture_binary_pair_data ( const char *  CAS1,
const char *  CAS2,
const char *  key 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::get_mixture_binary_pair_data
EXPORT_CODE long CONVENTION get_param_index ( const char *  param)

Get the index for a parameter "T", "P", etc.

Returns
index The index as a long. If input is invalid, returns -1

Definition at line 260 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION get_parameter_information_string ( const char *  key,
char *  Output,
int  n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::get_parameter_information_string
Note
This function returns the output string in pre-allocated char buffer. If buffer is not large enough, no copy is made
Returns
error_code 1 = Ok 0 = error

Definition at line 287 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION HAProps ( const char *  Output,
const char *  Name1,
double  Prop1,
const char *  Name2,
double  Prop2,
const char *  Name3,
double  Prop3 
)

DLL wrapper of the HAProps function.

Warning
DEPRECATED!!
See also
HumidAir::HAProps(const char *OutputName, const char *Input1Name, double Input1, const char *Input2Name, double Input2, const char *Input3Name, double Input3);
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 343 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION haprops_ ( const char *  Output,
const char *  Name1,
const double *  Prop1,
const char *  Name2,
const double *  Prop2,
const char *  Name3,
const double *  Prop3,
double *  output 
)

FORTRAN 77 style wrapper of the HAProps function.

Warning
DEPRECATED!!
See also
HumidAir::HAProps(const char *OutputName, const char *Input1Name, double Input1, const char *Input2Name, double Input2, const char *Input3Name, double Input3);
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 353 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION HAPropsSI ( const char *  Output,
const char *  Name1,
double  Prop1,
const char *  Name2,
double  Prop2,
const char *  Name3,
double  Prop3 
)

DLL wrapper of the HAPropsSI function.

See also
HumidAir::HAPropsSI(const char *OutputName, const char *Input1Name, double Input1, const char *Input2Name, double Input2, const char *Input3Name, double Input3);
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 329 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION hapropssi_ ( const char *  Output,
const char *  Name1,
const double *  Prop1,
const char *  Name2,
const double *  Prop2,
const char *  Name3,
const double *  Prop3,
double *  output 
)

FORTRAN 77 style wrapper of the HAPropsSI function.

See also
HumidAir::HAPropsSI(const char *OutputName, const char *Input1Name, double Input1, const char *Input2Name, double Input2, const char *Input3Name, double Input3);
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 339 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION IProps ( long  iOutput,
long  iName1,
double  Prop1,
long  iName2,
double  Prop2,
long  iFluid 
)
EXPORT_CODE double CONVENTION IPropsSI ( long  iOutput,
long  iName1,
double  Prop1,
long  iName2,
double  Prop2,
long  iFluid 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. IsFluidType(std::string, std::string)

EXPORT_CODE double CONVENTION K2F ( double  T_K)

Convert from Kelvin to degrees Fahrenheit (useful primarily for testing)

Definition at line 248 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION PhaseSI ( const char *  Name1,
double  Prop1,
const char *  Name2,
double  Prop2,
const char *  Ref,
char *  phase,
int  n 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::PhaseSI(const std::string &, double, const std::string &, double, const std::string&)
Note
This function returns the phase string in pre-allocated phase variable. If buffer is not large enough, no copy is made

Definition at line 222 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION Props ( const char *  Output,
const char  Name1,
double  Prop1,
const char  Name2,
double  Prop2,
const char *  Ref 
)

Works just like CoolProp::PropsSI, but units are in KSI system. This function is deprecated, no longer supported, and users should transition to using the PropsSI function

Definition at line 174 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION Props1 ( const char *  FluidName,
const char *  Output 
)

Works just like CoolProp::Props1SI, but units are in KSI system. This function is deprecated, no longer supported, and users should transition to using the Props1SI function

Definition at line 161 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION Props1SI ( const char *  FluidName,
const char *  Output 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::Props1SI(std::string, std::string)
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 212 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION PropsS ( const char *  Output,
const char *  Name1,
double  Prop1,
const char *  Name2,
double  Prop2,
const char *  Ref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
Props(const char *Output, const char Name1, double Prop1, const char Name2, double Prop2, const char *Ref)

Definition at line 171 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION PropsSI ( const char *  Output,
const char *  Name1,
double  Prop1,
const char *  Name2,
double  Prop2,
const char *  Ref 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::PropsSI(const std::string &, const std::string &, double, const std::string &, double, const std::string&)
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 217 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION propssi_ ( const char *  Output,
const char *  Name1,
const double *  Prop1,
const char *  Name2,
const double *  Prop2,
const char *  Ref,
double *  output 
)

FORTRAN 77 style wrapper of the PropsSI function This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::PropsSI(const std::string &, const std::string &, double, const std::string &, double, const std::string&)
Note
If there is an error, a huge value will be returned, you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 243 of file CoolPropLib.cpp.

EXPORT_CODE long CONVENTION redirect_stdout ( const char *  file)

Redirect all output that would go to console (stdout) to a file.

Definition at line 133 of file CoolPropLib.cpp.

EXPORT_CODE double CONVENTION saturation_ancillary ( const char *  fluid_name,
const char *  output,
int  Q,
const char *  input,
double  value 
)

Definition at line 201 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION set_config_string ( const char *  key,
const char *  val 
)

Set configuration string.

Parameters
keyThe key to configure
valThe value to set to the key
Note
you can get the error message by doing something like get_global_param_string("errstring",output)

Definition at line 322 of file CoolPropLib.cpp.

EXPORT_CODE void CONVENTION set_debug_level ( int  level)

Set the debug level

Parameters
levelThe level of the verbosity for the debugging output (0-10) 0: no debgging output

Definition at line 60 of file CoolProp.cpp.

EXPORT_CODE int CONVENTION set_reference_stateD ( const char *  Ref,
double  T,
double  rhomolar,
double  hmolar0,
double  smolar0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::set_reference_stateD
Returns
error_code 1 = Ok 0 = error

Definition at line 148 of file CoolPropLib.cpp.

EXPORT_CODE int CONVENTION set_reference_stateS ( const char *  Ref,
const char *  reference_state 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

See also
CoolProp::set_reference_stateS
Returns
error_code 1 = Ok 0 = error

Definition at line 137 of file CoolPropLib.cpp.