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
Macros | Functions | Variables
REFPROP.cpp File Reference
#include <sys/stat.h>
#include <string>
#include "CoolProp.h"
#include "REFPROP_lib.h"
#include "REFPROP.h"
#include "CoolPropTools.h"
#include <stdlib.h>
#include "string.h"
#include <stdio.h>
#include <iostream>
#include "Catch/catch.hpp"

Go to the source code of this file.

Macros

#define refpropcharlength   255
 
#define filepathlength   255
 
#define lengthofreference   3
 
#define errormessagelength   255
 
#define ncmax   20
 
#define numparams   72
 
#define maxcoefs   50
 

Functions

std::vector< double > x (ncmax, 0)
 
std::vector< double > LoadedREFPROPx (ncmax, 0)
 
voidgetFunctionPointer (char *name)
 
double setFunctionPointers ()
 
std::string get_REFPROP_fluid_path ()
 
bool load_REFPROP ()
 
bool set_REFPROP_fluid (std::string Ref, std::vector< double > &x)
 
double REFPROP (char Output, char Name1, double Prop1, char Name2, double Prop2, char *Ref)
 
double REFPROP (std::string Output, std::string Name1, double Prop1, std::string Name2, double Prop2, std::string Ref)
 
double REFPROPSI (long iOutput, long iName1, double Prop1, long iName2, double Prop2, std::string Ref)
 
 TEST_CASE ("REFPROP Fluid Class Helmholtz derivatives check","[helmholtz],[fast]")
 
 TEST_CASE ("REFPROP Fluid Class check saturation consistency","")
 
 TEST_CASE ("Check fluid names","[fast]")
 
 TEST_CASE ("Fluid class for bad fluid","[fast]")
 

Variables

std::string LoadedREFPROPRef
 
voidRefpropdllInstance =NULL
 
RPVersion_POINTER RPVersion
 
SETPATHdll_POINTER SETPATHdll
 
ABFL1dll_POINTER ABFL1dll
 
ABFL2dll_POINTER ABFL2dll
 
ACTVYdll_POINTER ACTVYdll
 
AGdll_POINTER AGdll
 
CCRITdll_POINTER CCRITdll
 
CP0dll_POINTER CP0dll
 
CRITPdll_POINTER CRITPdll
 
CSATKdll_POINTER CSATKdll
 
CV2PKdll_POINTER CV2PKdll
 
CVCPKdll_POINTER CVCPKdll
 
CVCPdll_POINTER CVCPdll
 
DBDTdll_POINTER DBDTdll
 
DBFL1dll_POINTER DBFL1dll
 
DBFL2dll_POINTER DBFL2dll
 
DDDPdll_POINTER DDDPdll
 
DDDTdll_POINTER DDDTdll
 
DEFLSHdll_POINTER DEFLSHdll
 
DHD1dll_POINTER DHD1dll
 
DHFLSHdll_POINTER DHFLSHdll
 
DHFL1dll_POINTER DHFL1dll
 
DHFL2dll_POINTER DHFL2dll
 
DIELECdll_POINTER DIELECdll
 
DOTFILLdll_POINTER DOTFILLdll
 
DPDD2dll_POINTER DPDD2dll
 
DPDDKdll_POINTER DPDDKdll
 
DPDDdll_POINTER DPDDdll
 
DPDTKdll_POINTER DPDTKdll
 
DPDTdll_POINTER DPDTdll
 
DPTSATKdll_POINTER DPTSATKdll
 
DSFLSHdll_POINTER DSFLSHdll
 
DSFL1dll_POINTER DSFL1dll
 
DSFL2dll_POINTER DSFL2dll
 
ENTHALdll_POINTER ENTHALdll
 
ENTROdll_POINTER ENTROdll
 
ESFLSHdll_POINTER ESFLSHdll
 
FGCTYdll_POINTER FGCTYdll
 
FPVdll_POINTER FPVdll
 
GERG04dll_POINTER GERG04dll
 
GETFIJdll_POINTER GETFIJdll
 
GETKTVdll_POINTER GETKTVdll
 
GIBBSdll_POINTER GIBBSdll
 
HSFLSHdll_POINTER HSFLSHdll
 
INFOdll_POINTER INFOdll
 
LIMITKdll_POINTER LIMITKdll
 
LIMITSdll_POINTER LIMITSdll
 
LIMITXdll_POINTER LIMITXdll
 
MELTPdll_POINTER MELTPdll
 
MELTTdll_POINTER MELTTdll
 
MLTH2Odll_POINTER MLTH2Odll
 
NAMEdll_POINTER NAMEdll
 
PDFL1dll_POINTER PDFL1dll
 
PDFLSHdll_POINTER PDFLSHdll
 
PEFLSHdll_POINTER PEFLSHdll
 
PHFL1dll_POINTER PHFL1dll
 
PHFLSHdll_POINTER PHFLSHdll
 
PQFLSHdll_POINTER PQFLSHdll
 
PREOSdll_POINTER PREOSdll
 
PRESSdll_POINTER PRESSdll
 
PSFL1dll_POINTER PSFL1dll
 
PSFLSHdll_POINTER PSFLSHdll
 
PUREFLDdll_POINTER PUREFLDdll
 
QMASSdll_POINTER QMASSdll
 
QMOLEdll_POINTER QMOLEdll
 
RESIDUALdll_POINTER RESIDUALdll
 
SATDdll_POINTER SATDdll
 
SATEdll_POINTER SATEdll
 
SATHdll_POINTER SATHdll
 
SATPdll_POINTER SATPdll
 
SATSdll_POINTER SATSdll
 
SATTdll_POINTER SATTdll
 
SETAGAdll_POINTER SETAGAdll
 
SETKTVdll_POINTER SETKTVdll
 
SETMIXdll_POINTER SETMIXdll
 
SETMODdll_POINTER SETMODdll
 
SETREFdll_POINTER SETREFdll
 
SETUPdll_POINTER SETUPdll
 
SUBLPdll_POINTER SUBLPdll
 
SUBLTdll_POINTER SUBLTdll
 
SURFTdll_POINTER SURFTdll
 
SURTENdll_POINTER SURTENdll
 
TDFLSHdll_POINTER TDFLSHdll
 
TEFLSHdll_POINTER TEFLSHdll
 
THERM0dll_POINTER THERM0dll
 
THERM2dll_POINTER THERM2dll
 
THERM3dll_POINTER THERM3dll
 
THERMdll_POINTER THERMdll
 
THFLSHdll_POINTER THFLSHdll
 
TPFLSHdll_POINTER TPFLSHdll
 
TPFL2dll_POINTER TPFL2dll
 
TPRHOdll_POINTER TPRHOdll
 
TQFLSHdll_POINTER TQFLSHdll
 
TRNPRPdll_POINTER TRNPRPdll
 
TSFLSHdll_POINTER TSFLSHdll
 
VIRBdll_POINTER VIRBdll
 
VIRCdll_POINTER VIRCdll
 
WMOLdll_POINTER WMOLdll
 
XMASSdll_POINTER XMASSdll
 
XMOLEdll_POINTER XMOLEdll
 
char refpropPath [] = ""
 

Macro Definition Documentation

#define errormessagelength   255

Definition at line 34 of file REFPROP.cpp.

#define filepathlength   255

Definition at line 32 of file REFPROP.cpp.

#define lengthofreference   3

Definition at line 33 of file REFPROP.cpp.

#define maxcoefs   50

Definition at line 37 of file REFPROP.cpp.

#define ncmax   20

Definition at line 35 of file REFPROP.cpp.

#define numparams   72

Definition at line 36 of file REFPROP.cpp.

#define refpropcharlength   255

Definition at line 31 of file REFPROP.cpp.

Function Documentation

std::string get_REFPROP_fluid_path ( )

Definition at line 313 of file REFPROP.cpp.

void* getFunctionPointer ( char *  name)

Definition at line 175 of file REFPROP.cpp.

bool load_REFPROP ( )

Definition at line 327 of file REFPROP.cpp.

std::vector<double> LoadedREFPROPx ( ncmax  ,
 
)
double REFPROP ( char  Output,
char  Name1,
double  Prop1,
char  Name2,
double  Prop2,
char *  Ref 
)

Definition at line 641 of file REFPROP.cpp.

double REFPROP ( std::string  Output,
std::string  Name1,
double  Prop1,
std::string  Name2,
double  Prop2,
std::string  Ref 
)

From REFPROP: temperature K pressure, fugacity kPa density mol/L composition mole fraction quality mole basis (moles vapor/total moles) enthalpy, internal energy J/mol Gibbs, Helmholtz free energy J/mol entropy, heat capacity J/(mol.K) speed of sound m/s Joule-Thomson coefficient K/kPa d(p)/d(rho) kPa.L/mol d2(p)/d(rho)2 kPa.(L/mol)^2 viscosity microPa.s (10^-6 Pa.s) thermal conductivity W/(m.K) dipole moment debye surface tension N/m

Definition at line 664 of file REFPROP.cpp.

double REFPROPSI ( long  iOutput,
long  iName1,
double  Prop1,
long  iName2,
double  Prop2,
std::string  Ref 
)

Definition at line 685 of file REFPROP.cpp.

bool set_REFPROP_fluid ( std::string  Ref,
std::vector< double > &  x 
)

Definition at line 417 of file REFPROP.cpp.

double setFunctionPointers ( )

Definition at line 191 of file REFPROP.cpp.

TEST_CASE ( "REFPROP Fluid Class Helmholtz derivatives check"  ,
[helmholtz],
[fast] "   
)

Definition at line 1411 of file REFPROP.cpp.

TEST_CASE ( "REFPROP Fluid Class check saturation consistency"  ,
""   
)

Definition at line 1449 of file REFPROP.cpp.

TEST_CASE ( "Check fluid names"  ,
""  [fast] 
)

Definition at line 1464 of file REFPROP.cpp.

TEST_CASE ( "Fluid class for bad fluid"  ,
""  [fast] 
)

Definition at line 1507 of file REFPROP.cpp.

std::vector<double> x ( ncmax  ,
 
)

Variable Documentation

ABFL1dll_POINTER ABFL1dll

Definition at line 75 of file REFPROP.cpp.

ABFL2dll_POINTER ABFL2dll

Definition at line 76 of file REFPROP.cpp.

ACTVYdll_POINTER ACTVYdll

Definition at line 77 of file REFPROP.cpp.

Definition at line 78 of file REFPROP.cpp.

CCRITdll_POINTER CCRITdll

Definition at line 79 of file REFPROP.cpp.

Definition at line 80 of file REFPROP.cpp.

CRITPdll_POINTER CRITPdll

Definition at line 81 of file REFPROP.cpp.

CSATKdll_POINTER CSATKdll

Definition at line 82 of file REFPROP.cpp.

CV2PKdll_POINTER CV2PKdll

Definition at line 83 of file REFPROP.cpp.

CVCPdll_POINTER CVCPdll

Definition at line 85 of file REFPROP.cpp.

CVCPKdll_POINTER CVCPKdll

Definition at line 84 of file REFPROP.cpp.

DBDTdll_POINTER DBDTdll

Definition at line 86 of file REFPROP.cpp.

DBFL1dll_POINTER DBFL1dll

Definition at line 87 of file REFPROP.cpp.

DBFL2dll_POINTER DBFL2dll

Definition at line 88 of file REFPROP.cpp.

DDDPdll_POINTER DDDPdll

Definition at line 89 of file REFPROP.cpp.

DDDTdll_POINTER DDDTdll

Definition at line 90 of file REFPROP.cpp.

DEFLSHdll_POINTER DEFLSHdll

Definition at line 91 of file REFPROP.cpp.

DHD1dll_POINTER DHD1dll

Definition at line 92 of file REFPROP.cpp.

DHFL1dll_POINTER DHFL1dll

Definition at line 94 of file REFPROP.cpp.

DHFL2dll_POINTER DHFL2dll

Definition at line 95 of file REFPROP.cpp.

DHFLSHdll_POINTER DHFLSHdll

Definition at line 93 of file REFPROP.cpp.

DIELECdll_POINTER DIELECdll

Definition at line 96 of file REFPROP.cpp.

DOTFILLdll_POINTER DOTFILLdll

Definition at line 97 of file REFPROP.cpp.

DPDD2dll_POINTER DPDD2dll

Definition at line 98 of file REFPROP.cpp.

DPDDdll_POINTER DPDDdll

Definition at line 100 of file REFPROP.cpp.

DPDDKdll_POINTER DPDDKdll

Definition at line 99 of file REFPROP.cpp.

DPDTdll_POINTER DPDTdll

Definition at line 102 of file REFPROP.cpp.

DPDTKdll_POINTER DPDTKdll

Definition at line 101 of file REFPROP.cpp.

DPTSATKdll_POINTER DPTSATKdll

Definition at line 103 of file REFPROP.cpp.

DSFL1dll_POINTER DSFL1dll

Definition at line 105 of file REFPROP.cpp.

DSFL2dll_POINTER DSFL2dll

Definition at line 106 of file REFPROP.cpp.

DSFLSHdll_POINTER DSFLSHdll

Definition at line 104 of file REFPROP.cpp.

ENTHALdll_POINTER ENTHALdll

Definition at line 107 of file REFPROP.cpp.

ENTROdll_POINTER ENTROdll

Definition at line 108 of file REFPROP.cpp.

ESFLSHdll_POINTER ESFLSHdll

Definition at line 109 of file REFPROP.cpp.

FGCTYdll_POINTER FGCTYdll

Definition at line 110 of file REFPROP.cpp.

Definition at line 111 of file REFPROP.cpp.

GERG04dll_POINTER GERG04dll

Definition at line 112 of file REFPROP.cpp.

GETFIJdll_POINTER GETFIJdll

Definition at line 113 of file REFPROP.cpp.

GETKTVdll_POINTER GETKTVdll

Definition at line 114 of file REFPROP.cpp.

GIBBSdll_POINTER GIBBSdll

Definition at line 115 of file REFPROP.cpp.

HSFLSHdll_POINTER HSFLSHdll

Definition at line 116 of file REFPROP.cpp.

INFOdll_POINTER INFOdll

Definition at line 117 of file REFPROP.cpp.

LIMITKdll_POINTER LIMITKdll

Definition at line 118 of file REFPROP.cpp.

LIMITSdll_POINTER LIMITSdll

Definition at line 119 of file REFPROP.cpp.

LIMITXdll_POINTER LIMITXdll

Definition at line 120 of file REFPROP.cpp.

std::string LoadedREFPROPRef

Definition at line 59 of file REFPROP.cpp.

MELTPdll_POINTER MELTPdll

Definition at line 121 of file REFPROP.cpp.

MELTTdll_POINTER MELTTdll

Definition at line 122 of file REFPROP.cpp.

MLTH2Odll_POINTER MLTH2Odll

Definition at line 123 of file REFPROP.cpp.

NAMEdll_POINTER NAMEdll

Definition at line 124 of file REFPROP.cpp.

PDFL1dll_POINTER PDFL1dll

Definition at line 125 of file REFPROP.cpp.

PDFLSHdll_POINTER PDFLSHdll

Definition at line 126 of file REFPROP.cpp.

PEFLSHdll_POINTER PEFLSHdll

Definition at line 127 of file REFPROP.cpp.

PHFL1dll_POINTER PHFL1dll

Definition at line 128 of file REFPROP.cpp.

PHFLSHdll_POINTER PHFLSHdll

Definition at line 129 of file REFPROP.cpp.

PQFLSHdll_POINTER PQFLSHdll

Definition at line 130 of file REFPROP.cpp.

PREOSdll_POINTER PREOSdll

Definition at line 131 of file REFPROP.cpp.

PRESSdll_POINTER PRESSdll

Definition at line 132 of file REFPROP.cpp.

PSFL1dll_POINTER PSFL1dll

Definition at line 133 of file REFPROP.cpp.

PSFLSHdll_POINTER PSFLSHdll

Definition at line 134 of file REFPROP.cpp.

PUREFLDdll_POINTER PUREFLDdll

Definition at line 135 of file REFPROP.cpp.

QMASSdll_POINTER QMASSdll

Definition at line 136 of file REFPROP.cpp.

QMOLEdll_POINTER QMOLEdll

Definition at line 137 of file REFPROP.cpp.

void* RefpropdllInstance =NULL

Definition at line 68 of file REFPROP.cpp.

char refpropPath[] = ""

Definition at line 310 of file REFPROP.cpp.

RESIDUALdll_POINTER RESIDUALdll

Definition at line 138 of file REFPROP.cpp.

RPVersion_POINTER RPVersion

Definition at line 73 of file REFPROP.cpp.

SATDdll_POINTER SATDdll

Definition at line 139 of file REFPROP.cpp.

SATEdll_POINTER SATEdll

Definition at line 140 of file REFPROP.cpp.

SATHdll_POINTER SATHdll

Definition at line 141 of file REFPROP.cpp.

SATPdll_POINTER SATPdll

Definition at line 142 of file REFPROP.cpp.

SATSdll_POINTER SATSdll

Definition at line 143 of file REFPROP.cpp.

SATTdll_POINTER SATTdll

Definition at line 144 of file REFPROP.cpp.

SETAGAdll_POINTER SETAGAdll

Definition at line 145 of file REFPROP.cpp.

SETKTVdll_POINTER SETKTVdll

Definition at line 146 of file REFPROP.cpp.

SETMIXdll_POINTER SETMIXdll

Definition at line 147 of file REFPROP.cpp.

SETMODdll_POINTER SETMODdll

Definition at line 148 of file REFPROP.cpp.

SETPATHdll_POINTER SETPATHdll

Definition at line 74 of file REFPROP.cpp.

SETREFdll_POINTER SETREFdll

Definition at line 149 of file REFPROP.cpp.

SETUPdll_POINTER SETUPdll

Definition at line 150 of file REFPROP.cpp.

SUBLPdll_POINTER SUBLPdll

Definition at line 152 of file REFPROP.cpp.

SUBLTdll_POINTER SUBLTdll

Definition at line 153 of file REFPROP.cpp.

SURFTdll_POINTER SURFTdll

Definition at line 154 of file REFPROP.cpp.

SURTENdll_POINTER SURTENdll

Definition at line 155 of file REFPROP.cpp.

TDFLSHdll_POINTER TDFLSHdll

Definition at line 156 of file REFPROP.cpp.

TEFLSHdll_POINTER TEFLSHdll

Definition at line 157 of file REFPROP.cpp.

THERM0dll_POINTER THERM0dll

Definition at line 158 of file REFPROP.cpp.

THERM2dll_POINTER THERM2dll

Definition at line 159 of file REFPROP.cpp.

THERM3dll_POINTER THERM3dll

Definition at line 160 of file REFPROP.cpp.

THERMdll_POINTER THERMdll

Definition at line 161 of file REFPROP.cpp.

THFLSHdll_POINTER THFLSHdll

Definition at line 162 of file REFPROP.cpp.

TPFL2dll_POINTER TPFL2dll

Definition at line 164 of file REFPROP.cpp.

TPFLSHdll_POINTER TPFLSHdll

Definition at line 163 of file REFPROP.cpp.

TPRHOdll_POINTER TPRHOdll

Definition at line 165 of file REFPROP.cpp.

TQFLSHdll_POINTER TQFLSHdll

Definition at line 166 of file REFPROP.cpp.

TRNPRPdll_POINTER TRNPRPdll

Definition at line 167 of file REFPROP.cpp.

TSFLSHdll_POINTER TSFLSHdll

Definition at line 168 of file REFPROP.cpp.

VIRBdll_POINTER VIRBdll

Definition at line 169 of file REFPROP.cpp.

VIRCdll_POINTER VIRCdll

Definition at line 170 of file REFPROP.cpp.

WMOLdll_POINTER WMOLdll

Definition at line 171 of file REFPROP.cpp.

XMASSdll_POINTER XMASSdll

Definition at line 172 of file REFPROP.cpp.

XMOLEdll_POINTER XMOLEdll

Definition at line 173 of file REFPROP.cpp.