justinjames92
New Member
- Joined
- May 2, 2011
- Messages
- 5
As an illustration, suppose that a slab of material is used to shield a nuclear reactor and that a
particle entering the shield follows a random path by moving forward, backward, left, or right with
equal likelihood, in jumps of one unit. A change of direction is interpreted as a collision with an
atom in this shield. Suppose that after 10 such collisions, the particle's energy is dissipated and that it
dies within the shield, provided that it has not already passed back inside the reactor or outside
through the shield. A program is to be written to simulate particles entering this shield and to
determine what percentage of them gets through it.
Think of the metal wall that is supposed to keep the high-energy particles contained as being
4 units thick and boundless in the horizontal direction. Divide up the cross-sectional view of the wall
as occupying a region 4 rows and, say, 20 columns. Use the coordinates (I, J) for (row, column) with
(0, 0) representing cell Al. Assume each particle starts its random motion into the wall in the top row
(I = 0) and column H (J = 7) of the spreadsheet (the metal wall begins at the second row and extends
to include the fifth row). Make a random number generator which returns one of the integers 1, 2, 3,
or 4, corresponding to down, up, left and right...the four random directions the particle can bounce.
Use Select Case and Offset to move the particle once its random number is generated. Get
another random number and repeat the movement. Continue this in a loop until either 10 numbers
have been generated and the particle decays or it escapes (made it to the 6th row down) whereby an
"out" should be placed in the cell where it left the metal wall. Put this entire process of a loop that
will repeat for 100 particles.
Animate the process by having the cell in which the particle is be colored red. Clear the cell
if the particle decays or if the particle escapes. Call a "delay" subprogram to slow down the action to
be visible but fast. Oftentimes more than one particle escapes the metal at the same column. If this
happens, have the active cell move down one row and then print "out-. Include a counter as to how
many of the 100 particles make it through the shielding wall.
any help???
particle entering the shield follows a random path by moving forward, backward, left, or right with
equal likelihood, in jumps of one unit. A change of direction is interpreted as a collision with an
atom in this shield. Suppose that after 10 such collisions, the particle's energy is dissipated and that it
dies within the shield, provided that it has not already passed back inside the reactor or outside
through the shield. A program is to be written to simulate particles entering this shield and to
determine what percentage of them gets through it.
Think of the metal wall that is supposed to keep the high-energy particles contained as being
4 units thick and boundless in the horizontal direction. Divide up the cross-sectional view of the wall
as occupying a region 4 rows and, say, 20 columns. Use the coordinates (I, J) for (row, column) with
(0, 0) representing cell Al. Assume each particle starts its random motion into the wall in the top row
(I = 0) and column H (J = 7) of the spreadsheet (the metal wall begins at the second row and extends
to include the fifth row). Make a random number generator which returns one of the integers 1, 2, 3,
or 4, corresponding to down, up, left and right...the four random directions the particle can bounce.
Use Select Case and Offset to move the particle once its random number is generated. Get
another random number and repeat the movement. Continue this in a loop until either 10 numbers
have been generated and the particle decays or it escapes (made it to the 6th row down) whereby an
"out" should be placed in the cell where it left the metal wall. Put this entire process of a loop that
will repeat for 100 particles.
Animate the process by having the cell in which the particle is be colored red. Clear the cell
if the particle decays or if the particle escapes. Call a "delay" subprogram to slow down the action to
be visible but fast. Oftentimes more than one particle escapes the metal at the same column. If this
happens, have the active cell move down one row and then print "out-. Include a counter as to how
many of the 100 particles make it through the shielding wall.
any help???