Adjustment of the WSP Calculator (Visual Basic)
The program "WSP Calculator" allows setting output values of water and water steam properties for various physical units and formats. The file "WSP.INI" serves for that purpose which is stored in the program directory containing the program "WSP Calculator". The given file is a standard file of Windows settings containing sections, keys and corresponding values. Description of the file format is given below.
Section [Format]
The given section allows setting output format of water and water steam properties. Formatting parameters are activated by a call of the built-in function "FORMAT" present in the programming language Visual Basic, therefore the user may find their description in any edition illustrating Visual Basic operations.
Possible keys available in the given section:
- "SaturationPressure" - output format of the saturation pressure value;
- "SaturationTemperature" - the saturation temperature format;
- "EsteamationHeat" - format of a specific heat of evaporation;
- "Volume" - format of a specific volume;
- "InternalEnergy" - format of a specific internal energy;
- "Entropy" - format of a specific entropy;
- "Entalphy" - format of a specific enthalpy;
- "HeatCapacityAtConstantPressure" - format of a specific heat capacity at constant pressure;
- "HeatCapacityAtConstantVolume" - format of a specific heat capacity at constant volume;
- "SoundVelocity" - format of a sound velocity;
- "ThermoConductivity" - format of a thermal conductivity;
- "DynamicViscosity" - format of a dynamic viscosity;
- "KinematicViscosity" - format of a kinematic viscosity;
- "Prandtle" - format of the Prandtl number;
- "IsoEntropyCoefficient" - format of an isentropic curve;
- "SurfaceTension" - format of a surface tension;
Setup of units
All functions of the OKAWSP6.DLL library take arguments as initial values and return values in the format of International System of Units (SI system). The program "WSP Calculator" allows recalculation of output data into different units and supports setting new units. For this purpose the "WSP.INI" file contains a number of sections enabling setting correspondence between user units and standard SI units. Section structure provides two keys for any unit ¾ the first one is a unit "name", and the second one - is a "conversion factor" for a new dimension and a standard one. Key names for dimension setting are composed respecting the following rule: a string "Name_" and "¹", where "¹" - is a sequence number of a current dimension in the given section. Key names for the dimension "conversion factor" - is a string "Value_" and "¹". Numeration starts with unity and should not contain misses.
Example of creation of a pressure dimension set is given in what follows. The corresponding section is named "Pressure". Therefore the file "WSP.INI" may include the following lines:
[Pressure]
[Pressure]
Name_1=bar
Value_1=100000
Name_2=MPa
Value_2=1000000
Name_3=Psi
Value_3=6894.75729316836
Name_4=atm
Value_4=101325
Name_5=in hg
Value_5=3376.86427794708
Name_6=torr
Value_6=133.322312022206
Name_7=mm hg
Value_7=133.322312022206
The example under examination defines seven additional dimensions with the following names: "bar", "MPa", "Psi", "atm", "in hg", "torr", "mm hg". Each dimension has its own conversion factor. The base pressure SI unit is Pascal. One bar contains 100 000 Pa, therefore the conversion factor for dimension "bar" - is 100 000. The remaining conversion factors are estimated in a similar manner. Possible number of dimensions is limited only by system resources.
Sections of the setting file allowing preset of dimensions are given below:
- [Pressure] - dimensions of pressure. Dimensions of the section serve for output of "saturation line pressure" values and for input of "pressure" values. The base dimension - is Pa.
- [DegreeOfDryness] - dimensions of degree of dryness. Dimensions of the section serve for output of "degree of dryness" values. The base dimension - is non-dimensional value (fractions).
- [Volume] - dimensions of specific volume. Dimensions of the section serve for output of "specific volume" values. The base dimension - is m3/kg.
- [Energy] - dimensions of energy. Dimensions of the section serve for output of values of "specific enthalpy", "specific internal energy" and "heat of vaporization". The base dimension - is J/kg.
- [Entropy] - dimensions of entropy. Dimensions of the section serve for output of values of "specific entropy", "specific heat capacity at constant pressure" and "specific heat capacity at constant volume". The base dimension - is J/(kg·K).
- [Velocity] - dimensions of speed. Dimensions of the section serve for output of "sound velocity" values. The base dimension - is m/sec.
- [ThermCond] - dimensions of thermal conductivity. Dimensions of the section serve for output of "thermal conductivity" values. The base dimension - is W/(m·K).
- [DynVis] - dimensions of dynamic viscosity. Dimensions of the section serve for output of "dynamic viscosity" values. The base dimension - is Pa·señ.
- [KinVis] - dimensions of kinematic viscosity. Dimensions of the section serve for output of "kinematic viscosity" values. The base dimension - is m2/sec.
- [SurfaceTension] - dimensions of surface tension. Dimensions of the section serve for output of "surface tension" values. The base dimension - is N/m.