Classic Computer Magazine Archive COMPUTE! ISSUE 19 / DECEMBER 1981 / PAGE 28

Window Analysis: Saving Fuel $$ With Your Computer

David Pitts
Houston, TX

In a typical home, the sunlight transmitted through the windows accounts for 10–14% (ref. 1) of the total air conditioning cost. This can be equal to the savings accrued by installing storm windows or adding attic insulation in some regions of the United States. Furthermore, shielding windows by planting trees or using solar screen, is usually much less expensive than adding insulation or storm windows (especially if one treats only the windows which need shading). The window analysis program described here will allow the homeowner to calculate how much is saved by shading windows in the summer and augmenting the winter heating by allowing sunlight into the home. Also, the program can be used for planning solar collector systems, designing greenhouses, evaluating the merit of adding skylights, or enclosing porches with glass.

As shown in the example run, the user inputs the latitude, the size of the window, the tilt of the window from horizontal, the azimuth [compass directions] that the window faces, and chooses either heating or cooling analysis to be performed. If cooling analysis is desired, the user inputs the capacity (tons) of the cooling system, the current it draws (amps) and the cost of the electricity. If the user chooses heating analysis, he must input the cost of natural gas. Both fuel savings, economic savings and the accrued energy in BTU/sq. ft. are printed by month and season. Because the window azimuth and elevation angle permit any angle window to be analyzed, a variety of applications are possible. In the author's residence, the east-facing windows cause almost $100 in excess cooling cost, whereas the winter gain is about a factor of three smaller. At the low latitude of the author's residence, south-facing windows do not contribute significantly to the heat load in the summer but are important in reducing heating cost when the sun is lower in the southern sky.

The Calculations

The program was written in Microsoft BASIC on an OSI 4PMF using simple I/O so that the program could be easily converted to other systems. However, lines 372–373 should be replaced for other microprocessors since they provide a flashing cursor on the OSI 4P. The program utilizes eight basic equations which describe the physical amount of sunlight and the angle at which it falls on the window's surface (ref. 2 and 3). The day of the year (DOY) is calculated from the month (M) and the day of month (D) in line 227. The solar declination (DE) is calculated from the day of year in line 350–360. The cosine of the zenith angle of the sun (A1) is calculated in line 440 from the solar declination, the hour angle, and solar elevation angle (AL). The direct solar irradiance is calculated in equation 480 from the apparent solar irradiance at zero air mass (AO), the atmospheric extinction coefficient (BETA) and solar elevation angle (AL). The diffuse irradiance is calculated in line 490 from the tilt of the window (TI) and the direct-solar flux (GN). The cosine of the angle between the vector perpendicular to the window and the vector to the sun is calculated in lines 560–570, based on the window tilt (TI), the window azimuth (BI), the sun's azimuth (AZ), and the sun's zenith angle (Z). Finally the total flux transmitted through the window (GL) is calculated in line 600 and summed by month (TT) and by season (SL).

The integration of transmitted energy during a day is accomplished in the FOR loop from line 370 to 712. In this loop, calculations are made during a day for hour angles (HE) of minus 120 degrees (4 AM local solar time) to plus 120 degrees (8 PM local solar time). It is assumed that this calculation is valid for ten days. The integration by month is accomplished between lines 348 and 713 in which three ten-day intervals are calculated per month.

The conversion from energy to utility usage is made assuming that 1100 BTU are produced by each cu. ft. of natural gas and air conditioner run time can be calculated from BTUs by the factor 12,000 BTU/(hr. ton). Kilowatt hours are calculated from volts times amps times time divided by 1000. The program is designed to be used at any latitude (except 0). However, if southern hemisphere calculations are desired, the seasons must be switched in line 225 (the starting month M for heating = 11, and for cooling = 5). Likewise, the length of the heating and cooling seasons must be modified from 152 days (line 715) for printing routine (line 719) should be modified for heating and cooling seasons appropriate for the long season regions. Special transmissionn functions for double glazed glass or solar film may be substituted for the subroutine in lines 2000–2050 as desired.


1 Houston Lighting and Power Residential Conservation Services, copyright 1981, Planenergy Inc., Austin Texas.

2 Yellot, John I.: 1974, Solar Energy Utilization for Heating and Cooling, NSF 74–41, available from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.

3 Klem, David C., 1980: Solar Specs, Microcomputing, pp. 68–70, 1980.