1 / 31

Chapter 5

Chapter 5. Potentials and Fields. 5.1 Laplace’s equation for electric potential. Partial differential equation (PDE). Eq. (5.1). V = V ( x , y , z ) electric potential in a region of space that do not contain any electric charges.

thora
Télécharger la présentation

Chapter 5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5 Potentials and Fields

  2. 5.1 Laplace’s equation for electric potential Partial differential equation (PDE) Eq. (5.1) • V = V (x,y,z) electric potential in a region of space that do not contain any electric charges • Different from previous cases: here boundary conditions are needed in place of initial conditions. Note: this is a 2-D motion

  3. Discretisation we will use this form Eq. (5.2)

  4. Discretisation = Eq. (5.7) Eq. (5.8)

  5. Jacobi method of relaxation To evaluate the value of V at each point (i,j,k) according to Eq. (5.8), we assume that the boundary conditions: values of V at the boundary: V(-1,0,0), V(1,0,0), V(0,-1,0), V(0,1,0), V(0,0,-1), V(0,0,1), are known. Then we put forward an initial guess of V(i,j,k) for each (i,j,k), call it V0(i,j,k). Insert this initial profile to the RHS of Eq. (5.8) to work out an “improved” profile V1(i,j,k). Then V1(i,j,k) is in turn inserted into the RHS of Eq. (5.8) again. Eq. (5.8)

  6. Jacobi method of relaxation In each iteration the solution Vn(i,j,k) “relaxes” to a more presumably “correct” values Vn+1 (i,j,k). The relaxation is continued until a satisfying convergence requirement is achieved for the V profile, (1/N)∑{i,j}[Vn+1(i,j,k) - Vn(i,j,k)]2 = DVn < tol, for all (i,j,k). N = total number of grid points = imax × jmax In practice, we monitor DVn in each iteration n. Solution for Vn(i,j,k) is said to be achieved once DVn < tol, where tol a convergence criteria set by us.

  7. Implementation of Jacobi relaxation method for Laplace equation in 2-D For a 2-D case, V=V(i,j) or

  8. Implementation on a 2-D plate (infinite extent) Boundary condition: V(-1,j)=-1; V(1,j)=1; Range of coordinates: xi=0=-1.0; xi+1=xi+Dx; xi=N = 1.0; Dx = (xi=N - xi=0)/N Similarly for y-component. N is the “resolution” of your simulation.

  9. Initial guess V(x,y=1) (1,1) 1 x O x=-1 x=1 -1 N=6 (-1,-1)

  10. Output The output is a list of V(i,j) for all position (i,j). Equipotential lines are to be plotted on the x-y plane. These equipotentials shall appear stationary on the xy plane when convergence is acchieved. A Mathematica code has to be developed to plot the equipotential lines based on V(i,j) generated.

  11. Program structure Call a subroutine to generate an initial trial potential profile V(i,j). Iterate Call the update program-V subroutine to update Vn+1 based on Vn Check DVn Display Vn(i,j) to monitor the variation visually (via movie) Break if DVn < tol Mathematica’s powerful displaying capability is good for such purpose.

  12. 2D Contour Plot of equipotential ListContourPlot or ListDensityPlot

  13. Electric field For generic 3D case, E = E(x,y,z)=Ex(x,y)+Ey(x,y)+Ez(x,y) E = - V(x,y,z) For a 2D case, E=E(x,y) only: E = Ex(x,y)+Ey(x,y)

  14. Electric field

  15. Hollow metallic prism with a solid inner conductor This is your homework assignment.

  16. Potentials and Fields Near electric charge Make sure you know how to derive this difference equation!!

  17. Metal box: potential at the walls vanishes.

  18. Code Generalise the 2D Laplace Equation to 3D Poisson equation. Use the Jacobi relaxation method to solve the point charge in the box problem. Visualise the potential and electric vectorial fields using ListDensityPlot (or ListContourPlot) and ListPlotVector, ListPlotVector3D.

  19. Compare your numerical solution with the Coulomb law, which is the solution to Poisson equation for the simple point charge in a large 3D box. In the simulation, the numerical solution improve (compares better to the analytical one) as the size of the simulation box gets larger (which in turn consumes more expansive computational resource.)

  20. 5.3 Magnetic field produced by a current – simplest case Wire of length 2L. Current I is to flow from left to right. The magnetic field is perpendicular to and directed inwards to the x-z plane. The current element is dI = Idz =Idz. x dB = dB {x=x, y=0 , z=0} x=x0 , r q z -L +L z=0 dz

  21. Vectors Vector notation: Reminder for vectors: cyclic permutation and right hand rule, e.g.,

  22. Bior-Savart law for magnetic field Bior-Savart law for magnetic field at the fixed point {x=x, y=0 , z=0}, produced by a current element dI is x dB = dB {x=x, y=0 , z=0} x=x0 , r q z -L +L z=0 dz Since

  23. Discretising Bior-Savart formula Using simple geometry, Hence Discretising, The total magnetic field is obtained by summing over all contribution from element Dz (Eq. 5.25)

  24. Partitioning of the z-axis This sum can be evaluated numerically via (x is fixed) zk=0=-L zk=N=L z z=0 z=-L Dz z=L zk=kDz

  25. Pseudocode Pseudocode: Choose the size of the simulation “box”, [–L, L]. Then choose the size of the interval, Dz. The number of intervals NStep is determined by 2L/Dz. z[0] = -L; z[NStep] = L; z[k] = z[0] + k Dz, k  [1,Nstep]; Then sum over all k to obtain Eq.(5.25) Repeat for next value of x. At the end, B as a function of x would be obtained.

  26. Analytical solution The analytical solution for the Biot-Savart law for an infinite current carrying wire is given by We can compare the numerical answer Eq. (5.25) with it. The numerical sum Eq. (5.25) for longer wire behaves closer to the analytical one. In addition, the discretisation effect sets in when x Dz. In this limit large error shows up.

  27. Numerical vs. analytical solution The values based on Eq. (5.25), and analytical solution are plotted for x=(0,1.0], L=1 (Red), L=10 (Blue), and Green (analytical), using Mathematica code.

  28. Trapezoid rule for integration Note that the sum approximates the integral Many methods can be used to numerically evaluate the integral Basically the integral is the area represented between the curve and the vertical axis.

  29. Use Numerical integration to calculate the magnetic field as function of x. Compare the result with that calculated analytically and that obtained with discrete summation

More Related