Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
184 stars 58 forks source link

in output file,I get Px and weight,the particle is electron,can I calculate the velocity by (px/weight/9.01e-31)? #713

Closed XnjeMa closed 1 month ago

XnjeMa commented 2 months ago

I get px=5.809e-21,weight=1.349e11,particles are electron,the v=0.05m/s, I think it‘s wrong,but I don’t know how to correct it

Status-Mirror commented 1 month ago

I've answered in the discussion, but I'll quickly get you the momentum using these numbers too.

Since you haven't given a $p_y$ or $p_z$, I'll assume they're 0 here (you can output these the same way you output $p_x$).

$p = \sqrt{p_x^2 + p_y^2 + p_z^2}$ = 5.809e-21 kgm/s $E = \sqrt{p^2c^2 + m^2c^4}$ = 1.7e-12 J $v/c= pc/E = 0.9999c$

So, very close to the speed of light.

Status-Mirror commented 1 month ago

I'm going to mark this issue as closed for now, but feel free to re-open if you need further clarification.

Cheers, Stuart