Please correct anything i have wrong, im not a physics guy :-). So my skills are lacking.(adsbygoogle = window.adsbygoogle || []).push({});

Say i have two points a and b. I wish to have a velocity vector in the direction from a to b with a 1-100 KeV range.

c = b - a;

0.5 mV^2 = eV

V = sqrt(2eV/m)

m = 9.1094e-31; //electron weight

mineV = sqrt(2000/m);

maxeV = sqrt(200000/m);

Range = maxeV - mineV;

value = mineV + (range * (float)rand()/((float)RAND_MAX+1))

So this gives me my random velocies in the range of 1-100 KeV.

However i have a velocity vector defined in cartesian space (xyz).

So how could i insure all particles have a velocity of 1-100KeV?

Also, if i have a velocity vector V how do i get the overall velocity of the particle?

I was thinking it should just be sqrt(V.x^2 + V.y^2 + V.z^2);

Thanks and sorry for the long post,

I greatly appreciate the help!!!

- m3the01

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Help velocity vectors, electrons, and KeV.

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**