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

SOLVAY

FLUOR UND DERIVATE GMBH

SOLKANE

Properties Module

Excel

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

Excel/VBA

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

Excel/VBA

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.

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)

-3-

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Excel/VBA

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

 

Excel/VBA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

Excel/VBA

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

Excel/VBA

Separate functions exist for each thermophysical property.

Imported functions from the SOLKANE PROPERTIES MODULE

VBA/ EXCEL

Basics

VBA (Visual Basic for Applications) is the macro programming language of the Microsoft Office® package. With VBA it is possible to access and use the SOLKANE PROPERTIES MODULE from Excel® 7 (or higher). The import routines may be declared in Visual Basic modules in Excel spreadsheets.

Alternatively it is possible to load ”Add-Ins” into MS Excel. ”Add-Ins” could for example be compiled versions of Macro-spreadsheets

With respect to the declaration of import routines in VBA-Macro-Spreadsheets there is no fundamental difference to the methods that apply for Visual Basic (Version 6 or higher). The extensions described below however are necessary to achieve useful Macros.:

1.In order to display the result of a calculation in a cell of an Excel spreadsheet, the output result has to be the result of the function. The results of the functions of the SOLKANE PROPERTIES MODULE however only supply the error status of the calculation. The primary SOLKANE functions are therefore not capable to be called directly from an Excel spreadsheet

2.Secondary functions are therefore to be implemented, which call the primary functions internally. The result of the secondary functions shall than be the result of the calculation rather than the error status.

3.The names of the secondary functions may be chosen freely. However they have to deviate from the names used by the primary functions

4.The input parameters of the secondary functions are to be passed by value (ByVal).

5.The primary functions are of no direct concern to the user the spreadsheets. They should therefore be declared as ”Private” only.

The appendix contains an overview of the secondary functions as supplied in the sample module SOLKANE.XLA The functions are compiled according to above stated rules. The prefix ”S_” in each function is replaced by ”SOL_” in the secondary functions. .

A listing of all import declarations of the functions supplied by REF_CALC32.DLL as well as those of the secondary functions is supplied in the appendix.

-7-

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Excel/VBA

A spreadsheet (SOL_EX.XLS) that is supplied as a sample with this package has all functions of REF_CALC.32 readily implemented

Syntax

1. Declarations of the primary import routines:

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;

2. Declaration of the secondary functions:

Declare Function myName (ByVal Refr As String _

[,ByVal IPar_1 As Double][,ByVal IPar_2 As Double]) As Double;

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

A cell of an Excel spreadsheet shall display the density of liquid R507 at 40°C. The Visual Basic Module shall be located in the same spreadsheet.

Implementation:

'Step 1: Declaration f the import routines (primary functions) in the VB module

'Function Nr. 10: specific volume, liquid

Private Declare Function S_v_l Lib "REF_CALC32.DLL" _

(ByVal Refr As String, ByVal T As Double, ByRef v_l As Double) As Boolean

'Step 2: Implementation of a secondary function in the VB module Function X_v_l(ByVal Refr As String, ByVal T As Double) As Double

Dim Retur As Boolean

Retur = S_v_l(Refr, T, X_v_l) End Function

'Step 3: Call of the secondary function in the cell of the spreadsheet =1/X_v_l("R507";40+273,15)

Result:

981,01 (kg/m³)

-8-

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Excel/VBA

EXCEL-Spreadsheet ”Sol_ex.xls”/ Module ”ImportVBA”

The spreadsheet Sol_ex.xls samples the use of the SOLKANE PROPERTIES MODULE in Microsoft Excel. Sol_Ex.xls was developed using EXCEL 71 and is compatible with this or higher versions..

The DLLs REF_LIB32 and VAR_LIB32 should either be in the WINDOWS systems folder or in the same folder as the executable programme. Please note, that Excel.exe is the executable programme!

Sol_Ex.xls consists of the sheets

”Aufrufe” (calls) and ”ImportVBA”. The sheet ”Aufrufe” demonstrates how the properties functions can be implemented to any spreadsheet. Column D contains the active function calls. Column D has the function calls implemented as comments. The input data is located in the grey coloured cells D2 till D5 (see figure 3).

Figure 3: Sol_Ex.xls – spreadsheet

The function calls that are used in the sheet ”Aufrufe” are implemented in the Visual-Basic-Module ”ImportVBA”. The content of

”ImportVBA” is listed completely in the appendix of this brochure.

If ”ImportVBA” is implemented to a spreadsheet folder, all spreadsheets in this folder may access the module. It is possible to copy ”ImportVBA” to other spreadsheet folders and access its full capabilities in user created spreadsheets.

The Import VB6-module is not only intended to serve as a sample. It enables access to the full set of functions of the SOLKANE PROPERTIES MODULE under Excel. The functions may be accessed in the same simple way as mathematical functions under Microsoft Excel. ImportVB6 is a readily available powerful tool to easily solve complex refrigeration and thermodynamic tasks.

Notes:

1 For EXCEL 5 (16 Bit) R_CALC16.DLL and V_LIB16.DLL have to be used instead of REF_CALC32.DLL and VAR_LIB32.DLL The declarations have to be modified to the 16bit libraries.

-9-

SOLVAY FLUOR UND DERIVATE GmbH

 

SOLKANE® PROPERTIES MODULE

Excel/VBA

1.It is possible to use the Excel Functions Assistant in order to implement the public functions of the ImportVB6 module.

2.If you are planning to give Excel spreadsheets containing ”ImportVB6” and calculations using the module to other persons or workstations, it is advisable to protect the VBmodule against foreign access.

3.The use of an Add-in (see following section) is an even simpler and also safer way to access the functions of the SOLKANE PROPERTIES MODULE

Installation:

1.Follow the installation routine that is started by setup.exe of the Solkane Software Package and enter the ‘Custom Installation’ section. Tick the Excel option and the installation routine will create a separate folder containing all previously mentioned files.

Add-In ”SOLKANE.XLA”

The Add-In SOLKANE.xla is a compiled version of the VB-module ”ImportVBA”. Contrary to the open VBA module it can not be alternated or accessed. The implemented routines are therefore safe from unauthorised access.

An installed and activated Add-In will be automatically loaded whenever Excel is started. The implemented and public functions are then accessible in every Excel session. As described above the functions may be accessed via the functions assistant of Microsoft Excel (user defined functions).

The complete set of the functions supplied by SOLKANE.XLA are compiled in the appendix.

With respect to the location of the DLLs, the same rules expressed previously apply. They shall be located in the Windows System folder or in the folder of the executable programme (Excel.exe). The Add in must be located in the Excel-Macro-folder2.

2 The actual position the MACRO-folder may deviate among different platforms. In order to find it easily please browse for *.XLA files or designated Add-In objects such as the Excel-Solver to locate the MACRO folder.

-10-

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