Нестационарная теплопроводность / Магистры Термодинамическое подобие / Программы / Solkane / 2012 / Installation Refcalc 7.1 / SOL_VB6 / HelpVBE
.pdfSOLVAY
FLUOR UND DERIVATE GMBH
SOLKANE
Properties Module
Visual Basic
Version 2.0 09/99
Postfach 220 |
Telefon: |
0511/857-0 |
D-30002 Hannover |
Telefax: |
0511/857-21 66 |
Hans-Böckler-Allee 20 |
E-mail: |
andrea.neubert@solvay.com |
D-30173 Hannover |
Internet: |
http://www.solvay.com |
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
Nomenclature
Physical units
Desig- |
Unit |
Explanation |
nation |
|
|
|
|
|
c |
J/(kg K) |
Specific heat capacity |
h |
J/kg |
Specific enthalpy |
M |
g/mol |
Molar mass |
p |
Pa |
Presuure |
s |
J/(kg K) |
Specific entropy |
T |
K |
Temperature |
v |
m³/kg |
Specific volume |
W |
m/s |
Velocity of sound |
κ |
- |
Adiabitc exponent |
λ |
W/(m K) |
Thermal conductivity |
η |
Pa s |
Dynamic viscosity |
σ |
N/m |
Surface tension |
Abbreviations and expressions
Indices Explanation
c Critical point p p = const.
v v = const.
‘ Sat. liquid., Bubble point ‘’ Sat. Vapour, Dew point
B, b: |
Bubble point |
D, d: |
Dew point |
DLL: |
Dynamic Link Library |
export routine: |
A procedure or function of a DLL which is exported from this DLL |
F: |
liquid phase |
G: |
vapour phase |
import routine: |
A procedure or function that is implemented externally into a DLL and is |
|
called from an other programme |
IPar_: |
formal input parameter. |
Refr, ref: |
formal parameter designating the refrigerant type. |
RPar: |
formal parameter into which the result of a calculation is written |
VB |
Visual Basic |
VBA |
Visual Basic for Applications |
-2-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
About this document
This document is intended for those who intend to use calculation module of SOLKANE SOFTWARE 2.0 in their own Windows-programmes. Since introducing SOLKANE SOFTWARE as a modern format to supply information on our products, numerous customers have made use of it. However the experience that was gathered since introduction of the programme has shown, that even well trained programmers might not be able to immediately implement the functions. Simple typing errors, compatibility problems with different platforms and wrongly connected functions can be very time consuming.
With this document we intend to describe some of the experiences that where gathered while using our package on different platforms. We concentrate on simple and easy to understand methods. The explanations are therefore intentionally focussed on static and easy to handle import methods.
The first part contains guidelines and examples for the import of property functions into your software. Detailed descriptions of the functions and source code are given in the appendix. All referred source code and sample programmes are also available as files. Included is an Microsoft Excel® ADD—in ”SOLKANE.XLA” for Excel versions 7 or higher that is ready to use.
It is virtually impossible to notify all different porgramming languages and versions. This document contains samples for the following languages:
•Delphi , Version 2 to 4
•MS Visual Basic, Version 6.0
•Visual Basic for Applications (EXCEL 7)
All samples deal with the 32-Bit-Version of the module. Differences between the 16-Bit and 32-Bit modules are explained in the text.
-3-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
The SOLKANE Property Module
Thermodynamic properties
The SOLKANE property module includes all major thermodynamic properties for
•The liquid phase,
•The gas phase
•Saturated liquid and vapour conditions
in the temperature and pressure range important for refrigeration and A/C technicians (normally p < pC). The functions of the following properties are implemented:
1. |
bubble and dew pressure: |
p’ = f(T) und p” = f(T) |
2. |
bubble and dew temperature: |
T’ = f(p) und T” = f(p) |
3. |
specific volume of the liquid phase: |
v’ = f(T) |
4. |
pressure, vapour phase: |
p = f(T, v) |
5. |
specific volume vapour phase: |
v = f(p, T) |
6. |
temperature vapour phase: |
T = f(p, v), T = f(p, h) und T = f(p, s) |
7. |
specific enthalpy liquid phase: |
h’ = f(T) |
8. |
specific enthalpy vapour phase: |
h = f(T, v) und h = f(T, p) |
9. |
specific entropy liquid phase: |
s’ = f(T) |
10. |
specific entropy vapour phase: |
s = f(T, v) und s = f(T, p) |
11. |
specific heat capacity liquid phase: |
c’ = f(T) |
12. |
specific heat capacity vapour phase (p=const.): |
cp = f(T, v) und cp = f(T, p) |
13. |
specific heat capacity vapour phase (v=const.): |
cv = f(T, v) und cv = f(T, p) |
14. |
adiabatic exponent, vapour phase: |
κ = f(T, v) und κ = f(T, p) |
15. |
velocity of sound, vapour phase: |
w = f(T, v) und w = f(T, p) |
16. |
thermal conductivity, liquid phase: |
λ‘ = f(T) |
17. |
thermal conductivity, vapour phase: |
λ = f(T, p) |
18. |
dynamic viscosity, liquid phase: |
η‘ = f(T) |
19. |
dynamic viscosity, vapour phase: |
η = f(T, p) |
20. |
surface tension: |
σ = f(T) |
21. |
characteristic data (molar mass, critical temperature, critical pressure,...) |
-4-
SOLVAY FLUOR UND DERIVATE GmbH |
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SOLKANE® PROPERTIES MODULE |
|
Visual Basic6.0 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The properties of the vapour phase |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function of temperature f(T). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Saturated |
temperatures |
and |
|
Figure 1: Pressure enthalpy diagram for a zeotrope |
pressures at dew and bubble point |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
are additionally calculated with the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
refrigerant blend (schematic) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
functions |
p’(T), p”(T), T’(p) and |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T”(p). Fur |
pure refrigerant |
types |
(e.g. R134a) or azeotropes (e.g. R507) the following rule applies: p’(T) = p”(T) and T’(p) = T”(p). As depicted in figure 1 for zeotropes (e.g. R407C) however the values deviate from each other: p’(T) > p”(T) und T’(p) < T”(p). It is regarded important to specifically note this phenomena since it was an often found source of programming errors.
A special role is assigned to the two vapour phase functions: T(p,s) und T(p,h) which can be used very effectively when calculating compression processes.
Structure
The SOLKANE PROPERTIES MODULE for 32-Bit applications consists of two DLLs namely
REF_CALC32.DLL and VAR_LIB32.DLL.
Figure 2 depicts the principal structure of a programme the makes use of the SOLKANE PROPERTIES MODULE.
Figure 2: Basic structure of a programme connected to the SOLKANE PROPERTIES MODULE
-5-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
For any programme connected to the DLL REF_CALC32.DLL will always be the ”active” module. It is up to the user by which means REF_CALC32.DLL is connected to the programme. The simplest way to achieve connection is when REF_CALC32.DLL is in the same folder as the connecting programme. Implementing REF_CALC32.DLL into the Windows folder is also possible where each programme automatically browses for DLLs.
Further is has to be ensured that REF_CALC32.DLL is able to connect to VAR_LIB32.DLL. Generally those two libraries should be in the same folder.
The SOLKANE PROPERTIES MODULE for 16-Bit applications consists of the components R_CALC16.DLL und V_LIB16.DLL.
General syntax of the property functions
The SOLKANE PROPERTIES MODULE has been programmed using BORLAND DELPHI®. REF_CALC32.DLL includes a total of 34 functions (export routines) for thermodynamic properties and transport properties. The general syntax of the functions is:
Function S_Name(Refr [;IPar_1] [;IPar_2] ; RPar)
The function s_revision (see appendix) is the only exception from this rule.
Name of the Function :
In all functions, Name as denoted in above mentioned syntax, is replaced by the name of the function. The complete function name will have the characters S_ leading the name.
Input Data :
Refr: zero terminated string, contains the refrigerant name (e.g. ‘R134a’, ‘R407C’, ...) IPar_n: 8 Byte real, contains independent parameters (e.g. pressure, temperature...)
The number of input data depends on the function used.
Output Data:
RPar: 8 Byte real, gives back the result of the calculation. RPar will be the last parameter of the parameter list.
Result of the Function:
2 Byte boolean, denotes the error status of the calculation:
TRUE (1) : An error has occured.
FALSE (0) : calculation successful (no errors).
-6-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
Separate functions exist for each thermophysical property.
Imported functions from the SOLKANE PROPERTIES MODULE
Visual Basic
Basics
1.The programme must have access to both DLLs: REF_CALC32 and VAR_LIB32. The DLLs should be situated either in the folder of the using programme or in the Windows System folder.
2.Imported functions are to be declared in the using programme.
3.The import routine declared in the user defined programme must have the identical name as the export function of REF_CALC32.DLL to which it refers (Case sensitive!).
4.The variable types of the parameters declared in external programmes must be compatible with those used in REF_CALC32.DLL.
5.Import and export routines must be identical with respect to the kind of parameter exchange (by value or by reference).
The appendix compiles a complete listing of the functions declarations which are valid for
VB6.
A listing of all import declarations for the functions provided by REF_CALC32.DLL is also given in the appendix .
The module ”ImportVB6.bas” which is included in the Solkane software package contains a full set of import declarations for all REF_CALC32.DLL functions and may serve as a starting platform to develop programmes that use the SOLKANE PROPERTIES MODULE.
Syntax
For declaration of import routines the following general syntax applies:
[Private] Declare Function S_name Lib "REF_CALC32.DLL" _
(ByVal Refr As String [,ByVal IPar_1 As Double][,ByVal IPar_2 As Double],
_
ByRef RPar As Double) As Boolean;
Note: Above mentioned syntax applies to the static import of functions.
-7-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
Parameter types
Following parameter types are compatible between the SOLKANE PROPERTIES MODULE and REF_CALC32.DLL:
• |
Zero terminated string: |
String |
|
• |
8 |
Byte real: |
Double; |
• |
2 |
Byte boolean: |
Boolean (true or false) or: |
|
|
|
Integer types (e.g. Byte, Integer; values: 0 and 1) |
Export is defined by the keywords ”ByVal” (by value) and ”ByRef” (by reference).
Example
The compression end temperature tv2 (°C) and the specific compression work wt (in kJ/kg) of a theoretical compression process using R134a shall be calculated using the following set values:
•Evaporation temperature: 0°C;
•Condensation temperature: 45°C;
• |
Suction line superheat: |
20 K; |
• |
isentropic efficiency: |
0,7 |
The sample especially demonstrates the use of the functions S_f_entro and S_f_entha.
Implementation:
'Step 1: declaration of the import routines
'Function Nr. 7: dew pressure
Private |
Declare Function |
S_p_d Lib "REF_CALC32.DLL" (ByVal Refr As String, |
||
_ |
|
|
|
|
ByVal T |
As |
Double, |
ByRef |
p_d As Double) As Boolean |
' Function |
Nr. 15: Enthalpy, vapour |
|||
Private |
Declare Function |
S_h_v Lib "REF_CALC32.DLL" (ByVal Refr As String, |
||
_ |
|
|
|
|
ByVal T |
As |
Double, |
ByVal |
p As Double, ByRef h_v As Double) As Boolean |
' Function |
Nr. 18: Entropy, vapour |
|||
Private |
Declare Function |
S_s_v Lib "REF_CALC32.DLL" (ByVal Refr As String, |
||
_ |
|
|
|
|
ByVal T |
As |
Double, ByVal |
p As Double, ByRef s_v As Double) As Boolean |
|
' Function |
Nr. 20: Temperature T=f(p,s), vapour |
|||
Private |
Declare Function |
S_f_entro Lib "REF_CALC32.DLL" (ByVal Refr As |
||
String, |
_ |
|
|
|
ByVal p |
As |
Double, ByVal |
s As Double, ByRef f_entro As Double) As Boolean |
|
' Funktion |
Nr. 21: Temperature T=f(p,h), vapour |
|||
Private |
Declare Function |
S_f_entha Lib "REF_CALC32.DLL" (ByVal Refr As |
||
String, |
_ |
|
|
|
ByVal p |
As |
Double, ByVal |
h As Double, ByRef f_entha As Double) As Boolean |
-8-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
' step 2: Implementation calculation (excerpt) |
|
Private Sub CalcProcess() |
|
Dim T0, |
TC, p0, pC, TV1, hV1, sV1, _ |
|
||
TV2_is, hV2_is, TV2, hV2, wt, Eta_is As Double |
||||
Dim Retur As Boolean |
|
|
||
Dim Refr As String |
|
' Parameter declaration |
||
Refr = "R134a" |
|
' definition of the refrigerant |
||
Eta_is = 0.7 |
|
' definition of isentropic efficiency |
||
T0 = 0 + 273.15 |
' definition of evaporation temperature T0 [K] |
|||
TC = 45 |
+ 273.15 |
' definition of condensation temperature TC [K] |
||
TV1 = |
20 + T0 |
' definition of suction temperature TV1 [K] |
||
Retur |
= |
S_p_d(Refr, T0, p0) |
|
'suction pressure p0 [Pa] |
Retur |
= |
S_p_d(Refr, TC, pC) |
|
'back pressure pC [Pa] |
Retur |
= |
S_h_v(Refr, TV1, p0, hV1) |
'Enthalpy hV1 [J/kg], suction line |
|
Retur |
= |
S_s_v(Refr, TV1, p0, sV1) |
'Entropy sV1 [J/kgK], suction line |
|
Retur |
= |
S_f_entro(Refr, pC, sV1, TV2_is) |
|
|
|
|
|
'Isentropic compression end temperature TV2_is [K] |
|
Retur |
= |
S_h_v(Refr, TV2_is, pC, hV2_is) |
|
|
|
|
|
'Enthalpy for isentropic compression hV2_is [J/kg] |
|
wt = (hV2_is - hV1) / Eta_is |
|
'specific compression work wt [J/kg] |
||
hV2 = |
hV1 + wt |
'Enthalpy at compressor outlet hV2 [J/kg] |
||
Retur |
= |
S_f_entha(Refr, pC, hV2, TV2) |
'compression end temperature TV2 [K] |
|
' conversion of units |
|
|
||
TV2 = |
TV2 - 273.15 |
|
'compression end temperature TV2 [°C] |
|
wt = wt |
/ 1000 |
|
'specific compression work wt [kJ/kg] |
|
... |
|
|
|
|
' output of results |
|
|
||
... |
|
|
|
|
End Sub |
|
|
|
|
Result: |
|
tV2 = 79,7 °C |
wt = 45,1 kJ/kg |
Visual-Basic-Sample project ”SOL_VB6”
The sample project SOL_VB6 developed using Visual Basic Version 6 shows how to implement functions of the SOLKANE PROPERTY MODULE into VB projects.
The complete project consists of the following files.:
1. |
Sol_vb6.vbp, Sol_vb6.vbw: |
VB6-Project files |
2. |
Form1.frm, Form1.frx: |
Formula files |
3. |
ImportVB6.bas |
VB-Module declarations of external functions |
4. |
Sol_VB6.exe |
executable file |
The DLLs REF_CALC32 and VAR_LIB32 shall be either located in the project folder or in the Windows system folder.
NOTE! Sol_VB6.exe additionally uses the DLLs Msvbvm60.dll und Oleaut32.dll. Both files are shareware components of the VB6 developer platform have however no direct influence on the functions of the systems. Please get back to SOLVAY FLUOR – Technical service refrigerants – if you need these files.
-9-
SOLVAY FLUOR UND DERIVATE GmbH |
|
SOLKANE® PROPERTIES MODULE |
Visual Basic6.0 |
The executable file from the Sol_VB6 project may of course also be used to perform a detailed test of our properties module.
You may chose the refrigerant and the function you wish to calculate by setting the ”Combo Boxes” ”Refrigerant” and
”Function”. The input data needed for the chosen functions can be set in the edit boxes ”Temperature” .... ”Entropy”.
”Calculate” starts the calculation. The result and the error status will be
displayed in the ”Result” and ”Error” field
Figure 3: Sample programme Sol_VB6
respectively. (FALSE denotes a correct calculation ”no Error” !!).
Sol_VB6.exe provides a sample for all functions provided by the SOLKANE PROPERTIES MODULE.
-10-