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/cm2]) for 3 types of sources:
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