Estimate Heating Costs

Author(s): Andrew Banta
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v2 n3 (Volume 2, Issue 3)
Date: March 1981
Pages: 4-6

Use these 3 programs to estimate heating costs for houses and other small buildings. They are written in integer BASIC and so have limited accuracy. Use them for making comparisons.

Each one uses 1K of RAM to its fullest; some of the CLS statements are necessary to stay within the available display file.

In the R Value program, the resistance (R) values in lines 22-26 and 122-126 include the inside and outside air film resistance to heat flow. These values are typical for the materials in the program, but may vary slightly depending on the specific materials and thickness in your house. If you don’t know the ceiling insulation thickness, use 3″ for older houses and 4-6″ for newer.

In the Heat Loss program, individual values in line 304 are in BTUs/hr; the total loss in line 310 is in BTUs/day. Input building measurements in feet or square feet. Use a daily average degree days value. (Degree days=65 – outside temperature.) If you know monthly averages, divide by the number of days in the month. Divide seasonal data by 150. The program assumes no heat loss through the floor and that the attic above is at the outside temperature. You may have to divide a larger building into 2 or more pieces to avoid an arithmetic overflow.

The Fuel Cost program assumes these heat values and conversion efficiencies:

  • Fuel oil: 130,000 BTU/gal., 70% efficient
  • Natural gas: 1,000,000 BTU/1000 cubic feet, 70% efficient
  • Electricity: 3412 BTU/Kw hr., 100% efficient
  • Coal: 10,500 BTU/lb or 21,000,000 BTU/ton, 70% efficient
  • Wood: 6000 BTU/lb (25% moisture) or 19,200,000 BTU/cord (3200 lb/cord), 65% efficient

Coal and wood values are averages and may differ from actual values. If you know more accurate values, proportion the constants in lines 190 and 200. Also, manufactured gas may differ in heat value from natural gas; change the constant in line 170 to adjust.

Note: You can save a few bytes in the R Value program by changing the LET-GO TO statement sequences to IF-THEN LET statements. For example, substitute IF I=1 THEN LET R=104 for lines 16-23.–AZ

R VALUE

 10 PRINT "INSIDE WALL MATERIAL? PLASTER=1 WALLBOARD=2 PANELING=3"
15 INPUT I
16 GO TO 20+I*2
22 LET R=104
23 GO TO 30
24 LET R=119
25 GO TO 30
26 LET R=94
27 CLS
30 GO SUB 530
60 PRINT "OUTSIDE SHEATHING? WOOD=1 FIBER =2"
65 INPUT I
66 CLS
67 GO TO 70+I*2
72 LET R=R+100
73 GO TO 80
74 LET R=R+200
80 PRINT "OUTSIDE SURFACE? ALUMINUM SIDING UNINSULATED=1 ALUMINUM SIDING INSULATED=2 WOOD OR SHINGLES=3 BRICK=4 STONE=5"
85 INPUT I
86 GO TO 90+I*2
92 GO TO 105
94 LET R=R+125
95 GO TO 105
96 LET R=R+80
97 GO TO 105
98 LET R=R+40
99 GO TO 105
100 LET R=R+100
105 LET RW=R/100
106 CLS
110 PRINT "CEILING MATERIAL? PLASTER=1 WALLBOARD=2 ACOUSTIC TILE=3"
115 INPUT I
116 GO TO 120+I*2
122 LET R=142
123 GO TO 130
124 LET R=157
125 GO TO 130
126 LET R=247
130 GO SUB 530
140 LET RC=R/100
145 CLS
150 PRINT "R VALUE WALLS=";RW,,,"R VALUE CEILING=";RC
160 STOP
530 PRINT "INSULATION? FIBERGLASS/ROCKWOOL=1 CELLULOSE=2"
535 INPUT I
536 CLS
540 PRINT "INSULATION THICKNESS?"
545 INPUT T
546 GO TO 550+I*2
552 LET R=R+370*T
553 GO TO 560
554 LET R=R+400*T
560 RETURN
Syntactic Sum=-9782

HEAT LOSS

 10 PRINT "R FOR WALLS?"
20 INPUT RW
30 PRINT "R FOR CEILING?"
40 INPUT RC
50 PRINT "HOUSE PERIMETER?"
60 INPUT L
65 PRINT "CEILING AREA?"
66 INPUT AC
67 PRINT "CEILING HEIGHT?"
68 INPUT CH
70 PRINT "NUMBER OF STORIES?"
80 INPUT NS
90 PRINT "HOW MANY WINDOW SIZES?"
100 INPUT JMAX
105 LET P=0
106 LET WA=0
107 CLS
110 FOR J=1 TO JMAX
111 PRINT "WINDOW HEIGHT?"
112 INPUT HW
113 PRINT "WINDOW WIDTH?"
114 INPUT WW
115 PRINT "HOW MANY THIS SIZE?"
116 INPUT NW
117 LET P=(2*HW+2*WW)*NW+P
118 LET WA=HW*WW*NW+WA
120 CLS
121 NEXT J
130 PRINT "STORM WINDOWS? NO=1 YES=2"
140 INPUT SW
150 CLS
200 PRINT "HOW MANY DEGREE DAYS?"
210 INPUT DD
220 LET AW=L*NS*CH-WA
250 LET BTUW=(AW/RW)*DD
260 LET BTUC=(AC/RC)*DD
270 LET BTUWD=(WA*DD)/SW
280 LET BTUI=(P*DD/2)/SW
300 LET BTU=(BTUW/100+BTUC/100+BTUWD/100+BTUI/100)*24
303 LET BTUWI=BTUWD+BTUI
304 PRINT "WALL LOSS=";BTUW,,,"CEILING LOSS=";BTUC,,"WINDOW LOSS=";BTUWI
310 PRINT "HEAT LOSS/DAY=";BTU;"00 BTUS"
999 STOP
Syntactic Sum=-11400

FUEL COST

 10 PRINT "FUEL OIL COST IN CENTS/GAL?"
20 INPUT FOC
30 PRINT "NATURAL GAS COST IN CENTS/1000 CUBIC FT?"
40 INPUT NGC
50 PRINT "ELECTRIC COST IN MILS/KWH?"
60 INPUT EC
70 PRINT "COAL COST IN $/TON?"
80 INPUT CC
90 PRINT "WOOD COST IN $/CORD?"
100 INPUT WC
110 CLS
120 PRINT "WHAT IS HEAT LOSS IN 1000S OF BTUS/DAY?"
130 INPUT BTU
150 LET FOH=(BTU/91)*FOC
160 LET NGC=NGC/10
170 LET NGH=(BTU/70)*NGC
180 LET EH=(BTU/34)*EC
190 LET CH=(BTU/147)*CC
200 LET WH=(BTU/125)*WC
300 LET COST=FOH
310 PRINT "FUEL OIL COST=";
320 GO SUB 500
330 LET COST=NGH
340 PRINT "NATURAL GAS COST=";
350 GO SUB 500
360 LET COST=EH
370 PRINT "ELECTRIC COST=";
380 GO SUB 500
390 LET COST=CH
400 PRINT "COAL COST=";
410 GO SUB 500
420 LET COST=WH
430 PRINT "WOOD COST=";
440 GO SUB 500
450 STOP
500 LET DOL=COST/100
510 LET CEN=COST-DOL*100
515 IF CEN<10 THEN GO TO 530
520 PRINT "$";DOL;".";CEN
525 RETURN
530 PRINT "$";DOL;".0";CEN
535 RETURN
Syntactic Sum=-15980

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.