1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked...

34
1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the integral Boltzmann Attacking the integral Boltzmann Transport Equation with our new Transport Equation with our new methodology. methodology. Presentation of the integral equation Presentation of the integral equation Reformulation into Neumann Reformulation into Neumann Breaking it into convenient “event” Breaking it into convenient “event” pieces pieces MC attack of Neumann linked equations MC attack of Neumann linked equations Event-based tallies Event-based tallies

Transcript of 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked...

Page 1: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

1

Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport EqnLesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn

• Neumann self-linked equationsNeumann self-linked equations• Attacking the integral Boltzmann Transport Attacking the integral Boltzmann Transport

Equation with our new methodology.Equation with our new methodology.• Presentation of the integral equation Presentation of the integral equation • Reformulation into NeumannReformulation into Neumann• Breaking it into convenient “event” piecesBreaking it into convenient “event” pieces• MC attack of Neumann linked equationsMC attack of Neumann linked equations• Event-based talliesEvent-based tallies

Page 2: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

2

Sampling from recurring equations: Neumann seriesSampling from recurring equations: Neumann series

• Sampling from recurring equations introduces a Sampling from recurring equations introduces a complexity: We cannot use the above procedure complexity: We cannot use the above procedure because, the procedure requires that we sample because, the procedure requires that we sample from from f(x)f(x) on the right-hand side in order to sample on the right-hand side in order to sample from from f(x)f(x) on the left-hand side. on the left-hand side.

• However, for linear occurrences of However, for linear occurrences of f(x)f(x) on the right- on the right-hand side, we can "bootstrap" a solution by hand side, we can "bootstrap" a solution by representing representing f(x)f(x) as an infinite Neumann series: as an infinite Neumann series:

on BOTH sides of the equation and properly lining on BOTH sides of the equation and properly lining up terms.up terms.

xfxfxfxf 210

Page 3: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

3

Neumann series (2)Neumann series (2)

• If we have the general linear recurring integral If we have the general linear recurring integral equation:equation:

with known “source” term with known “source” term q(x)q(x) and linear operator and linear operator K(x’,x)K(x’,x), we can substitute to get:, we can substitute to get:

• We can “line up” the left hand and right hand terms We can “line up” the left hand and right hand terms in the following way:in the following way:

xdxfxxKxqxf

,)()(

dxxfxfxxKxqxfxf

...)()(,)(...)()( 1010

Page 4: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

4

Neumann series (3)Neumann series (3)

• Obviously, the sum of the solutions of these Obviously, the sum of the solutions of these coupled equations obeys the original equation.coupled equations obeys the original equation.

• We solve them sequentially, eliminating the circular We solve them sequentially, eliminating the circular dependencedependence

• Of course, this procedure has an infinite number of Of course, this procedure has an infinite number of steps for each sample of , so it will have to be steps for each sample of , so it will have to be truncated somehow, but -- before worrying about truncated somehow, but -- before worrying about that -- let us first look at an example.that -- let us first look at an example.

dxxfxxKxf

dxxfxxKxf

xqxf

kk )(,)(

)(,)(

)()(

1

01

0

Page 5: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

5

Neumann series (4)Neumann series (4)

• Example: Develop an infinite sampling Example: Develop an infinite sampling procedure for the recurring equation:procedure for the recurring equation:

• Answer: Integrating the differential equation Answer: Integrating the differential equation over x from 0 to x (and applying the over x from 0 to x (and applying the boundary condition) gives us the recurring boundary condition) gives us the recurring integral equation:integral equation:

30,10, xfxfdx

xdf

30,1

0

xduufxfx

Page 6: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

6

Neumann series (5)Neumann series (5)

• If we insert the infinite Neumann series for If we insert the infinite Neumann series for the function on both sides, we get the the function on both sides, we get the following coupled equations:following coupled equations:

duufxf

duufxf

xf

x

ii

x

0

1

0

01

0 1

Page 7: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

7

Neumann series (6)Neumann series (6)

Since the function Since the function f(x)f(x) is the infinite sum of is the infinite sum of these, the procedure to sample from is:these, the procedure to sample from is:

1. Sample from using:1. Sample from using:

2. Sample from using the above sample:2. Sample from using the above sample:

xf0

0 0 0 0 0

00 0

,

1n i i i

ii i

f x f x x w x x

wx

xf1

1 1

1 1 1 1 1

0 0 00 0 10 0

11 1 1 1 1 1

,

0, ,

i i

i i i i

x x

i i ii i i

ii i i i i i

f x f x x w x x

f u du w x x duw x x

wx x x

Page 8: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

8

Neumann series (7)Neumann series (7)

3. Sample from using the above sample:3. Sample from using the above sample:

……Sample from using the above sample:Sample from using the above sample: 1nf x

xf2

2 2

2 2 2 2 2

1 1 11 1 20 0

22 2 2 2 2 2

,

0, ,

i i

i i i i

x x

i i ii i i

ii i i i i i

f x f x x w x x

f u du w x x duw x x

wx x x

, 1 , 1

1 , 1 , 1 , 1 , 1

, 10 0, 1

, 1 , 1 , 1 , 1 , 1 , 1

,

0, ,

i n i n

n i n i n i n i n

x x

in in inin in i n

i n

i n i n i n i n i n i n

f x f x x w x x

f u du w x x duw x x

wx x x

Page 9: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

9

Neumann series (8)Neumann series (8)

Observations:Observations:1.1. The procedure is infinite in theory, but not infinite in practice because The procedure is infinite in theory, but not infinite in practice because

as soon as we pick a value of x that is SMALLER than the one as soon as we pick a value of x that is SMALLER than the one before it, then the weight will go to zero. Once this happens, of before it, then the weight will go to zero. Once this happens, of course, we can ignore the higher order f's because they will be zero course, we can ignore the higher order f's because they will be zero as well. What else could we do to terminate the sequence?as well. What else could we do to terminate the sequence?

2.2. We must remember that it is not a single sample of We must remember that it is not a single sample of ff00(x)(x) or or ff11(x)(x) , etc., , etc.,

that constitutes our sample of the function, but ALL OF THEM that constitutes our sample of the function, but ALL OF THEM together. Therefore, the i'th sample of together. Therefore, the i'th sample of f(x)f(x) is, formally: is, formally:

Note: We do NOT divide by the number of Note: We do NOT divide by the number of contributions to the icontributions to the ithth sample sample

ijijj

i xxwxf

0

Page 10: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

10

Neumann series (9)Neumann series (9)

Observations:Observations:3.3. Therefore, if we improve our approximation by Therefore, if we improve our approximation by

taking N samples, the combined best result would taking N samples, the combined best result would be:be:

• As a practical matter, point 2 means that our coding As a practical matter, point 2 means that our coding must collect data in "sample bins" -- i.e, which must collect data in "sample bins" -- i.e, which collect data from individual Neumann terms within a collect data from individual Neumann terms within a single sample -- and, at the end of the sample, single sample -- and, at the end of the sample, contribute from the "sample bins" to the overall contribute from the "sample bins" to the overall "solution bins"."solution bins".

N

i

ijijj

N

xxf

xf1

0

Page 11: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

11

Convergence of recurring equationsConvergence of recurring equations

• You should be aware that there is a good You should be aware that there is a good possibility that a “straight-forward” possibility that a “straight-forward” application of the procedure for recurring application of the procedure for recurring equations will result in a equations will result in a divergentdivergent procedureprocedure

• Convergence is guaranteed only if the Convergence is guaranteed only if the eigenvalues of the recurrence operator K in:eigenvalues of the recurrence operator K in:

have magnitude less than one.have magnitude less than one.

xdxfxxKxqxf

,)()(

Page 12: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

12

TalliesTallies

• All of this discussion has been focused on All of this discussion has been focused on sampling a functionsampling a function at a point. at a point.

• BUT, it is more common for us to be BUT, it is more common for us to be interested in INTEGRALS of the functions—interested in INTEGRALS of the functions—e.g., reaction rates in a cell.e.g., reaction rates in a cell.

• These integrals are referred to as These integrals are referred to as talliestallies and most of them represent a physical or and most of them represent a physical or mathematical value we want to knowmathematical value we want to know

• In our current sampling strategy, our In our current sampling strategy, our samples include Dirac deltas, so our only samples include Dirac deltas, so our only choice for these tallies is to create integral choice for these tallies is to create integral tallies using the samples:tallies using the samples:

Page 13: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

13

Tallies (2)Tallies (2)

• Although tallies are not mathematically Although tallies are not mathematically necessary (one could keep the and necessary (one could keep the and for later use), almost all MC codes use them for later use), almost all MC codes use them to save storage.to save storage.

0

( )

(Non-recurring)

(Recurring)

i i

iij ij

j

I R x f x dx

R x w

IR x w

iw ix

Page 14: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

14

Presentation of Boltzmann EquationPresentation of Boltzmann Equation

• The integral form of the Boltzmann Transport Equation:The integral form of the Boltzmann Transport Equation:

• NOTE: Throughout this lecture, to simplify the notation, I DO NOT use any vector NOTE: Throughout this lecture, to simplify the notation, I DO NOT use any vector symbols. You need to remember that and are position and direction, symbols. You need to remember that and are position and direction, respectively.respectively.

rr Ω

Page 15: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

15

Reformulation into NeumannReformulation into Neumann

• Since flux appears on the right hand side as Since flux appears on the right hand side as well as the left, we have the same well as the left, we have the same “bootstrap” problem as the traditional “bootstrap” problem as the traditional recurrence operator equation—No place to recurrence operator equation—No place to start.start.

• We solve it the same way: By creating a We solve it the same way: By creating a Neumann sequence that begins with the Neumann sequence that begins with the equation that has a RHS source term that equation that has a RHS source term that does NOT depend on either variable and does NOT depend on either variable and then building from there.then building from there.

Page 16: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

16

Reformulation into Neumann (2)Reformulation into Neumann (2)

• We get:We get:

• Note: Note: It is handy to remember that the Neumann superscript It is handy to remember that the Neumann superscript corresponds to how many times the particle has collidedcorresponds to how many times the particle has collided

0

, , , ,jj

r E r E

Page 17: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

17

MC attack of Neumann linked equationsMC attack of Neumann linked equations

• So far, of course, we have done no Monte So far, of course, we have done no Monte Carlo. We have only created a Neumann Carlo. We have only created a Neumann sequence for the Boltzmann Transport sequence for the Boltzmann Transport Equation. Equation.

• We could, if we wanted to (and knew how), solve We could, if we wanted to (and knew how), solve it deterministically.it deterministically.

• Now we have to approximate this Neumann Now we have to approximate this Neumann sequence one term at a time using the sequence one term at a time using the Monte Carlo tools that we have learnedMonte Carlo tools that we have learned

Page 18: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

18

Application of MC methodologyApplication of MC methodology

• Recall that the essence of our formal MC Recall that the essence of our formal MC methodology is to replace functions of methodology is to replace functions of continuous variables with function that contain continuous variables with function that contain stochastic variables.stochastic variables.

• For multidimensional Dirac approximation:For multidimensional Dirac approximation:

• Let us apply this to the Neumann coupled Let us apply this to the Neumann coupled equation setequation set

Page 19: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

19

Application of MC methodologyApplication of MC methodology

• The steps for this are straightforward, but fraught with tedious The steps for this are straightforward, but fraught with tedious opportunities for error!opportunities for error!

• For each coupled equation from Neumann:For each coupled equation from Neumann:1.1. Create the formal MC approximation weight definition with the Create the formal MC approximation weight definition with the

function (LHS of Neumann Eq evaluated at chosen values of function (LHS of Neumann Eq evaluated at chosen values of independent variables) in the numerator and pdf’s for all of the independent variables) in the numerator and pdf’s for all of the variables in the denominator (with any variable NOT changing variables in the denominator (with any variable NOT changing having a Dirac distribution at current value as its pdf)having a Dirac distribution at current value as its pdf)

2.2. Replace the numerator with the RHS equivalent from the Replace the numerator with the RHS equivalent from the Neumann Eq.Neumann Eq.

3.3. Replace any previously-MC-approximated term in the numerator Replace any previously-MC-approximated term in the numerator with the MC approximationwith the MC approximation

4.4. Work out the resulting definition of the weight (with the pdf’s Work out the resulting definition of the weight (with the pdf’s unspecified)unspecified)

5.5. (Just for interest) Plug in some typical (e.g., physical) pdfs to see (Just for interest) Plug in some typical (e.g., physical) pdfs to see what the weights do.what the weights do.

Page 20: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

20

0th order term0th order term

• We start with:We start with:

• Since there is an integral we have to sample something Since there is an integral we have to sample something inside. The obvious choice is the S(..) term, which we sample inside. The obvious choice is the S(..) term, which we sample using:using:

• wherewhere

Page 21: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

21

0th order term0th order term• Substituting this gives us:Substituting this gives us:

• We still have an integral in R, so we sample the exponential:We still have an integral in R, so we sample the exponential:

• And substitute to give us:And substitute to give us:

Page 22: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

22

0th order term0th order term• where:where:

• You may wonder why the total cross section isn’t just You may wonder why the total cross section isn’t just incorporated into the weight, incorporated into the weight,

• The answer is just that it is traditional to not do this, so The answer is just that it is traditional to not do this, so that analog procedures will keep the weight at 1.00that analog procedures will keep the weight at 1.00

• (You may have noticed how well the numerators fit the (You may have noticed how well the numerators fit the “traditional” or “natural” PDFs we have studied“traditional” or “natural” PDFs we have studied

Page 23: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

23

i+1st termi+1st term• For the other Neumann term(s), we use an inductive For the other Neumann term(s), we use an inductive

procedure where we assume that we have a MC procedure where we assume that we have a MC approximation for the ith flux:approximation for the ith flux:

• and substitute it into the i+1and substitute it into the i+1stst equation to get: equation to get:

Page 24: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

24

i+1st term (cont’d)i+1st term (cont’d)• Which reduces to:Which reduces to:

• This is still continuous in direction and energy, so we sample This is still continuous in direction and energy, so we sample these variables (through the scattering cross section) to get:these variables (through the scattering cross section) to get:

Page 25: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

25

i+1st term (cont’d)i+1st term (cont’d)• Again, the one remaining integral is dealt with by sampling R:Again, the one remaining integral is dealt with by sampling R:

• which we substitute to get:which we substitute to get:

• wherewhere

Page 26: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

26

Putting it togetherPutting it together

• Putting the pieces together, we get:Putting the pieces together, we get:

• which is a sample of a SINGLE history (through its N scatters)which is a sample of a SINGLE history (through its N scatters)

Page 27: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

27

Putting it together (2)Putting it together (2)

• As we discussed before, we can deal with the infinite As we discussed before, we can deal with the infinite summation BY:summation BY:

1.1. Recognizing (from the fact that each weight is a multiple of Recognizing (from the fact that each weight is a multiple of the previous one) that once a weight goes to 0, all remaining the previous one) that once a weight goes to 0, all remaining weights need not be computed; andweights need not be computed; and

2.2. Forcing a weight to zero (with non-zero probability) using one Forcing a weight to zero (with non-zero probability) using one of two techniques:of two techniques:

A.A. Define the PDFs so that there is a non-zero probability Define the PDFs so that there is a non-zero probability that the NUMERATOR at the chosen point will be zero; orthat the NUMERATOR at the chosen point will be zero; or

B.B. Introduce an artificial “choice” with non-zero probability of Introduce an artificial “choice” with non-zero probability of going to zero. Russian Roulette works well (and can be going to zero. Russian Roulette works well (and can be introduced anywhere you want it):introduced anywhere you want it):

0 1

ji

ji

w with probability p

w p

with probability p

Page 28: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

28

From general to specific MC algorithmFrom general to specific MC algorithm

• Since the previous equations for the weights include unspecified Since the previous equations for the weights include unspecified PDFs, we can convert them into a programmable SPECIFIC PDFs, we can convert them into a programmable SPECIFIC algorithm by choosing the PDFsalgorithm by choosing the PDFs

• Each pdf used must obey three rules:Each pdf used must obey three rules:

1.1. The pdf must be non-negative.The pdf must be non-negative.

2.2. The integral of the pdf over its selection domain must be 1. The integral of the pdf over its selection domain must be 1. (Integration of a function over the complete problem domain will (Integration of a function over the complete problem domain will be denoted as .)be denoted as .)

3.3. The pdf must be non-zero for all values of its selection domain The pdf must be non-zero for all values of its selection domain for which a non-zero contribution to any tally is possible. for which a non-zero contribution to any tally is possible.

, ,f x y

Page 29: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

29

Analog specific algorithmAnalog specific algorithm

• To tie us into the previous event-based development, we next To tie us into the previous event-based development, we next develop the “analog” specific algorithm:develop the “analog” specific algorithm:

• One can either interpret the word “analog” in it physical One can either interpret the word “analog” in it physical sense: Following nature’s rules or in the Monte Carlo sense: Following nature’s rules or in the Monte Carlo sense of “keeping the weights equal to 1”sense of “keeping the weights equal to 1”

• To get started we bring together the three weight equations To get started we bring together the three weight equations from previous slides:from previous slides:

Page 30: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

30

Analog specific algorithmAnalog specific algorithm

• The analog approach starts off by making the denominators The analog approach starts off by making the denominators equal the numerators (with proper normalization), that is:equal the numerators (with proper normalization), that is:

Page 31: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

31

Analog specific algorithmAnalog specific algorithm

• Substituting these gives us the resulting weights of:Substituting these gives us the resulting weights of:

• Since it is our desire in “analog” simulations to always be Since it is our desire in “analog” simulations to always be following particles with weight of 1, we “fix” these by the following particles with weight of 1, we “fix” these by the setting the initial particle weight to 1 (leaving it to the user or setting the initial particle weight to 1 (leaving it to the user or coder to multiply times the total source strength) and use:coder to multiply times the total source strength) and use:

Page 32: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

32

Cell-averaged talliesCell-averaged tallies

• Once we have a MC estimate of the flux, then the MC Once we have a MC estimate of the flux, then the MC estimate integral tallies are just a substitutionestimate integral tallies are just a substitution

• This is most easily shown for a cell average tally where:This is most easily shown for a cell average tally where:

• SubstitutingSubstituting

,

0 4

, , , , /cell

x cell x cell

V

T dr dE R r E r E V

,

1 0

ˆ ˆˆ , ,1 ˆ ˆˆlimˆˆ ,

Ix ij ij ij

x cell ij ji ji jiI

i j t ij ij cell

R r ET w r r E E

I r E V

1 0

1 ˆ ˆˆ, , limˆˆ ,

Iji

ji ji jiI

i j t ji ji

wr E r r E E

I r E

Page 33: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

33

HomeworkHomework

Page 34: 1 Lesson 9: Solution of Integral Equations & Integral Boltzmann Transport Eqn Neumann self-linked equations Neumann self-linked equations Attacking the.

34

HomeworkHomework