# General procedure for Monte Carlo method -- Algorithm 4.11

The Monte Carlo method is a form of ray tracing in which a statistical sample is taken from the set of all possible ray directions. It may be used to determine daylight coefficients for a complex interior, taking into account both irregular geometry and non-Lambertian reflections. It may be used to find form factors.

The method may be seen as repetitive calculation of the path of a particle from its emission by a light source to its eventual absorption. On emission, and at each stage of reflection or transmission when the path alters, the computed direction of a particle is determined by a random number scaled by the probability distribution that describes the physical process. Each particle carries a 'weight' proportional to the intensity of the corresponding ray. This is reduced at each reflection and during transmission through an attenuating medium. As the path of a particle is modelled, at each intersection with a surface, the particle weight is added to the count for the surface. When a particle weight falls below some small arbitrary value, the ray is taken to be absorbed, and the process repeated with the emission of a new particle. Different categories of weight may represent intensity in different colour dimensions. The process is repeated many times. The illuminance on a surface, in relation to the total flux output of a lamp or the luminance of a sky zone, is given finally by the number of particles received by unit area of surface in comparison with the total number of emitted particles .

To determine daylight coefficients, particle paths may be tracked in reverse. Each particle is taken to be emitted by the receiving surface. It is tracked through reflections and transmission by the window, and its weight is added to the count for the sky zone represented by its eventual direction. By reciprocity, the ratio between the zone count and the total number emitted gives the daylight coefficient between the sky zone and the emitting surface. The direct and reflected components of the coefficient can be distinguished by separate counts of particles received by the sky without reflection and after one or more reflections.

Form factors may be determined by sampling the particles emitted over the area of a surface and received directly by another surface.

A 'stopping rule' is used to determine the number of particles taken. This may be based on statistical sampling theory. A commonly-used rule is as follows: divide the run of repetitions into successive shorter runs of fixed length; calculate the illuminance (or daylight coefficient ) of each short run on completing it; calculate cumulatively the standard error; stop when the standard error falls below a predetermined value, and find the overall mean illuminance. In general, the standard error in this estimate of illuminance is inversely proportional to the number of particles sampled.

The geometrical framework for Monte Carlo calculations may be identical with that described for finite area methods. The advantages of the Monte Carlo method are that complex building forms can be modelled more simply than with finite area methods, and the amount of data storage required increases linearly with the number of zones, rather than approximately with the square of the number. The disadvantage of the Monte Carlo method is that processing time can be significantly greater.

## General procedure for computation of daylight coefficients at a point

```for sky zones=1 to number of zones
zone count(sky zone)=0
next
while number of repetitions < stopping number
particle weight = 1
(select initial direction) algorithm 4.12
(calculate direction cosines) algorithm 5.11
while (particle lies within x,y,z bounds of enclosure)
while particle weight > minimum weight
(select nearest surface in direction of travel) algorithm 5.15
(calculate new position of particle) algorithm 5.15
(determine whether reflected or transmitted) algorithm 4.13
(select new direction of travel) algorithm 4.12
particle weight = particle weight x (reflectance or transmittance)
end while
(calculate sky zone) algorithm 1.35
zone count(sky zone) = zone count(sky zone)+ particle weight
end while
end while
for sky zones=1 to number of zones
daylight coefficient(sky zone) =
next

```
Source

Tregenza(1)
References

1. Tregenza P R The Monte Carlo method in lighting calculations Lighting Research and Technology 15 (4) 163-170 (1983)

Go Back to Subtask C Contents