1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Chapter 15 TRƯỜNG ĐIỆN TỪ

67 0 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

Chapter 15 NUMERICAL METHODS The recipe for ignorance is: be satisfied with your opinions and content with your knowledge —ELBERT HUBBARD 15.1 INTRODUCTION In the preceding chapters we considered various analytic techniques for solving EM problems and obtaining solutions in closed form A closed form solution is one in the form of an explicit, algebraic equation in which values of the problem parameters can be substituted Some of these analytic solutions were obtained assuming certain situations, thereby making the solutions applicable to those idealized situations For example, in deriving the formula for calculating the capacitance of a parallel-plate capacitor, we assumed that the fringing effect was negligible and that the separation distance was very small compared with the width and length of the plates Also, our application of Laplace's equation in Chapter was restricted to problems with boundaries coinciding with coordinate surfaces Analytic solutions have an inherent advantage of being exact They also make it easy to observe the behavior of the solution for variation in the problem parameters However, analytic solutions are available only for problems with simple configurations When the complexities of theoretical formulas make analytic solution intractable, we resort to nonanalytic methods, which include (1) graphical methods, (2) experimental methods, (3) analog methods, and (4) numerical methods Graphical, experimental, and analog methods are applicable to solving relatively few problems Numerical methods have come into prominence and become more attractive with the advent of fast digital computers The three most commonly used simple numerical techniques in EM are (1) moment method, (2) finite difference method, and (3) finite element method Most EM problems involve either partial differential equations or integral equations Partial differential equations are usually solved using the finite difference method or the finite element method; integral equations are solved conveniently using the moment method Although numerical methods give approximate solutions, the solutions are sufficiently accurate for engineering purposes We should not get the impression that analytic techniques are outdated because of numerical methods; rather they are complementary As will be observed later, every numerical method involves an analytic simplification to the point where it is easy to apply the method The Matlab codes developed for computer implementation of the concepts developed in this chapter are simplified and self-explanatory for instructional purposes The notations 660 15.2 FIELD PLOTTING • 661 used in the programs are as close as possible to those used in the main text; some are defined wherever necessary These programs are by no means unique; there are several ways of writing a computer program Therefore, users may decide to modify the programs to suit their objectives 15.2 FIELD PLOTTING In Section 4.9, we used field lines and equipotential surfaces for visualizing an electrostatic field However, the graphical representations in Figure 4.21 for electrostatic fields and in Figures 7.8(b) and 7.16 for magnetostatic fields are very simple, trivial, and qualitative Accurate pictures of more complicated charge distributions would be more helpful In this section, a numerical technique that may be developed into an interactive computer program is presented It generates data points for electric field lines and equipotential lines for arbitrary configuration of point sources Electric field lines and equipotential lines can be plotted for coplanar point sources with simple programs Suppose we have N point charges located at position vectors r t , r , ., rN, the electric field intensity E and potential V at position vector r are given, respectively, by y Qk(r-rk) (15.1) t=i Airs \r - rk\3 and (15.2) ift\ 4ire |r - rk\ If the charges are on the same plane (z = constant), eqs (15.1) and (15.2) become N E= ykff2 - xkf + (y - N Qk - ykf}} m - xkf k=\ (15.3) (15.4) To plot the electric field lines, follow these steps: Choose a starting point on the field line Calculate Ex and Ey at that point using eq (15.3) Take a small step along the field line to a new point in the plane As shown in Figure 15.1, a movement A€ along the field line corresponds to movements AJC and Ay along x- and y-directions, respectively From the figure, it is evident that Ax Ex E [E2X U2 ] 662 Numerical Methods Figure 15.1 A small displacement on a field line field line new point point or Ax = (15.5) Similarly, • Ey y (15.6) Move along the field line from the old point (x, y) to a new point x' = x + Ax, y' =y + Ay Go back to steps and and repeat the calculations Continue to generate new points until a line is completed within a given range of coordinates On completing the line, go back to step and choose another starting point Note that since there are an infinite number of field lines, any starting point is likely to be on a field line The points generated can be plotted by hand or by a plotter as illustrated in Figure 15.2 To plot the equipotential lines, follow these steps: Choose a starting point Calculate the electric field (Ex, Ey) at that point using eq (15.3) Figure 15.2 Generated points on £-field lines (shown thick) and equipotential lines (shown dotted) 15.2 FIELD PLOTTING 663 Move a small step along the line perpendicular to £-field line at that point Utilize the fact that if a line has slope m, a perpendicular line must have slope — Mm Since an fi-field line and an equipotential line meeting at a given point are mutually orthogonal there, (15.7) Ax = Ay = (15.8) + Move along the equipotential line from the old point (x, y) to a new point (x + Ax, y + Ay) As a way of checking the new point, calculate the potential at the new and old points using eq (15.4); they must be equal because the points are on the same equipotential line Go back to steps and and repeat the calculations Continue to generate new points until a line is completed within the given range of x and >> After completing the line, go back to step and choose another starting point Join the points generated by hand or by a plotter as illustrated in Figure 15.2 By following the same reasoning, the magnetic field line due to various current distributions can be plotted using Biot-Savart law Programs for determining the magnetic field line due to line current, a current loop, a Helmholtz pair, and a solenoid can be developed Programs for drawing the electric and magnetic field lines inside a rectangular waveguide or the power radiation pattern produced by a linear array of vertical half-wave electric dipole antennas can also be written EXAMPLE 15.1 Write a program to plot the electric field and equipotential lines due to: (a) Two point charges Q and —4Q located at (x, y) = ( - , 0) and (1,0), respectively (b) Four point charges Q, -Q,Q, and - Q located at (x,y) = ( - , - ) , ( , - ) , (1, 1), and (—1, 1), respectively Take QIAire = landA€ = 0.1 Consider the range — < x , y < Solution: Based on the steps given in Section 15.2, the program in Figure 15.3 was developed Enough comments are inserted to make the program as self-explanatory as possible For example, to use the program to generate the plot in Figure 15.4(a), load program plotit in your Matlab directory At the command prompt in Matlab, type plotit ([1 - ] , [-1 0; 0], 1, 1, 0.1, 0.01, 8, 2, 5) where the numbers have meanings provided in the program Further explanation of the program is provided in the following paragraphs Since the £"-field lines emanate from positive charges and terminate on negative charges, it seems reasonable to generate starting points (xs, ys) for the £-field lines on small circles centered at charge locations (xQ, yQ); that is, xs = xQ + r cos (15.1.1a) y, = Vn + rsind (15.1.1b) 664 Numerical Methods function plotit(charges,location,ckEField,ckEq,DLE,DLV,NLE,NLV,PTS) figure; hold on; % Program for plotting the electric field lines % and equipotential lines due to coplanar point charges % the plot is to be within the range -5= 5)) break; end if (sum(abs(XE-XQ) < 05 & abs(YE-YQ) < 05) >0) break; end JJ=JJ+1; if (~mod(JJ,PTS)) plot (XE,YE); end end % while loop end % I =1:NLE end % K = 1:NQ end % if % NEXT, DETERMINE THE EQUIPOTENTIAL LINES % FOR CONVENIENCE, THE STARTING POINTS (XS,YS) ARE % CHOSEN LIKE THOSE FOR THE E-FIELD LINES if (ckEq) JJ=1; DELTA = 2; ANGLE = 45*pi/180; Figure 15.3 (Continued) 666 Numerical Methods for K =1:NQ FACTOR = 5; for KK = 1:NLV XS = XQ(K) + FACTOR*cos(ANGLE); YS = YQ(K) + FACTOR*sin(ANGLE); if ( abs(XS) >= | abs(YS) >=5) break; end DIR = 1; XV = XS; YV = YS; JJ=JJ+1; if (~mod(JJ,PTS)) plot(XV,YV); end % FIND INCREMENT AND NEW POINT (XV,YV) N=l; while (1) EX = 0; EY = 0; for J = 1:NQ R = sqrt((XV-XQ(J))"2 + (YV-YQ(J))^2); EX = EX + Q(J)*(XV-XQ(J))/(RA3); EY = EY + Q(J)*(YV-YQ(J))/(R"3); end E=sqrt(EXA2 + EY~2); if (E

Ngày đăng: 12/04/2023, 21:05