General Information: P. Colonna and T.P. Van Der Stelt
General Information: P. Colonna and T.P. Van Der Stelt
General Information: P. Colonna and T.P. Van Der Stelt
General Information
FluidProp is a standard interface to several software libraries for the calculation of thermodynamic and transport properties of fluids. This
program is developed by P. Colonna and T.P. van der Stelt, Energy Technology Section, Delft University of Technology.
A 64-bit version of FluidProp is also available and is no different from the 32-bit version. When installing FluidProp on a 64-bit system, both a
64-bit as well as a 32-bit FluidProp will be installed. The default installation folder for the 64-bit version is C:\Program Files\FluidProp and for
the 32-bit version C:\Program Files (x86)\FluidProp.
Each thermodynamic library implements one or more thermodynamic models for a number of different fluids and mixtures. Fig. 1 schematically
shows the main structure of the program.
FluidProp makes it easy to obtain fluid properties in different MS Windows® programs and development environments because it is a COM
server, i.e. it follows the Component Object Model standard, a software architecture developed by Microsoft to build component-based
applications. COM objects are discrete components, each with a unique identity, which expose interfaces that allow applications and other
components to access their features. COM objects are more versatile than Win32 DLLs because they are completely language-independent,
have built-in interprocess communications capability, and easily fit into an object-oriented program design. COM was first released in 1993 with
OLE2, largely to replace the interprocess communication mechanism DDE used by the initial release of OLE. ActiveX also is based on COM.
Server means that it provides calculated values to a main program, which is usually defined as a client; therefore both programs implement a
client-server architecture. The new Microsoft .NET runtime environment is fully compatible with the COM standard.
1. T.P. van der Stelt, N.R. Nannan, P. Colonna, 2012. ''The iPRSV equation of state.'' Fluid Phase Equil. , 330, pp. 24-35.
1. J. Gross, G. Sadowski, 2001. ''Perturbed-Chain SAFT: An Equation of State Based on a Perturbation Theory for Chain Molecules.'' Ind. Eng. Chem. Res.
, 40, pp. 1244-1260.
2. J. Gross, G. Sadowski, 2002. "Application of the Perturbed-Chain SAFT Equation of State to Associating Systems.'' Ind. Eng. Chem. Res. , 41, pp.
5510-5515.
3. J. Gross, 2005. '' An Equation-of-State Contribution for Polar Components: Quadrupolar Molecules.'' AIChE J , 51 (9), pp. 2556-2568.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 2 of 62
4. J. Gross, J. Vrabec, 2006. ''An Equation-of-State Contribution for Polar Components: Dipolar Molecules.'' AIChE J , 52 (3), pp. 1194-2004.
5. J. Vrabec, J. Gross, 2008. '' Vapor-Liquid Equilibria Simulation and an Equation of State Contribution for Dipole-Quadrupole Interactions.'' J. Phys.
Chem. , B 112, pp. 51-60.
Independently from the syntax of the client program, the procedure for the calculation of a property is as follows:
First call the SetFluid procedure to define the thermodynamic library and the fluid, e.g.
SetFluid( LibName, FluidName)
This function also returns an object identifier (ObjID) or "memory address" which defines where the input information about the chosen fluid is
stored in the memory of the computer.
Secondly call the procedure for the desired property and supply the object identifier, the input specification that defines the thermodynamic
state and the corresponding values, e.g.
Enthalpy( ObjID, InputSpecifier, Value1, Value2)
Many thermodynamic properties can be computed by FluidProp with a large number of combinations of input properties to define the
thermodynamic state:
Available Thermodynamic and Transport Properties
Available Thermodynamic State Definitions
One innovative feature of FluidProp is that for all thermodynamic models, except for IF97, it is possible to calculate some derived
thermodynamic functions (see Table of available Thermodynamic and Transport Properties ) that are demanded e.g. by up-to-date CFD or
process dynamics software. In this respect, see e.g.:
1. Colonna, P. and Silva, P., May 2003. ''Dense Gas Thermodynamic Properties of Single and Multi-Component Fluids for Fluid Dynamics Simulations.'' J.
Fluids Engrg. , 125, pp. 414-427.
2. Colonna, P. and Rebay, S., 2004. ''Numerical simulation of dense gas flows on unstructured grids with an implicit high resolution upwind Euler solver.''
Int. J. Numer. Meth. Fluids . Accepted for publication.
At the moment the following programs and programming environments have been tested with FluidProp:
Every program or development environment supporting the COM standard can be client of the FluidProp server.
The following methods (or functions), ordered by category, are available in FluidProp:
Object creation and cleanup Working fluid definition Simultaneous calculation of all
CreateObject SetFluid properties
ReleaseObjects GetFluid AllProps
GetFluidNames AllPropsSat
GetCompSet (obsolete) Solve
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 3 of 62
Acknowledgements
The late Prof. W.C. Reynolds is hereby greatly thanked first and foremost for his teaching and inspiration which went beyond the scientific field.
His contribution is acknowledged for his guidance in the development of StanMix and for providing the first version of TPSI.
The authors also gratefully acknowledge the contribution of P. Silva who developed the subroutines for several additional TPSI fluids and for the
calculation of additional TPSI properties.
Moreover the contribution of Dr. E.W. Lemmon (NIST) is recognized: he provided us with the RefProp source code and further information
about the code.
Radoslaw Gnutek produced the T-s diagrams in Excel.
The library FunCustomize.dll is used to create the "FluidProp" category in the Excel function wizard, appears by courtesy of Laurent Longre.
The authors are also in debt with the late Eric Ruyg who as a student helped Teus van der Stelt developing the IF97 model.
Prof. Dr. Joachim Gross provided his PCP-SAFT code.
P. Colonna, T.P. van der Stelt, 2004, FluidProp: a program for the estimation of thermo physical properties of fluids , Energy Technology Section, Delft
University of Technology, The Netherlands (www.FluidProp.com).
Disclaimer
The FluidProp software is developed as a tool for scientific research and distributed "as is", in the current state of its development; hence, the
authors make no warranty or representation of this software as error free, accurate, complete, or useful for any specific application. The
authors shall not be liable for any claims, demands, liabilities, costs, losses, damages or expenses of any kind caused to or suffered by any
person or entity that directly or indirectly arise out or result from the use of the software or in connection thereof.
Any use of trade marks, product, or company names in this web publication is for descriptive purposes only.
Registration
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 4 of 62
PCP-SAFT
PCP-SAFT (Perturbed-Chain Polar Statistical Association Fluid Theory) is an equation of state that is based on statistical mechanics. The
behavior of molecules on a microscopic level is used to predict the macroscopic behavior of a fluid. Because of the strong physical background it
is robust, consistent, and predictive. It is successful in predicting vapor-liquid equilibria of complex fluids and suitable for estimating properties
of complex fluids and of mixtures in general for liquid and vapor phases. The contribution of (self)association and polar interactions (dipolar,
quadrupolar, and dipolar-quadrupolar contributions) are taken into account. PCP-SAFT is not able to account for long-range density fluctuations
in the critical region and as a result the properties, which are calculated in that region, are not accurate. In order to obtain a complete the
thermodynamic model a third order polynomial function for the calculation of the ideal gas heat capacity was added.
The PCP-SAFT components can be used as pure fluids or in a mixture. PCP-SAFT provides thermodynamic and transport properties for the fluids
in Table 1. The listed FluidProp names (either short or long) must be used to specify the fluid name in the SetFluid method.
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 5 of 62
GasMix
GasMix implements the ideal gas equation of state:
1. Gordon, S., McBride, B.J. Computer Program for Calculation of complex Chemical Equilibrium Compositions. Lewis Research Center , NASA SP-273, 1971.
Details of the theory and fluid data for these methods can be found in:
3. Reid, R.C., Prausnitz, J.M. and Sherwood, T.K. The Properties of Gases and Liquids, 3rd ed., McGraw-Hill, 1977.
The GasMix components can be used as pure fluids or in a mixture. GasMix provides thermodynamic and transport properties for the fluids in
Table 1. The listed FluidProp names (either short or long) must be used to specify the fluid name in the SetFluid method. For GasMix the short
FluidProp name equals the chemical formula of the fluid. For a given fluid, the FluidProp name is the same in all thermodynamic libraries in
which the fluid is available.
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 6 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 7 of 62
IF97
IF97 implements models for the thermodynamic and transport properties of water and steam according to the IAPWS -IF97 industrial standard
and documented in:
Wagner, W., Kruse, A. Properties of Water and Steam, The Industrial Standard IAPWS-IF97 for the Thermodynamic Properties and Supplementary Equations for Other Properties,
Springer-Verlag Berlin Heidelberg, 1998.
R: 461.526 [J/kg.K]
0.01
T min: [°C]
P <= 100 bar --> Tmax = 2000 °C
T max: 100 < P <= 1000 bar --> Tmax = 800 °C [°C]
RefProp
RefProp is developed and maintained by the National Institute of Standard and Technologies and any specific information can be found in the
original distribution package.
RefProp is not distributed together with the standard version of FluidProp because RefProp is owned and distributed by the National Institute of
Standards and Technologies (NIST). To get access to RefProp via the common FluidProp interface you must own a valid license of RefProp 8 (or
later). Once a valid a license has been obtained or if you have already a valid license, you can contact us about how to establish a link between
FluidProp and RefProp.
RefProp implements reference equations of state as well as technical equations of state for pure fluids. Reference equations of state are able to
describe all experimental thermodynamic property data available for a certain fluid within their experimental uncertainty. Technical equations of
state are accurate enough for most technical applications.
Mixture properties can also be calculated using a generalized model described in the RefProp documentation. Mixtures can be composed from
the list of available pure fluids. However, mixing of pure fluids is limited.
RefProp (version 9.0) provides thermodynamic and transport properties for the pure fluids listed in Table 1. The listed FluidProp names (either
short or long) must be used to specify the fluid name in the SetFluid method. For a given fluid, the FluidProp name is the same in all
thermodynamic libraries in which the fluid is available.
Table 1
FluidProp Name FluidProp Name Tc[°C] Pc Tmin[° Tmax[°
(short) (long) [bar] C] C]
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 8 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 9 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 10 of 62
The predefined mixtures of RefProp are also available through this version of the FluidProp interface. These mixtures are listed in table 2. The
listed FluidProp names (either short or long) must be used to specify the fluid name in the SetFluid method.
Table 2
Product Components FluidProp Name MW Tc[°C] Pc Tmin[° Tmax[°
Name (short and long) [g/mol] [bar] C] C]
AIR NITROGEN/ ARGON/ OXYGEN AIR 28.9586 - 38.50 -217.44 1720.58
140.33
AMARILLO METHANE/ NITROGEN/ CO2/ ETHANE/ AMARILLO 17.5953 -71.06 54.25 -187.53 368.60
PROPANE/ ISOBUTAN/ BUTANE/ IPENTANE/
PENTANE/ HEXANE
EKOFISK METHANE/ NITROGEN/ CO2/ ETHANE/ EKOFISK 18.7680 -56.95 60.25 -185.85 374.10
PROPANE/ ISOBUTAN/ BUTANE/ IPENTANE/
PENTANE
GLFCOAST METHANE/ NITROGEN/ CO2/ ETHANE/ GLFCOAST 16.7992 -75.97 49.43 -186.69 358.85
PROPANE/ ISOBUTAN/ BUTANE/ IPENTANE/
PENTANE/ HEXANE
HIGHCO2 METHANE/ NITROGEN/ CO2/ ETHANE/ HIGHCO2 19.8288 -65.89 58.81 -183.56 419.87
PROPANE/ ISOBUTAN/ BUTANE
HIGHN2 METHANE/ NITROGEN/ CO2/ ETHANE/ HIGHN2 18.6486 -79.63 55.00 -190.59 400.05
PROPANE/ ISOBUTAN/ BUTANE
R401A R22/ R152A/ R124 R401A 94.4384 107.34 46.08 -155.18 246.70
R401B R22/ R152A/ R124 R401B 92.8361 105.57 46.86 -156.39 252.16
R401C R22/ R152A/ R124 R401C 101.0342 111.73 43.73 -153.27 231.67
R402A R125/ PROPANE/ R22 R402A 101.5501 75.81 42.19 -145.50 245.64
R402B R125/ PROPANE/ R22 R402B 94.7091 82.89 45.16 -154.60 257.22
R403A PROPANE/ R22/ R218 R403A 91.9849 86.96 47.04 -168.91 257.94
R403B PROPANE/ R22/ R218 R403B 103.2574 79.66 43.29 -170.22 236.70
R404A R125/ R134A/ R143A R404A 97.6038 72.04 37.29 -112.09 307.50
R405A R22/ R152A/ R142B/ RC318 R405A 111.9083 106.14 42.85 -140.07 276.98
R406A R22/ ISOBUTAN/ R142B R406A 89.8574 116.84 48.55 -153.88 242.03
R407A R32/ R125/ R134A R407A 90.1107 82.26 45.15 -119.09 191.55
R407B R32/ R125/ R134A R407B 102.9373 74.97 41.30 -113.09 207.54
R407C R32/ R125/ R134A R407C 86.2036 86.03 46.29 -120.76 185.13
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 11 of 62
R407D R32/ R125/ R134A R407D 90.9616 91.37 44.68 -117.06 183.55
R407E R32/ R125/ R134A R407E 83.7818 88.46 47.02 -121.80 181.18
R408A R125/ R143A/ R22 R408A 87.0149 83.14 42.95 -142.75 315.03
R409A R22/ R124/ R142B R409A 97.4333 109.27 46.99 -157.96 246.96
R409B R22/ R124/ R142B R409B 96.6731 106.93 47.35 -159.22 251.30
R410A R32/ R125 R410A 72.5854 71.34 49.01 -130.26 187.15
R410B R32/ R125 R410B 75.5723 70.81 48.12 -128.62 190.46
R411A PROPYLEN/ R22/ R152A R411A 82.3642 99.10 49.52 -158.96 271.07
R411B PROPYLEN/ R22/ R152A R411B 83.0689 95.92 49.44 -163.56 275.32
R412A R22/ R218/ R142B R412A 92.1736 107.19 49.06 -156.82 250.23
R413A R218/ R134A/ ISOBUTAN R413A 103.9547 96.55 40.19 -118.59 178.35
R414A R22/ R124/ ISOBUTAN/ R142B R414A 96.9320 112.68 46.79 -158.46 242.19
R414B R22/ R124/ ISOBUTAN/ R142B R414B 101.5894 111.00 45.92 -159.13 240.97
R415A R22/ R152A R415A 81.9105 101.97 49.59 -154.57 267.53
R415B R22/ R152A R415B 70.1946 111.37 46.54 -132.35 238.58
R416A R134A/ R124/ BUTANE R416A 111.9209 107.09 39.76 -131.65 185.11
R417A R125/ R134A/ BUTANE R417A 106.7459 87.13 40.35 -112.78 199.26
R418A PROPANE/ R22/ R152A R418A 84.5949 96.21 49.82 -162.89 276.18
R419A R125/ R134A/ DME R419A 109.3379 82.12 39.43 -110.56 222.43
R420A R134A/ R142B R420A 101.8451 104.76 40.86 -112.97 182.34
R421A R125/ R134A R421A 111.7465 82.78 39.19 -106.99 203.84
R421B R125/ R134A R421B 116.9290 72.41 37.49 -106.16 217.71
R422A R125/ R134A/ ISOBUTAN R422A 113.6044 71.71 37.45 -114.88 218.41
R422B R125/ R134A/ ISOBUTAN R422B 108.5184 83.21 39.58 -114.27 202.95
R422C R125/ R134A/ ISOBUTAN R422C 113.3993 73.06 37.75 -113.98 216.53
R422D R125/ R134A/ ISOBUTAN R422D 109.9351 79.57 39.05 -115.06 207.82
R423A R134A/ R227EA R423A 125.9591 99.14 35.63 -118.45 185.66
R424A R125/ R134A/ ISOBUTAN/ BUTANE/ R424A 108.4124 85.89 40.03 -112.34 200.18
IPENTANE
R425A R32/ R134A/ R227EA R425A 90.3065 93.89 45.01 -121.54 177.33
R426A R125/ R134A/ BUTANE/ IPENTANE R426A 101.5585 99.89 40.92 -111.39 183.13
R427A R32/ R125/ R143A/ R134A R427A 90.4440 85.32 43.92 -117.84 201.24
R428A R125/ R143A/ PROPANE/ ISOBUTAN R428A 107.5276 69.00 37.25 -115.78 260.02
R435A DME/ R152A R435A 49.0354 125.15 53.84 -144.38 245.16
R436A PROPANE/ ISOBUTAN R436A 49.3342 115.88 42.73 -183.09 346.22
R436B PROPANE/ ISOBUTAN R436B 49.8728 117.42 42.50 -182.06 343.22
R437A R125/ R134A/ BUTANE/ PENTANE R437A 103.7085 96.27 40.87 -110.62 189.20
R500 R12/ R152A R500 99.3030 102.09 41.68 -152.94 227.57
R501 R22/ R12 R501 93.0983 95.87 47.61 -163.44 266.53
R502 R22/ R115 R502 111.6278 81.51 40.17 -149.97 262.85
R503 R23/ R13 R503 87.2467 18.43 42.81 -178.17 148.57
R504 R32/ R115 R504 79.2491 62.09 44.24 -140.24 166.09
R507A R125/ R143A R507A 98.8592 70.62 37.05 -111.79 308.37
R508A R23/ R116 R508A 100.0977 10.19 36.51 -147.21 158.36
R508B R23/ R116 R508B 95.3940 11.20 37.72 -150.14 162.79
R509A R22/ R218 R509A 123.9617 68.48 36.02 -165.41 205.63
R510A DME/ ISOBUTAN R510A 47.2442 125.67 51.18 -149.27 253.32
FreeStanMix
The complete thermodynamic model implemented in FreeStanMix is documented in the following references:
1. Colonna, P., June 1995. Properties of Fluid Mixtures for Thermodynamic Cycles Applications.Tech. rep., Stanford University, Stanford, CA.
2. Angelino, G. and Colonna, P., 1998. ''Multicomponent Working fluids for Organic Rankine Cycles (ORCs).'' Energy , 23, pp. 449-463.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 12 of 62
The PRSV cubic equation of state, which is a modified Peng Robinson equation of state particularly suited for the accurate estimation of
saturation properties, is described in
3. Stryjeck, R. and Vera, J. H., 1986. ``PRSV: An Improved Peng-Robinson Equation Of State For Pure Compounds And Mixtures.'' Can. J.
Chem. Eng. , 64, pp. 323-333.
The Wong and Sandler mixing rules which are suitable for the modeling of highly non-ideal mixtures are documented e.g. in:
4. Wong, D. S. H., Sandler, S. I., and Orbey, H., 1992. ``Equation Of State Mixing Rule For Nonideal Mixtures Using Available Activity
Coefficient Model Parameters And That Allows Extrapolation Over Large Ranges Of Temperature And Pressure.'' Ind. Eng. Chem. Res. ,
31, pp. 2033-2039.
5. Wong, D. S. H. and Sandler, S. I., 1992. ``A Theoretically Correct Mixing Rule for Cubic Equations of State.'' AIChE Journal , 38, pp. 671-
680.
6. Huang, H. and Sandler, S. I., 1993. ``Prediction of Vapor-Liquid Equilibria at High Pressures Using Activity Coefficient Parameters
Obtained from Low Pressure Data: A comparison of Two Equation of State Mixing Rules.'' Ind. Eng. Chem. Res. , 32, pp. 1498-1503.
7. Orbey, H. and Sandler, S. I., 1993. ``Accurate Equation of State Predictions at high temperatures and pressures using the existing
UNIFAC model.'' Fluid Phase Equilib. , 85, pp. 41-54.
8. Sandler, S. I. et al. , 1994. Models For Thermodynamic And Phase Equilibria Calculations . Marcel Dekker, New York.
9. Orbey, H. and Sandler, S. I., 1995. ``On the Combination of Equation of State and Excess Free Energy Models.'' Fluid Phase Equilib. ,
111, pp. 53-70.
10. Orbey, H. and Sandler, S. I., 1995. ``Reformulation of Wong-Sandler Mixing Rules for Cubic Equations of State.'' AIChE J. , 41.
11. Orbey, H. and Sandler, S. I., 1995. ``Equation of State modeling of Refrigerant Mixtures.'' Ind. Eng. Chem. Res. , 34, pp. 2520-2525.
12. Orbey, H. and Sandler, S. I., 1997. ``A Comparison of Huron-Vidal Type Mixing Rules of Mixtures of Compounds with Large Size
Differences, and a New Mixing Rule.'' Fluid Phase Equilib. , 132, pp. 1-14.
13. Shiflett, M. B. and Sandler, S. I., June 1998. ``Modeling Fluorocarbon Vapor Liquid Equilibria using the Wong-Sandler model.'' Fluid
Phase Equilib. , 147, pp. 145-162.
IMPORTANT NOTE: FreeStanMix implements a simple Successive Substitution Model for the solution of saturation calculations that is known
to fail for close-to-critical states and performs worse for highly non-ideal mixtures. The critical point calculation for a mixture is implemented as
the pseudo-critical point calculation if the user specifies the composition, therefore the result is highly inaccurate, but an estimate is necessary
for all other type of calculations. For predefined mixtures the critical point is calculated with a "climbing" method, that is the bubble point
calculation is repeated by increasing the temperature in ever-small steps until it does not converge anymore. This is also an inaccurate estimate
even if much better than the pseudo-critical point calculation. Refer to StanMix for improved versions of these algorithms.
The critical point calculation for a mixture is implemented as the pseudo-critical point calculation if the composition is specified by the user,
therefore the result is highly inaccurate, but an estimate is necessary for all other type of calculations. For predefined mixtures the critical point
is calculated with a "climbing" method, that is the bubble point calculation is repeated by increasing the temperature in ever small steps until it
does not converge anymore. This is also an inaccurate estimate even if much better than the pseudo-critical point calculation. We plan to
improve these calculations.
FreeStanMix provides thermodynamic properties for the pure fluids listed in Table 1 and 2. The listed FluidProp names (either short or long)
must be used to specify the fluid name the SetFluid method. For a given fluid, the FluidProp name is the same in all thermodynamic libraries in
which the fluid is available.
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 13 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 14 of 62
More fluids can easily be added. The necessary data are the critical temperature, the critical pressure, the saturation curve and the specific heat
in the ideal gas state.
Moreover the mixtures listed in Table 2 are available as predefined mixtures. The listed FluidProp names (either short or long) must be used to
specify the fluid name the SetFluid method. Other mixtures can be added if pure and binary interaction data are available.
A large collection of binary interaction parameters data is available, for example, on:
14. Various authors. DECHEMA Chemistry Data Series, Frankfurt am Main (1977 and thereafter).
15. DETHERM: Thermophysical properties of pure substances & mixtures
16. Infotherm: Experimental thermodynamic and physical properties of mixtures and pure substances
17. DIPPR: Evaluated Process Design Data of the AIChE Design Institute of Physical Properties
Table 2
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 15 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 16 of 62
For a mixture:
Tmin = Max[Tmin (i)]; i = 1,2,..., ncomponents
Tmax = Min[Tmax(i)]; i = 1,2,..., ncomponents
Pmin = P(Tmin, q = 0)
Pmax = P(Tmax, v = 1/2 vc,min),
vc,min = Max[vc (i)] ; i = 1,2,..., ncomponents
TPSI
TPSI implements the computer programs described in:
1. Reynolds, W.C., Thermodynamic properties in S.I., Department of Mechanical Engineering - Stanford University, Stanford, CA, 1979.
A first version of the program was written by Prof. W.C. Reynolds and distributed as a DOS executable program. The program was later
modified and expanded with more fluids and properties, as documented in:
2. Colonna, P., Rebay, S., and Silva, P., Computer Simulations of Dense Gas Flows Using Complex Equations of State for Pure Fluids and
Mixtures and State of the Art Numerical Schemes. Tech. Rep., Università di Brescia, Via Branze, 38, 25123 Brescia, Italy, March 2002.
TPSI provides thermodynamic properties for the fluids listed in Table 1. The listed FluidProp names (either short or long) must be used to
specify the fluid name in the SetFluid method. For a given fluid, the FluidProp name is the same in all thermodynamic libraries in which the fluid
is available. Liquid metals are available at additional cost.
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 17 of 62
(1) In this model air and H2O vapor are treated as perfect gas with variable specific heats. The liquid is treated as incompressible. It uses
specific heat and saturation equations from the appropriate TPSI subroutines of the other fluids.
StanMix
StanMix is based on the iPRSV equation of state. The iPRSV equation of state is an improved, by Stryjek-Vera modified, Peng-Robinson cubic
equation of state. For mixtures the Wong-Sandler mixing rules are applied. It estimates vapor pressures accurately, the phase equilibrium
correlation for mixtures is good, and the performance for thermodynamic conditions other than saturation and for other thermodynamic
properties is satisfactory. Furthermore, this equation of state provides a good trade-off between simplicity of the model and accuracy, and the
simplicity of the formulation positively affects computational speed. It is generally known that the liquid densities are not represented accurately
by a CEoS. This applies also to the iPRSV model. In order to obtain a complete the thermodynamic model a third order polynomial function for
the calculation of the ideal gas heat capacity was added.
StanMix is documented in the following references:
1. T.P. van der Stelt, N.R. Nannan, P. Colonna, 2012. '' The iPRSV equation of state.'' Fluid Phase Equil. , 330, pp. 24-35.
2. R.A. Heidemann, A.M. Khalil, 1980. ''The calculation of critical points.'' AIChE J , 26 (5), pp. 769-779.
3. M.L. Michelsen, 1980. ''Calculation of phase envelopes and critical points for multicomponent mixtures.'' Fluid Phase Equil. , 4, pp. 1-10.
4. M.L. Michelsen, 1985. ''Saturation point calculations.'' Fluid Phase Equil. , 23, pp. 181-192.
5. M.L. Michelsen, 1982a. "The isothermal flash problem. Part I. Stability analysis.'' Fluid Phase Equil. , 9, pp. 1-19.
6. M.L. Michelsen, 1982b. "The isothermal flash problem. Part II. Phase split calculation.'' Fluid Phase Equil. , 9, pp. 21-40.
7. M.L. Michelsen, J. Mollerup, 2007. "Thermodynamic Models: Fundamentals & Computational Aspects, Second edition." Tie-Line Publications
The StanMix components can be used as pure fluids or in a mixture. StanMix provides thermodynamic and transport properties for the fluids in
Table 1. The listed FluidProp names (either short or long) must be used to specify the fluid name in the SetFluid method.
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 18 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 19 of 62
The predefined mixtures of StanMix are also available through this version of the FluidProp interface. These mixtures are listed in table 2. The
listed FluidProp names (either short or long) must be used to specify the fluid name in the SetFluid method.
Table 2
The state definition gives a string which defines the input variables for a FluidProp method (see e.g. Enthalpy).
Table 1
FluidProp Name (short) FluidProp Name (long) Tc [°C] Pc MW Tmin[° Tmax[°
[bar] [g/mol] C] C]
1- 1-propanol/hexane 73.1370 263.56 51.70 59.85 350.00
C3H8O/C6H14
C3H6O/CH4O acetone/methanol 45.0610 229.42 60.80 17.27 350.00
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 20 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 21 of 62
PT
Pv
Pd
Ph
Ps
Pq n/a
Pu
Tv
Td
Ts
Tq n/a
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 22 of 62
vh
vs
vq n/a n/a
vu
dh
ds
dq n/a n/a
du
hs
Legend:
n/a = not available
P = Pressure
T = Temperature
v = Specific volume
d = Density
h = Enthalpy
s = Entropy
u = Internal energy
q = Vapor quality
Table 1
-
Temperature Temperature T °C
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 23 of 62
(Alpha)
(Beta)
(Chi)
(Fi)
(Theta)
(Kappa)
(Gamma)
Not all properties can be computed by all the libraries interfaced to FluidProp. Table 2 lists the available properties for each library.
Table 2
Thermophysical property FluidProp method TPSI FreeStanMix IF97 GasMix RefProp StanMix PCP-SAFT
Pressure Pressure
Temperature Temperature
Density Density
Enthalpy Enthalpy
Entropy Entropy
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 24 of 62
Fi (1) n/a
Legend:
n/a = not available
(1) = not available for the TPSI fluids Air and Moist. Air;
Table 1
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 25 of 62
Info property Method Default TPSI FreeStanMix IF97 GasMix RefProp StanMix PCP-SAFT
unit
Legend:
= available
n/a = not available
Table 1
Temperature T °C K °F
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 26 of 62
Table 2
Length m in ft yd mi
Mass g lb oz
Time s min h d y
Temperature K °C °F °R
Temperature difference K °C °F °R
Area m2 a sq in sq ft sq acre
yd
Volume m3 L cu in cu ft cu cc
yd
Force N gf lbf
Power W hp
Base units can be preceded (if applicable) by the prefixes listed in Table 3.
Table 3
Base units, possibly preceded by a prefix, can be used together in arbitrary combinations. For instance the unit of the specific heat capacity
(J/kgK) can be formed by combining the units of energy, mass and temperature difference dT by means of the operators listed in Table 4.
Table 4
symbol
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 27 of 62
. period multiply
/ slash divide
^ circumflex power
A compound unit consists of a row of base units, possibly raised to a certain power, separated by a period or a slash. A base unit raised to a
power consists of base unit followed by circumflex and after that a positive or negative number. If no power is specified, the power defaults to
1. For example if a pressure is to be specified as Newton per square meter then it can be written as N/m^2 (or N.m^-2). The number of base
units in a compound unit is unlimited. Each base unit and its power form a unit itself. This means that a period or slash in front of the preceding
unit does not affect the unit thereafter. Therefore the unit of the specific heat capacity must be written as J/kg/K, or J.kg^-1.K^-1, or J/kg.K^-
1, or J.kg^-1/K and certainly not as J/kg.K.
CreateObject
It creates an empty FluidProp object for a certain library.
This method need not to be used if the SetFluid method is employed, because SetFluid itself calls the CreateObject method internally.
The CreateObject method can also be used to test if a certain thermodynamic library is available. For example, suppose that the RefProp library
is not installed, then CreateObject( &ldots;, "RefProp", ErrorMsg) yields ErrorMsg = "Error in FluidProp: library RefProp not available.".
Arguments:
ReleaseObjects
It deletes all FluidProp objects from the memory.
Syntax:
ReleaseObjects()
Predefined mixtures
Mixtures for which the composition is set in the input file (e.g. .smx files for StanMix, .mix files for RefProp).
SetFluid
It defines the library to be used for the calculation of the fluid properties and the fluid.
It returns an Object Identifier to which methods for property calculation can refer (see e.g. Enthalpy).
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 28 of 62
Arguments:
Notes:
FluidProp 2 uses fluid names for all available fluids (returned by the GetFluidNames method) that are common to all libraries; FluidProp 1
employed fluid names that were specific to each good sentence library (returned by the obsolete GetCompSetmethod); for compatibility issues
both names can still be used.
Examples:
Note: in this case also the Comp argument is ignored because the IF97 model applies only to water.
Note: the Conc() argument is not ignored, even though it is a predefined mixture(in this case benzene (0.5) / toluene (0.5) ). For predefined
mixtures SetFluid still needs to be called with an array specifying the concentrations of the fluids. The concentration can also be explicitly
specified with Conc() as in the following examples about custom defined mixtures:
Comp(1) = "N2"
Conc(1) = 0.7729
Comp(2) = "O2"
Conc(2) = 0.2075
Comp(3) = "H2O"
Conc(3) = 0.0101
Comp(4) = "AR"
Conc(4) = 0.0092
Comp(5) = "CO2"
Conc(5) = 0.0003
SetFluid("GasMix", 5, Comp, Conc, ErrorMsg)
Comp(1) = "R32"
Conc(1) = 0.69762
Comp(2) = "R125"
Conc(2) = 0.30238
SetFluid("RefProp", 2, Comp, Conc, ErrorMsg)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 29 of 62
Comp(1) = "benzene"
Conc(1) = 0.7
Comp(2) = "toluene"
Conc(2) = 0.3
SetFluid("StanMix", 2, Comp, Conc, ErrorMsg)
Excel example:
SetFluid("TPSI", "propane", "", A1)
Notes: A1 is a cell containing the value returned by SetUnits. Using default FluidProp units it is just: SetFluid("TPSI", "propane")
The error message is not in the arguments list; in case an error occurs during the calculation, the value returned by the function is a
string containing the error description.
GetFluid
It returns the library name and composition of the working fluid.
Arguments:
GetFluidNames
It returns a string vector containing the names of the fluids available in the specified library. Both the long and short name formats can be
specified.
Arguments:
Type: a string containing either "short", "s", "long" or "l", which indicates the wanted format for the names (input)
Library: a string containing the library name; if Library is blank (" ") or "all" then all names of all fluids available are returned (input)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 30 of 62
Excel Examples:
GetFluidNames("s", "all")
GetFluidNames("s", "GasMix")
GetFluidNames("l", "RefProp")
GetFluidNames("short", "StanMix")
GetFluidNames("Long", "TPSI")
Note: in case an error occurs during execution, the value returned by the function is a string containing the error description.
GetCompSet
OBSOLETE
This method has been maintained for compatibility with FluidProp 1. Use GetFluidNames instead.
AllProps
It returns all available thermophysical properties, given 2 input thermodynamic variables as defined by the InputSpec argument (see
Thermodynamic State definitions).
The properties that are calculated and the default units are listed in the table of available Thermodynamic and Transport Properties.
The general syntax for procedural programming languages like Fortran is:
call AllProps( FluidObj, InputSpec, Value1, Value2, P, T, v, d, h, s, u, q, x, y, cv, cp, c, alpha, beta, chi, fi, ksi, psi, zeta, theta, kappa,
gamma, eta, lambda, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
FluidObj.AllProps( InputSpec, Value1, Value2, P, T, v, d, h, s, u, q, x, y, cv, cp, c, alpha, beta, chi, fi, ksi, psi, zeta, theta, kappa, gamma,
eta, lambda, ErrorMsg)
The general syntax for Excel is:
AllProps( FluidObj, InputSpec, Value1, Value2)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object
variable created at runtime.
InputSpec: String
Value1: Double (input)
Value2: Double (input)
P, T, v, d, Double (output)
h, s, u, q:
x, y: 1-dimensional double array (output)
cv, cp, c, Double (output)
alpha, beta,
chi, fi, ksi,
psi, zeta, theta,
kappa, gamma,
eta, lambda:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 31 of 62
Excel Example:
AllPropsSat
It returns all available thermophysical properties and some saturation properties as function of pressure P, given 2 input thermodynamic
variables as defined by the InputSpec argument (see Thermodynamic State definitions).
The thermophysical properties that are calculated and the default units are listed in the table of available Thermodynamic and Transport
Properties. The following saturation properties are calculated (default units):
dd_liq_dP first-order partial derivative of the saturated liquid density with respect to the pressure [kg/m3.bar]
dd_vap_dP first-order partial derivative of the saturated vapor density with respect to the pressure [kg/m3.bar]
dh_liq_dP first-order partial derivative of the saturated liquid enthalpy with respect to the pressure [kJ/kg.bar]
dh_vap_dP first-order partial derivative of the saturated vapor enthalpy with respect to the pressure [kJ/kg.bar]
dT_sat_dP first-order derivative of the saturation temperature with respect to the pressure [K/bar]
The general syntax for procedural programming languages like Fortran is:
call AllPropsSat( FluidObj, InputSpec, Value1, Value2, P, T, v, d, h, s, u, q, x, y, cv, cp, c, alpha, beta, chi, fi, ksi, psi, zeta, theta, kappa,
gamma, eta, lambda, d_liq, d_vap, h_liq, h_vap, T_sat, dd_liq_dP, dd_vap_dP, dh_liq_dP, dh_vap_dP, dT_sat_dT,
ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
FluidObj.AllPropsSat( InputSpec, Value1, Value2, P, T, v, d, h, s, u, q, x, y, cv, cp, c, alpha, beta, chi, fi, ksi, psi, zeta, theta, kappa,
gamma, eta, lambda, d_liq, d_vap, h_liq, h_vap, T_sat, dd_liq_dP, dd_vap_dP, dh_liq_dP, dh_vap_dP, dT_sat_dT,
ErrorMsg)
The general syntax for Excel is:
AllPropsSat( FluidObj, InputSpec, Value1, Value2)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object
variable created at runtime.
InputSpec: String
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 32 of 62
Excel Example:
Solve
It calculates the root of F(Tmd1,Tmd2) - FF = 0 where Tmd's are available thermodynamic properties, F is any of the available methods for
thermodynamic property calculations (see Table of available Thermodynamic and Transport Properties) and FF is a desired value for the
property F.
The general syntax for programs like Excel and programming languages like Fortran is:
Root = Solve( FluidObj, FuncSpec, FuncVal, InputSpec, Target, FixedVal, MinVal, MaxVal, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
Root = FluidObj.Solve( FuncSpec, FuncVal, InputSpec, Target, FixedVal, MinVal, MaxVal, ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
FuncSpec: String, function specification ("Pressure", "Temperature",...), i.e. F in F(Tmd1,Tmd2) - FF = 0
FuncVal: Double, desired value of the function F, i.e. FF in F(Tmd1,Tmd2) - FF = 0
InputSpec: String
Target: Integer, indicates which is the running variable, i.e. Target = 1 for Tmd1 or Target = 2 for Tmd2
FixedVal: Double, fixed Value, i.e. Tmd1 (Target = 2) or Tmd2 (Target = 1)
MinVal: Lower boundary for the running variable
MaxVal: Upper boundary for the running variable
ErrorMsg: String
T = Solve( A1,"Gamma",1.008,"Tv",1,0.3723,0,200)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 33 of 62
Pressure
It returns the pressure, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
P = Pressure( FluidObj, InputSpec, Value1, Value2, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
P = FluidObj.Pressure( InputSpec, Value1, Value2, ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Temperature
It returns the temperature, given 2 input thermodynamic variables as defined by the InputSpec argument.
Default unit: °C
The general syntax for programs like Excel and programming languages like Fortran is:
T = Temperature( FluidObj, InputSpec, Value1, Value2, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
T = FluidObj.Temperature( InputSpec, Value1, Value2, ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 34 of 62
SpecVolume
It returns the specific volume, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
v = SpecVolume( FluidObj, InputSpec, Value1, Value2, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
v = FluidObj.SpecVolume( InputSpec, Value1, Value2, ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Density
It returns the specific volume, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
The syntax for object oriented programming languages like VB, C++ and Matlab is:
= FluidObj.Density( InputSpec, Value1, Value2, ErrorMsg)
Arguments:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 35 of 62
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Enthalpy
It returns the enthalpy, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
h = Enthalpy( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
h = FluidObj .Enthalpy( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Entropy
It returns the entropy, given 2 input thermodynamic variables as defined by the InputSpec argument.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 36 of 62
The general syntax for programs like Excel and programming languages like Fortran is:
s = Entropy( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
s = FluidObj .Entropy( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
IntEnergy
It returns the internal energy, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
u = IntEnergy( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
u = FluidObj .IntEnergy( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 37 of 62
The possible input specifications are listed in the table of available Thermodynamic State definitions.
VaporQual
It returns the vapor quality, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
q = VaporQual( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
q = FluidObj .VaporQual( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
HeatCapV
It returns the isochoric heat capacity, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
cv = HeatCapV( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
cv = FluidObj .HeatCapV( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 38 of 62
Excel Example:
LiquidCmp
It returns the liquid phase composition, given 2 input thermodynamic variables as defined by the InputSpec argument.
Because the output is an array, the general syntax for a programming language like Fortran is:
call LiquidCmp( FluidObj , InputSpec , Value1 , Value2, x, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
x = FluidObj .LiquidCmp( InputSpec , Value1 , Value2, ErrorMsg )
The general syntax for Excel is:
x = LiquidCmp( FluidObj , InputSpec , Value1 , Value2 )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
VaporCmp
It returns the vapor phase composition, given 2 input thermodynamic variables as defined by the InputSpec argument.
Because the output is an array, the general syntax for a programming language like Fortran is:
call VaporCmp( FluidObj , InputSpec , Value1 , Value2, y, ErrorMsg )
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 39 of 62
The syntax for object oriented programming languages like VB, C++ and Matlab is:
y = FluidObj .VaporCmp( InputSpec , Value1 , Value2, ErrorMsg )
The general syntax for Excel is:
y = VaporCmp( FluidObj , InputSpec , Value1 , Value2 )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
GibbsFreeEnergy
It returns the Gibbs free energy, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
G = GibbsEnergy( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
G = FluidObj .GibbsEnergy( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 40 of 62
The possible input specifications are listed in the table of available Thermodynamic State definitions.
Surface tension
It returns the surface tension
The general syntax for programs like Excel and programming languages like Fortran is:
= SurfTens( FluidObj, InputSpec, Value1, Value2, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
= FluidObj.SurfTens( InputSpec, Value1, Value2, ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
FugacityCoefficients
It returns the fugacity coefficients
Default unit: -
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 41 of 62
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
HeatCapP
It returns the isobaric heat capacity, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
cp = HeatCapP( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
cp = FluidObj .HeatCapP( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
SoundSpeed
It returns the speed of sound, given 2 input thermodynamic variables as defined by the InputSpec argument.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 42 of 62
The general syntax for programs like Excel and programming languages like Fortran is:
c = SoundSpeed( FluidObj , InputSpec , Value1 , Value2, ErrorMsg )
The syntax for object oriented programming languages like VB, C++ and Matlab is:
c = FluidObj .SoundSpeed( InputSpec , Value1 , Value2, ErrorMsg )
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Alpha
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 43 of 62
Beta
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Chi
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 44 of 62
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Fi
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 45 of 62
Ksi
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Psi
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 46 of 62
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Zeta
It returns the partial derivative
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 47 of 62
Theta
It returns the volumetric thermal expansion coefficient:
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Kappa
It returns the isothermal compressibility:
,
given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 48 of 62
The syntax for object oriented programming languages like VB, C++ and Matlab is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Gamma
It returns the fundamental derivative of gas dynamics:
Default unit: -
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 49 of 62
Viscosity
It returns the dynamic viscosity, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
ThermCond
It returns the thermal conductivity, given 2 input thermodynamic variables as defined by the InputSpec argument.
The general syntax for programs like Excel and programming languages like Fortran is:
Arguments:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 50 of 62
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
InputSpec: String
Value1: Double
Value2: Double
ErrorMsg: String
Excel Example:
Mmol
It returns the molar mass of the working fluid.
The general syntax for programs like Excel and programming languages like Fortran is:
M = Mmol( FluidObj, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
M = FluidObj.Mmol( ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
ErrorMsg: String
Excel Example:
M = Mmol( A1)
Tcrit
It returns the critical temperature of the working fluid.
Default unit: °C
The general syntax for programs like Excel and programming languages like Fortran is:
T = Tcrit( FluidObj, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 51 of 62
T = FluidObj.Tcrit( ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
ErrorMsg: String
Excel Example:
T = Tcrit( A1)
Pcrit
It returns the critical pressure of the working fluid.
The general syntax for programs like Excel and programming languages like Fortran is:
P = Pcrit( FluidObj, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
P = FluidObj.Pcrit( ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
ErrorMsg: String
Excel Example:
P = Pcrit( A1)
Tmin
It returns the lower limit of the temperature validity range of the working fluid.
Default unit: °C
The general syntax for programs like Excel and programming languages like Fortran is:
T = Tmin( FluidObj, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
T = FluidObj.Tmin( ErrorMsg)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 52 of 62
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
ErrorMsg: String
Excel Example:
T = Tmin( A1)
Tmax
It returns the upper limit of the temperature validity range of the working fluid.
Default unit: °C
The general syntax for programs like Excel and programming languages like Fortran is:
T = Tmax( FluidObj, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
T = FluidObj.Tmax( ErrorMsg)
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
ErrorMsg: String
Excel Example:
T = Tmax( A1)
AllInfo
It returns the molar mass, critical point parameters and the temperature validity range of the working fluid at once.
Default units:
Molar mass: kg/mol,
Pressures: bar
Temperatures: °C
The general syntax for programs like Excel and programming languages like Fortran is:
AllInfo( FluidObj, Mmol, Tcrit, Pcrit, Tmin, TMax, ErrorMsg)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
FluidObj.AllInfo(Mmol, Tcrit, Pcrit, Tmin, TMax, ErrorMsg)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 53 of 62
Arguments:
FluidObj: In Excel it is the variable returned by SetFluid, in other programs or programming environments it is an object variable
created at runtime.
Mmol: Molar mass of the working fluid (Double)
Tcrit: Critical temperature of the working fluid (Double)
Pcrit: Critical pressure of the working fluid (Double)
Tmin: Lower limit of the temperature validity range for the working fluid (Double)
Tmax: Upper limit of the temperature validity range for the working fluid (Double)
ErrorMsg: String
Excel Example:
AllInfo( A1)
SetUnits
It defines the units to be used for the calculation of thermophysical properties in FluidProp. The use of this method in Excel is slightly different
from its use in other client programs or programming environments.
The syntax for defining the unit set for Excel is as follows:
SetUnits(UnitSet, MassOrMole, Properties, Units)
The syntax for programming languages like Fortran is:
SetUnits( FluidObj, UnitSet, MassOrMole, Properties, Units)
The syntax for object oriented programming languages like VB, C++ and Matlab is:
FluidObj.SetUnits( UnitSet, MassOrMole, Properties, Units)
Important note
In order to use the SetUnits method, an object variable must already have been created. The unit settings defined by the SetUnits method
apply to all object variables that are used in the current application.
In Excel the handling of fluid objects is different: the units must be defined for each working fluid defined with the SetUnits function. Hence the
SetUnits function returns an Object Identifier to which the SetFluid method can refer.
The provided example might further clarify the use of the SetUnits function in Excel.
Arguments
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 54 of 62
MassOrMole: String that specifies the base unit for the selected properties;
It can be:
- "PerMass" or " " (default)
- "PerMole"
This modifier overwrites the specification possibly set with UnitSet.
Properties: String indicating a list with one or more properties (separated by commas) for which the user wants to specify a unit different
from the specified unit set.
If no units are to be modified then a blank must be entered (" ").
This modifier overwrites the unit specification of the specified properties in UnitSet and MassOrMole.
For example: to modify the units of pressure and temperature, Properties is: "P,T"
Units: String indicating a list with one or more units separated by commas in the same order as the property symbols in Properties.
For the available units, see Table 2 in Available Units and Unit sets).
The number of unit symbols must the same as the number of property symbols in Properties. If no properties have been
specified in Properties then a blank (" ") must be entered.
For example: to modify the units of pressure and temperature in pounds per square inch and degrees Fahrenheit, Units must
be: "psia, °F".
Examples
To specify the SI unit set for all units except for the pressure and temperature, which should be in bar and in Celsius degrees, enter:
To specify that all units of the specified unit set must be per mole instead of per mass, enter:
To specify the FluidProp unit set for all units except for the enthalpy and the entropy, which have to be in Megajoules instead of Kilojoules and
except for the pressure, which has to be in Newton per square meter, enter:
SetUnits( " ", " ", "h, s, P", "MJ/kg, MJ/kg/K, N/m^2")
To specify the Anglo-Saxon unit set for all units, except that all units have to be per mole instead of per pound, enter:
SetRefState
It defines the reference state in case both the state definitions and the calculated properties must be non-dimensional.
Notes
In order to use the SetRefState method, an object variable must have been created. The reference state defined by the SetRefState method
applies to all object variables that are used in the current application.
This method is not available in Excel.
Arguments
FluidObj: An object variable created at runtime.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 55 of 62
Example
To define the reference state to be T = 50 °C and P = 2 bar:
SetRefState( 50, 2, ErrorMsg)
General Information
The folder <FluidProp folder>\ Sample Clients contains examples of client programs for the following programs or development
environments:
In all examples the same calculations are executed. The Visual Basic and C++ Builder examples are applications based on MS-Windows
scrollable windows, while the Fortran, Visual C++ and Borland C++ client are just console applications. Once FluidProp is installed properly, you
can run all the executables.
In order to adapt or extend an example you must have the corresponding programming system and open the enclosed project file.
In order to use C++ Builder as we did, special installation steps should be accomplished. See the Readme.txt file in the C++ Builder folder.
For the C++ examples the names of the source files are the same. However, the contents of the files are slightly different. This mainly has to
do with the different way in which specific libraries available in the different programming environments handle string variables. Nevertheless,
methods have been added in each example, so that FluidProp can be used in the same way.
BD client Example
Using FluidProp from Borland Delphi is very easy. Look into the example provided in:
General syntax:
ErrorMsg = invoke(ObjID,'SetFluid_M', ModelName, nComp, Comp, Conc)
Arguments:
ObjID: Object variable as set by the actxserver Matlab function (e.g. FP = actxserver ('FluidProp.FluidProp');)
ModelName: String (possible values: TPSI, RefProp, StanMix, GasMix, IF97)
nComp: Integer
Comp(): String containing the comma separated list of the components (IMPORTANT: it must match exactly the string returned by
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 56 of 62
GetFluidNames but it is not case dependent; both short and long names can be used.)
Conc(): Double Array. Dimensions: nComp rows X 2 columns. The second column is formed by 0's. This is due to the Matlab
implementation of COM: arrays can only be passed if they are matrices and not vectors.
ErrorMsg: String (value returned)
Examples:
Model = 'GasMix';
nCmp = 5;
Cmp = 'AR,CO2,H2O,N2,O2';
Cnc = [0.0092,0; 0.0003,0; 0.0101,0; 0.7729,0; 0.2075,0];
ErrorMsg = invoke(FP,'SetFluid_M',Model,nCmp,Cmp,Cnc)
Model = 'RefProp';
nCmp = 1;
Cmp = 'Toluene';
Cnc = [1, 0];
ErrorMsg = invoke(FP,'SetFluid_M',Model,nCmp,Cmp,Cnc)
Any of the functions to compute a fluid property can be called with the same syntax, e.g.:
[Enthalpy,ErrorMsg] = invoke(FP,'Enthalpy','PT', P, T);
Alternatively, one can also call a FluidProp function with:
[Enthalpy,ErrorMsg] = FP.Enthalpy("PT", P, T);
VC client Example
Using FluidProp from Microsoft Visual C++ is very easy. Look into the example provided in:
Maple Example
Using FluidProp from Maple is very easy. Look into the example provided in:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 57 of 62
CAPE-OPEN information
FluidProp includes a CAPE-OPEN interface (which is sold in a separate add-on). The FluidProp CAPE-OPEN thermo system is registered under
the name "FluidPropCO.FluidProp.1"
For more information on the CAPE-OPEN standard and CAPE-OPEN test clients, check: www.colan.org.
Browse your computer and select the file FluidProp.xla in the FluidProp folder:
Now a FluidProp category appears every time you use the Excel Function Wizard:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 58 of 62
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 59 of 62
Go to the Add-Ins tab and from the Manage drop-down box select Excel Add-ins and press Go...:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 60 of 62
Browse your computer and select the file FluidProp.xla in the FluidProp folder:
Now a FluidProp category appears every time you use the Excel Function Wizard:
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 61 of 62
Excel Examples
Using FluidProp from Excel is very easy. Look into the examples provided in:
<FluidProp folder>\Sample Clients\Microsoft Excel
Excel Sample.xls shows examples of FluidProp functions for each available library.
The folder <FluidProp folder>\Sample Thermodynamic Diagrams contains T-s and PTx diagrams realized with FluidProp as a
demonstration of the FluidProp capabilities.
Example:
In one cell enter (e.g. A1), set the library and the fluid by inserting the SetFluid function:
=SetFluid(ModelName, FluidName)
e.g: =SetFluid("TPSI","Butane")
for a custom defined mixture: =SetFluid("RefProp",{"Butane","Propane"},{0.5,0.5})
To calculate properties, in another cell insert a function with the appropriate arguments:
=Enthalpy($A$1,"Tq",50,1)
The first argument is the address of the cell in which the SetFluid function was entered. All arguments can be cell addresses.
The last argument is the address of the cell in which the SetUnits function was entered.
Remark: In this help file we assume the decimal symbol to be a period ("."), the digital grouping symbol a space (e.g. 10 000)
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016
Welcome Page 62 of 62
and the list separator a comma (e.g. "CH4","H2O", "N2"). The correct symbol depends on your Regional and Language Options
(see Control Panel of the MS-Windows operating system) or your Excel settings (in Excel XP: Tools -> Options: International tab).
You can also open the file Excel Sample.xls in the folder Client samples\Microsoft Excel to check which symbols your system is
using.
file:///C:/Users/Usuario/AppData/Local/Temp/~hh37FA.htm 22/11/2016