[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Weather data interpolation



Dear YU Fu Wing,

The short answer is probably that you are confused by the way TRNSYS
interpretes temperature in TRNSYS-TMY files. The data is assumed to be
instantaneous and the outputted value is the average on the time step. That
may explain the discrepancies you have noted.


The longer answer is an explanation on data interpolation in TRNSYS data
readers:

In TRNSYS, all variables are averaged on the time step and referenced by the
time at the end of the time step.
E.g. if you are running a solar system simulation with a 0.25-h time step,
you could get such an output file (Tcoll is the collector outlet temperature
given by Type 1):

TIME   Tcoll
[h]    [°C]
...
10.25  19.0
10.50  20.0
10.75  20.5

It means, for example, that the AVERAGE collector outlet temperature between
10.25 and 10.50 is 20.0 °C.

Data read from an input file can be of two types: instantaneous or averaged
(or summed). The simplest example is the TMY2 weather files, for which
Temperature is recorded every hour with an instantaneous reading, while
solar radiation is integrated for every hour.

Typical weather data records from a TMY2 file would be (converted to a
readable format):

Month Day  Hour  Tamb  Global
...
01    15   9     20.0  150    
01    15   10    21.0  180
...

This means that the temperature at 9 AM on January 15 was 20.0 °C, while the
average solar radiation between 9 AM and 10 AM was 180 W/m2.

TRNSYS needs the average values on each time step, so it has to convert the
instantaneous temperature value. The Data reader (Type9 and Type89) makes
that conversion if you tell it to interpolate (by using a positive
"interpolate" parameter for the column). 

With the weather file here above, you should set the parameters in your data
reader as follows:

...
Interpolate or not?-1   : -1  (Do not interpolate month)
Multiplication factor-1 : 1.0 
Addition factor -1      : 0.0

Interpolate or not?-2   : -2  (Do not interpolate day)
Multiplication factor-2 : 1.0 
Addition factor -2      : 0.0

Interpolate or not?-3   : -3  (Do not interpolate hour)
Multiplication factor-3 : 1.0 
Addition factor -3      : 0.0

Interpolate or not?-4   : 4  (INTERPOLATE Temperature)
Multiplication factor-4 : 1.0 
Addition factor -4      : 0.0

Interpolate or not?-5   : -5  (Don't interpolate sol. rad)
Multiplication factor-5 : 3.6 (convert W/m2 to kJ/h/m2) 
Addition factor -5      : 0.0
...

With those settings, TRNSYS will convert the instantaneous temperature to
the average value on the time step. This means that if you simulate with a
hourly time step, the Temperature for TIME=10 (i.e. the average temperature
between 9 and 10) will be 20.5

If you use smaller time steps, the temperature will be interpolated between
the two instantaneous values assuming a linear profile and then converted to
the average value. The solar radiation will NOT be interpolated by Type9 or
Type89 (Type16 must be ued to do that). Actually, all variables that are
read in as "average values" will not be interpolated by the data reader. 

Assuming that you have the following input file with hourly data:
TIME  X     Y
1     0     0
2     2     2
3     1     1
4     3     3
5     5     5
...

If you assume the first column includes instantaneous values (to be
interpolated) and the second column includes hourly averaged data, The value
outputted by Type9-Type89 for a 0.25-h simulation will be:

TIME   X      Y
 1.00  0.000  0.000
 1.25  0.250  2.000
 1.50  0.750  2.000
 1.75  1.250  2.000
 2.00  1.750  2.000
 2.25  1.875  1.000
 2.50  1.625  1.000
 2.75  1.375  1.000
 3.00  1.125  1.000
 3.25  1.250  3.000
 3.50  1.750  3.000
 3.75  2.250  3.000
 4.00  2.750  3.000
 4.25  3.250  5.000
 4.50  3.750  5.000
 4.75  4.250  5.000
 5.00  4.750  5.000
...

For X:
The instantaneous value of X is given at Time=1 and Time=2
A linear interpolation gives X(t=1.25)=0.5
The average value between 1.00 and 1.25 is (0+0.5)/2=0.25
Etc.

For Y:
The average value of Y between time=1 and Time=2 is 2. Y is not
interpolated, so the average value between 1 and 1.25 is 2 as well. This
value is reported at Time=1.25. Etc. 



Note that it is currently not possible to have TRNSYS interpolate data which
is averaged. You could imagine that you read hourly averaged temperature
instead of instantaneous values, and in that case you may want to
interpolate it if you use a smaller time step. Currently, this is not
possible in TRNSYS (if you were to set the data reader to interpolate, it
would assume that the data is instantaneous). You have to process your data
before running the TRNSYS simulation.


I hope this helps,


Michaël Kummert 

_________________________________________________________

Michaël Kummert

Solar Energy Laboratory - University of Wisconsin-Madison
1303 Engr Res Bldg, 1500 Engineering Drive
Madison, WI 53706

Tel: +1 (608) 263-1589
Fax: +1 (608) 262-8464
E-mail: kummert@engr.wisc.edu (*****NEW*****)

SEL Web Site: http://sel.me.wisc.edu 
TRNSYS Web Site: http://sel.me.wisc.edu/trnsys





-----Original Message-----
From: owner-trnsys@relay.doit.wisc.edu
[mailto:owner-trnsys@relay.doit.wisc.edu] On Behalf Of YU Fu wing
Sent: Thursday, December 05, 2002 03:35
To: trnsys@relay.doit.wisc.edu
Subject: Weather data interpolation


Dear all,

I am working out a cooling load calculation for a building using TRNSYS 15
with IISiBat 3. I have prepared a weather data file in the TRNSYS TMY
format. While I used the TYPE89a-2 to read the weather data, I found that
the weather data replicated by the reader deviate from that in the data
file. For instance, there is a -1.15 to 2.4 deg.C of deviation in outdoor
temperature ranging from 7.8 to 33.7 deg.C. I would like to know the reasons
for this. At the same time, I notice that the calculation can be carried out
with a timestep of less than one hour, say, 1/3 hour. I would also like to
know how to interpolate the weather data within the reader in general.

Best regards

YU Fu Wing
Research Student
Department of Building Service Engineering
The Hong Kong Polytechnic University
Hong Kong

e-mail:00901490r@polyu.edu.hk