nanoHUB.org online simulations and more
1
ME 595M: Monte Carlo Simulation
T.S. FisherPurdue University
nanoHUB.org online simulations and more
2
Monte Carlo Simulation
• BTE solutions are often difficult to obtain♦ Closure issues force the use of BTE moments
• Inherent approximations♦ Ballistic transport is often not described well by perturbed
equilibrium distributions
• Instead, seek to track representative carriers and use statistical averaging to predict transport behavior♦ Monte Carlo methods are essentially averaging or integration tools
• In neither case can we easily incorporate quantum (wave) effects
nanoHUB.org online simulations and more
3
Scattering
• Treatment of scattering underlies almost all MC methods
• Consider electron scattering mechanisms♦ Acoustic deformation potential (ADP)
♦ Intervalley scattering by phonon absorption
♦ Others (τ3-1, τ4
-1, …)• Combine with Mathiessen’s rule
( )13
1
1 2 10 ( ) /E p q= ×τ
( )13
2
1 1.5 10 ( ) / 0.050E p q= × +τ 1( )
( )
(Effective Scattering Rate)ii
pp
Γ =τ∑
nanoHUB.org online simulations and more
4
Combining Scattering Events
Lundstrom Fig. 6.1
nanoHUB.org online simulations and more
5
Equation of Motion
• The most complex transport equation employed in most MC simulations is Newton’s law, F=ma
• Collision times are typically much smaller than free-flight times♦ Collisions are treated as instantaneous events
• Carrier position can be expressed as an integral of velocity
d qdt
= = −epF E
0( ) (0) ( ') '
tt t dt= + ∫r r v
nanoHUB.org online simulations and more
6
Free Flight
• Consider an electron under the action of an electric field directed along the z-axis
• Position relations become
( ) (0)( ) (0)
( ) (0) ( )
x x
y y
z z z
p t pp t p
p t p q t
=
=
= + − E
*
*
(0)( ) (0)
(0)( ) (0)
( ) (0)( ) (0)( )
x
y
z
px t x tm
py t y t
mE t Ez t z
q
= +
= +
−= +
− E
last equality derivesfrom the parabolic energy band assumption
E in numeratoris energy
nanoHUB.org online simulations and more
7
Ensemble Scattering
• Consider a collection of carriers of concentration nCF that have not undergone scattering since time t=0
• Assume a constant scattering rate Γ0 (for now)• The time evolution of nCF is expressed
mathematically as
♦ solution
0CF
CFdn n
dt= −Γ
0( ) (0) tCF CFn t n e−Γ=
nanoHUB.org online simulations and more
8
Scattering Probability and Time
• Probability that an electron survives until time t without scattering is
• Probability that a carrier undergoes its first collision between t and t+dt is the scattering rate times the survival probability
0( )(0)
tCF
CF
n t en
−Γ=
00( ) tP t dt e dt−Γ= Γ
nanoHUB.org online simulations and more
9
Random Selection• Now we wish to choose a random number such that the
probability of choosing a number between r and r+dr equals the probability of selecting a collision time between t and t+dt
• Note that r1 is also a uniformly distributed random number between 0 and 1
• Foregoing equation relates random numbers to collision times
0
0
0
10 0
( ) ( )let P(r) = 1 for a random number generator between 0 and 1
11 1ln(1 ) ln( )
c
t
tc
c c
P r dr P t dt
dr e dt
r e
t r r
−Γ
−Γ
=
→ = Γ
→ = −
→ = − − = −Γ Γ
nanoHUB.org online simulations and more
10
Self-Scattering
Lundstrom Fig. 6.4
nanoHUB.org online simulations and more
11
Collision Distributions
Lundstrom Fig. 6.5
tc based on all scattering events (includingself-scattering)
tc based on only realscattering events (not includingself-scattering)
0
1ct ≈
Γ
1( )ct p
≈Γ
nanoHUB.org online simulations and more
12
Identification of Scattering Events
• After selecting the duration of free flight (tc), we must properly choose the type of scattering event that occurs
• Each scattering mechanism can alter the particle’s momentum (direction and magnitude) differently
• Ultimately, the choices must be proportional to the relative likelihoods of occurrence
nanoHUB.org online simulations and more
13
Cumulative Scattering Probabilities• Consider k possible scattering mechanisms
• Imagine a cumulative bar chart that includes a sum of the fractional probabilities of each type
• Choose a uniformly distributed random number r2 between 0 and 1
• Select scattering event l if the following holds1
1 12
0 0
1 1( ) ( )
l l
i ii ip pr
−
= =τ τ≤ <
Γ Γ
∑ ∑
nanoHUB.org online simulations and more
14
Graphical Interpretation
• Lundstrom, Fig. 6.8
nanoHUB.org online simulations and more
15
Selecting a Final State• Generally the most expensive part of the computation
• Must select the final magnitude of momentum (energy) andits direction
• Consider particle states immediately before (tc-) and after (tc+) scattering
♦ assumes parabolic energy bands♦ ΔE is a fundamental characteristic of the scattering event (e.g.,
ΔE=0 for elastic scattering, ΔE ~ ħω for events involving phonons)
( )*( ) ' 2c cp t p m E t E+ −⎡ ⎤≡ = + Δ⎢ ⎥⎣ ⎦
nanoHUB.org online simulations and more
16
Selecting a Final Direction• Align local coordinate system with initial momentum
vector p• Assume azimuthal invariance
• Thus, we can select azimuthal angle from a uniformly distributed random number r3 as β=2πr3
LundstromFig. 6.9
2
0
1( ) 1 ( )2
P d P d dπ
β β = → β β = βπ∫
nanoHUB.org online simulations and more
17
Determination of the Polar Angle
• Scattering often depends on the polar angle; hence, its treatment is more complicated
• If we assume a simple delta-function scattering mechanism [S~δ(E’-E)], then
22
0 02
20
0 0 0
sin ( ) ' '
( ) 1 ( )
( ) sin '
d S d p dp
P d P d
S d d p dp
∞ π
π
∞ π π
α α β
α α = → α α =
α α β
∫ ∫∫
∫ ∫ ∫
p, p'
p, p'
sin( )2
dP d α αα α =
nanoHUB.org online simulations and more
18
Final Polar Angle• Now we seek another uniformly distributed random
number r4 between 0 and 1 to satisfy
• Finally, we find p’ in the local coordinate system as
• Last step involves transformation from local to global coordinates
( )4
40 0
sin( ) ( ) ( ) 12
1 1sin ' ' 1 cos cos 1 22 2
r
dP r dr P d P r
dr d rα
α α= α α = → =
→ = α α = − α → α = −∫ ∫
' sin cos' sin sin' cos
ppp
α β⎛ ⎞⎜ ⎟= α β⎜ ⎟⎜ ⎟α⎝ ⎠
p'
nanoHUB.org online simulations and more
19
Other Monte Carlo Topics• Ensemble vs. incident flux approaches
♦ Ensemble follows particles in parallel in a time-stepping procedure
• Uses “superelectron” approximation♦ Incident flux follows each particle sequentially from
beginning to end• Treatment of Coulomb effects
♦ Charged particles alter the local field through Coulomb interactions
♦ Can be handled by summing individual contributions♦ If foregoing is too onerous, then particle-in-cell-type
methods can be applied♦ Must ensure that the size of the time step does not
exceed natural fluctuations at the plasma frequency
nanoHUB.org online simulations and more
20
Relation between Monte Carlo Simulation at the BTE• Consider a 1D slab on infinitesimal thickness that
contains a single particle trajectory
• Apply the chain rule
( , ) ( ), and( , ) ( ( )) ( ( ))i
i
n tf t t tδ = δ −
δ = δ − δ −i
i i
r r rr, p r r p p
, ,but we notice that
and
now sum over all trajectories
i i
i i
i i
i
ir i p i
r i p icoll
r p r p
ip i
coll coll
r pcoll
f d df ft dt dt
f f qt
f f
fft t
f ff q ft t
∂δ= ∇ δ ⋅ + ∇ δ ⋅
∂⎛ ⎞∂
= ∇ δ ⋅ + ∇ δ ⋅ − +⎜ ⎟∂⎝ ⎠∇ δ = −∇ δ
⎛ ⎞ ∂δ∂∇ δ ⋅ =⎜ ⎟∂ ∂⎝ ⎠
∂ ∂+ ∇ ⋅ − ⋅∇ =
∂ ∂
i i
i
i
r p
pv E
p
v E
nanoHUB.org online simulations and more
21
Homework Problem
1. Two parallel infinite plates2. Particles leave the same spot on the
source plate at a fixed initial velocity3. Assume no interactions among particles,
i.e. neglect the force between particles4. Particles scatter with a constant cross
section5. Post-collision velocity will be determined
by the model provided6. The spacing is so small that, for each
particle, at most one collision would occur
7. Determine the radial and angular distributions on the collector, and the total number of collisions
Emitter
Collector x
nanoHUB.org online simulations and more
22
Code Breakdown
• Data structure:♦ What do we use to represent a particle?
• Something to bind together all the interesting kinetic properties of particles
• A “particle” class in C++• A “particle” structure in C• A n by 7 array in C/C++, matlab, or Fortran 77
zyx3
zyx2
zyx1yVxV zV
xV
xV yV
yVzV
zV
nanoHUB.org online simulations and more
23
Algorithm
nanoHUB.org online simulations and more
24
Algorithm Breakdown
• Generate the particles at the emitter♦ Set the Vx according to the initial energy, assuming y, z
velocity components of particles are neligible
♦ Set X,Y,Z to zero
0,0,/2 === zyx VVmEV
0,0,0 === ZYX
nanoHUB.org online simulations and more
25
Move particles
• What time step to use?
• Recommendation: ~ 1 femtosecond or less
1.0)exp(1)( <Δ−−=Δ tntP συ
tL Δ>υ
nanoHUB.org online simulations and more
26
Position Updates
dtzz
dtyy
dtxx
znn
ynn
xnn
υ
υ
υ
=−
=−
=−
+
+
+
1
1
1
nanoHUB.org online simulations and more
27
Collision
• Calculate the probability:
• Select a random number• If r<P, then a collision occurs• See notes about polar scattering angle and
azimuthal angle• See notes about post-collision velocity
)exp(1)( tntP Δ−−=Δ συ[0,1]r∈
nanoHUB.org online simulations and more
28
Parameters
• Number of particles: N=50,000• Initial kinetic energy of all particles: E=5eV
• Gap: L = 10 nm• Cross-section, σ = 10-18 m2
• Number density of media (target particles), n = 2.5x1025 m-3
• Assume that all scattering is elastic
221 υemE =
nanoHUB.org online simulations and more
29
Record the particle information
• When the particle hits the collector or the emitter, we assume it is absorbed without other side effects
• The final particle positions should be stored only for particles that have collided