Question: how do i make a program for shielding a nuclear reactor

A beam of neutrons bombards a reactor's wall. Consider the motion of the neutrons as a random walk on the (x,y) plane.

The neutrons then have to comply with the following conditions:

  1. Only four directions of motion are possible (left, right, up or down).
  2. On the next step the neutron can not step back, but only forward, left or right.
  3. The probability to go forward is four times more than changing a direction.
  4. On each step the neutron looses one unit of energy.
  5. The initial neutron energy is enough for 100 steps.
  6. The initial neutron velocity is perpendicular to the shield.
  7. There are three possibilities for a neutron after entering the shield : it can return to the reactor core, it can be absorbed inside the shield or it can penetrate and travel through the shield.
  8. When a neutron re-enters the reactor or when it goes through the shield, its random path stops, regardless of its energy.

                                                                                                                                            

 

Write a Monte Carlo program to simulate the random walk for many neutrons (> 1000, but not too many, else it becomes very slow!) and count and determine the probabilities for neutrons as a function of the shield size l :

a) to be reflected back in the reactor, PR

b) to be captured in the shield, PC

c) to penetrate through the shield, Pe

Let l vary between 5 to 100 in steps of 5.

 

Before repeating the algorithm for many neutrons and repeating it again for each value of l, make a few plots showing typical paths of single neutrons through the shield. Use this mainly to check that your algorithm is working correctly. Don’t make further plots of the paths, when starting to repeat the process.


Make graphs showing the dependence for the three different probabilities as a function of shield size l. To test whether your program is working correctly, the sum of the probabilities should add up to 1. Discuss the results you obtain.

 

Assume that the probability Pe to get through the shield has the asymptotic exponential dependence as  where l  is the thickness of the shield. Estimate the exponent a.

 

Hint: To determine new steps for the random walk, let the four possible directions be represented by a direction number, for example : the four integer numbers 0 to 3, where 0 would represent a move up, 1 a move to the right, 2 a move downward, etc. Keep track of the value used for the previous move. Generate a real random number in the unit interval and decide with the correct probabilities in which general direction to move: forward in same direction as previous, a change in direction to the left or right. If a move is to be in forward direction, use same direction number as used in previous step. If a change of direction needs to be made, take the previous direction number and add or subtract 1 to get new direction number.

Please Wait...