

You will observe that two particles start moving with the same velocities in x-direction and enter the region of electric field. Save the above code as a file named Multiple_electric_field.py and run using following command: python3 Multiple_electric_field.pyĮdit this code Simulation of Motion of Oppositely Charged Particles Parallel to Electric Field at High Velocity. They are moving in the direction of electric field (x-direction) with the same velocities of 10 unit. In the above code, particle and particle1 have charges 1 and -1 respectively and the remaining parameters are same. 2.1 Oppositely Charged Particles 2.1.1 Particles Parallel to Electric Field at High Velocity If you add few more particles to the list beam then the new curves will be added automatically to graph and data points for each of them will also be updated without modifying anything in while loop. The x-component of velocity is obtained using.

Here, i is the index of element in list beam, which we use to add data points corresponding to i th particles to the graph. If the particle goes out of the region of interest, we stop updating it’s position. In while loop, I have updated position of all the particles in beam using a for loop. The color of curve will be same as that of particle.

We have plotted x-component of velocity and kinetic energy as a function of time in two separate canvases, each of which contains two curves one for each particle. We have declared two objects named particle and particle1 and added them to the list beam. In the above code, we have introduced a list named beam which contains particles as it’s elements.

Particle.pos = particle.pos + particle.velocity*dt Particle.velocity = particle.velocity + acc(particle)*dt # Defining function to calculation Electric field Particle = sphere( pos = vector(-lEbox*2,0,0), radius = 0.5, velocity = vec(10,0,0), charge = 1, mass = 10, color =color.blue, make_trail=True, trail_type="points", interval=20, retain=100) LEbox = 10 # Size of box of electric fieldĮbox = box(pos = vector (0,0,0), size = vector (2*lEbox,lEbox,lEbox), color = color.cyan, opacity=0.2) Scene2 = canvas(title='Charged Particle in Electric Field', width=500, height=400, center=vector(0,0,0), align="left", background=vector(1,1,1)) The positively charged particle will be accelerated in the direction of electric field.Ĭopy the following code and save as Single_electric_field.py # This program simulate motion of a charged particle in a constant electric field 1 Motion of Single Particle in Electric FieldĬonsider a charged particle entering into a region of constant electric field. I have already explained in previous tutorial the installation of VPython 7 in Python3 in Ubuntu 18.04. We are going to write program in VPython 7. The velocity and position are calculated at time if we already know their value at time. The acceleration of the charged particle can be calculated from the electric force experienced by it using Newton’s second law of motion.Īfter calculating acceleration of the charged particle, we can update velocity and position of charged particle. (1) Motion of Particle of charge q and mass m in constant Electric Field in x-direction. The electric force experienced by the charged particle in the electric field is given as following Here, electric field is already present in the region and our particle is passing through that region.Ĭonsider a particle of charge and mass passing though a region of electric field. In this tutorial, we are going to learn how to simulate motion of charged particle in an electric field. A charged particle experiences an electrostatic force in the presence of electric field which is created by other charged particle. Many fundamental particles are electrically charged which interact with other particles through electromagnetic interaction. Simulation of Motion of Charged Particle in Electric Field.
