View
238
Download
4
Embed Size (px)
Citation preview
1
CH.IX: MONTE CARLO METHODS FOR TRANSPORT PROBLEMS
SOLUTION USING MONTE CARLO SIMULATION • MONTE CARLO SIMULATION • SIMULATION OF NEUTRON TRANSPORT• SAMPLING• ESTIMATION OF FINITE INTEGRALS• ESTIMATION OF A REACTION RATE• ADVANTAGES AND DRAWBACKS• IMPROVING THE SIMULATION EFFICIENCY
ESTIMATORS OF A REACTION RATE• FIRST MOMENT OF THE SCORE• PARTIALLY NON-BIASED ESTIMATORS• SECOND MOMENT OF THE SCORE
VARIANCE REDUCTION • ESTIMATION OF FINITE INTEGRALS• ESTIMATION OF A REACTION RATE• EXAMPLES OF BIASED KERNELS
2
MONTE CARLO SIMULATION
Introduction
Boltzmann eq: PDE with 7 variablesSolution only for some simplified cases
Reactor: highly heterogeneous medium Classical numerical methods “not fitted” for an exact solution
Monte Carloresorting to random numbers to estimate a quantity as an expected value in a stochastic process associated to the problem at hand ( “survey”)
IX.1 SOLUTION USING MONTE CARLO SIMULATION
3
SIMULATION OF NEUTRON TRANSPORT
Transport process = stochastic process!Estimation of transport-related quantities (e.g. reaction rate) as
their expected value on a large number of evolutions (“runs/histories”) of the neutron population
Algorithm
1. Draw the initial coordinates and speed of the n from the source density
2. Draw its free flightif it escapes the reactor, go to 4.
3. Draw the type of collision* if absorption, go to 4.* if scattering, draw the outgoing speed of the n* if fission, draw the number of n produced and their outgoing
speed + memorize the coordinates of the additional n
4. Deal with next n in memory (if appropriate) and go to 2.5. Go to 1. if there are still runs to play
4
SAMPLING
Principle
Cumulative distribution function (c.d.f.) F of a random variable x = monotonously non-decreasing function on [0,1]
Draw a random number uniformly distributed on [0,1] Inversion of F
x* s.t. F(x*) =
x
F(x)
1
0
x*
5
Sampling of the transition kernel
Negative exponential distribution
For an homogeneous reactor : F(s) = 1 - exp(-ts)
s* s.t. 1 - exp(-ts*) = ’ = 1 -
s* = - (ln )/t
General case
with (infinite reactor)
*
1 srr jj
ln),(.. ** srrqts jjv
6
Sampling of the collision kernel
Two steps
1. Interaction type
Let
Rem: if i* = f, sampling of the distribution of
2. Speed and direction
Depends on the interaction sampled
fscivr
vrp
t
ii ,,,
),(
),(
j
i
jj
i
j
ppqti
**
0
1
0
* ..
7
ESTIMATION OF FINITE INTEGRALS
b
adxxfI )(
Geometric interpretation of the integral:
mabN
nabmMI ).().).((
~
• n=0
• (xi,yi) uniformly drawn from [a,b], [m,M] resp., i=1…N
• yi f(xi) n=n+1
M
m
a b
f(x)
g(x)
1
(x1,y1)
(x2,y2)
(x3,y3)
(x4,y4)
8
N
iixhN
I1
)(1
b
a
b
adxxxhdxxfI )()()(
1)( b
adxx
(cf. MC estimation of an expected value)
If xi, i=1…N, drawn independently from (x)
Then : unbiased estimator of I
Proof:
(x) 0 x [a,b]
•
2
IdxxxhN
xhN
EIE
N
i
b
a iii
N
ii
1
1
)()(1
)(1
)(
9
ESTIMATION OF A REACTION RATE
Transport kernel
Probabilistic transfer function: output of 1 collision entry in the next one
Collision kernel
Probabilistic transfer function: entry in 1 collision output
Compact notation:
)'().'(.'
'
')',(),,',','( 2
),'(
vvrr
rr
rr
evrvrvrT
rr
t
v
)'()','(
)]','(4
)(),',','([
),,',','( rrvr
vrv
vvrvrvrC
t
fs
)',','(';),,( vrPvrP
1)'( dPPPC
)(1)'( vedPPPT
Captures not accounted for
1
= 1 for an infinite reactor
10
Collision densities
Ingoing density: = expected number of n entering /u.t. a collision with coordinates in dP about P
Outgoing density: = expected number of n leaving /u.t. a collision with coordinates in dP about P
Evolution equations
')'()'()( dPPPTPP
dPP)(
)()()( PPP t
dPP)(
')'()'()()( dPPPCPPQP
')'()'()(
"')'()'"()"(')'()'()(
dPPPKPPI
dPdPPPTPPCPdPPPTPQP
11
Rem:
equ. of (P) = (equ. of (P)) x t(P)
Natural interpretation of n transport 1 collision after the other
Formal solution using Neumann series
Let
j(P): ingoing density after j collisions
: solution of the transport equation
Not realistic Basis for solution algorithms
)()( PIPo
...1,')'()'()( 1 jdPPPKPP jj
)()(0
PP jj
12
ESTIMATION OF A REACTION RATE
Preliminary problem
Estimation of
with
and j-1(P) : pdf + K(P’ P) : non-negative function ?
Let and
Algorithm
Sample N values of P’i from j-1(P’)
Sample next the corresponding Pi , i=1..N, from k(P|P’)
= unbiased estimator of Rj
Proof:
dPPPfR jj )()(
dPPPKPw )'()'(
')'()'()( 1 dPPPKPP jj
)'(
)'()'|(
Pw
PPKPPk
)()'(1~
1ii
N
ij PfPwN
R
jj
jj
RPPPKdPPdPf
PPPkPfPdPwdPRE
)'()'(')(
)'()'|()()'(')~
(
1
1
13
Solution of the transport equation
Estimation of
with ?
Development in Neumann series
Algorithm (run i, i = 1…N)
1. j=0 ; sample Pio from I(P) / wio with
2. Sample Pi,j+1 from
with
3. j = j + 1 ; 2 until the n is captured or exits the reactor
with
')'()'()()( dPPPKPPIP dPPPfR )()(
dPPIwio )(
dPPPfRR jj
jj
)()(00
dPPPKPw ijijji )()(1,
)(
)()|(
1, ijji
ijij Pw
PPKPPk
)(1~
1ijij
N
ij PfWN
R
ik
j
kij wW
0
14
ADVANTAGES AND DRAWBACKS
Transport = natural stochastic process No restrictive assumptions on the transport equation Solution of the whole transport problem
Optimisation of a MC game: for the estimation of one reaction rate at a time
Number of runs: large for a given accuracy
Important computer timesRather validation of classical solution schemes than
repeated calculations in industry
15
IMPROVING THE SIMULATION EFFICIENCY
Difficulties related to the estimation of low reaction rates (e.g. transmission probability through a protection wall):
Few histories giving information on the rate to be estimated A large number of histories have to be played for the
statistical accuracy of the estimations
Efficiency E of a simulation algorithm
The shorter the computer time needed by a MC algorithm to reach a given accuracy, the higher its efficiency
Increasing the efficiency
More info collected / history better estimation More interesting events biasing
E = 1/(2) 2 : variance of the MC game
: average time / history
16
FIRST MOMENT OF THE SCORE
Adjoint form of the transport equation
Estimation of
with
Importance H(P) of a n – entering a collision at P – in the estimation of R? (see chap.VI)
Direct contribution due to a collision at point P: f(P) Expected contribution due to the next collisions:
')'()'()(
"')'()'"()"(')'()'()(
dPPPKPPI
dPdPPPTPPCPdPPPTPQP
IX.2 ESTIMATORS OF A REACTION RATE
dPPPfR )()(
')'()'( dPPHPPK
17
Adjoint equation: H(P) *(P)
Expression of the reaction rate based on importance? n emitted by the source, then transported to a 1st collision
Expected contribution to the score due to a n emitted at P?
Thus
1st moment?
with
dPPPI
dPPPfR
)(*)(
)()(
')'(*)'()()(* dPPPPKPfP
')'(*)'()(1 dPPPPTPM dPPMPQR )()( 1
')'()'(')'()'()( 11 dPPMPPLdPPfPPTPM PdPPCPPTPPL~
)'~
()~
()'( (Physical interpretation ?)
18
General set of estimators
Consider the following MC algorithm:
Samplings are performed from kernels T and C Score collected along a history based on estimators
associated to each possible event:
Event Estimator
Free flight from P to P’ f(P,P’)
Capture at P’ fc(P’)
Scattering from P’ to P” fs(P’,P”)
Fission (with k secondary n) at P’ with n emitted at P”
fk(P’,P”)
19
Explicit form of the collision kernel
with ci(P’): proba that the collision at P’ is of type i , i = c,s,f
P: point outside the domain of interest (capture) Cs(P’P”): scattering kernel – distribution of the outgoing
coordinates P”, given a scattering collision takes place at P’ qk(P’): proba that a fission at P’ produces k secondary n
Ck(P’P”): fission kernel – distribution of the coordinates P” of the secondary n, given a fission producing k n takes place at P’
)"'()'()'(
)"'()'()"()'()"'(
1
PPCPkqPc
PPCPcPPPcPPC
kkk
f
ssc
20
Expected score M1’(P) from a starter at P
Contribution due to the 1st collision:
Free flight:
Capture:
Scattering:
Fission:
Contribution due to the next collisions:
')',()'( dPPPfPPT
')'()'()'( dPPfPcPPT cc
'")",'()"'()'()'( dPdPPPfPPCPcPPT sss
'")",'()"'()'()'()'(1
dPdPPPfPPCPkqPcPPT kkkk
f
)"(')"'()'('" 1 PMPPCPPTdPdP +
M1’(P)=
21
PARTIALLY NON-BIASED ESTIMATORS
Definition
For the estimation of a reaction rate
{f(P,P’), fc(P’), fs(P’,P”), fk(P’,P”)} = set of partially non-biased estimators iff
M1(P) M1’(P) P
with
and
dPPPfR )()(
')'()'(')'()'()( 11 dPPMPPLdPPfPPTPM
')'(')'(
")",'()"'()'()'(
")",'()"'()'(
)'()'()',()'(')('
1
1
1
dPPMPPL
dPPPfPPCPkqPc
dPPPfPPCPc
PfPcPPfPPTdPPM
kkkk
f
sss
cc
22
Necessary and Sufficient Condition: independent terms equal
Particular cases
Estimator f(P) in the definition of R Case without fission
Free-flight estimator
At the start of each free flight, score = expected contribution over all possible free flights
")",'()"'()'()'(
")",'()"'()'(
)'()'()',()'('')'()'()(
1
dPPPfPPCPkqPc
dPPPfPPCPc
PfPcPPfPPTdPdPPfPPTPI
kkkk
f
sss
cco
0)",'()",'()'(
)'()',(
PPfPPfPf
PfPPf
ksc
0)",'()",'()'(
)()',(
PPfPPfPf
PIPPf
ksc
o
)'()",'()'(
0)",'()',(
PfPPfPf
PPfPPf
sc
k
23
Example: escape rate out of an homogeneous slab of thickness L
We have
But
Then
Track-length estimator
dPPPfdPHxHLxPR xx )()())()()()()((
))()()()(()(
1)( xx
t
HxHLxP
Pf
)'().'(.)','()',',',,( /'xx
xxtxx vvevxvxvxT xt
')'()'()( dPPfPPTPIo
)(.),(exp)(.),(exp xx
txx
t Hx
vxHxL
vx
(H(x) = 1 if x 0, 0 else)
24
Intuitive, binary estimator of the capture rate in a volume V (analog MC algorithm)
Simulation of the free flights and collision types, and unit contribution to the score when a capture is sampled
Partially non-biased estimator associated to the free flight
Corresponding reaction rate:
0)",'()",'()',(
)'()'(
PPfPPfPPf
rPf
ks
Vc
0)",'()",'()'(
)'().'()'().'(/)'()'()',(
PPfPPfPf
rPcrPPPfPPf
ksc
VcVtc
dPPPdPPrP
P
dPPPfR
c
V
Vt
c )()()()()(
)(
)()(
Capture rate
25
SECOND MOMENT OF THE SCOREComparison of the efficiency of different estimators
Reference MC game with f(P)
2nd moment: expected value of (f(P’)+s(P”))2, where s(P”) = score obtained starting from P”, leaving the 1st collision
MC game with partially non-biased estimators (no fission)
Comparison not really obvious…
)"()"'()'('
)"()"'(")'()'('2')'()'()(
2
12
2
PMPPCPPTdP
PMPPCdPPfPPTdPdPPfPPTPM
)"(')"'()'('
)"())",'()',()("'(")'('
))',()'()('()'(')('
2
221
0
22
PMPPCPPTdP
PMPPfPPfPPCdPPPTdPC
PPfPfPcPPTdPPM
rr
srr
cc
26
ESTIMATION OF FINITE INTEGRALS
Analog estimation
Let
If xi, i=1…N, are sampled independently from (x)
Then : unbiased estimator of I, i.e.
Variance
Estimator?
s.t.
1)( b
adxx
IX.3 VARIANCE REDUCTION
b
a
b
adxxxhdxxfI )()()( (x) 0 x
[a,b]
•
N
iixhN
I1
)(1
dxxIxhsb
a)())(( 22
2
1
2 ))((1
1Ixh
Ns k
N
k
22
1
))((1
1Ixh
NN
Nk
N
k22 )( ssE
with
IIE )(
27
Importance sampling
Let
with : probability density function
If xi, i=1…N, sampled independently from
Then : unbiased estimator of I
Variance:
: better or worse?
)(~
)()(
1
1 k
kN
kki
x
xxh
NI
dxxIx
xxhs
b
ai )(~
))(
~)()(
( 22
dxxx
xxhdxxxhI
b
a
b
a)(
~
)(~
)()()()(
)(~x
)(~x
dxxx
xxhss
b
ai )())(
~)(
1)((222
28
Particular case
zero variance: !
But applicable only if the solution I is already known…
Practical use: choice of based on an approximation of I
Better variance
Statistical weight
w(xk) = corrective factor of the estimator h(x) due to changing the pdf used for the sampling
02 isI
xxhx
)()()(
~
)(~x
)(~
)()(
1
1 k
kN
kki
x
xxh
NI
)()(1
1k
N
kk xwxh
N
29
ESTIMATION OF A REACTION RATE
Preliminary problem
Estimation of
with
and j-1(P): pdf + K(P’ P): non-negative function?
Sampling?
Based on a kernel s.t.
Objective: artificially increase the number of samplings favorable to the estimation of Rj, in order to increase the statistical quality of its estimation
dPPPfR jj )()(
')'()'()( 1 dPPPKPP jj
)'(~
PPK 1)'(~ dPPPK
30
Algorithm
Sample N values of P’i from j-1(P’)
Sample the corresponding Pi , i = 1..N, from
Let the corresponding statistical weight
= unbiased estimator of Rj
Proof:
Solution of the transport equation
Estimation of
with ?
Sampling from a modified kernel
Solution in Neumann series
jj
jj
RPPPKdPPdPf
PPPKPfPPdPwdPRE
)'()'(')(
)'()''(~
)(),'(')~
(
1
1
)'(~
)'(),'(
PPK
PPKPPw
)(),'(1~
1iii
N
ij PfPPwN
R
)'(~
PPK i
')'()'()()( dPPPKPPIP dPPPfR )()(
)'(~
PPK
dPPPfRR jj
jj
)()(00
31
Algorithm (run i, i = 1…N)
1. j=0 ; sample Pio from I(P) / wio with
2. Sample Pi,j+1 from
Compute the statistical weight
3. j = j + 1 ; 2 until n is captured or exits the reactor
with
Remark
Impact of biasing the kernel on the accuracy of the results?
Cases favored by resorting to the modified kernel w < 1 Cases unfavored by resorting to the modified kernel w
> 1
A couple of unfavored samplings might ruin the statistical accuracy
Biasing: dangerous if not cautiously used
)(~
PPK ij
dPPIwio )(
)(~
)(),(
1,
1,1,1,
jiij
jiijjiijji
PPK
PPKPPw
)(1~
1ijij
N
ij PfWN
R
ik
j
kij wW
0
32
EQUATION OF THE FIRST MOMENT
MC game based on the definition of the reaction rateReminder: analog case
Biased case
Let be the first moment of the score obtained from a starter n emitted at P with a unit statistical weight
Let W: statistical weight of the n at P
W’(P,P’): weight after a free flight from P to P’
W”(P’,P”): weight after a collision at P’ exited at P”
)"()"'(")'('
')'()'()(
1
1
PMPPCdPPPTdP
dPPfPPTPM
)"(~
")"'(~
")'(~
'
')'(')'(~
)(~
1
1
PMWPPCdPPPTdP
dPPfWPPTPMW
)(~
1 PM
33
MC game with partially non-biased estimatorsReminder: analog case
Biased caseW: statistical weight of the n at PW’(P,P’): weight after a free flight from P to P’W”(P’,P”): weight after a collision from P’ to P”
Wc(P,P’): weight due to the capture at P’ of a n emitted at P
Ws(P’,P”): weight due to a scattering from P’ to P” of 1 n emitted at P
Wk(P’,P”): weight due to a fission from P’ to P” of 1 n emitted at P
)"()"'(")'('
")",'()"'()'()'(
")",'()"'()'(
)'()'()',()'(')(
1
1
1
PMPPCdPPPTdP
dPPPfPPCPkqPc
dPPPfPPCPc
PfPcPPfPPTdPPM
kkkk
f
sss
aa
34
Biased case
Estimation with no bias?
)"(~
")"'(~
")'(~
'
")",'()"'(")'()'(~
")",'()"'(")'(~
)'()'(~)',(')'(')(~
1
1
1
PMWPPCdPPPTdP
dPPPfPPCWPkqPc
dPPPfPPCWPc
PfPcWPPfWPPTdPPMW
kkkkk
f
ssss
ccc
dPPMPQdPPMPQ )()()(~
)(~
11
35
EXAMPLES OF BIASED KERNELS
Estimation of the escape probability (see above)
Slab of thickness L, 1D-model
analog case:
Track-length estimator
Expected value of the escape probability accounted for from the start of any free flight
No additional info if this event of leak is actually sampledTransport kernel biased to prevent this non-informative
situation to occur and extend the interesting runs
')()(exp)'()'(
x
xx
Ltt
duuuxxxT
)(.
)(.)()(.)(exp
)(exp)'(
)'(~
'
x
Hdu
uHdu
u
duux
xxT L
x
x
ox
tx
L
xx
t
x
xx
tt
36
Estimation of the capture rate in a volume V (see above)Analog case: use of the collision kernel
Estimator associated to the free flight and scoring cc(P’)Expected value of the capture probability at the end of each
free flightNo additional info if capture is actually sampledCollision kernel biased to prevent this non-informative
situation to occur and extend the interesting runs
Remark
In both cases, “risk-free” biasing: Augmentation of the number of favorable cases No loss of information Statistical accuracy ok (all weights < 1)
BUT no stopping criterion of a history !
37
Russian roulette
If the weight W of a history goes below a threshold Wo:
Sampling of a random number , uniformly distributed on [0,1]
If < Wo, then the history goes on with a weight W / Wo
Else, the history is killed
Bias?
Expected value of the weight after a roulette:
E(W) = (W / Wo).P(history kept) + 0.P(history killed)
= W