Using Properties of Water DLL in Microsoft Excel

I hope to make an Excel add in in the future. But for now, the steam libraries can still be used in Excel with a little work. You need administrative privileges in order to follow these instructions.

  1. Download the tlb file and the VBA module from the downloads page, and put them in a folder, for example c:/utility. Also download the DLL into the same directory.
  2. Depending on where .NET3.5 is installed on your computer, put one of the following two lines in a batch file using a text editor and save it as register_dll.bat

    C:/Windows/Microsoft.NET/Framework/v2.0.50727/RegAsm.exe ./StmProp.dll /codebase

    or

    C:/WINNT/Microsoft.NET/Framework/v2.0.50727/RegAsm.exe ./StmProp.dll /codebase

     If you cannot find Microsoft.NET/Framework/v2.0.50727/RegAsm.exe anywhere, proper version of .NET was not installed on your computer. See the downloads page to install .NET3.5. (Caution for the adventurers: RegAsm.exe you may find in any other directory will not work, even if it is a newer version. If these instructions are not working while using this particular version of RegAsm, the problem is not RegAsm version). 
  3. If you have Windows XP, run register_dll.bat by double clicking on it. If you have Windows 7, right click and  run as administrator. This will add StmProp.dll in registry.
  4. Start Excel. Press ALT+F11 to start Visual Basic. Select Tools -> References  [show me]
  5. In the Reference list, scroll down to find StmProp and check it. [show me]
  6. Select File -> Import and find the DLL saved in Step 1. [show me]
  7. The functions are now ready to use in Excel. The functions have an "s_" prefix. For example, s_tsat(p) takes pressure in kPa as argument and returns saturation temperature in °K. In BTU units, s_tsat(p,true) takes pressure in psia and returns saturation temperature in °F.
  8. Here is an example for enthalpy as a function of pressure and temperature. [show me]
  9. You can also download an excel workbook with the VBA module in it. It has a list of functions and a sample. But in order for this workbook to work, the DLL must be registered as described above and the StmProp must be added to the references.

Properties of Water

aaaaaaaaaaaaiii