Sie sind auf Seite 1von 22

ROTRONIC AG

QM-System

Psychrometric Calculations
ME

DV04-271
Seite:1 / 22

Psychrometric Calculations

Psychrometric Calculations .........................................................................................................................................................1


Technical Note Computational Errors on Psychrometric Calculations........................................................................................2
Saturation vapor pressure tables ..............................................................................................................................................2
Equation used to compute the saturation vapor pressure .........................................................................................................3
Difference between equation and reference table ....................................................................................................................4
Computational errors on dew / frost point ...............................................................................................................................4
Wet-bulb temperature calculation............................................................................................................................................5
Calculation of other psychrometric values...............................................................................................................................5
Computation formulas code.........................................................................................................................................................9
Main.........................................................................................................................................................................................9
computation others to humidity............................................................................................................................................9
Dew point to Humidity ........................................................................................................................................................9
Frost point to Humidity......................................................................................................................................................10
Wet Bulb to Humidity .......................................................................................................................................................11
Mixing Ratio by Weight to Humidity................................................................................................................................12
Mixing Ratio by Volume to Humidity...............................................................................................................................12
Enthalpy to Humidity ........................................................................................................................................................12
Vapor Partial Pressure to Humidity ...................................................................................................................................13
Specific Humidity (moist) to Humidity .............................................................................................................................13
Vapor Concentration to Humidity .....................................................................................................................................13
Computation humidity to others.........................................................................................................................................14
Humidity to Dew point ......................................................................................................................................................14
Humidity to Frost point......................................................................................................................................................16
Humidity to Wet Bulb .......................................................................................................................................................18
Humidity to various ...........................................................................................................................................................20
'SATURATION PRESSURE (above water, also below freezing)'....................................................................................20
'Mixing Ratio by Weight'...................................................................................................................................................20
'Mixing Ratio by Volume'..................................................................................................................................................20
'Specific Humidity' ............................................................................................................................................................20
'Vapor Concentration (Absolute Humidity)' ......................................................................................................................21
'Enthalpy' ...........................................................................................................................................................................21
Humidity to Sat_Pressure ..................................................................................................................................................21
Humidity to Vapor_Pressure .............................................................................................................................................21

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:2 / 22

Technical Note Computational Errors on Psychrometric Calculations

Saturation vapor pressure tables


ASTM standard E 337-84 (USA) provides a table for the saturation vapor pressure over water in the
range of 0 to 100C. This table was obtained from Wexlers 1976 formulation. The standard also mentions
that the following tables are suitable:
- Smithsonian Meteorological Tables
- International Meteorological Tables (WMO)
- ASHRAE Handbook and Product Directory.
Problems:
To our knowledge, there is no table that should be preferred to the other tables. As a matter of fact the
different tables do not fully agree one with the other. Small numerical differences can be noted. Most
tables are a mix of experimental and computed data. In the case of the Smithsonian Tables, experimental
data and the Goff-Gratch [1] formulation are both being used.
Tables usually show a small difference between ice and water at 0C due to the fact that the triple point
of water is 0.01C.
Most tables are limited to a temperature range that is less than the temperature range covered by the
Rotronic humidity probes (-50 to 200C). The WMO tables cover the range of -100 to 0C over ice and the
range of -50 to 50C over water. The Smithsonian tables also cover the range of -100 to 0C over ice but
provide values between -50 and 102C above water.
Values above 100C are generally computed using the Keyes formula [2].
In my opinion, we should preferably use the Smithsonian tables as a reference in the range of
-100 to 100C (Goff-Gratch formulation), and use the Keyes formula as a reference for temperatures
above 100C.
[1] Goff, J. A. and Gratch, S., Trans. Amer. Soc. Heat. And Vent. Eng., vol. 52, p. 95, 1946.
[2] Keyes, F. G., Journ. Chem. Phys., vol. 15, No. 8, pp. 602-12, 1947

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:3 / 22

Equation used to compute the saturation vapor pressure


In principle, it should be indifferent to use one or the other of several available algorithms as long as the
maximum deviation between the algorithm and the reference tables is clearly stated.
For example, ASTM standard E 337-84 provides an equation that yields values which differ from their
table by 20 ppm or less.
The following two equations are used by Rotronic to compute the saturation vapor pressure over water
and over ice:
SATURATION PRESSURE
KC = -2892.3693
KD = -2.892736
KE = -4.9369728 * 10 ^ (-3)
KF = 5.606905 * 10 ^ (-6)
KG = -4.645869 * 10 ^ (-9)
KH = 3.7874 * 10 ^ (-12)
KI = 19.4260451
Over water:
TK = TC + 273.16
PS = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PS = 10 ^ PS 'in hPa'
The above equation gives numerical results that are identical to the Keyes formula mentioned on page
350 of the Smithsonian Meteorological Tables. The only difference is that the result is in hPa (mbar) as
opposed to mm Hg.
Over ice:
If (TK - 273.16) < 0 Then PS = PS * (1 - 0.01154 * (Abs(TK - 273.16) ^ (0.9)))
The exact source for this second equation is not known.
Note: the following equation is published in ASTM standard E 337-84
SATURATION PRESSURE
G1 = -0.63536311 * 10 ^ 4
G2 = 0.3404926034 * 10 ^ 2
G3 = -0.19509874 * 10 ^ (-1)
G4 = 0.12811805 * 10 ^ (-4)
Over water
LNPS = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
PS = 0.01 * Exp(LNPS) 'in hPa'

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:4 / 22

Difference between equation and reference table


We have computed the numerical difference between the above equations and the values published in
the Smithsonian Meteorological Table. For temperatures above 100C, we have used the International
Critical tables (Keyes) as the reference.
Over water:
In the range of 0 to -50 C, the difference ranges from -0.001795 hPa (-294 ppm) to +0.000473 hPa
(7,442 ppm)
In the range of 0 to 100 C, the difference ranges from -0.001795 hPa (-294 ppm) to 0.000000 hPa (0
ppm)
In the range of 110 to 200 C, the difference ranges from -0.167181 hPa (-117 ppm) to +17.688068 hPa
(1,138 ppm)
Over ice:
In the range of 0 to -50 C, the difference ranges from -0.000995 hPa (-163 ppm) to +0.007440 hPa and
10,302 ppm.
In the range of -50 to -80 C, the difference ranges from -0.000365 hPa (-3.38 %) to -0.000005 hPa (32.2%)

Computational errors on dew / frost point


The error resulting from using the above equations have been estimated by comparing the numerical
results from the equation with the values published in the Smithsonian Meteorological Table. For
temperatures above 100C, we have used the International Critical tables (Keyes) as the reference.
Over water:
In the range of 0 to -50 C, the computational error on dew point ranges from -0.004 C to +0.065 C
In the range of 0 to 100 C, the computational error on dew point ranges from -0.004 C to 0.000 C
In the range of 100 to 200 C, the computational error on dew point ranges from 0.000 C to +0.054 C
Over ice:
In the range of 0 to -50 C, the computational error on frost point ranges from -0.002 C to +0.098 C
In the range of -50 to -80 C, the computational error on frost point ranges from +0.063 C to +0.897 C
Notes:
The above computational errors are small in comparison with the error introduced by the uncertainty on
the measurement of relative humidity and temperature (input values in the calculation of dew / frost point).
Rotronic generally does not provide accuracy data for humidity measurement at temperatures below -50
C.

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:5 / 22

Wet-bulb temperature calculation


For the calculation of wet bulb temperature, Rotronic uses the equation published in ASTM standard E
337-84, page 10 - X3.1 The result of this equation is corrected for the value of barometric pressure as per
ASTM standard E 337-84., page 23 - X4. Since the standard provides a correction factor only in the
temperature range of 0 to 50 C (page 23, table X4.1), we use an extrapolation in the temperature range
of 50 to 100 C.
In the range of 2 to 50 and at a barometric pressure of 1013.25 hPa, there is close agreement between
the Rotronic calculation and ASTM standard E 337-84, table X3.1.
Note: the wet bulb temperature tables published in the ASTM standard, table X3.1 are valid for a
barometric pressure of 1013.25 hPa.

Calculation of other psychrometric values


For the calculation of other psychrometric values, Rotronic uses commonly accepted equations. These equations
are published in our instruction manuals.

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:6 / 22

Saturation Vapor Pressure over Water


deg C

Equation
hPa

0
-10
-20
-30
-40
-50

Smith. Table
hPa

difference
hPa

difference
ppm

difference
%

6.1060
2.8619
1.2539
0.5092
0.1897
0.0640

6.1078
2.8627
1.2540
0.5088
0.1891
0.0636

-0.001795
-0.000831
-0.000070
0.000363
0.000560
0.000473

-294
-290
-56
713
2'961
7'442

-0.0294
-0.0290
-0.0056
0.0713
0.2961
0.7442

0
10
20
30
40
50
60
70
80
90
100

Equation
hPa
6.1060
12.270
23.370
42.428
73.777
123.401
199.275
311.718
473.707
701.175
1'013.250

Smith. Table
hPa
6.1078
12.272
23.373
42.430
73.777
123.40
199.26
311.69
473.67
701.13
1'013.25

difference
hPa
-0.001795
-0.002435
-0.003234
-0.002201
0.000489
0.000780
0.015421
0.027926
0.037397
0.044561
0.000000

difference
ppm
-294
-198
-138
-52
7
6
77
90
79
64
0

difference
%
-0.0294
-0.0198
-0.0138
-0.0052
0.0007
0.0006
0.0077
0.0090
0.0079
0.0064
0.0000

deg C
110
120
130
140
150
160
170
180
190
200

Equation
hPa
1'432.462
1'984.887
2'700.254
3'612.017
4'757.399
6'177.438
7'917.033
10'025.010
12'554.273
15'561.960

difference
hPa
-0.167181
-0.470187
-0.991146
-2.246606
-2.850628
-3.388464
-3.544126
-1.101125
4.155527
17.688068

difference
ppm
-117
-237
-367
-622
-599
-548
-447
-110
331
1'138

difference
%
-0.0117
-0.0237
-0.0367
-0.0622
-0.0599
-0.0548
-0.0447
-0.0110
0.0331
0.1138

deg C

Dok-Verz: K:\TD\QM

Int. Critical
Int. Critical Table
Table
mmHg
h Pa
1'432.629
1'074.56
1'985.357
1'489.14
2'701.245
2'026.10
3'614.264
2'710.92
4'760.250
3'570.48
4'636.00
6'180.826
7'920.577
5'940.92
10'026.111
7'520.20
12'550.117
9'413.36
15'544.272
11'659.16
Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

Smith. Table Step


hPa
Deg C
0.0442
0.0225
0.0108
0.0048
0.0020
0.0007

error on Dp
Deg C
0.1
0.1
0.1
0.1
0.1
0.1

-0.004
-0.004
-0.001
0.008
0.028
0.065

Smith. Table Step


hPa
Deg C
0.0442
0.1
0.0820
0.1
0.1440
0.1
0.2430
0.1
0.3940
0.1
0.6100
0.1
0.9200
0.1
1.3500
0.1
1.9200
0.1
2.6700
0.1
3.6200
0.1

error on Dp
Deg C
-0.004
-0.003
-0.002
-0.001
0.000
0.000
0.002
0.002
0.002
0.002
0.000

Int. Critical Table Step


mm Hg
hPa
Deg C
35.6400
47.516
46.5100
62.008
59.7500
79.660
76.0800
101.432
94.2400
125.643
116.2800
155.027
142.8800
190.491
171.0000
227.981
206.7200
275.604
246.2400
328.293

1
1
1
1
1
1
1
1
1
1

error on Dp
Deg C
-0.004
-0.008
-0.012
-0.022
-0.023
-0.022
-0.019
-0.005
0.015
0.054

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:7 / 22

Saturation Vapor Pressure over Ice

0
-10
-20
-30
-40
-50

deg K
273.16
263.16
253.16
243.16
233.16
223.16

RAG Equation
over Water
hPa
6.106005
2.861869
1.253930
0.509163
0.189660
0.064033

RAG Equation
over Ice
hPa
6.106005
2.599534
1.039440
0.383713
0.129121
0.039048

Smith. Table
over Ice
hPa
6.107000
2.597000
1.032000
0.379800
0.128300
0.039350

difference
hPa
-0.000995
0.002534
0.007440
0.003913
0.000821
-0.000302

difference
ppm
-163
976
7'210
10'302
6'399
-7'680

difference
%
-0.0163
0.0976
0.7210
1.0302
0.6399
-0.7680

-60
-70
-80
-90
-100

213.16
203.16
193.16
183.16
173.16

0.019316
0.005118
0.001167
0.000223
0.000035

0.010435
0.002415
0.000472
0.000075
0.000010

0.010800
0.002615
0.000547
0.000097
0.000014

-0.000365
-0.000200
-0.000075
-0.000021
-0.000005

-33'791
-76'597
-137'640
-221'283
-321'765

-3.3791
-7.6597
-13.7640
-22.1283
-32.1765

deg C

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

Smith. Table Steps


hPa
Deg C
0.050000
0.1000
0.023000
0.1000
0.010000
0.1000
0.004000
0.1000
0.001500
0.1000
-0.000480
0.1000
-0.000430
-0.000224
-0.000076
0.000021

0.3000
0.6000
0.9000
1.4000

error on Fp
Deg C
-0.002
0.011
0.074
0.098
0.055
0.063
0.255
0.537
0.897
-1.457

ROTRONIC AG

DV04-271

Psychrometric Calculations

QM-System

ME

Seite:8 / 22

Saturation Vapor Pressure over Water

deg C
0
-10
-20
-30
-40
-50
-60
-70
-80
-90
-100

RAG Equation
hPa
6.1060
2.8619
1.2539
0.5092
0.1897
0.0640

T deg K
273.1600
263.1600
253.1600
243.1600
233.1600
223.1600

hPa
0.660854193
0.331746753
-0.026629826
-0.418046527
-0.846927779
-1.318498967

4.579880996
2.146578388
0.940524632
0.381903355
0.142256533
0.048028722

0
10
20
30
40
50
60
70
80
90
100

deg C
110
120
130
140
150
160
170
180
190
200

Equation
hPa
1'432.462
1'984.887
2'700.254
3'612.017
4'757.399
6'177.438
7'917.033
10'025.010
12'554.273
15'561.960

Dok-Verz: K:\TD\QM

T deg K

difference
ppm

6.1060
2.8619
1.2539
0.5092
0.1897
0.064033

Keyes Formula
Equation
hPa
6.1060
12.270
23.370
42.428
73.777
123.401
199.275
311.718
473.707
701.175
1'013.250

deg C

Keyes Formula

hPa

0
0
0
1
1
-1

difference
ppm

273.1600
283.1600
293.1600
303.1600
313.1600
323.1600
333.1600
343.1600
353.1600
363.1600
373.1600

0.660854193
0.963926184
1.24375141
1.502747513
1.743020833
1.966415007
2.174550788
2.368858861
2.550607073
2.720923134
2.880813652

4.579880996
9.20293139
17.52876867
31.82346852
55.33766534
92.55822282
149.4688825
233.8077276
355.3097077
525.9241743
760.0001037

6.106
12.270
23.370
42.428
73.778
123.401
199.276
311.718
473.707
701.175
1'013.250

0
0
0
0
0
-1
0
0
0
0
0

383.1600
393.1600
403.1600
413.1600
423.1600
433.1600
443.1600
453.1600
463.1600
473.1600

3.031180177
3.172832784
3.306501618
3.432846758
3.552466677
3.665905521
3.773659393
3.876181808
3.97388843
4.067161211

1074.435075
1488.787742
2025.357151
2709.2355
3568.343687
4633.461093
5938.262513
7519.376097
9416.47657
11672.42819

1'432.463
1'984.888
2'700.255
3'612.018
4'757.401
6'177.442
7'917.034
10'025.013
12'554.273
15'561.961

0
0
0
0
-1
-1
0
0
0
0

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:9 / 22

Computation formulas code


Main
Declaration constant
Public Valid As Integer
'Dim KC, KD, KE, KF, KG, KH, KI As Double
'Declare Public Constants'
Public Const KC = -2892.3693
Public Const KD = -2.892736
Public Const KE = -4.9369728 * 10 ^ (-3)
Public Const KF = 5.606905 * 10 ^ (-6)
Public Const KG = -4.645869 * 10 ^ (-9)
Public Const KH = 3.7874 * 10 ^ (-12)
Public Const KI = 19.4260451
Public Const G1 = -0.63536311 * 10 ^ 4
Public Const G2 = 0.3404926034 * 10 ^ 2
Public Const G3 = -0.19509874 * 10 ^ (-1)
Public Const G4 = 0.12811805 * 10 ^ (-4)

computation others to humidity


Dew point to Humidity
Public Sub DP_to_RH()
Dim TC As Single, RH As Single, TK As Single
Dim PS As Single
Dim DP As Single
Dim T_Unit As Single
'Reset Variables'
RH = 0 'Relative Humidity in %rh'
TC = 0 'Temperature in deg C'
TK = 0 'Temperature in deg K'
PS = 0 'Saturation Pressure above Water in hPa'
DP = 0 'Dew Point in deg C'
'BEGIN'
TC = Range("T_Value").Value
DP = Range("DP_Value").Value
'SATURATION PRESSURE (above water, also below freezing)'
PS = Range("SP_Value").Value
'SATURATION PRESSURE AT DEW POINT (above water, also below freezing)'
TK = DP + 273.16
PDP = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PDP = 10 ^ PDP 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PDP = 0.01 * Exp(LNVP) 'in hPa'
'RELATIVE HUMIDITY'
RH = 100 * PDP / PS
Range("RH_Value").Value = RH
End Sub
Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:10 / 22

Frost point to Humidity


Public Sub FP_to_RH()
Dim TC As Single, RH As Single, TK As Single
Dim PS As Single
Dim DP As Single
Dim T_Unit As Single
'Reset Variables'
RH = 0 'Relative Humidity in %rh'
TC = 0 'Temperature in deg C'
TK = 0 'Temperature in deg K'
PS = 0 'Saturation Pressure above Water in hPa'
FP = 0 'Frost Point in deg C'
'BEGIN'
TC = Range("T_Value").Value
FP = Range("FP_Value").Value
'SATURATION PRESSURE (above water, also below freezing)'
PS = Range("SP_Value").Value
'SATURATION PRESSURE AT FROST POINT (above ice)'
TK = FP + 273.16
PFP = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PFP = 10 ^ PFP 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PFP = 0.01 * Exp(LNVP) 'in hPa'
If (TK - 273.16) < 0 Then PFP = PFP * (1 - 0.01154 * (Abs(TK - 273.16) ^ (0.9)))
'RELATIVE HUMIDITY'
RH = 100 * PFP / PS
Range("RH_Value").Value = RH
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:11 / 22

Wet Bulb to Humidity


Public Sub WB_to_RH()
TC = Range("T_Value").Value
P = Range("P_Value").Value 'barometric pressure in hPa'
PS = Range("SP_Value").Value
WB = Range("WB_Value").Value
'Step #1: find the value of B (steps 1C, correction for pressure)'
If TC > 101 Then B = 0.02
If TC < 1 Then B = 10
If B = 0 Then
i = -1
Do
i=i+2
If i = TC Then KK = 100
If i > TC Then KK = 10
Loop Until (KK >= 10) Or (i = 101)
Dim DATA As Variant
DATA = Array(, 10000, , 8720, , 7580, , 6610, , 5780, , 5060, , 4440, , 3910, , 3450, , 3050, , 2700, , 2390, ,
2120, , 1890, , 1680, , 1500, , 1340, , 1210, , 1080, , 973, , 876, , 790, , 713, , 645, , 584, , 528, , 509, , 490, ,
460, , 430, , 400, , 377, , 355, , 337, , 319, , 300, , 275, , 250, , 233, , 216, , 200, , 175, , 150, , 133, , 116, , 100, ,
88, , 75, , 64, , 58, , 50)
B = (DATA(i) / 1000)
If KK < 100 Then B = ((DATA(i - 2)) / 1000) - ((((DATA(i - 2)) / 1000) - B) / 20) * ((2 - (i - TC)) * 10)
End If
PS = 100 * PS 'Pascals'
P = 100 * P 'Pascals'
A = 6.6 * 0.0001 * (1 + 0.00115 * WB)
TK = WB + 273.16
PSWB = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PSWB = 100 * (10 ^ PSWB) 'in Pa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PSWB = Exp(LNVP) 'in Pascals'
RH = 100 * (PSWB - A * 101325 * (TC - WB)) / PS 'RH at standard barometric pressure'
RH = (RH * 100000# + B * (TC - WB) * (101325 - P)) / 100000#
Range("RH_Value").Value = RH
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:12 / 22

Mixing Ratio by Weight to Humidity


Public Sub MRW_to_RH()
P = Range("P_Value").Value
PS = Range("SP_Value").Value
MRW = Range("MRW_Value").Value
e = MRW * P / (621.97 + MRW)
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Mixing Ratio by Volume to Humidity


Public Sub MRV_to_RH()
P = Range("P_Value").Value
PS = Range("SP_Value").Value
MRV = Range("MRV_Value").Value
MRV = MRV / 1000000
e = (P * MRV) / (1 + MRV)
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Enthalpy to Humidity
Public Sub H_to_RH()
TC = Range("T_Value").Value
P = Range("P_Value").Value
PS = Range("SP_Value").Value
H = Range("H_Value").Value
MRW = (H - 1.00464 * TC) / (0.001846 * TC + 2.5)
e = MRW * P / (621.97 + MRW)
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:13 / 22

Vapor Partial Pressure to Humidity


Public Sub VP_to_RH()
PS = Range("SP_Value").Value
e = Range("VP_Value").Value
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Specific Humidity (moist) to Humidity


Public Sub Q_to_RH()
P = Range("P_Value").Value
PS = Range("SP_Value").Value
Q = Range("Q_Value").Value
e = 1.6078 * Q * P / (1000 + 0.6078 * Q)
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Vapor Concentration to Humidity


Public Sub DV_to_RH()
TC = Range("T_Value").Value
PS = Range("SP_Value").Value
DV = Range("DV_Value").Value
TK = TC + 273.16
e = 0.004615 * DV * TK
RH = 100 * e / PS
Range("RH_Value").Value = RH
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:14 / 22

Computation humidity to others

Humidity to Dew point


'------------------------- DewPoint----------------------------------------------------'
Public Sub RH_to_DewPoint()
Dim TC As Single, RH As Single, TK As Single
Dim FA As Single, FAH As Single, ADJ As Single
Dim DP As Single, DPK As Single, DPD As Single
Dim PS As Single, e As Single, PSK As Single, PSD As Single
Dim M As Integer, DF As Single, DFD As Single, DERIV As Single
'RH = relative humidity %RH'
'TC = dry bulb temperature deg C'
'DP = Dew Point Deg C (end result)'
'DPK = current approximation of EDP'
'DPD = auxiliary variable DPK + 0.05 deg C'
'PS: saturated vapor pressure at TC (in hPa above water)'
'e: actual partial vapor pressure (hPa)'
'PSK: saturated vapor pressure at DPK (hPa)"
'PSD: saturated vapor pressure at DPD (hPa)"
'M = auxilliary counter, limits number of iterations'
'DF = dew point function (PSK - e), goal is DF = 0 (hPa)'
'DFD = auxilliary variable used to compute DERIV'
'DERIV = local derivative of DF'
'Reset Variables'
RH = 0
TC = 0
TK = 0 'Auxilliary temperature in deg K'
PS = 0
e=0
PSK = 0
PSD = 0
M=0
DF = 0
DFD = 0
DERIV = 0
DP = 0
DPK = 0
DPD = 0

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:15 / 22

'BEGIN'
TC = Range("T_Value").Value
RH = Range("RH_Value").Value
'SATURATION PRESSURE (hPa, above water, also below freezing)'
PS = Range("SP_Value").Value
'PARTIAL PRESSURE, (hPa)'
e = RH / 100 * PS
'NEWTON ITERATION TO FIND OUT THE DEW POINT'
'Begin'
DPK = TC 'First approximation of DP'
M = 1 'Auxilliary Counter'
Do
DP = DPK
'Water vapor pressure of current approximation'
TK = DPK + 273.16
PSK = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PSK = 10 ^ PSK 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PSK = 0.01 * Exp(LNVP) 'in hPa'
'Compute the value of DF'
DF = PSK - e
'Compute DERIV = local derivative of DF'
DPD = DPK + 0.05
TK = DPD + 273.16
PSD = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PSD = 10 ^ PSD 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PSD = 0.01 * Exp(LNVP) 'in hPa'
DFD = PSD - e
DERIV = (DFD - DF) / 0.05
'Compute next approximation of DP'
If (DERIV = 0) Then
DPK = DPK 'avoids division by zero'
Else
DPK = DPK - DF / DERIV
End If
M=M+1
Loop Until Abs(DF) <= 0.005 Or M > 20 '(0.005 hPa)'
Range("DP_Value").Value = DP
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:16 / 22

Humidity to Frost point


Public Sub RH_to_FrostPoint()
Dim TC As Single, RH As Single, TK As Single
Dim FA As Single, FAH As Single, ADJ As Single
Dim DP As Single, DPK As Single, DPD As Single
Dim PS As Single, e As Single, PSK As Single, PSD As Single
Dim M As Integer, DF As Single, DFD As Single, DERIV As Single
'RH = relative humidity %RH'
'TC = dry bulb temperature deg C'
'DP = Dew/Frost Point Deg C (end result)'
'DPK = current approximation of EDP'
'DPD = auxiliary variable DPK + 0.05 deg C'
'PS: saturated vapor pressure at TC (in hPa above water)'
'e: actual partial vapor pressure (hPa)'
'PSK: saturated vapor pressure at DPK (hPa)"
'PSD: saturated vapor pressure at DPD (hPa)"
'M = auxilliary counter, limits number of iterations'
'DF = dew point function (PSK - e), goal is DF = 0 (hPa)'
'DFD = auxilliary variable used to compute DERIV'
'DERIV = local derivative of DF'
'Reset Variables'
RH = 0
TC = 0
TK = 0 'Auxilliary temperature in deg K'
PS = 0
e=0
PSK = 0
PSD = 0
M=0
DF = 0
DFD = 0
DERIV = 0
DP = 0
DPK = 0
DPD = 0

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:17 / 22

'BEGIN'
TC = Range("T_Value").Value
RH = Range("RH_Value").Value
'SATURATION PRESSURE (hPa, above water, also below freezing)'
PS = Range("SP_Value").Value
'PARTIAL PRESSURE, (hPa)'
e = RH / 100 * PS
'NEWTON ITERATION TO FIND OUT THE DEW/FROST POINT'
'Begin'
DPK = TC 'First approximation of DP'
M = 1 'Auxilliary Counter'
Do
DP = DPK
'Water vapor pressure of current approximation'
TK = DPK + 273.16
PSK = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PSK = 10 ^ PSK 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PSK = 0.01 * Exp(LNVP) 'in hPa'
If DPK < 0 Then
PSK = PSK * (1 - 0.01154 * (Abs(DPK)) ^ (0.9))
End If
'Compute the value of DF'
DF = PSK - e
'Compute DERIV = local derivative of DF'
DPD = DPK + 0.05
TK = DPD + 273.16
PSD = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PSD = 10 ^ PSD 'in hPa'
'LNVP = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PSD = 0.01 * Exp(LNVP) 'in hPa'
If DPD < 0 Then
PSD = PSD * (1 - 0.01154 * (Abs(DPD)) ^ (0.9))
End If
DFD = PSD - e
DERIV = (DFD - DF) / 0.05
'Compute next approximation of DP'
If (DERIV = 0) Then
DPK = DPK 'avoids division by zero'
Else
DPK = DPK - DF / DERIV
End If
M=M+1
Loop Until Abs(DF) <= 0.005 Or M > 20 '(0.005 hPa)'
Range("FP_Value").Value = DP
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:18 / 22

Humidity to Wet Bulb


Public Sub RH_to_WetBulb()
Dim TC As Single, RH As Single, TK As Single
Dim P As Single, PW As Single, e As Single
Dim B As Single, WB As Single
B=0
KK = 0
RH = Range("RH_Value").Value
TC = Range("T_Value").Value
P = Range("P_Value").Value
PS = Range("SP_Value").Value
PS = 100 * PS '(Pascals)'
'Step #1: find the value of B (steps 2C, correction for pressure)'
If TC > 101 Then B = 0.02
If TC < 1 Then B = 10
If B = 0 Then
i = -1
Do
i=i+2
If i = TC Then KK = 100
If i > TC Then KK = 10
Loop Until (KK >= 10) Or (i = 101)
Dim DATA As Variant
DATA = Array(, 10000, , 8720, , 7580, , 6610, , 5780, , 5060, , 4440, , 3910, , 3450, , 3050, , 2700, ,
2390, , 2120, , 1890, , 1680, , 1500, , 1340, , 1210, , 1080, , 973, , 876, , 790, , 713, , 645, , 584, , 528, ,
509, , 490, , 460, , 430, , 400, , 377, , 355, , 337, , 319, , 300, , 275, , 250, , 233, , 216, , 200, , 175, , 150,
, 133, , 116, , 100, , 88, , 75, , 64, , 58, , 50)
B = (DATA(i) / 1000)
If KK < 100 Then B = ((DATA(i - 2)) / 1000) - ((((DATA(i - 2)) / 1000) - B) / 20) * ((2 - (i - TC)) * 10)
End If
'Step #2: Newton Iteration to find the value of WB'
'Goal is to make WF = 0 (Wet Bulb Function)'
WBK = TC 'First approximation value'
KK = 0
Do
WB = WBK
RK = (RH * 100000# - (B * (TC - WBK)) * (101325 - (P * 100))) / 100000#
A = 6.6 * 0.0001 * (1 + 0.00115 * WB)
TK = WBK + 273.16
PW = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PW = 100 * (10 ^ PW) 'in Pa'
'PW = G1 * (1 / TK) + G2 + G3 * TK + G4 * TK * TK
'PW = Exp(PW)
AP = A * 101325 * WBK
WF = PW + AP - (PS * RK / 100) - (A * 101325 * TC)
'Absolute = Abs(WF)
'If Absolute < 1 Then KK = 10
'If Absolute > 1 Then
WBD = WBK + 0.005
Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:19 / 22

TK = WBD + 273.16
PW = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PW = 100 * (10 ^ PW) 'in Pa'
'PW = G1 * (1 / TK) + G2 + G3 * TK + G4 * TK * TK
'PW = Exp(PW)
A = 6.6 * 0.0001 * (1 + 0.00115 * WBD)
AP = A * 101325 * WBD
RK = (RH * 100000# - (B * (TC - WBD)) * (101325 - (P * 100))) / 100000#
WFD = PW + AP - PS * RK / 100 - A * 101325 * TC
DERIV = (WFD - WF) / 0.005
WBK = WBK - WF / DERIV
KK = KK + 1
'Loop Until KK >= 15
Loop Until Abs(WF) <= 0.005 Or KK > 20
'Wet Bulb Temperature'
If RH = 100 Then WB = TC
Range("WB_Value").Value = WB
End Sub

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:20 / 22

Humidity to various
Public Sub RH_to_Others()
Dim TC As Single, RH As Single, TK As Single
Dim P As Single, PS As Single, e As Single
Dim MRW As Single, MRV As Single
Dim Q As Single, DV As Single, H As Single
'Reset Variables'
P=0
RH = 0
TC = 0
TK = 0
PS = 0
e=0
MRW = 0
MRV = 0
Q=0
DV = 0
H=0
'BEGIN'
RH = Range("RH_Value").Value
TC = Range("T_Value").Value
P = Range("P_Value").Value

'SATURATION PRESSURE (above water, also below freezing)'


PS = Range("SP_Value").Value
'Partial Pressure of Water Vapor'
e = RH / 100 * PS

'Mixing Ratio by Weight'


MRW = 621.97 * e / (P - e)
Range("MRW_Value").Value = MRW

'Mixing Ratio by Volume'


MRV = (e / (P - e)) * 10 ^ 6
Range("MRV_Value").Value = MRV

'Specific Humidity'
Q = 1000 * e / (1.6078 * P - 0.6078 * e)
Range("Q_Value").Value = Q

Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG

Psychrometric Calculations

QM-System

ME

DV04-271
Seite:21 / 22

'Vapor Concentration (Absolute Humidity)'


TK = TC + 273.16
DV = e / (0.004615 * TK)
Range("DV_Value").Value = DV
DVS = PS / (0.004615 * TK)
Range("DVS_Value").Value = DVS

'Enthalpy'
H = 1.00464 * TC + 1.846 * MRW * TC / 1000 + 2.5 * MRW
Range("H_Value").Value = H
End Sub

Humidity to Sat_Pressure
Public Sub Sat_Pressure()
Dim LNPS As Double, PS As Single
PS = 0
LNPS = 0
TC = Range("T_Value").Value
'SATURATION PRESSURE
'above water, also below freezing because of RH sensor)
TK = TC + 273.16
PS = KC / TK + KD * (Log(TK) / Log(10)) + KE * TK + KF * TK ^ 2 + KG * TK ^ 3 + KH * TK ^ 4 + KI
PS = 10 ^ PS 'in hPa'
'LNPS = G1 * TK ^ (-1) + G2 + G3 * TK + G4 * TK ^ 2
'PS = 0.01 * Exp(LNPS) 'in hPa'
'Saturation Pressure above Water (hPa)
Range("SP_Value").Value = PS
End Sub

Humidity to Vapor_Pressure
Public Sub Vapor_Pressure()
RH = Range("RH_Value").Value
'SATURATION PRESSURE (above water, also below freezing)'
Call Sat_Pressure
PS = Range("SP_Value").Value
'PARTIAL PRESSURE'
e = RH / 100 * PS
Range("VP_Value").Value = e
End Sub
Dok-Verz: K:\TD\QM

Version: 1

Datum: 12.03.04 Ersteller: Hagi Freigabe:

ROTRONIC AG
QM-System

Dok-Verz: K:\TD\QM

Psychrometric Calculations
ME

Version: 1

DV04-271
Seite:22 / 22

Datum: 12.03.04 Ersteller: Hagi Freigabe:

Das könnte Ihnen auch gefallen