WinCalc
Warning: beware of using this for anything serious.
This was done long ago as a Java learning exercise, and never validated.
There are problems in the diffuse radiation calculation (at least) that
may or may not ever be fixed. Feel free to dig into the source code.
WinCalc is a Java Applet that performs energy calculations on one
or more windows (or other surfaces) exposed to the sun. Although the
name makes it sound as if it is an application written for Microsoft
Widows, it should, being Java, be more or less platform independent.
Whenever I get an attack of imagination, I'll probably change the name.
This applet requires Java version 1.1.6 or later to operate. With
Netscape, it requires version 4 or later. With Microsoft Internet Explorer,
I am not sure where the breakpoint is, but know it works with version 5.0.
On the Macintosh, it appears that Netscape isn't quite up to snuff yet.
It does appear that you can on MacOS 8.1 (or better) install Apple's
MRJ (Mac Runtime for Java)
version 2,2 and run WinCalc as an application, an applet using the
Appletviewer, or using MRJ as a plugin to Microsoft Internet Explorer.
I have run it on Netscape under AIX, on RS/6000, and find it extremely
slow. However, running it on the same platform using Appletviewer, it
is quite snappy.
When this page is loaded, it also loads Wincalc. The applet is about
62Kbytes, and will take a little time to load if you are on a dialup
connection. Wincalc brings up its own window, which can be
resized as desired. Calculations are performed using "TMY" (Typical
Meteorological Year) data (typically gzip-compressed. When Wincalc is
first invoked, it does not load any data. You should see "Location: NOT LOADED"
at the top of the left hand column. To make Wincalc do something, a TMY data
file needs to be loaded, which can be done by selecting a city from the following
list:
This causes WinCalc to download the selected TMY data file. Downloading
takes a certain amount of time, especially if you are on a dialup connection,
because the files, even when compressed, occupy nearly 250 Kbytes.
Once the TMY file has been loaded, the Location field will be set to
the appropriate city (such as Austin, TX), and other material will
appear on the screen.
Screen Layout
Inputs
The left portion of the screen deals with specifying the
inputs for the system to be analyzed. The top portion of the
input area gives information about the location. As it stands,
it will show information about the last location to be loaded,
though in fact multiple locations can be loaded. This information
is all taken from the TMY file that is loaded, and it cannot be
altered.
Orientation Panel
Below the Location panel is a panel that is used for defining
angular orientation of a surface or surfaces. Multiple orientations
can be defined for a particular location, and the "<" and ">"
buttons at the bottom of the location panel can be used to
step through them. The "new" button creates a new orientation.
Two values determine an orientation, tilt angle (a horizontal
surface is at zero degrees, a vertical at 90), and azimuth (measured
from South, with West being positive).
When the program is invoked, one orientation, with Zero azimuth
and 90 degree tilt (southfacing, vertical) is created. This is
the default orientation for any new orientations that are created.
The entry boxes can be used to change the values. New values take
effect when the Enter key is pressed (Tab won't do it, for now).
Surface Panel and Window Panel
Associated with each Orientation can be one or more Surfaces.
The Surfaces can be simple surfaces or windows.
The "<" and ">" buttons at the bottom of the Orientation panel
steps through them. Surfaces can be either a simple surface exposed
to sunlight, or a window. The "New Surface" button creates a new
simple surface, and the "New Window" button creates a new window.
When a new Orientation is created, a single Window surface is also
created. Default parameters for a surface are an area of 1 square meter
and a ground reflectivity of 0.15. New Window surfaces have the
additional default values of UVALUE = 1 BTUH/Ft2-F (5.67 W/m2-C),
about the value for a singe pane window. The other window parameter is
the Solar Heat Gain Coeficient (SHGC), set by default to 0.8.
Output Screens
The right portion of the screen shows a variety of output screens.
The "<" and ">" buttons step through the available screens.
Graphs
One of the output panels shows graphs of input or calculated
data. The top portion of this panel is a selection list showing
all of the data items that are available for graphing. Items are
toggled selected / deselected with a mouse click.
Two different graphs are currently available,the Daily Graph
and the Hourly Graph. The "<" and ">" buttons labeled "Graph Selection"
toggle between them.
The Daily Graph displays the selected data items over the period of
one day. The Hour Graph shows the selected items at a particular hour,
over the period of one year.
It is expected that other graphs will be added.
Other Output Screens
Each surface defines one or more output screens that summarize
behavior of the surface by month. The content of these is easy
to change, hance likely to be volatile as I experiment with
different ways of looking at the data. Use the "Output Selection
[<][>]" buttons to see the available data.
Code Status
This is by no means a finished program. I have placed it up here
because it is starting to do something interesting, and I think it
is far enough along to be useful (from an educational, not engineering,
standpoint) to someone who wants to study the thermal performace of
windows exposed to the sun.
Here is an incomplete list of bugs to fix and features that
I want to attack (listed without order).
- Apparent problems in event processing. Excessively long
update times for unit system change.
- Change the name to something other than WinCalc.
- Graphs need color management
- Graphs need labels
- Vertical axis ticks & grids disappear for small values.
- Panels to specify HVAC and Utility characteristics.
- I need to derate SHGC based on angle of incidence.
- Need status bar.
- Properly handle input screens for multiple locations.
- Truncated fields on input panels.
- Only perform output screen calculations when the particular
screen is visible: if it is visible and something changes, or
when it is made newly visible, and an update is pending.
- Window shading structures.
- Shading vegetation...pretty big deal.
- Derate SHGC for non-normal angles.
- Some programmability of initial state, instead of having
it all hardwired.
- Scripting (Tcl?).
- Parameterized defaults.
- Parameterized output screens.
- Parameterized graphs.
- Nice, tabbed layout manager for the output screen.
Operation as an Application
WinCalc is written to be used as a standalone application.
More about how to do this later.
Source code is in this directory.
Documentation is here.
|