Calculation of thermodynamic properties of water and steam according to IF95 and IF97
as so-called macro for Microsoft Excel
This program (in Excel it is called a macro) allows you to use IF95 and IF97 calculations in your own Excel worksheets (that is ONLY in Excel, it doesn't work elsewhere, so I can't vouch for its functionality). In order for this to work, Excel has to be enabled to run macros, well, as I look now, the ability to run macros after a query has disappeared from the Excel Security Center (horrible, it's getting "better and better"...). So, there are two options: either "Disable all macros except digitally signed macros" or "Enable all macros (... bullshit about not recommending ...)", well, and since I'm not going to invest in a digital signature, to make these calculations work only remaining option is "Enable all macros...". Of course, macros can be enabled only when using these calculations and then disabled again, but that's pretty terrible. I for my part declare that I haven't built any viruses or snoopers into it, that's all I can do.
Any of your files with these calculations must be saved as an "Excel workbook with macro support", preferably as an .xlsm file, because otherwise calculations will not be saved and it would not calculate the next time you open such a file (for example as a simple .xlsx Excel workbook).
- Document IF95 is at: IAPWS - IF95
- Document IF97 is at: IAPWS - IF97
-
Also, dynamic viscosities and thermal conductivities are found there.
After opening in Excel, this workbook contains three sheets, first two are Checking calculations and instructions for IF 95 and IF97, third is blank, ready for all kinds of tests or use. These instructions describe what it calculates by and how formulas are entered, followed by checking calculations, which are calculations for all check data contained in sources, so a simple check to see if calculations are "edible" is possible.
In these checking calculations, when
you click mouse on a cell with a calculation, used relation is displayed in
formula row, so you can see it, but to protect it from unwanted changes it
cannot be copied. The best way to insert formulas into an unlocked sheet is to
click on the cell where you want to save the formula, then click on fx,
that is, "Insert function", on the left next to formula row, and
select category "Programs L. Ruffer" in option "Select
category". There all IF95 and IF97 functions are accessible with a simple
help on what to insert where.
For safety, checking calculations and instructions
for use can be downloaded in pdf format here:
- For IF95: Example of using IF95 and IF97 as macro - IF95.pdf
- For IF97: Example of using IF95 and IF97 as macro - IF97.pdf
Picture of program with selected cell C85, in formula line you can see formula for calculation of specific volume in m3/kg (given by "V") for pressure in MPa absolute from cell A85 and temperature in °K (degrees Kelvin, given by "K") from cell B85:
Program can be downloaded here:
Example of using IF95 and IF97 as macro.xlsm
One more rather important caveat:
On this website program "Calculation of thermodynamic properties of water and steam according to IF95 and IF97" for Excel is available in two versions here:
- as macro (here)
- as add-in: Water and steam thermodyn. properties as Excel add-in
and since both variants use the same named functions for calculations of thermodynamic properties, I strongly recommend to use either one or the other variant, but DO NOT USE BOTH VERSIONS TOGETHER.
This is because if you open the function file as a macro in Excel with add-in activated ( that is, configured in menu "File/Options/Add-ins/Go"), all functions for thermodynamic properties will be in group "Programs L. Ruffer" twice without distinguishing where they are called from - once from add-in and the second time from macro - and secondly, Excel when saving such a file most likely may save functions with a path to add-in or macro file, so that next time this file is opened in Excel without access to add-in or macros, Excel might want to update link and so on. It is possible to fix this in formulas, but it is unnecessarily complicated.
Both options have their advantages and disadvantages, everyone can choose what they prefer:
- With version with macros, everything needed is stored in a file (.xlsm) and so there is no need to install anything, however, this variant cannot be used in a newly opened Excel with empty sheets, it is always necessary to open an .xlsm workbook that already contains macros, and edit its sheets or insert new ones and then delete the used ones.
- With version as an add-in, add-in must be installed on all accounts on all computers where it is to be used, but then nothing is needed and it can be used immediately, for example, in a newly opened Excel. Unless you are using some own custom macros files can be saved as .xlsx, because macros for thermodynamic properties do not get stored in a file containing data.