What is the Monte Carlo Method for Simulating Neutron Transport using MPI in C?

In summary, the conversation discusses resources for learning about Monte Carlo simulations in radiation transport, including books and online materials. The main focus is on understanding the use of a random number, u, in the simulation code and how it affects the direction and distance traveled by a neutron. The code is also mentioned and the speaker asks for help with parallelizing it using MPI.
  • #1
Milentije
48
0
Can anyone hepl me with this?I need some web resource,to start learning from scratch.
 
Engineering news on Phys.org
  • #2
Try these to get started.

Introduction to Numerical Simulations in Radiation Transport
http://iron.nuc.berkeley.edu/%7Ebdwirth/Public/NE155/ne155.html
Notes in pdf
http://iron.nuc.berkeley.edu/%7Ebdwirth/Public/NE155/schedule.html
Several files are large.

Brief history of MCNP - Monte Carlo Neutron-Photon
http://library.lanl.gov/cgi-bin/getfile?00418730.pdf

LANL paper - A Monte Carlo Code for Particle Transport
http://www.fas.org/sgp/othergov/doe/lanl/pubs/00326727.pdf

Another historical perspective on MC -
http://library.lanl.gov/cgi-bin/getfile?00326867.pdf

MCNP site
http://mcnp-green.lanl.gov/index.html
http://mcnp-green.lanl.gov/v_r_refs.html
 
Last edited by a moderator:
  • #3
Milentije said:
Can anyone hepl me with this?I need some web resource,to start learning from scratch.
Milentije,

A very good book on Monte Carlo is by Spanier and Gelbard;
"Monte Carlo Principles and Neutron Transport Problems"

There's also another short text by Carter and Cashwell.

Dr. Gregory Greenman
Physicist
 
  • #4
Thanks Astronuc and Morbius,I have found the recources very usefull.
 
  • #5
Hello friends, I am doing simple mc simulation for neutron transport.
The principle of random simulation is L=-(1/C)*ln(u), where u is a random number from the uniform distribution [0,1), and c is the total cross section (absorbed + scattered). Could you explain me what is the meaning of u, and how can I use it in my simulation?.
I wrote a simple code in c, which I have to parallel it in MPI:

#include "mpi.h"
#include <math.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <stdbool.h>
#define PI 3.14159265
int main (int argc, char *argv[])
{
/* Simple "srand()" seed: just use "time()" */
unsigned int iseed = (unsigned int)time(NULL);
srand (iseed);

/*c = mean distance between neutron/atom interaction*/
/*cs = scattering component of c*/
/*cc = absorbing component of c*/
float c,cs,cc; /*mean distance between neutron/atom interaction*/
double h,l; /*thickness of the slab and length travelled*/
double u; /*uniform random number*/
double dd,d; /*direction of the neutron [0,pi]*/
double x; /*position particle in the plate*/
int n=10; /*number of samples*/
int bounce; /*boolean value*/
int i,r,b,t;
r=0; b=0; t=0; /*reflected,absorbed and transmited neutrons*/
/*generates randon values between 0 and 1*/
/*dd = (float) rand()/RAND_MAX;*/
for (i = 1; i <= n; i++)
{
x = 0.0;
d = 0.0;
dd = 0.0;
c = 5.5545;
cc = 0.0035;
cs = 5.551;
h = 10.00;
bounce = 1;
do {
dd = (float) rand()/RAND_MAX;
d=PI*dd;
/*generates randon values between 0 and 1*/
u = (float)rand()/RAND_MAX;
l = -(1/c)*log(u);
/*lenght traveled by the particle*/
x = x + l*cos(d);
//printf("value of x=%2.4f\n",x);
if (x < 0.0) /*reflected*/
{
r = r + 1;
bounce = 0;
// printf("reflec r= %d\n",r);
}
else {
if (x >= h) /*transmited*/
{
t = t+1;
bounce = 0;
// printf("trans t=%d\n",t);
}
else{
if (u < cc/c)
{
b = b+1;
bounce = 0;
// printf("absorbed b=%d\n",b);
}
else d = u * PI;
}
}/*end first else*/
} while (bounce = 1);
} /*end for*/
printf("Particles reflected = %d\n",dd);
printf("Particles absorbed = %d\n",b);
printf("Particles transmittedd = %d\n",b);
}/*end main*/


Please any help is more than welcome
 

What is MonteCarlo neutron transport?

MonteCarlo neutron transport is a computational method used to simulate the behavior and interactions of neutrons in a given material or system. It is based on the Monte Carlo method, which involves using random numbers and statistical sampling to generate a large number of individual neutron histories and then statistically analyzing the results to obtain the overall behavior of the neutrons.

How does MonteCarlo neutron transport work?

The process of MonteCarlo neutron transport involves creating a virtual model of the material or system being studied, including its geometry and composition. The model is then used to generate a large number of individual neutron histories, taking into account factors such as scattering, absorption, and other interactions with the material. By analyzing the results of these individual histories, the overall behavior of the neutrons can be determined.

What are the applications of MonteCarlo neutron transport?

MonteCarlo neutron transport is commonly used in nuclear engineering and physics to study the behavior of neutrons in reactors and other nuclear systems. It is also used in medical physics to model the interactions of neutrons with biological tissues for radiation therapy and imaging applications. Additionally, MonteCarlo neutron transport can be used in other fields such as materials science and astrophysics to study neutron behavior in different environments.

What are the advantages of using MonteCarlo neutron transport?

One major advantage of MonteCarlo neutron transport is its ability to accurately model complex systems and materials. It takes into account a wide range of factors and interactions, making it a powerful tool for studying neutron behavior. Additionally, the use of random numbers and statistical sampling allows for a more precise and efficient analysis of neutron behavior compared to other methods.

What are the limitations of MonteCarlo neutron transport?

One limitation of MonteCarlo neutron transport is the large amount of computational power and time required to run simulations. This can make it a time-consuming and costly method, particularly for complex systems. Additionally, the accuracy of the results can be affected by the assumptions and simplifications made in the virtual model, so careful consideration must be taken in creating an accurate model for the simulation.

Similar threads

Replies
11
Views
2K
Replies
5
Views
848
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Nuclear Engineering
Replies
2
Views
2K
  • High Energy, Nuclear, Particle Physics
Replies
1
Views
1K
  • Nuclear Engineering
Replies
7
Views
2K
  • Nuclear Engineering
Replies
4
Views
3K
  • Nuclear Engineering
Replies
8
Views
2K
  • Nuclear Engineering
Replies
2
Views
2K
Back
Top