emlab 1 implementation of 2d fdtd. emlab 2 lecture outline review – update equations with pml –...

Download EMLAB 1 Implementation of 2D FDTD. EMLAB 2 Lecture Outline Review – Update equations with PML – Code development sequence Numerical Boundary Conditions

If you can't read please download the document

Upload: scarlett-russell

Post on 26-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

  • Slide 1
  • EMLAB 1 Implementation of 2D FDTD
  • Slide 2
  • EMLAB 2 Lecture Outline Review Update equations with PML Code development sequence Numerical Boundary Conditions for 3D Reduction to Two Dimensions Calculating the PML Parameters Implementation for E z Mode Total Field/Scattered Field Source
  • Slide 3
  • EMLAB 3 Uniaxial PML Reflections can be prevented at all angles, all frequencies, and for all polarizations if we allow our absorbing material to be diagonally anisotropic.
  • Slide 4
  • EMLAB 4 Derivation of Update Equation for H x 1. Governing Equation in the Frequency Domain 2. Prepare equation for conversion to time domain 3. Convert each term to the time domain 4. Approximate the equation for numerical implementation 5. Solve for H at the future time value
  • Slide 5
  • EMLAB 5 Step 1 Basic Update + Dirichlet Step 2 Basic Update + Periodic BC Step 3 Add PML Code Development Sequence Step 5 Calculate Response Step 6 Add a Device and Benchmark
  • Slide 6
  • EMLAB 6 Numerical Boundary Conditions for 3D
  • Slide 7
  • EMLAB 7 Boundary Conditions We have formulated our update equations so that the curl can be calculated separate from the update equation. Boundary condition problems occur only in these equations. Special boundary conditions are required at the high grid boundaries when computing the curl of the E field. Special boundary conditions are required at the low grid boundaries when computing the curl of the H field.
  • Slide 8
  • EMLAB 8 Handling the Boundary Conditions Boundary conditions are handled by calculating the curl terms at the boundaries separate from the rest of the curl equation. This should be done explicitly without using if statements. For example, Calculating the curl terms separate from the update equations is an excellent way to isolate and modularize the boundary condition problem.
  • Slide 9
  • EMLAB 9 MATLAB Code Implementation (1 of 3) First, we blindly try to calculate the curl. We see that we run into two problems at the y hi and z hi sides of the grid.
  • Slide 10
  • EMLAB 10 MATLAB Code Implementation (2 of 3) Next, we handle the z hi problem explicitly outside of the nz loop. We copy the code inside the nz loop and past it after the nz loop. We still have the problem at the y hi side of the grid, but now the problem occurs in two places.
  • Slide 11
  • EMLAB 11 MATLAB Code Implementation (3 of 3) Finally, we handle the y hi problem explicitly outside of the ny loop. We copy all of the code inside the ny loop and paste it after the nyloop.
  • Slide 12
  • EMLAB 12 Reduction to Two Dimensions
  • Slide 13
  • EMLAB 13 3D 2D (Exact) Sometimes it is possible to describe a physical device using just two dimensions. Doing so dramatically reduces the numerical complexity of the problem and is ALWAYS GOOD PRACTICE.
  • Slide 14
  • EMLAB 14 2D Grids are Infinite in the 3rd Dimension Anything represented on a 2D grid, is actually a device that is of infinite extent along the 3rd dimension.
  • Slide 15
  • EMLAB 15 What is Different in Two Dimensions? We will assume it is the z direction that is uniform. All derivatives in the z direction are zero We do not need a PML to terminate the z axis
  • Slide 16
  • EMLAB 16 Revisions for Update Equation for Hx The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 17
  • EMLAB 17 2D Update Equation for H x The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 18
  • EMLAB 18 2D Update Equation for H y The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 19
  • EMLAB 19 2D Update Equation for H z The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 20
  • EMLAB 20 2D Update Equation for D x The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 21
  • EMLAB 21 2D Update Equation for D y The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 22
  • EMLAB 22 2D Update Equation for D z The update coefficients are computed before the main FDTD loop. The integration terms are computed inside the main FDTD loop, but before the update equation. The update equation is computed inside the main FDTD loop immediately after the integration terms are updated.
  • Slide 23
  • EMLAB 23 2D Update Equations for Ex, Ey, and Ez The update coefficients are computed before the main FDTD loop. The update equations are computed inside the main FDTD loop.
  • Slide 24
  • EMLAB 24 MATLAB Code for Update Equations The update equation for Hx was This could be implemented in MATLAB as follows However, it is much simpler and faster to implement it using vectorized MATLAB commands.
  • Slide 25
  • EMLAB 25 Calculating the PML Parameters
  • Slide 26
  • EMLAB 26 MATLAB Code to Calculate PML Parameters To calculate the PML parameters x and y we employ the 2 grid concept. First, we calculate x and y on the 2 grid.
  • Slide 27
  • EMLAB 27 Visualizing the PML Parameters If calculated correctly, the PML conductivity terms should look like:
  • Slide 28
  • EMLAB 28 MATLAB Code to Calculate Update Coefficients Next, we overlay the PML functions onto the 1 grid to calculate the update coefficients containing PML terms.
  • Slide 29
  • EMLAB 29 Implementation E z Mode
  • Slide 30
  • EMLAB 30 Block Diagram for E z Mode (1 of 2)
  • Slide 31
  • EMLAB 31 Block Diagram for E z Mode (2 of 2)
  • Slide 32
  • EMLAB 32 Block Diagram for H z Mode (1 of 2)
  • Slide 33
  • EMLAB 33 Block Diagram for H z Mode (2 of 2)
  • Slide 34
  • EMLAB 34 Total Field/Scattered Field Plane Wave Source
  • Slide 35
  • EMLAB 35 Total Field / Scattered Field The total field/scattered field (TF/SF) condition is a technique to inject a one way source. Benefits Eliminates backward propagating power Needed for calculation of reflection Minimizes power incident on PML Ensures waves at the boundaries are only travelling outward 100% of power injected by the source is incident on the device being simulated.
  • Slide 36
  • EMLAB 36 Typical 2D FDTD Grid Layout For Modeling Periodic Structures
  • Slide 37
  • EMLAB 37 Typical 2D FDTD Grid Layout For Modeling general Structures
  • Slide 38
  • EMLAB 38 The Total Field/Scattered Field Framework
  • Slide 39
  • EMLAB 39 Correction to Finite Difference Equations at the Problem Cells (1 of 2) On the scattered field side of the TF/SF interface, the finite difference equation contains a term from the total field side. Due to the staggered nature of the Yee grid, this only occurs in the update equation for a magnetic field. In fact, this only occurs in the computation of the curl of E used in the H field update equations. We must subtract the source from to make it look like a scattered field quantity. standard curl equation This is a correction term that can be implemented after calculating the curl to inject a source.
  • Slide 40
  • EMLAB 40 Correction to Finite Difference Equations at the Problem Cells (2 of 2) On the total field side of the TF/SF interface, the finite difference equation contains a term from the scattered field side. Due to the staggered nature of the Yee grid, this only occurs in the update equation for an D field. In fact, this only occurs in the computation of the curl of H used in the D field update equations.
  • Slide 41
  • EMLAB 41 The Two Source Terms From the previous slides, we now know that we need to calculate two source functions before the main FDTD loop. These are: We need to make a few observations that must be accounted for before we can calculate these source functions correctly. 1.The amplitude of these functions can be different as E and H are related through the material impedance. 2.These functions are a half grid cell apart and have a small time delay between them 3.These functions exist at different time steps.
  • Slide 42
  • EMLAB 42 Calculation of the Source Functions (Ez Mode) We calculate the electric field as We calculate the magnetic field as
  • Slide 43
  • EMLAB 43 TF/SF Block Diagram for E z Mode
  • Slide 44
  • EMLAB 44 TF/SF Block Diagram for H z Mode