Consider a set of discrete "states" $|1\rangle,|2\rangle,|3\rangle,\dots,|N_{\text{max}}\rangle$). Next, assume that there are 1000 "particles" occupying the state 1 at the initial moment of "time". Let us discretize the time on timesteps $\Delta t$. There is a probability $P$ for each particle occupying the state $|N\rangle$ to go to the state $|N+1\rangle$ at the step $\Delta t$. When each such transition happens, the number of particles at the state $|N+1\rangle$ is increased by $1+\Delta n$ (possibly not integer).

I would like Mathematica to simulate this process and return a table

{Timestep, Total number of particles, Number of particles at level 1 *E0 + Number of particles at level 2 *E0/2+...},

where E0 is some constant. It is possible?

The physical system I want to model is an injection of high energy particles into the thermal bath and the evolution of such particles due to energy loss (which defines $P$), population increase due to knocking out thermal particles and population decrease due to "annihilation" (defining $\Delta n$). The levels correspond to the values of energy, with $|1\rangle$ being the level with the energy $E_{0}$ and each next level corresponds to twice smaller energy (on average the high energy particle scattering on a low energy particle lose an energy $\Delta E = E/2$).

P.S. Unfortunately I am completely unfamiliar with making simulations in Mathematica.

  • 1
    $\begingroup$ How come that you are completely unfamiliar if your reputation here is so high? :) $\endgroup$ – yarchik Mar 17 '20 at 15:43
  • $\begingroup$ @yarchik : so far I have used Mathematica in questions not related to simulations only. $\endgroup$ – John Taylor Mar 17 '20 at 15:44
  • 1
    $\begingroup$ First you need to figure out what probability distribution determines P. Then use RandomVariate to generate a set of probabilities.Use these to construct an evolution over time (delta t is probably a post hoc consideration that can be ignored for the also) Finally do statistics on the set of evolutions. I will try to do a bit of code for this but am busy dealing with WFH and coronapocalypse so it might take me a few days and in that time somebody else will have constructed a better one. :) $\endgroup$ – Mike Colacino Mar 17 '20 at 15:50
  • 2
    $\begingroup$ Check out DiscreteMarkovProcess. $\endgroup$ – Chris K Mar 17 '20 at 15:56
  • 1
    $\begingroup$ @JimB : in the physical system I consider, it corresponds to the disappearance in the annihilation process when colliding the anti-particle from the background population. $\endgroup$ – John Taylor Mar 17 '20 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.