[neutron-mc] Maxwell random deviate generator

George Apostolopoulos gapost at ipta.demokritos.gr
Thu Oct 4 15:54:05 CEST 2007


Dear all,

I post here a routine for generating random numbers drawn from the
maxwell flux distribution. I thought it may be of interest for McStas.

The method follows an example from "Numerical Recipes - 7.3 Rejection
Method"

Files:
maxwell.c : contains the actual routine and also runs a basic test on
the validity of the algorithm.
maxwell_deviate.pdf : Documents the algorithm in some more detail. 

Best regards.

******************************************************
Dr. Georgios Apostolopoulos
Institute of Nuclear Technology & Radiation Protection
National Center for Scientific Research "Demokritos"
15310 Agia Paraskevi Attikis, Greece

tel +30-210-650-3731 
fax +30-210-653-3431
email: gapost at ipta.demokritos.gr
******************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Maxwell_Deviate.pdf
Type: application/octet-stream
Size: 152549 bytes
Desc: Maxwell_Deviate.pdf
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20071004/9d2ffa2b/attachment.obj>


More information about the mcstas-users mailing list