1 / 33

EEE 431 Computational Methods in Electrodynamics

EEE 431 Computational Methods in Electrodynamics. Lecture 4 By Dr. Rasime Uyguroglu Rasime.uyguroglu@emu.edu.tr. FINITE DIFFERENCE METHODS. Introduction. In general real life EM problems cannot be solved by using the analytical methods, because: The PDE is not linear,

gloriaheath
Download Presentation

EEE 431 Computational Methods in Electrodynamics

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. EEE 431Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu Rasime.uyguroglu@emu.edu.tr

  2. FINITE DIFFERENCE METHODS

  3. Introduction • In general real life EM problems cannot be solved by using the analytical methods, because: • The PDE is not linear, • The solution region is complex, • The boundary conditions are of mixed types, • The boundary conditions are time dependent, • The medium is inhomogeneous or anisotropic.

  4. Introduction • For such complicated problems numerical methods must be employed. • Finite Difference Method (FDM) is one of the available numerical methods which can easily be applied to solve PDE’s with such complexity. • FDM, is easy to understand and apply.

  5. Introduction • FD techniques are based upon approximations of differential equations by finite difference equations. • Finite difference approximations: • have algebraic forms, • Relate the value of the dependent variable at a point in the solution region to the values at some neighboring points.

  6. Introduction • Steps of finite difference solution: • Divide the solution region into a grid of nodes, • Approximate the given differential equation by finite difference equivalent, • Solve the differential equations subject to the boundary conditions and/or initial conditions.

  7. Introduction • Rectangular Grid Pattern

  8. Finite Difference Schemes • The derivative of a given function f(x) can be approximated as:

  9. f(x) P B A x Finite Difference Schemes

  10. Finite Difference Schemes • Estimate of second derivative of f(x) at P:

  11. Finite Difference Schemes • Or, by using Taylor Series:

  12. Finite Difference Schemes • Adding these equations: • Assuming that higher order terms are neglected:

  13. Finite Difference Schemes • is the error introduced by truncating the series. • It represents the terms that are not greater than .

  14. Finite Difference Schemes • Subtracting Eq.6 from Eq. 5 and neglecting terms of the order • Error is second order. • Eq. 3- Eq.4 are second order, Eq.1 and Eq. 2 are first order.

  15. Finite Difference Schemes • As long as the derivatives of f are well behaved and the step size is not too large, the central difference should be the most accurate of the other two. i.e. Backward and forward difference approximations.

  16. Finite Difference Schemes • The error in central difference decreases quadratically as the step size decreases, whereas the decrease is only linear for the other two formula. • In general, CDF is to be preferred. Situations where the data is not available on both sides of the point where the numerical derivative is to be calculated are exceptions.

  17. Finite Difference Schemes • To apply the difference method to find the solution of a function the solution region is divided into rectangles:

  18. Finite Difference Schemes • Let the coordinates (x, t) of a typical grid point or a node be: • The value of at a point:

  19. Finite Difference Schemes • Using this notation, the central difference approximations of at (i, j) are: First derivative:

  20. Finite Difference Schemes • Second derivative:

  21. Finite Difference Schemes • One dimensional example: • Solve • Subject to the boundary conditions: • Assume

  22. Finite Difference Schemes • Solution: Discretization of the equation:

  23. Finite Difference Schemes • Since there is one unknown, one equation is enough to find this unknown.

  24. Finite Difference Schemes • If

  25. Finite Difference Schemes • f(1), f(2) and f(3) are unknowns. Therefore, three equations are written to find three unknowns.

  26. Finite Difference Schemes • For we have (N-1) unknowns and we need (N-1) equations to solve. • The equation of the i th node is:

  27. Finite Differencing of Parabolic PDE’s • Consider the diffusion equation: • Where k is a constant. Discretized equation:

  28. Finite Difference Schemes • Where • Forward difference for t and central difference for x is used. • Let:

  29. Finite Difference Schemes • We can write: • This equation can be calculated in terms of boundary and initial conditions. • This explicit formula can be used to find • explicitly in terms of .

  30. Stability • Stability is important for the numerical solutions. • A stable solution is only possible when (1-2r) is nonnegative. Or: • Choose r=1/2. Then our equation becomes:

  31. Stability • Stability increases by applying an implicit formula. The formula is simple to apply but it is computationally slow. Crank and Nicholson’s formula:

  32. Example (Cont.) • Rewrite: • Three known values on the left hand side and three unknown values on the right hand side.

  33. Example (cont.) • The formula is valid for all finite values of r, chose r=1:

More Related