Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. # impact cutoff 50 microns
  2. ion_x, ion_y, ion_z = np.random.uniform(-50e-6,50e-6), np.random.uniform(-50e-6,50e-6), z
  3. while(np.sqrt(ion_x**2+ion_y**2) > 50e-6):
  4.     ion_x, ion_y, ion_z = np.random.uniform(-50e-6,50e-6), np.random.uniform(-50e-6,50e-6), z
  5.  
  6. # new r based off randomnly placed ion (assuming electron or ion starts at origin, if ion at origin, then below is electron position)
  7. r = [ion_x,ion_y,ion_z, 0, 0, vz]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement