1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Project report plot the trajectory of electron in static electromagnetic field

16 20 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

lOMoARcPSD|20597457 VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY PROJECT REPORT Plot the trajectory of electron in static electromagnetic field Instructor: Prof Huynh Quang Linh Course code: PH1003 Class: CC01 Group: 10 Members: Kiều Hải Nam Nguyễn Hải Đăng Ho Chi Minh City, November 2021 1952346 1913092 lOMoARcPSD|20597457 CONTENTS INTRODUCTION THEORY 3 MATLAB Code and Explanation Results and discussion Conclusion 14 REFERENCES 14 lOMoARcPSD|20597457 Introduction Electromagnetic theory is concerned with the study of charges at rest and in motion Electromagnetic principles are fundamental to the study of electrical engineering It is also required for the understanding, analysis and design of various electrical, electromechanical and electronic systems Electromagnetic theory can be thought of as generalization of circuit theory Electromagnetic theory deals directly with the Ielectric and magnetic field vectors where as circuit theory deals with the voltages and currents Voltages and currents are integrated effects of electric and magnetic fields respectively The Electromagnetic field problems involve three space variables along with the time variable and hence the solution tends to become correspondingly complex A charged particle of mass m and charge q will experience a force acting upon it in an electric field 𝐸⃗ Also, the charged particle will experience a magnetic force acting upon it when moving with a velocity 𝑣 in a magnetic ⃗ field 𝐵 The equation of the electron when its moves in static electromagnetic field is expressed by the Lorentz force: ⃗⃗⃗ ⃗ 𝐹 = 𝐹𝐸 + 𝐹𝐿 = q𝐸⃗ + q𝑣 × 𝐵 With the initial position and velocity, we can determine the kinetic motion equations of electron x (t), y (t) and z (t) After that, we can determine the acceleration of the electron Subsequently, eliminating t from mentioned motion equations, we can derive f (x, y, z) = const, which is the orbital equation of electron If the charged particle is stationary ( 𝑣 = 0), the force depends only of the electric field The direction of the electric force is in the same direction as the electric field if 𝑞 > and the electric force is in the opposite direction to the electric field if 𝑞 < When a charged particle is moving only in a magnetic field, the direction lOMoARcPSD|20597457 of the magnetic force is at right angles to both the direction of motion and the direction of the magnetic field as given by the right hand palm rule This project requires students to use MATLAB to calculate and simulation of the trajectory of a particle in electric and magnetic field (electromagnetic field) lOMoARcPSD|20597457 Theory Consider a particle of charge q coulombs and mass m kilograms subjected to an electric field ⃗⃗⃗ (0,0, 𝐸𝑍 ) → 𝐸 ⃗⃗⃗ = 𝐸𝑍 𝑘̂ 𝐸 In newtons per coulomb and a magnetic field ⃗⃗⃗ (0,0, 𝐵𝑍 ) → ⃗⃗⃗ 𝐵 𝐵 = 𝐵𝑍 𝑘̂ The equation of the electron when its moves in static electromagnetic field is expressed by the Lorentz force: ⃗⃗⃗ ⃗ 𝐹 = 𝐹𝐸 + 𝐹𝐿 = q𝐸⃗ + q𝑣 × 𝐵 ⃗⃗⃗ 𝐹 = 𝑚𝑎 ⃗⃗⃗ ⃗⃗⃗ = 𝑞( ⃗⃗⃗⃗ ⃗⃗⃗ ) 𝐹 𝐸 + ⃗⃗⃗ 𝑣 × 𝐵 ⃗⃗⃗⃗ + ⃗⃗⃗ ⃗⃗⃗ ) => 𝑚𝑎 ⃗⃗⃗ = 𝑞( 𝐸 𝑣 × 𝐵 With 𝑎 ⃗⃗⃗ is the acceleration vector Expressing by component in the Cartesian coordinates reference, we can obtain following differential equations: 𝑚( 𝑎𝑥 𝑖̂ + 𝑎𝑦 𝑗̂ + 𝑎𝑧 𝑘̂ ) = 𝑞[𝐸𝑍 𝑘̂ + (𝑣𝑥 𝑖̂ + 𝑣𝑦 𝑗̂ + 𝑣𝑧 𝑘̂ ) × 𝐵𝑍 𝑘̂] 𝑚( 𝑎𝑥 𝑖̂ + 𝑎𝑦 𝑗̂ + 𝑎𝑧 𝑘̂ ) = 𝑞𝐸𝑍 𝑘̂ + 𝑞(𝑣𝑥 𝑖̂ + 𝑣𝑦 𝑗̂ + 𝑣𝑧 𝑘̂) × 𝐵𝑍 𝑘̂ 𝑚𝑎𝑥 = 𝑞𝐵𝑍 𝑣𝑦 => {𝑚𝑎𝑦 = −𝑞𝐵𝑍 𝑣𝑥 𝑚𝑎𝑧 = 𝑞𝐸𝑍 𝑞𝐵𝑍 𝑦̇ 𝑚 𝑞𝐵 => 𝑦̈ = − 𝑍 𝑥̇ 𝑚 𝑞𝐸𝑍 𝑧̈ = { 𝑚 𝑥̈ = Projection in the direction of Ox Differential equation 𝑥′′(𝑡) = 𝑞𝐵𝑍 𝑦′(𝑡) 𝑚 lOMoARcPSD|20597457 Projection in the Oy direction Differential equation 𝑦′′(𝑡) = − 𝑞𝐵𝑍 𝑥′(𝑡) 𝑚 Projection in the Oz direction Differential equation 𝑧′′(𝑡) = With 𝑞𝐸𝑍 𝑚 𝑥(0) = 𝑥0 𝑦(0) = 𝑦0 𝑧(0) = 𝑧0 𝑥′(0) = 𝑣𝑥0 𝑦′(0) = 𝑣𝑦0 𝑧′(0) = 𝑣𝑧0 These are coupled second-order ordinary differential equations that can be solved by either analytical or numerical methods Numerically, as done in this demonstration, the solution needs initial conditions for the velocity and the position, given by 𝑟⃗⃗⃗0 (𝑥0 , 𝑦0 , 𝑧0 ) → ⃗⃗⃗ 𝑟0 = 𝑥0 𝑖̂ + 𝑦0 𝑗̂ + 𝑧0 𝑘̂ 𝑣 ⃗⃗⃗⃗0 (𝑣𝑥0 , 𝑣𝑦0 , 𝑣𝑧0 ) → 𝑣 ⃗⃗⃗⃗0 = 𝑣𝑥0 𝑖̂ + 𝑣𝑦0 𝑗̂ + 𝑣𝑧0 𝑘̂ Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 MATLAB Code and Explanation % Motion of a electron in uniform cross B and E fields clear; clc; clf; syms x(t) y(t) z(t); syms k k1 k2 vx0 vy0 vz0 x0 y0 z0; format short; % % SYMBOLIC OPERATION % Dx = diff(x,t); Dy = diff(y,t); Dz = diff(z,t); % k1 = q*B/m and k2 % ODE function ode1 = diff(x,t,2) ode2 = diff(y,t,2) ode3 = diff(z,t,2) = q*E/m == k1*diff(y,t); == -k1*diff(x,t); == k2; Eqn = [ode1, ode2, ode3]; Cond = [Dx(0) == vx0; Dy(0) == vy0; Dz(0) == vz0; x(0) == x0; y(0) == y0; z(0) == z0]; S = dsolve(Eqn,Cond); x_func = collect(simplify(S.x)); y_func = collect(simplify(S.y)); z_func = collect(simplify(S.z)); vx_func = collect(simplify(diff(S.x,t))); vy_func = collect(simplify(diff(S.y,t))); vz_func = collect(simplify(diff(S.z,t))); ax_func = collect(simplify(diff(S.x,t,2))); ay_func = collect(simplify(diff(S.y,t,2))); az_func = collect(simplify(diff(S.z,t,2))); % % OUTPUT FUNCTION % % Motion function disp('Motion function on x-direction: x='); disp(x_func); disp('Motion function on y-direction: y='); disp(y_func); disp('Motion function on z-direction: z='); disp(z_func); disp('ooooooooooooooooooooooooooooooooooooooooooooo'); % Velocity function disp('Velocity function on x-direction: vx ='); disp(vx_func); disp('Velocity function on y-direction: vy ='); disp(vy_func); disp('Velocity function on z-direction: vz ='); disp(vz_func); disp('ooooooooooooooooooooooooooooooooooooooooooooo'); % Acceleration function disp('Acceleration function on x-direction: ax ='); disp(ax_func); disp('Acceleration function on x-direction: ay ='); disp(ay_func); disp('Acceleration function on x-direction: az ='); disp(az_func); disp('ooooooooooooooooooooooooooooooooooooooooooooo'); % Note disp('with k1 = q*B/m'); disp('with k2 = q*E/m'); Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 % % DISPLAY RECOMMENDED INPUT PARAMETERS % disp('ooooooooooooooooooooooooooooooooooooooooooooo'); disp('Recommended parameters for you to enter/input') disp('Recommended initial position of electron: [0 0] '); disp('Recommended initial position of electron [2 -5]'); disp('Recommended static magnetic field parallel to z-axis: 2e-11'); disp('Recommended static electric field parallel to z-axis: 5e-12'); % % INPUT PARAMETERS % disp(' '); disp(' '); disp(' '); disp(' '); % Enter initial position and velocity of electron r0 = input('Enter the initial position of electron [x0 y0 z0] (m) - '); v0 = input('Enter the initial velocity of electron [vx0 vy0 vz0] (m/s) - '); % Enter magnitude of uniform B and E fields B = input('Enter static magnetic field parallel to z-axis [0 B] (T) - '); E = input('Enter static electric field parallel to z-axis [0 E] (V/m) - '); % Parameter of electron m = 9.10939e-31; q = 1.602177e-19; k11= q*B/m; k22= q*E/m; disp(' '); disp(' '); disp(' '); disp(' '); % % CALCULATE THE ELECTROMAGNETIC FORCE ACTING ON THE ELECTRON % Fx=subs(m*ax_func,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3 ),k11,k22]); Fy=subs(m*ay_func,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3 ),k11,k22]); Fz=subs(m*az_func,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3 ),k11,k22]); disp('Force disp('Force disp('Force disp(' '); acting acting acting disp(' on the electron on x-direction: Fx='); pretty(Fx); on the electron on y-direction: Fy='); pretty(Fy); on the electron on z-direction: Fz='); disp(double(Fz)); '); disp(' '); disp(' '); % % OUTPUT FUNCTION % -h1=subs(S.x,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3),k11, k22]); h2=subs(S.y,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3),k11, k22]); h3=subs(S.z,[x0,y0,z0,vx0,vy0,vz0,k1,k2],[r0(1),r0(2),r0(3),v0(1),v0(2),v0(3),k11, k22]); Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 disp(' -Function after entering parameters -'); % Motion function disp('Motion function on x-direction: x='); pretty(h1); disp('Motion function on y-direction: y='); pretty(h2); disp('Motion function on z-direction: z='); pretty(h3); disp('ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'); % Velocity function disp('Velocity function on x-direction: vx ='); pretty(diff(h1,t)); disp('Velocity function on y-direction: vy ='); pretty(diff(h2,t)); disp('Velocity function on z-direction: vz ='); pretty(diff(h3,t)); disp('ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'); % Acceleration function disp('Acceleration function on x-direction: ax ='); pretty(diff(h1,t,2)); disp('Acceleration function on x-direction: ay ='); pretty(diff(h2,t,2)); disp('Acceleration function on x-direction: az ='); pretty(diff(h3,t,2)); % % PLOT THE TRAJECTORY OF ELECTRON % figure(1) XMax = ; XMin = -XMax; YMax = XMax ; YMin = -YMax; ZMax = 20 ; ZMin = -20; fplot3(h1,h2,h3,[0 50],'-','LineWidth',1); grid on axis equal box on axis([XMin, XMax, YMin, YMax, ZMin, ZMax]); xlabel('x ylabel('y zlabel('z [m]'); [m]'); [m]'); set(gca,'fontsize',10); Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 Results and discussion Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 10 Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 11 Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 12 Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 13 Downloaded by hong chinh (vuchinhhp5@gmail.com) lOMoARcPSD|20597457 Conclusion The project has completed plot the trajectory of electron in static electromagnetic field problem using MATLAB symbolic calculation With this tool we can plot more complex situations that cannot be plotted by the analytical method The trajectory is calculated by computationally solving differential equations The direction and magnitude of magnetic and electric field can be changed along with other attributes of motion References 1) General Physics A1, General Physics Exercises A1 2) “Motion of Charged particle in E and B” YouTube, uploaded by For the Love of Physics, 5th May, 2019, https://www.youtube.com/watch?v=wpQJKg8Zl4s&t=1652s 14 Downloaded by hong chinh (vuchinhhp5@gmail.com)

Ngày đăng: 22/06/2023, 20:53

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w