Using WaterSteamPro in Mathcad

For Mathcad 12 users

Mathcad Professional - is a mathematical package designed by MathSoft, Inc. The first versions of WaterSteamPro package were designed in Mathcad and worked only in that environment. However, starting with the 5-th version all functions were converted to C++ language, which enable use of WaterSteamPro package in other environments.

To use functions for water and steam in Mathcad in the previous versions you should import a Mathcad worksheet containing function definitions into a new one. For that, the Reference mechanism was used. To access the functions from the OKAWSP6.DLL library now stub-library WSPMCAD.DLL was written readdressing the calls from Mathcad to OKAWSP6.DLL. The library WSPMCAD.DLL is written using the USEREFI technique attaching the functions written in Mathcad C. Unfortunately, it is the MathSoft policy that you can access the user functions only in Mathcad Professional versions. That resulted in the following requirements to Mathcad:

As already mentioned, the WSPMCAD.DLL library allows new capabilities of new WaterSteamPro version in Mathcad Professional. The library should be kept in the USEREFI folder of the Mathcad catalog.

Note: the unified function names of the 5-th version are incompatible with the previous versions. Therefore it is necessary to change function names in Mathcad worksheets using earlier versions. A number of functions for calculation of water/water steam properties in the saturation line are not defined also in the 5-th version (though, these functions are used rarely). Worksheets operating with these functions should use previous versions of the program. Another way - is to apply both the new and the previous version of WaterSteamPro at the same time (that has been successfully tested).

A new capability of the program version is that you can insert functions into a worksheet in the standard dialog box "Insert Function", which is enabled by means of either the toolbar, or the item "Insert Function." in the menu "Insert". To display a list of functions in the "Insert Function." dialog box the file WSPMCAD.XML keeping definitions of WaterSteamPro functions should be in folder DOC\FUNCDOC of the Mathcad catalog. Since you can not use the file WSPMCAD.XML in Mathcad 7 Professional, the given Mathcad version does not allow function definitions in the "Insert Function" dialog box.

To install the functions for calculation of properties of water and water steam click the function name in the "Insert Function" dialog box shown below. If the function list is absent reinstall the program or register files manually as described above.

All functions of WaterSteamPro package are displayed in the "Insert Function" dialog box in sections starting with the line "WaterSteamPro" (see Fig. 7).

Fig. 7. Dialog box "Insert Function" with "WaterSteamPro" functions

Attention: It is strongly recommended that you use dimensions in WaterSteamPro functions in Mathcad. For that, insert a reference to file "WaterSteamPro.mcd" in an active Mathcad worksheet. How to do that is described in Mathcad user's guide. The description of using dimension functions is given in "Two ways of using WaterSteamPro functions in Mathcad"

For Mathcad 12 users

In Mathcad 12 namespace operator was introduced. With this future the WaterSteamPro functions with dimensions will not work.

How to manually solve the problem is described in F.A.Q.

Due to namespace operator in Mathcad 12 the files "watersteampro.mcd" for Mathcad version below 12 and from 12 and upper are different. So for differ versions of Mathcad the differ file "watersteampro.mcd" is reqiured.

There are different files "watersteampro.mcd" in release version of WaterSteamPro 6.0 to support both Mathcad 12 (or later) and older versions.

To solve the problem of using dimension WaterSteamPro functions in release version of WaterSteamPro 6.0 used next algorithm:

This allow to use the file "watersteampro.mcd" for installed version of Mathcad. In case of upgrading to another version of Mathcad it is require to use needed file from "MC8" or "MC12" folder.

In case of simultaneously installed two or more versions of Mathcad (as example Mathcad 11 and Mathcad 12) it is required to make the reference to needed file "watersteampro.mcd" in "MC8" or "MC12" folder. In this case to work with the same Mathcad document in differ versions of Mathcad is difficult.