Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Everyday Statistics in Monte Carlo Shielding Calculations  One Key Statistics: ERROR, and why it can’t tell the whole story  Biased Sampling vs. Random.

Similar presentations


Presentation on theme: "1 Everyday Statistics in Monte Carlo Shielding Calculations  One Key Statistics: ERROR, and why it can’t tell the whole story  Biased Sampling vs. Random."— Presentation transcript:

1 1 Everyday Statistics in Monte Carlo Shielding Calculations  One Key Statistics: ERROR, and why it can’t tell the whole story  Biased Sampling vs. Random Sampling

2 2 What is a Monte Carlo Calculation?  Monte Carlo methods are a class of computational algorithms that rely on repeated random sampling to compute their results.

3 3 Warning Monte Carlo Statistics will help us with answer how precisely we answered our question, but not how accurate our model is.

4 4 Bottom Line in an MCNP output tally 2 tally 2 nps mean error vov slope fom nps mean error vov slope fom 512000 9.7768E-04 0.0010 0.0002 1.5 519843 512000 9.7768E-04 0.0010 0.0002 1.5 519843 nps = number of starting particles run mean = result of the tally error = standard deviation / mean vov = variance of the variance slope = slope = Pareto slope of the history score probability density function fom = figure of merit

5 5 MCNP Details  MCNP = Monte Carlo N-Particle Code, developed at Los Alamos National Laboratory since the 1940’s  Actual MCNP outputs contain a lot of detailed data.

6 6 Example Monte Carlo (Not MCNP) Run Sampling photons from Am-241 There are 153 photons Sample strategy – random number from 1 to 153 identifies the photon A weighting factor (a very important statistic) is used to adjust for probabilities of these photons, the lowest at 5.5E-10.

7 7 Example Monte Carlo (Not MCNP) Run  This is biased sampling because each photon is sampled uniformly, without regard to its probability.

8 8

9 9 Example Pseudocode Assign a starting value for “dose.” Start a loop. Select a random integer from 1 to 153. Use the random number to select one of the photons. Multiply the photon by its weight. Add this sum to: current dose estimate * number of previous runs. Divide this by the number of current runs. End loop

10 10 MCNP includes a lot of operations, such as:   Start a source particle (energy, direction);   Find the distance to the next boundary, cross the surface and enter the next cell;   Find the total photon cross section and process photon collisions producing electrons as appropriate;   Follow electron tracks;   Process tallies.

11 11 In our demo, we are only going to:   Start a source particle.   Process tallies.

12 12 Example Run -> Switch to live R presentation Switch to live R presentation <- The following slides are samples of the live presentation.

13 13 First 200 photons

14 14

15 15

16 16

17 17 Up to 400

18 18

19 19

20 20 Up to 10,000

21 21

22 22 In a well-behaved Monte Carlo run, expect the error to decrease as the square of the number of samples increases. For example to divide error by 2, multiply samples by 4.

23 23

24 24 npsDose MC Errorvov|Error| from True 2000.02520.24050.01200.2267 4000.02440.26630.01320.2510 1,0000.02290.21440.00680.2975 10,0000.03360.13350.00130.0319 100,0000.03330.05340.00010.0218 799,4850.032579n/a 0.0004

25 25 Time to Evaluate the Sampling Bias  Did it help or hurt our statistics to bias the sampling?  In the slides that follow, we compare unbiased sampling to biased sampling for two cases.

26 26 Comparison to an MCNP run  Simple Model: point source in vacuum.  Tally at a sphere in vacuum.  This is very much like our R model.  Later, we add a twist: a steel shield.

27 27

28 28

29 29 For the Simple Case…  The random sample looks good. All statistical checks were passed.  But if you look at the output in detail…  Many of the low probability particles were not sampled at all.  We ran 10,000,000 particles, but that wasn’t enough to ensure we sampled all the particles.

30 30 Now Add ½” Steel

31 31

32 32

33 33 Summary Statistics Biased Mean error vov slope fom 9.97E-06 0.0028 0.0001 10 3768 Unbiased Mean error vov slope fom 9.92E-06 0.053 0.0079 10 12

34 34 Conclusions  How you sample makes a difference. But it depends on the problem what the preferred sampling will be.  MCNP Summary Statistics are a helpful guide, but they do not tell the whole story.


Download ppt "1 Everyday Statistics in Monte Carlo Shielding Calculations  One Key Statistics: ERROR, and why it can’t tell the whole story  Biased Sampling vs. Random."

Similar presentations


Ads by Google