Do you have "headache" about converting from units in SI to units in units which you are using at every call to WaterSteamPro functions?
Do you want to tell WaterSteamPro functions to use you own custom dimensions?
Do you want to send parameters in WaterSteamPro functions and receive results in those dimensions what you want?
In this case the program WaterSteamPro Custom Units is designed for you.
WaterSteamPro Custom Units - it's simple extension under WaterSteamPro, consisting of some libraries.
One advantage (and disadvantage, since our disadvantages it's prolongation of our advantages) of WaterSteamPro in this fact that all it's functions receive arguments and return results in SI (Pa, K, N, Joule etc.).
From one hand it's program advantage, since you always know the dimensions, which used in functions.
But from the other hand you must every time made the units conversion from dimenstion you are used into dimensions in SI, the latest used by WaterSteamPro functions.
To solve the latest problem program WaterSteamPro Custom Units is designed.
This program practically identical to WaterSteamPro except follows:
In WaterSteamPro Custom Units have own system files for using it in programs (Mathcad, Excel and so on), so you can use WaterSteamPro and WaterSteamPro Custom Units together at one PC. But it is recommended to use the same version of the WaterSteamPro and WaterSteamPro Custom Units.
To converting dimensions used simple linear dependance:
SIunit = A * CU + B,
where SIunit - dimension in SI (used by "nature" functions of the WaterSteamPro), A - factor of proportionality, B - addition, CU - dimension in user units system.
Given formula is used while converting the WaterSteamPro Custom Units functions arguments into SI before call to "nature" WaterSteamPro functions. To backword return values converting used next formula:
CU = (SIunit - B) / A
The samples of A and B:
To set up the parameters A and B used the WaterSteamPro Custom Units function:
wcuSETCU(unit_id, A, B)
where unit_id - unit type identificator, A - parameter A for given unit type, B - parameter B for given unit type.
For each type of dimension in WaterSteamPro Custom Units functions used special unique number - unit type identificator.
As example for pressures - unit type identificator equal to 1, for temperatures - 2, for specific volumes - 4 and so on. The full list of unit type identificators given below. In WaterSteamPro Custom Units functions list for each function and it's arguments given used unit type.
For default all user defined dimensions are identical to SI. It's mean that for all units used next values A = 1.0, B = 0.0.
But file with units conversion settings is exists This file allow to set parameters of units conversion by default. This file named "okawcu6.ini" and it's located in folder where WaterSteamPro Custom Units is installed. You can edit this file manually in anyone text editor (as example - Notepad).
When WaterSteamPro Custom Units installed the Setup Wizard suggest to select one of some files "okawcu6.ini", each of them describe own settings of units conversion.
This file located in installation folder of the WaterSteamPro Custom Units. But each time of initalizing the WaterSteamPro Custom Units this file searched in next folders:
The structure of "okawcu6.ini" given in file itself. Also in file given the examples of some units conversion settings.
Unique unit type identificator | Unit type name | Dimension in SI | Examples of values in this dimension |
1 | Pressure | Pa | Pressure, saturation pressure |
2 | Temperature | K | Temperature, saturation temperature |
3 | Vapor fraction | - | Vapor fraction |
4 | Specific volume | m3/kg | Specific volume |
5 | Specific entropy | J/(kg·K) | Specific entropy, specific isobaric and isochoric heat capacities |
6 | Specific enthalpy | J/kg | Specific enthalpy, internal energy |
7 | Velocity | m/sec | Sound velocity |
8 | Joule-Tompson coefficient | K/Pa | Joule-Tompson coefficient |
9 | Thermal conductivity coefficient | Wt/(m·K) | Thermal conductivity coefficient |
10 | Dynamic viscosity | Pa·sec | Dynamic viscosity |
11 | Prandtl number | - | Prandtl number |
12 | Kinematic viscosity | m2/sec | Kinematic viscosity |
13 | Isoentropic exponent | - | Isoentropic exponent |
14 | Surface tension | N/m | Surface tension |
15 | Efficiency | - | Efficiency |
16 | Density | kg/m3 | Density |
17 | Molar mass | kg/mole | Molar mass |
18 | Mass | kg | Mass |
19 | DPDT | Pa/K | Derivation of saturation pressure on saturation temperature |
20 | DVDPt | m3/(kg·Pa) | Derivate of specific volume on pressure with constant temperature |
21 | DUDPt | J/(kg·Pa) | Derivate of specific internal energy on pressure with constant temperature |
22 | DSDPt | J/(kg·K·Pa) | Derivate of specific entropy on pressure with constant temperature |
23 | DVDTp | m3/(kg·K) | Derivate of specific volume on temperature with constant pressure |
24 | DSDTp | J/(kg·K·K) | Derivate of specific entropy on temperature with constant pressure |
25 | Tolerance | - | Tolerance |
Set up parameters of units conversion for current session of working with WaterSteamPro Custom Units:
wcuSETCU(unit_id, A, B)
where unit_id - unit type identificator, A - parameter A for given unit type, B - parameter B for given unit type.
Receive parameters of units conversion for current session of working with WaterSteamPro Custom Units:
wcuGETCU(unit_id, *A, *B)
where unit_id - unit type identificator, *A - return parameter A for given unit type, *B - return parameter B for given unit type.
Converting of given value from custom dimension to dimension in SI:
wcuCU2SI(unit_id, value)
where unit_id - unit type identificator, value - value to convert.
Converting of given value from dimension in SI to custom dimension:
wcuSI2CU(unit_id, value)
where unit_id - unit type identificator, value - value to convert.
All values of unit_id must be taked from given above table.
As written above our disadvantages - are prolongation of our advantages.
This is the truph for WaterSteamPro Custom Units too.
When you using the WaterSteamPro functions you can always be sure that functions used the SI units in all cases.
But for WaterSteamPro Custom Units it is not truph. This program convert units depending on user settings (as default - given in file "okawcu6.ini", and as current session given - with the function wcuSETCU(unit_id, A, B)).
And it can be very easy that you think that you use one dimension but in really case program use another dimension.
As example it may occur due to:
So it is strongly recommended to set up all units conversion settings in each document where you use WaterSteamPro Custom Units functions.
Another type of mistakes - in repeated redefinition of units converting while working with one document (or few documents) at one session.
In can be occur at next cases:
Such errors arise from fact that WaterSteamPro Custom Units can't know about the context in which it's functions are used.
So it's strongly recommended to set up units conversion settings only one time at begin of calculation. And it's recommended to take into account the process of set up of units conversion settints while recalculation. And recalculate all document while working with a few documents. In Excel the recalculation full worksheet can be done by pressing CTRL+ALT+F9.
But I hope that the WaterSteamPro Custom Units help you in your working.
Yours faithfully,
Konstantin Orlov