Source Code for Solar Analysis Programs and Classes


I am making this software available under an Open Source license.

Open Source is explained here:  -- basically its completely free, but you are obligated to pass on any enhancements you make.


All of the classes and programs were developed in Visual Basic .net using the 2005 version. 

If you don't have Visual Basic, Microsoft is currently offering a Visual Basic 2005 Express Edition for a year for free.  All of this software will run on the cheap, standard version of Visual Basic (I know, because that's all I own).  If you don't like Bill, the code is pretty simple, and could easily be converted something else.


There are most likely errors, omissions, and certainly lots of poor design in this software:


!!You use this source code completely at your own risk!!


Please also see the this note


The following 8 Visual Basic 2005 projects are included in the single zip file.  Each will unzip in its own directory, which includes all of the source and Visual Basic project files as well as an executable. 


Download all 8 projects ( 2MB zip file)



Visual Basic project for the Radiation On Collector program.

This program estimates the solar radiation that will fall on
a planar solar collector surface as a function of the collector
orientation. Output can be hour by hour for one day, or month
by month for one year.

Preview of source

This is a very simple solar simulation example that shows
how the Sun, TMY weather, and Collector classes can be
used to build a simulation of a solar collector using actual
weather and a solar collector defined by its efficiency curve.

Preview of source

This is another simulation example that is a bit more complex
than the one above. Its adds a heat storage tank, heated space, and
a backup furnace to the simulation. Some primitive report
writing routines are also included.

Sun Class:
This class represents the sun. Based on date, time, and location inputs,
it provides sun elevation and azimuth angles, and sunny day
solar direct and diffuse radiation.
It is used in RadOnCollector and the simulations.

Preview of source

TMY Weather Class:
This class reads weather for a Typical Meteorological Year (TMY) file
for use in simulations. TMY weather files are available for
a number of cities form NREL. The TMY object reads in a full years
TMY data, and makes it available by date and time from an in memory
data structure.

It is used in RadOnCollector and the simulations.

Preview of source

Collector Class and Collector Efficiency Curve Class:
CollectorCls is a base class that represents a flat plate
solar collector. Based on inputs that include collector area,
orientation, and solar radiation, it provides collector incidence
angle, radiation input to the collector and other outputs.

CollectorECurveCls is derived from CollectorCls, and models a
collector based on its efficiency curve. Additional inputs include
Yintercept and the slope of the collectors efficiency curve.
Additional outputs include the collector efficiency and the collector

These classes are used in RadOnCollector and the simulations.

Preview of source

Vector Class:
This class supports some basic 3D vector manipulations, and
is used by the Sun and Collector classes

Please let me know if you have any problems, find any errors, or
make any enhancements.