[Greenbuilding] An annotated St. Louis TMY2 simulation

nick pine nick at early.com
Tue Jan 18 08:06:05 CST 2011


Here's a basic simulation for a 40'x60' house with 96 ft^2 of U0.25
windows and R30 walls and an R40 ceiling using NREL's TMY2 hourly
weather data file for a Typical Meteorological Year in St. Louis.

The first few lines set up the screen to allow
displaying hourly temperatures during the year.

20 CLS:SCREEN 9:LINE (0,0)-(639,349),,B
30 TMIN=0:TMAX=140:V=350/(TMAX-TMIN)'vertical scaling
40 FOR TR=0 TO TMAX STEP 20'plot temp ref lines
50 LINE (0,349-V*(TR-TMIN))-(639,349-V*(TR-TMIN)):NEXT
60 DS=0:DE=365'start and end display days
70 HS=24*DS:HE=24*DE'start and end display hours
80 XSF=640/(HE-HS)'horizontal scaling factor

The next few lines describe the house, thermally-speaking.

90 L=60'house length (ft)
100 W=40'house width (ft)
110 AWIND=96'window area (ft^2)
120 UWIND=.25'window U-value (Btu/h-F-ft^2)
130 GWIND=AWIND*UWIND'window conductance (Btu/h-F)
140 AWALL=8*2*(L+W)-AWIND'wall area (ft^2)
150 RWALL=30'wall R-value (h-F-ft^2/Btu)
160 GWALL=AWALL/RWALL'wall conductance (Btu/h-F)
170 RCEIL=40'ceiling R-value
180 GCEIL=L*W/RCEIL'ceiling conductance (Btu/h-F)
190 GH=GWIND+GWALL+GCEIL'house conductance (Btu/h-F)
200 CH=7000'inherent house capacitance (Btu/F)

An 8'x48' patch of solar siding and a 1075 gallon tank
can provide 100% of the house heat in a typical year:

210 AHA=384'air heater area (ft^2)
220 CW=1075*8.33'warm store capacitance (Btu/F)
230 CFM=1000'fan cfm
240 RAH=2/AHA+1/CFM'air heater equivalent resistance
250 TW=110'initial warm store temp (F)
260 TH=70'initial house temp
270 TAMIN=100'initialize min outdoor temp (F)
280 FOR YEAR=1 TO 2
290 AHMIN=1000'min house temp (F)
300 NCD=-1'initialize # Nov cloudy days
310 OPEN "stlyear" FOR INPUT AS #1:LINE INPUT#1,H$
320 FOR H=1 TO 8760'TMY2 hours

Here's a fundamental simulation step: read the hourly
outdoor temp and find the house heat loss and adjust
the house temperature, based on its heat loss and
thermal mass: IdeltaT = CdeltaV, in electrical terms...

330 INPUT#1,MONTH,DAY,HOUR,TA,WIND,TDP,SH,SS,SW,SN,SE
340 IH=(TH-TA)*GH'house heat loss (Btu/h)
350 TH=TH-IH/CH'new house temp
360 TTA=TA+2*.8*SS'Thevenin equivalent air heater temp (F)

A night setback allows the inherent house mass to store
overnight heat from solar-warmed air. Without the setback
the house could not store any heat, so the tank and its
water heater would have to be larger.

370 IF HOUR<6 OR HOUR>22 THEN TT=60 ELSE TT=70'target temp
380 QHEAT=(TT-TH)*CH'house heating need
390 IF QHEAT<0 THEN QHEAT=0:GOTO 510'house needs no heat. Charge 
store?
400 IF TTA<TH GOTO 460'no ss heat available. Warm house with store?
410 IF TTA-QHEAT*RAH-TH<0 GOTO 430'partial sunspace heating
420 TH=TT:GOTO 510'full sunspace heating
430 IA=(TTA-TH)/RAH'partial sunspace heating (Btu/h)
440 TH=TH+IA/CH'new house temp
450 QHEAT=(TT-TH)*CH'heat required to reach target temp
460 AWARM=(TW-TH)*CW'available warmstore heat
470 IF AWARM<0 THEN GOTO 510'no warmstore heat available
480 IF QHEAT<AWARM THEN TH=TT:SHEAT=QHEAT:GOTO 500'full target heating
490 TH=TH+AWARM/CH:SHEAT=AWARM'partial target heating
500 TW=TW-SHEAT/CW'new warmstore temp (F)
510 IF TTA-QHEAT*RAH<TW GOTO 560'no heat available for warmstore
520 QWARM=(140-TW)*CW'warmstore heating need (Btu)
530 IF QWARM<0 GOTO 560'warmstore needs no heat
540 IW=(TTA-QHEAT*RAH-TW)/RAH'warmstore charging (Btu/h)
550 IF IW<QWARM THEN TW=TW+IW/CW ELSE TW=140'new warmstore temp
560 IF TH<AHMIN THEN AHMIN=TH'min house temp (F)
570 IF H>HE OR YEAR=1 GOTO 690

Defining a cloudy day as "one with less than 50% of average sun,"
ie less than 510 Btu/ft^2, this St. Louis TMY2 file contained
11 cloudy days in November of 1979...

580 IF MONTH<>11 GOTO 620
590 IF DAY=LDAY THEN ST=ST+SS:GOTO 620'accumulate daily solar energy
600 LDAY=DAY:STT=ST:ST=0
610 IF STT<510 THEN NCD=NCD+1'count November cloudy days
620 X=(H-HS)*XSF'horizontal screen coordinate
630 PSET(X,349-V*(TA-TMIN))'plot ambient temp
640 IF TA<TAMIN THEN TAMIN=TA
650 'PSET(X,349-V*(SS/4-TMIN))'plot south sun
660 PSET(X,349-V*(TH-TMIN))'plot house temp
670 'PSET(X,349-V*(TW-TMIN))'plot warm temp
680 IF DAY=1 AND HOUR=.5 THEN LINE (X,349)-(X,345)'mark months
690 NEXT H
700 CLOSE #1
710 NEXT YEAR
720 PRINT "2000'";CH,AHA,GH,TAMIN
730 PRINT "2010'";CW,TW,AHMIN,NCD

7000     384           134.1333     -4.000127E-02
8954.75                109.2637      60            11

This simple simulation can be refined further with heat gain
from indoor electrical use, direct solar gain from windows,
slab heat loss, ventilation heat loss, and DHW preheating
with a pressurized plastic pipe coil in the tank.

Nick 





More information about the Greenbuilding mailing list