Download Statistics in a Monte Carlo Dose Rate Calculation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
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
1
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.
2
Warning
Monte Carlo Statistics will help us with
answer how precisely we answered our
question, but not how accurate our model
is.
3
Bottom Line in an MCNP
output
tally
2
nps
mean
error
vov slope fom
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 = Pareto slope of the history score probability
density function
fom = figure of merit
4
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.
5
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.
6
Example Monte Carlo (Not MCNP)
Run
 This
is biased sampling because each
photon is sampled uniformly, without
regard to its probability.
7
Am-241 Spectum
1.E+00
1.E-01
0
0.2
0.4
0.6
0.8
1
1.2
1.E-02
Intensity
1.E-03
1.E-04
1.E-05
1.E-06
1.E-07
1.E-08
1.E-09
1.E-10
MeV
8
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
9
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.
10
In our demo, we are only going to:
 Start a source particle.

Process tallies.
11
Example Run
-> Switch to live R presentation <The following slides are samples of the
live presentation.
12
First 200 photons
13
14
15
16
Up to 400
17
18
19
Up to 10,000
20
21
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.
22
<End of Live Section>
23
nps
Dose
MC
Error
vov
|Error| from True
200
0.0252
0.2405
0.0120
0.2267
400
0.0244
0.2663
0.0132
0.2510
1,000
0.0229
0.2144
0.0068
0.2975
10,000
0.0336
0.1335
0.0013
0.0319
100,000
0.0333
0.0534
0.0001
0.0218
799,485
0.032579
n/a
n/a
0.0004
24
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.
25
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.

26
Mean
3.35E-02
3.30E-02
3.25E-02
3.20E-02
3.15E-02
3.10E-02
3.05E-02
3.00E-02
2.95E-02
2.90E-02
2.85E-02
10000
100000
"random sampling"
1000000
"uniform sampling"
10000000
27
Error
0.1
0.09
0.08
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
10000
100000
random sampling
1000000
10000000
uniform sampling
28
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.
29
Now Add ½” Steel
30
Mean
1.20E-05
1.00E-05
8.00E-06
6.00E-06
4.00E-06
2.00E-06
0.00E+00
1.00E+04
1.00E+05
"Random Sampling"
1.00E+06
1.00E+07
"Uniform Sampling"
31
Error
1.2
1
0.8
0.6
0.4
0.2
0
1.00E+04
1.00E+05
"Random Sampling"
1.00E+06
1.00E+07
"Uniform Sampling"
32
Summary Statistics
Biased
Mean
error
vov
9.97E-06
0.0028
0.0001
Unbiased
Mean
error
vov
9.92E-06
0.0079
0.053
slope fom
10
3768
slope fom
10
12
33
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.
34