IAM Program Manual

This program calculates the optical performance of cylindrical (and other non-symmetric) solar collectors using a three dimensional Monte Carlo ray tracing algorithm. Figure 1 shows a typical cylindrical collector array. For each incident direction, a large number of "solar" photons are traced through possibly many surface interactions until the photon is either absorbed by a surface or exits the volume of interest. The overall transmission-absorptance product (tau-alpha) of the collector is computed as the ratio of photons absorbed by all collector surfaces designated as absorbers to the number of photons incident upon an aperture plane defined by the user (in the absence of all other surfaces). The output of the calculation is a matrix of biaxial Incident Angle Modifiers (IAM's) suitable for use with available TRNSYS (Klein, 1997) collector models. The IAM is defined as the ratio of a collector's performance (tau-alpha) at a particular angle of incidence to the collector's performance at normal incidence (tau-alpha, normal).

This program manual should provide brief description of the function of the program and the construction of an input deck


Figure 1. Typical cylindrical collector array.

Input Deck

The input deck is named "iam.in" and is written in free-form style is used to define control information, material properties and collector geometry. Successive values input must be separated by one or more spaces, An ampersand (&) may be used in the first column of a line to specify a comment line, ignored by the program. The following sections briefly describe the input for each the program. Where possible, suggested values are included in parenthesis at the end of the description. Four example input decks are also provided to help the new user.

It is important that all input be in a consistent set of units. Any consistent set of units can be used, for example cm, m, ft or in.

1. Title

This title is for the user's benefit. It helps identify the input file and is printed as a header in the output file "iam.out".

Item

Variable Name

Description

1

headin

title of the problem, may be up to 40 characters including spaces; must be left-justified, i.e. it is taken as the characters in columns 1 through 40.

2. Control Information

For each incident direction, the Monte Carlo algorithm begins casting photons in groups of "num_photons". At the completion of each "photon loop", the convergence of the calculated tau-alpha is tested. Calculation continues until accuracy of tau-alpha is better than "tol" or until a maximum of "num_ploops" loops have be completed. The screen output allows the user to follow the progress of the calculations

The variable "seed0" is the initial seed for the random number generator. "seed0" MUST ALWAYS BE SET EQUAL TO ZERO for production runs of the IAM program. With seed0=0 a random initial seed is generated from the date and time of execution. With "seed0" not equal to zero, generation of random numbers in the code is not longer "random", but repeatable from to run. While this feature is valuable when trying to isolated programming errors, it should not be used otherwise. Having made that point as strongly as possible, please note that in order to make the examples cases reproducible, "seed0" has been set equal to 1 in all of the example input files.

Item

Variable Name

Description

1

num_photons

number of photons emitted for each photon loop (10,000)

2

num_ploops

maximum number of photon loops to be executed before moving on to next incident direction (100)

3

seed0

initial seed to be used for the random number generator (0)



seed0 == 0 ===> a "random" initial seed is generated from the date and time of execution



seed0 != 0 ===> seed0 is used as the initial seed0. USE ONLY FOR TROUBLE SHOOTING!

4

tol

desired tolerance for results (0.01)

3. Print Control

Successful execution of the IAM code generates two output files, "iam.tab" and "iam.out". The table file, "iam.tab", contains a table of the calculated IAM's in a format which can be read by the standard TRNSYS solar collector routine along with the calculated values of ([tau][alpha])normal and ([tau][alpha])diffuse. Typically, this will be all of the output need by a user. Execution error messages will be printed to the output file, "iam.out". The variable "iprint" allows the user to control the amount and detail of the additional information that can be printed to "iam.out". For example iprint=1 will print the number of photons absorbed by each individual surface. Additional output will slow the execution speed of the code

The IAM program performs some minimal checking of the input file. Any errors generated are print to the screen and echoed to the "iam.out" file. Setting "idata" equal to one causes the program to check the validity of the input file and then terminate the execution of the code.

Item

Variable Name

Description

1

iprint

controls the amount of output sent to the output file "iam.out" (0)



iprint == 0 ===> error output only is sent to iam.out



iprint >= 1 ===> modest photon absorption output is sent to iam.out



iprint >= 2 ===> random number, directions, materials, and collector geometry output is sent to iam.out



iprint >= 3 ===> more photon absorption output is sent to iam.out

2

idata

data check only flag (0)



idata = 0 ===> after the validity of the data is verified, normal execution of the program continues - IAM's will be calculated



idata = 1 ===> the whole input deck will be read, validity of the input data verified and execution of the program will be terminated - no IAM's will be calculated

4. Directions

The geometry and orientation of the solar collector is defined with respect to a Cartesian coordinate system. While the user has some choice as to the location of the origin of the coordinate system, the orientation of the axes conforms to standard practice. Figure 1 shows the orthogonal (Cartesian) coordinate system defined for a sample cylindrical solar collector (see Example 1 below) In this case, the origin of the coordinate system has been placed in the center of the plane which contains the axes of the cylindrical collectors (referred to here as the collector plane). The z-axis is normal to the plane of the collector (pointing up). The x-axis lies parallel to the axis of the cylindrical collector elements and is referred to as the longitudinal axis. The x-z plane is called the longitudinal plane. The y-axis (lateral axis) is perpendicular to the axis of the cylindrical collector elements, in the plane of the collector, forming a right-hand coordinate system. The y-z plane is called the lateral plane.

The direction of the incident solar radiation is characterized by longitudinal and lateral incident angles. The longitudinal incident angle is the angle between the normal to the collector (z-axis) and the projection of the incident ray into the longitudinal (x-z) plane. It is defined as positive toward the positive x-axis. The lateral incident angle is the angle between the collector normal and the projection of the incident ray into the lateral (y-z) plane. By convention, the lateral incident angle is defined as positive toward the negative y-axis. The user should note that using the above convention, incident radiation in the plane of the collector can not be defined. I.e. the direction of the incident radiation can not be uniquely defined with the absolute value of either the longitudinal and lateral incident angles equal to 90 degrees.

The user must specify a table of incident angles (longitudinal and lateral). The code will calculate the IAM for each pair of incident angles in the table. Normal incidence ([theta]l=0, [theta]t=0) must be specified. Typically due to symmetry of the collector, a table of IAM's need only be generated for one quadrant. The code will calculate the IAM for an incident direction in any of the four quadrants above the collector.

Item

Variable Name

Description

1

n_long

number of longitudinal incident angles from which to emit photons (5)

2

n_tran

number of transverse incident angles from which to emit photons (10)

Next "n_long" Lines --- Longitudinal Incidence Angles

Item

Variable Name

Description

1

n

longitudinal incidence angle number

2

thetal(n)

longitudinal incidence angle

Next "n_tran" Lines --- Transverse Incidence Angles

Item

Variable Name

Description

1

n

transverse incidence angle number

2

thetat(n)

transverse incidence angle

5 Materials

In this section, the user must specify the radiative properties of the opaque or semitransparent materials used to construct the collector surfaces. For opaque materials, the user may specify a combination of specular, diffuse, and semi-specular reflectivity's. For diffuse and semi-specular materials, an additional parameter defines the shape of the distribution of the reflected photons. For semi-transparent materials, the user must supply the index of refraction, extinction coefficient and thickness. Please see Ryan (1997) for a detailed description of the material models employed in this code.

Item

Variable Name

Description

1

num_mats_opaq

number of opaque surface materials to be read in the surface materials input section

2

num_mats_glass

number of semi-transparent materials to be read in the glass materials input section

Next "num_mats_opaq" Lines --- Opaque Material Descriptions

Item

Variable Name

Description

1

mat_num

opaque material number

2

rho_s(n)

specular reflectance of material n

3

rho_ss(n)

semi-specular reflectance of material n

4

rho_d(n)

diffuse reflectance of material n



0 <= rho_s + rho_ss + rho_d <= 1.0

5

r_ss(n)

semi-specular weighting exponent (0 - 10)

6

r_d(n)

diffuse weighting exponent (1)

Next "num_mats_glass" Lines --- Semi-Transparent Material Descriptions

Item

Variable Name

Description

1

mat_num

glass material number

2

n_glass(n)

index of refraction for glass material n (1.5)

3

k_glass(n)

extinction coefficient for glass material n (0.13/cm)

4

t(n)

thickness of glass material n






It is very important that the product of the extinction coefficient and the glass thickness be dimensionless. The extinction coefficient will range from 0.04/cm for "water white" glass to 0.32/cm for "green glass." Soda-lime glass, with a normal transmittance of 0.9, has an extinction coefficient of approximately 0.13/cm.6. --- Collector Aperture Definition

6. Collector Aperture Definition

The calculation of the total transmission-absorptance product of the collector requires that the user define an aperture for the collector. The definition of the collector aperture for cylindrical collector systems is somewhat more arbitrary than for a more typical flat plat system. In general, the aperture should probably be defined parallel to the plane of the collector and should reflect the extent of a collector. A reasonable choice would be to define the aperture to be a region in the plane of the collector with a length equal to that of a collector element and a width equal to the number of collector elements multiplied by the pitch (spacing) of the elements. The geometry and orientation of the aperture plane is defined in terms of the coordinates of the four vertices of a quadrilateral.

Next 4 Lines -- Vertices of the Collector Aperture

Item

Variable Name

Description

1

n

vertex number

2

x

the x-value vertex n

3

y

the y-value vertex n

4

z

the z-value vertex n






Note: vertices must be entered in order. Start at any vertex, enter points in order obtained by following the perimeter around in either a counter-clockwise or clockwise.

7. -- Module Definitions

The geometry of the collector must be specified in terms of one of two elemental surfaces allowed in the present incarnation of the code. The first is a general quadrilateral plane region that may be oriented arbitrarily in space. The second is a closed cylindrical tube which is constrained (by definition) to be parallel to the longitudinal axis (x-axis). Any number of plane surfaces and cylinders can be used to define the collector. The geometry and position of each general quadrilateral surface is specified in by the coordinates of the vertices of the four corners. As a special case, when the coordinate of the last vertex is a repeat of any of the first three, the code treats the quadrilateral as a triangle. The geometry and position of each closed circular cylinder is specified by a radius, the coordinates of the origin and the maximum and minimum extent in the x direction. Remember, the axis of the cylinder is constrained to lie parallel to the x-axis.

A typical cylindrical collector system is made up of an array of identical collector modules (see Figure 1). In order to simplify the input of the collector geometry to the code, the input is organized in terms of collector module definitions. Each module definition consists of the definitions of the surfaces, plane or cylindrical which make up a collector module. The material type and properties of each surface is specified in terms of the previously defined material number. In order to reduce computation effort, the surface is also given an intersection level. The significance and use of the intersection level will be described in the paragraph which follows. Each surface is also designated (or not) as an absorber for the purpose of computing absorbed photon counts.

The "int_level" variable works to reduce the execution time required by the code by limiting the number of surfaces which must be checked for intersection in this way. When each photon is first "emitted" from the emission plane, the algorithm resets a variable called "intersection_level" to zero. Each time the ray tracing algorithm searches for a new intersection point, it will only check surface for when (int_level == intersection_level) or (int_level == intersection_level+1). Consider the example geometry in Figure 1. Let int_level=0 for the back plane reflector, int_level=1 for the outer glass covers, and int_level=2 for the inner cylindrical absorbers. Then, at the start of the ray tracing loop, the algorithm will only check the back plane (int_level=0) and the cylindrical covers (int_level=0+1) for intersection. It will not check any of the cylindrical absorbers (int_level=2). As the photon is traced through the collector geometry, "intersection_level" is incremented whenever the photon is transmitted through a surface with (int_level == intersection_level+1). "intersection_level" is decremented whenever the photon is transmitted through a surface with (int_level == intersection_level). Therefore in our example, when a photon intersects one of the covers and is transmitted, intersection_level=1 and the routine will only search for the next intersection on either the glass cover (int_level=1) or on the absorber (int_level=1+1). The back plane will be ignored until the photon is transmitted back through the cover.

The IAM program will issue a warning whenever a photon is "lost" (does not intersect any surface) when intersection_level>0. This condition may indicate a problem with the geometry specification which allows photons to escape from enclosures. It may also be caused by failure to correctly use the int_level variable.

An exception occurs when int_level=-1. In this case, the surface is always checked for a possible intersection. As safe default, the user may specify int_level=-1 for every surface. The consequences will be that the execution of the code will be slowed (although perhaps not greatly) and no lost photon warnings will be issued. int_level=-1 is also useful in constructing a box enclosure like that in Example 4.

Once the module type definitions are complete, the position of each identical module of this type must then be specified.

Item

Variable Name

Description

1

num_mod_defs

number of module definitions

For each module definition

Item

Variable Name

Description

1

num_elements

number of elements in this module definition

For each module element

Item

Variable Name

Description

1

n

module element number

2

type

type of surface



type=1 ===> general quadrilateral plane surface



type=2 ===> finite circular cylindrical surface

3

mat_num

material definition number for the surface



mat_num>0 ===> opaque material



mat_num<0 ===> semi-transparent material

4

int_level

intersection level



int_level==-1 ===> always check surface for intersection



int_level>=0 ===> check surface for intersection when (intersection_level==int_level or intersection_level==int_level+1).
intersection_level==0 upon emission of a photon
intersection_level is incremented whenever the photon is transmitted through a surface with int_level==intersection_level+1
intersection_level is decremented whenever the photon is transmitted through a surface with int_level==intersection_level

5

absorber

absorber designation for IAM calculation



absorber=0 ===> surface is not counted as an absorber surface in IAM calculation



absorber=1 ===> surface is counted as an absorber surface in IAM calculation

If "type" = 1, surface is a general quadrilateral plane surface, next 4 lines are:

Item

Variable Name

Description

1

n

vertex number

2

x

the x-value vertex n

3

y

the y-value vertex n

4

z

the z-value vertex n






Note: vertices must be entered in order. Start at any vertex, enter points in order obtained by following the perimeter around in either a counter-clockwise or clockwise.

If "type" = 2 surface is a closed circular cylinder, next line is:

Item

Variable Name

Description

1

x1

x-value of the origin of the local coordinate system for this cylinder

2

y1

y-value of the origin of the local coordinate system for this cylinder (center of circular section)

3

z1

z-value of the origin of the local coordinate system for this cylinder (center of circular section)

4

r

radius of cylinder

5

xmin

minimum extent of cylinder in the x-direction (local coordinate system)

6

xmax

maximum extent of cylinder in the x-direction (local coordinate system)

After "num_elements" surfaces have been specified, enter number and position of modules of this type

Item

Variable Name

Description

1

num_modules

number of modules of type "n"

Next "num_modules" lines -- Position of module number "mn"

Item

Variable Name

Description

1

mn

module number

2

x

the x-value of the center of the module mn

3

y

the y-value of the center of the module mn

4

z

the z-value of the center of the module mn

8. External Surface Definitions

Finally, after all modules definitions have been entered and the positions of all like modules specified, the user may define the geometry, position, and properties of additional external plane surfaces can be specified. Cylindrical surface may only be specified inside of module definitions.

Item

Variable Name

Description

1

num_ext

number of external surface definitions

For "num_extrn" external surfaces

Item

Variable Name

Description

1

n

module element number

2

mat_num

material definition number for the surface



mat_num>0 ===> opaque material



mat_num<0 ===> semi-transparent material

3

int_level

intersection level



int_level==-1 ===> always check surface for intersection



int_level>=0 ===> check surface for intersection when (intersection_level==int_level or intersection_level==int_level+1).
intersection_level==0 upon emission of a photon
intersection_level is incremented whenever the photon is transmitted through a surface with int_level==intersection_level+1
intersection_level is decremented whenever the photon is transmitted through a surface with int_level==intersection_level

4

absorber

absorber designation for IAM calculation



absorber=0 ===> surface is not counted as an absorber surface in IAM calculation



absorber=1 ===> surface is counted as an absorber surface in IAM calculation

Next 4 Lines -- Vertices of the surface

Item

Variable Name

Description

1

n

vertex number

2

x

the x-value vertex n

3

y

the y-value vertex n

4

z

the z-value vertex n






Note: vertices must be entered in order. Start at any vertex, enter points in order obtained by following the perimeter around in either a counter-clockwise or clockwise.

Execution of IAM Program

With the executable file "iam.exe" (simply "iam" for Macintosh) and the input deck "iam.in" in the same directory, the program is executed on Windows or Macintosh systems by double-clicking on its icon. Output to the screen will be information about the current status of the program's execution. After each photon loop is completed, a line of information is written to the screen. This includes:


Item

Description

1

whether or not the results have converged for this incident direction

2

current incident direction number

3

photon loop number for this incident direction

4

number of photons emitted in the photon loop

5

current convergence tolerance

6

desired convergence tolerance

Upon completion of the program, the final photon tallies for each incident direction are written to the screen:

Item

Description

1

direction number

2

transmittance-absorptance product (tau-alpha)

3

number of photons absorbed by the cylinders

4

number of photons absorbed by the glass covers

Output Files

During the execution, a number of files are written to the active directory:

File Name

Description

iam.tab

contains tables of incidence angles and IAM's formatted for input into TRNSYS; also lists tau_alpha normal, tau_alpha diffuse, aperture area, convergence tolerance, initial seed for random numbers, and number of directions converged (these although present, are ignored by TRNSYS).

iam.out

depending on the value of "iprint" contains information about the input deck, material properties, collector geometry, detailed results for each incident direction and detailed results for the entire run, including error termination information

iam.tp1

temporary file to process input

iam.tp2

temporary file to process input

Access to the IAM Program

The following files are available at CSU's Solar Energy Applications Laboratory web page (http://www.coloctate.edu/Orgs/SEAL/research/IAM/ iam.html):

References

Klein et al, "TRNSYS - A Transient System Simulation Tool, Version 14.2," Solar Energy Laboratory, University of Wisconsin, Madison, Wisconsin, 1997.

Knappmiller, K., "Computation of Total Hemispheric Incident Angle Modifiers for Solar Collectors," MS Thesis, Department of Mechanical Engineering, Colorado State University, Fort Collins, Colorado, 80523, 1991.

Menon, A., "Optical Performance of Cylindrical Absorber Collectors with and without Reflectors," MS Thesis, Department of Mechanical Engineering, Colorado State University, Fort Collins, Colorado, 80523, 1994.

Ryan, J. P., J. A. Miller, and P. J. Burns, "Development And Use Of A Monte Carlo Code To Conduct A Parametric Study Of Cylindrical Solar Collector Arrays", Solar Engineering - 1998, ASME International Solar Energy Conference, Albuquerque, New Mexico, June 13-18, 1998.

Ryan, J., "Incidence Angle Modifiers in Cylindrical Solar Collector Design," MS Thesis," Department of Mechanical Engineering, Colorado State University, Fort Collins, Colorado, 80523, 1997.

Ryan, J., P. J. Burns, and D. C. Hittle, "Incidence Angle Modifiers (IAM's) by Monte Carlo," Solar Engineering - 1997: Proceedings of the ASME/JSME/JSES International Solar Energy Conference, Washington D. C., 1997.