Скачиваний:
33
Добавлен:
25.04.2015
Размер:
222.73 Кб
Скачать

SOLVAY

FLUOR UND DERIVATE GMBH

SOLKANE

Properties Module

Delphi

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

Delphi2-4

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

Delphi2-4

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 programming 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

Delphi2-4

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

 

Delphi2-4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The properties of the vapour phase

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

including the dew line can be either

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

calculated as a function of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

temperature and pressure f(T,p) or

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

as a function of temperature and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

volume f(T,v).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The liquid phase in the relevant

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

range is regarded is incompressible.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Functions

calculating the

liquid

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

phase are therefore only given as a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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). For

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

Delphi2-4

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

Delphi2-4

Separate functions exist for each thermophysical property.

Imported functions from the SOLKANE PROPERTIES MODULE

Delphi

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 programme shall be dedicated specifically to an export routine of REF_CALC32.DLL. REF_CALC32.DLL supports imports via the name clause as well as via the index-clause.

4.Import routines of programmes shall be declared using stdcall (Windows standard call) and external.

5.The variable types of the parameters declared in external programmes must be compatible with those used in REF_CALC32.DLL.

6.Import and export routines must be identical with respect to the kind of parameter exchange (via copy or via reference).

The appendix compiles a complete list of all DELPHI specific functions. If import is realised via the index clause, the value denoted in the index column shall be used.

A listing of the import clauses of all REF_CALC32.DLL functions is included in the

appendix.

The attached unit ImportD.pas provides a sample with the complete set of functions being

implemented.

-7-

pChar Double;
WordBool (true und false) or
Integertypes (e.g. Word, Integer; Werte: 0 und 1)

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Delphi2-4

Syntax

The following syntax applies for the import declaration:

1.Import via name clause:

Function S_Name(Refr:pChar [[;IPar_1][,IPar_2]:Double]; var RPar):

WordBool;

stdcall; external 'ref_calc32.dll'

This implementation identifies the function via the name of the function (S_Name).

2.Import via index clause:

Function myName(Refr:pChar [[;IPar_1][,IPar_2]:Double]; var RPar):

WordBool;

stdcall; external 'ref_calc32.dll' Index Nr;

This implementation identifies the function via the Index (Nr). The name of the function (myName) can then be chosen by the user.

Note: above mentioned syntax applies to the static import of functions.

Parameter Types

Following parameter types are compatible for data exchange between programmes and REF_CALC32.DLL (Delphi 2-4):

Zero terminated string:

8 Byte real:

2 Byte Boolean:

The export type ”by reference” is enforced by using the key word ”var” The result of a calculation shall be exported ”by reference”.

Example

Saturated pressures and enthalpies of R407C shall be calculated at 50 °C. The functions are statically imported via the name clause. In case of an error the routine ”Emassage” is executed.

Implementation:

{Step 1: Declaration of Import Routines}

Interface

{function Nr. 6: bubble point pressure}

-8-

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Delphi2-4

Function S_p_b(Refr: pChar; T: double; var p: double): WordBool; stdcall; external 'ref_calc32.dll';

{Funktion Nr. 7: dew point pressure}

Function S_p_d(Refr: pChar; T: double; var p: double ): WordBool; stdcall; external 'ref_calc32.dll';

{Funktion Nr. 14: liquid enthalpy}

Function S_h_l(Refr: pChar ; T: double; var h_L: double ): WordBool; stdcall; external 'ref_calc32.dll';

{Funktion Nr. 15: enthalpie h(T,p), vapour phase}

Function S_h_v(Refr: pChar ; T,p: double; var h_v: double ): WordBool; stdcall; external 'ref_calc32.dll';

{Step 2: implemented calculation (excerpt)}

Implementation

...

Procedure CalcValues;

var T, pB, pD, hB, hD: double; begin

T:= 50;

{Calculation}

if S_p_B('R407C', T + 273.15, pB) then EMessage;{bubble point pres. pB in Pa} if S_p_D('R407C', T + 273.15, pD) then EMessage; {dew point pres. pD in Pa} if S_h_L('R407C', T + 273.15, hB) then EMessage; {enthalpy,liq. hB in J/kg} if S_h_v('R407C', T + 273.15, pD, hD) then EMessage;

{enthalpy ,sat. vapour: hD=f(T,pD) in J/kg}

...

{Output of results T, pB, pD, hB, hD}

...

end;

...

Result:

 

 

 

 

T [°C]

pB [Pa]

pD [Pa]

hB [J/kg]

hD [J/kg]

50

2210451,3

1984604,2

276328,4

425604,5

Delphi 2-sample project ”SOL_DEL2”

The project SOL_DEL2 developed with BORLAND Delphi® 2 shows how SOLKANE PROPERTY functions are implemented using the Delphi developer platform. The project consists of the following parts:

1.

Sol_del2.dpr, Sol_del2.dof, Sol_del2.res:

Delphi files

2.

Test_ob.pas, Test_ob.dfm, Test_ob.dcu:

Formula files

3.

ImportD.pas, ImportD.dcu

Delphi unit external functions implemented

4.

Sol_del2.exe

Executable file

The libraries REF_CALC32.DLL and VAR_LIB32.DLL shall either be situated in the project folder or in the Windows system folder.

-9-

SOLVAY FLUOR UND DERIVATE GmbH
SOLKANE® PROPERTIES MODULE
figure 3: Sample programme Sol_del2

Delphi2-4

The executable programme file may of course also be used for a detailed test of the functions of the SOLKANE PROPERTIES MODULE.

Refrigerants and functions may be chosen by setting the ”Combo Boxes”

”Refrigerant” and ”Function”. The input properties that apply 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 respectively. (FALSE denotes a correct calculation ”no Error” !!).

For each function implemented in the SOLKANE PROPERTIES MODULE an example is included in Sol_del2.

-10-

Соседние файлы в папке Sol_Del2