Simple steady-state Monte Carlo program in spherical, cylindrical and planar coordinates (using ANSI standard C). Used in the article:

Download the program: mc321.c

Compile the program:

cc -o mc321 mc321.c

Run the program:

./mc321

The output is: mc321.out, which yields the fluence rate (F [W/cm^{2}]) for 3 types of sources:

- for a point source: F
_{sph}[W/cm^{2}per W delivered] - for a cylindrical source: F
_{cyl}[W/cm^{2}per W/cm delivered] - for a planar source: F
_{pla}[W/cm^{2}per W/cm^{2}delivered]

The output file **mc321.out** can be plotted by the MATLAB program, lookmc321.m, yielding the following figure:

An introductory short-course on the Monte Carlo method discusses mc321.c. tutorial

Other Monte Carlo programs: omlc.org/software/mc