3
$\begingroup$

How do I simulate the motion of an electron in 2D for a classic case of elastic scattering considering a certain electron emitted from a source and colliding with other particles in vacuum using Monte Carlo method? And thus to determine the mean free path and its direction for ten collisions.

I will really appreciate any help, and if anyone know where I can find similar resources that would help me to understand this since it is a new field for me, I will appreciate greatly.

$\endgroup$
11
  • 2
    $\begingroup$ I think you should add context to your question. As it is, it is not clear what regime is should be used for the electron (classical? or semiclassical?) and what kind of scattering is implied. $\endgroup$ Commented Sep 8, 2022 at 10:08
  • $\begingroup$ you should also say with what is the electron to collide? in vacuum? $\endgroup$
    – anna v
    Commented Sep 8, 2022 at 10:21
  • $\begingroup$ Thank you all for your inputs. It is a classical case of an elastic scattering, where a particular election emitted from a source collide with other particles in a vacuum. I am to simulate it's motion as it collide with other particles and to determine the mean free path and its direction for ten different collisions. I really value all your inputs, thanks greatly 🙏 $\endgroup$ Commented Sep 8, 2022 at 11:04
  • $\begingroup$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. $\endgroup$
    – Community Bot
    Commented Sep 8, 2022 at 11:49
  • $\begingroup$ I will do that, Thank you $\endgroup$ Commented Sep 8, 2022 at 11:52

1 Answer 1

3
$\begingroup$

From the description in the post and comments, this is basically an $n$-body simulation with (1) collisions and (2) Brownian motion as the driver of motion.

For any $n$-body simulation, you need to evolve the following two differential equations, \begin{align} \frac{\mathrm{d}\mathbf{x}_i}{\mathrm{d}t}&=\mathbf{v}_i \\ m\frac{\mathrm{d}\mathbf{v}_i}{\mathrm{d}t}&=\sum_j\mathbf{F}_{ij} \end{align} where the $i$ indicates one of the $n$ particles. In many cases, $\mathbf{F}$ is the gravitational force; in other cases, the Lorentz force is used (in which case this is generally called a particle in cell simulation due to added complexities of the background field). Since you are interested in the random motion of the particles in the space, you should be able to use a Langevin equation, $$m\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t}=-\lambda\mathbf{v}+{\boldsymbol\eta}(t)$$ where ${\boldsymbol\eta}(t)$ is the stochastic white noise term. This also can be written as a stochastic differential equation, $$m\,\mathrm{d}\mathbf{v}=-\lambda\mathbf{v}\mathrm{d}t+\mathrm{d}W$$ where $\mathrm{d}W$ is the Wiener process. Note that I am assuming that the particles don't interact with each other except through collisions, which I'll discuss later; if there are interactions with forces, then those need to be addressed in your force equation.

These can be evolved using pretty simple Euler integration scheme (see also my answer here), so for a single time step, you would have an update like,

for n = 1 to num_particles
    x[n] = x[n] + v[n] * dt
    v[n] = (1 - lambda * dt / m) * v[n] + dW(dt) / m

where dW(dt) returns a random normal value with mean 0 and variance dt.

After each update, you need to check the distance between all of the particles to see if any two are "close enough" to be considered as colliding. This is naively a $\mathcal{O}(n^2)$ comparison, though I imagine more intelligent systems have been developed & could be used. If any two particles are close enough, you need to compute the resulting velocities given your elastic scattering formula.
Likewise, if you are considering your domain to be rigid, then you need to also compute reflections off the walls for particles that are also close to the wall. For periodic boundaries, you would need to check particles that crossed one wall and place it at the other side (e.g., $x_i\sim1.03\to0.03$ when considering a domain of (0,1))

Overall, your simulation outline would be something like,

  1. Initialize everything ($\mathrm{d}t$, number of particles, positions, velocities, etc)
  2. While the number of collisions are less than 10:
    1. Evolve the particles one time step using the Euler update above
    2. Check for collisions between particles & increment the collision counter as necessary
    3. Check for collisions with the wall or, alternatively, check for wrapping if using periodic boundaries
    4. Increment total time by $\mathrm{d}t$ (may not be necessary, but might be useful)
    5. Output useful details (e.g., current time, iteration, collisions detected, etc) then return to step 2.1

Processing for the mean free path can be done somewhere in the "check for scattering" part, assuming you know the particles' initial positions.

$\endgroup$
7
  • $\begingroup$ Should it be v[n-1] on the rhs of your second line in your FOR loop? $\endgroup$ Commented Sep 8, 2022 at 14:35
  • 1
    $\begingroup$ @honeste_vivere n is the particle index, not time or space. The RHS would be at the previous time step and the LHS the updated value. $\endgroup$
    – Kyle Kanos
    Commented Sep 8, 2022 at 14:59
  • $\begingroup$ Ah okay, I misunderstood how Fortran indexes arrays ;) [I've only played with VAX/ALPHA Fortran in the past for necessity in short bursts] $\endgroup$ Commented Sep 8, 2022 at 15:02
  • 1
    $\begingroup$ Well that's not exactly Fortran. More like a hodge-podge of Python & VBA. I tried making it language agnostic, but I guess I could have been more explicit on that :D $\endgroup$
    – Kyle Kanos
    Commented Sep 8, 2022 at 15:23
  • 1
    $\begingroup$ @honeste_vivere great memory to remember that from ages ago! Unfortunately for me, Fortran isn't too common in banking so I've had to forget everything I knew about it and learn C++, VBA and, more recently, Rust. $\endgroup$
    – Kyle Kanos
    Commented Sep 8, 2022 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.