Part E1 Transient Fields: Leapfrog Integration Prof. Dr.-Ing. Rolf Schuhmann
MAXWELL Grid Equations in time domain d 1 h() t MC e( t) dt d 1 e() t M Ch() t j( t) dt Transient Fields system of 1 st order ordinary differential equation (ODEs) Numeric integration using standard methods of numerical analysis utilize the system s special structure, using a central difference quotient f ( t t) f ( t t) f t O t t ( ) ( ) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik
Discretization of time: FARADAY s law equidistant time steps ( temporal grid ) h ( m) Transient Fields d h dt h( tm ), tm t0 m t with time step width t 1 () t MC e( t) central DQ for the time derivative h h ( m1) ( m) t d h dt ( m ) 1 M Ce 1 (m 1 ) half time step ( m) h e d h dt ( m ) 1 ( m ) 1 ( m1) h ( m) h t m t m+1/ t m+1 t t m+ t staggered time ais (allocation of quantities) (analogous to staggered spatial allocation in the dual grid system) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 3
Transient Fields Discretization of time: AMPERE s law equidistant time steps e ( m ) e( t t m t ), t 1 1 0 ( ) 1 m m 1 d e dt (w/o currents!) 1 () t M Ch() t central DQ for the time derivative e ( m ) ( m ) 3 1 ( m) h e t e d h dt d e dt ( m ) 1 ( m ) 1 ( m1) d e dt M Ch ( m1) ( m1) h 1 ( m1) e ( m ) 3 again at full time steps ( m) h t m t m+1/ t m+1 t m+3/ t m+ t Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 4
Construction of the time integration scheme d h dt d e dt 1 ( m ) ( m1) ( m) h t ( m1) ( m ) ( m ) h e 3 1 e t M M 1 Ce Ch 1 ( m ) 1 ( m1) Transient Fields h h t M Ce ( m1) ( m) 1 ( m 1 ) m 3 1 m e e t M C ( ) ( ) 1 ( m1) update equations h ( m) h e ( m ) 1 ( m1) h e ( m ) 3 ( m) h t m t m+1/ t m+1 t m+3/ t m+ t leapfrog scheme Etensions Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 5
Leapfrog Scheme Special time integration scheme for MAXWELL Grid Equations idea: finite differences on an equidistant time ais motivated by the structure of the ODE system (of MAXWELL s equations) (so far) only the simplest form of the curl equations properties staggered allocation of the quantities on time ais eplicit update equations with high efficiency (no matri inversion, no system of equations must be solved) local accuracy: nd order in the temporal FD approimation global accuracy? stability? proposed for MAXWELL s equations by K.S. YEE 1966 (later referred to as: FDTD = finite difference time domain) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 6
Small eample Leapfrog Scheme: Eample 33 grid, PEC boundaries, unit lengths = y = z = 1m only 5 non-zero components: 1, 4 free indeing epected solution: one cavity mode (type E z,110 with f res 106 MHz) e h time domain simulation no current (0) start with e 1 vary time step width t (start with ca. 10 steps per time period) transient results of (normalized) fields h 1 h h 4 e 1 h 3 Matlab... Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 7
Leapfrog Scheme: Eample (Scaled) transient fields, varying time step width t t 0 fitted cos function Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 8
Leapfrog Scheme: Eample (Scaled) transient fields, varying time step width t t 0 fitted cos function Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 9
Leapfrog Scheme: Eample (Scaled) transient fields, varying time step width t 3t 0 fitted cos function Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 10
Leapfrog Scheme: Eample (Scaled) transient fields, varying time step width t 4 t 0 fitted cos function Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 11
Leapfrog Scheme: Eample (Scaled) transient fields, varying time step width t 4 t 0 semi-logarithmic Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 1
Leapfrog Scheme: Eample Impact of the time step width in the leapfrog scheme 1. accuracy very accurate result for (at least) 10 time steps per time period larger time steps: phase error (effective frequency ) insufficient sampling rate: inaccurate results. stability time integration is instable for a too large t! eponential increase (comple frequency) the leapfrog scheme is only conditionally stable (strict) stability limit: t t ma 3.33 10 9 s (eperimental value) calculate a priori? instability: meaningless results Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 13
Properties of the discrete solutions Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 14
Properties of the discrete solutions Properties of the Solution eample D-grid with absorbing boundaries radiation source (antenna with reference impedance) in the middle time domain: ecitation signal = modulated pulse fields are monitored at several frequencies (FOURIER transform) online demo... Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 15
Properties of the Solution Cylindrical wave in a Cartesian FIT grid f 50 MHz D grid - 11 points - symmetry boundaries - = y = 0.5m 1 f f f f f 50 MHz: 6m=1 100 MHz: 3m=6 10 MHz:.5m=5 150 MHz: m=4 00 MHz: 1.5m=3 Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 16
Properties of the Solution Cylindrical wave in a Cartesian FIT grid f 150 MHz D grid - 11 points - symmetry boundaries - = y = 0.5m f 50 MHz: 6m=1 4 f 100 MHz: 3m=6 f 10 MHz:.5m=5 f 150 MHz: m=4 f 00 MHz: 1.5m=3 Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 17
Grid Solution for Plane Waves Cylindrical wave in a Cartesian FIT grid for fied grid: frequency spatial sampling rate / spatial sampling dominates accuracy (ok: / > 10) discrete wave length depends on direction of propagation f=50 MHz, / 1 f=150 MHz, / 4 Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 18
Grid Solution for Plane Waves Wave propagation in grid, simplest case plane waves j( tk r ) j t j( k k y k z) E, H ~ e e e y z (continuous) dispersion relation: k ky kz c (relation of: wave number / frequency = space / time dependency) infinite grid (no specific boundary conditions), equidistant (constant grid steps, y, z), vacuum (constant: 0, 0, s = 0 ) (numerical) dispersion relation in the grid? Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 19
Grid Solution for Plane Waves 1) Properties of the spatial discretization impose plane wave for grid quantities jk EH, e r e T y eˆy bˆz eˆ e y e jk r e y T ey T reference point all components can be represented by amplitudes (quantities eˆ, eˆ, eˆ, bˆ, at reference point) phase factors y z jk jk y jkzz y z y T e, T e, T e Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 0
Grid Solution for Plane Waves Local derivation of the discrete wave equation eˆ T y eˆ ˆ ˆ ˆ ˆ y ezt eyt z e j b y z eˆy bˆz eˆ T y eˆ ˆ ˆ ˆ ˆ z et ezt e j b z y eˆ eˆ ˆ ˆ ˆ ˆ eyt et y e j b y z 33 version of FARADAY s Law for wave amplitudes ˆ 0 ( T 1) ( 1) ˆ z Ty e b ( T 1) 0 ( 1) ˆ ˆ z T e y j b y ( T 1) ( 1) 0 ˆ ˆ y T e z b z Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 1
Grid Solution for Plane Waves Local derivation of the discrete wave equation eˆy eˆ bˆz T y eˆ T y ˆ 0 ( T 1) ( T 1) ˆ z y e b ( T 1) 0 ( T 1) eˆ ˆ j b z y y ( T 1) ( T 1) 0 eˆ ˆ y z b z eˆ Cˆ eˆ j bˆ analogous: insert into each other: ˆ Chˆ j dˆ with ˆ C C dˆ Mˆ eˆ, bˆ Mˆ hˆ ˆ H ˆ M CM Cˆ e ˆ 1 ˆ 1 ˆ eˆ (a local 33- wave equation) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik
Solutions of Grid Solution for Plane Waves ˆ M CM Cˆ e ˆ 1 ˆ 1 ˆ eˆ left hand side (spatial discretization): compute eigenvalues ˆ of Aˆ ˆ Mˆ CMˆ Cˆ 1 1 ( Aˆ ˆ ) (...) ˆ 0 1 ˆ static solution sink sinkyy sinkzz y z,3 c plane waves ( polarizations!) MAXWELL s grid equations require: ˆ Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 3
Numerical Dispersion Relation Numerical dispersion relation (NDR) of the FIT Gitterdispersionsgleichung k sin k y y k z sin sin z y z c condition for the propagation of plane waves in the grid only valid eactly in the given simplest case dispersion in the grid depends on direction of wave propagation! converges towards continuous dispersion relation (...):, y, z 0 k k k y z c allows a quantitative approimation of the dispersion error (...) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 4
Numerical Dispersion Relation Directional wave propagation in the grid k 1 k0 0 sin k c k 1/ k1/ 0 sin k ( ) ( ) c (with y) (both converging) different wave lengths (for identical frequency) k this eplains the results for the cylindrical wave eperiment! Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 5
Numerical Dispersion Relation quantitatively: cos k k diskret sin 0 y k Polar plot representation (n=4): diskret kontin. sin cos / / n sin sin / / n n n kontin. n diskret diskret 1 3 cos4 6 n 4 kontin. Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 6
Numerical Dispersion: Time Time harmonic wave temporal phase factor Tt j t e M CM Ce 1 1 d dt e -1 1-1 1 discrete 1 st derivative Tt 1 eˆ ê T eˆ t t ref t t ref t ref t t t/ -1 1 discrete nd derivative d 1 eˆ ref e eˆ ref ( Tt 1) (cost j sint 1) dt t t t ref d 1 1 1 ˆ ˆ ref t t ref e e ( T T ) e (cost j sint cost j sin t) dt t t 1 1 (sin t ) eˆ (1 cos ) ˆ ref t e ref ( t ) ( t ) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 7
Numerical Dispersion Relation Numerical dispersion relation (time domain) k sin k y y k z 1 t sin sin sin z y z c t now a complete description of the result above (in the simplest case ) identical epressions for space- and time-dependence converges for step widths 0 (later: temporal error < spatial error) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 8
NDR and Stability Stability eperimental result: stable for t < t ma can the stability limit be computed a priori? stable: f(t) = ep(j t) instable: f(t) = ep(j t) ep(at) = ep(j t) only real eigenfrequencies comple eigenfrequency Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 9
Stability NDR and Stability the scheme is stable, if all (eigen)frequencies are real in the simplest case: modelled by the numerical grid dispersion relation: eigenfrequency, wave number, step widths k sin k y y k z 1 t sin sin sin z y z c t condition for real frequencies real sin( t ) 1 k, k, k y z worst-case approimation of the left-hand side (wave numbers) sin( k ) 1 l.h.s. 4 4 4 y z Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 30
NDR and Stability Stability ( ) t 4 4 4 1 sin y z c t 1 1 1 sin t t c 1 y z! 1 1 t c 1 1 1 y z COURANT - FRIEDRICHS - LEVY (CFL) criterion = stability limit (maimum stable time step width) for FIT + leapfrog scheme (or FDTD, resp.) conditionally stable time integration scheme Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 31
CFL criterion Leapfrog: Stable Time Step maimum stable time step for the time integration t ma depends on spatial grid step width (and material) for y z : tma c 3 3 only valid in the simples case; otherwise (heuristically): 1 1 t c 1 1 1 y z t min i i 1 1 1 y z i i i i (worst-case for all grid cells) can easily be evaluated a-priori! 1 9 yields here: tma 1.93 10 s (eperimentally: 3.3 10-9 s) c 3m Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 3
Leapfrog: Stable Time Step CFL criterion worst-case approimation for all grid cells in the infinite, homogeneous grid t min i i 1 1 1 y z i i i i all possible (real) wave numbers k, k y, k z real situation with losses, boundaries, etc. (strictly speaking:) the derivation is no longer valid inhomogeneous, finite grids: worst-case situation often only locally deviation in the demo eample: small grid, limited range of wave numbers k, k y, k z (typically the estimation is much closer) a superior (eact!) formula is t ma = / ma 1 1 ma CC (eigenvalue with largest magnitude of A M CM C ) Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 33
Interpretation of TD Eigenvalues 1. Time continuous / frequency domain / t 0 1 rot E 1 rot H t H E t 1 rot H H 1 rot E t E H / t Ht () Im j E/ t Et () FIT Re Sign: operations still missing ( ) already shown: real frequencies for lossless FIT systems the time-continuous system itself is stable Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 34
Interpretation of TD Eigenvalues. Time discrete: t > 0 (e.g., leapfrog) each time step advances the phase of each eigensolution by we already know: frequencies only approimate t TD TD eigenvalue of the time stepping scheme j j TD t e e TD the scheme is stable, if j TD t e 1 TD TD ( m1) h the stability of the time stepping scheme depends on how it approimates the eigenfrequencies ( m) h Im ( m1) ( m1/ ) e ( m) Re leapfrog ( ): j ( t) ( t) e 1 t 1 4 t t ma ma Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 35
TD Stability fully continuous system (MAXWELL) is stable with real eigenfrequencies phys FIT with C C etc., Others? (FD, FE, ) T FIT semi-discrete system (timecontinuous MAXWELL Grid Eqs.) is stable with real eigenfrequencies Leapfrog with limited time step Others? j TD t e 1, TD fully discrete time-domain system is stable with eigenvalues within unit circle Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 36
Accuracy and Stability Accuracy and stability stability criterion determines ma. time step the ratio time step / time period also determines accuracy space: sampling of the wave length by grid spatial error time: sampling of the time period by time ais temporal error coupled by t t ma c quantitative relation between spatial and temporal approimation? is the choice of the maimum stable reasonable w.r.t. accuracy? Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 39
Accuracy and stability Accuracy and Stability Eample (1D): plane wave propagating in -direction sin k 1 sin t numerical grid dispersion: c t analyze accuracy: compare FIT results with continuous values k fied cont. = k c vs. FIT (eample: cavity), or fied k,cont. = / c vs. k,fit (eample: cyl. wave) vary the grid step -- sampling rates -- (n steps per wave length) k n n k vary the time step T t m m (m steps per period) t n m Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 40
insert: k Accuracy and Stability n n m FIT n n FIT k c n c m m sin m sin si sin with n m T t k c,, cont. relative frequency error: FIT cont. cont. cont. sin m sin m n n 1 for further analysis: series epansion: consider separately: 3 5 sin a a a O( a ) m (spatial error: only due to > 0 ) n (temporal error: only due to t > 0 ) 1 6 1 O 4 space 6n n 1 O 4 time 6m m Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 41
Accuracy and Stability 1 O 4 space 6n n 1 O 4 time 6m m quantitatively: error < % for (6 n ) 0.0 n 0.1 9.1 10 lines per lambda rule spatial and temporal errors compensate each other (partially) is it possible to take the best choice m=n? apply CFL criterion c 3 3 t m 3 n c 3 t the stability limit yields errors in the same magnitude, m=n only possible in the (academic) 1D case ( magic time step ) no (considerable) additional effort by stability requirement! Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 4
The leapfrog scheme is NOT efficient, if Limitations of Leapfrog the CFL criterion requires a very small time step very small grid steps (misalignments, small geometric details related to ) very small frequencies (e.g. 50 Hz, related to =6.000 km; object size 1m1m1m, = 1cm, t 10 10 s, T 10 8 t ) good conductors with small skin depth ( use special models) the computational domain is electrically very large (related to ) very high frequencies and large objects: > 10 grid steps per required due to dispersion errors e.g. plane wave (1 GHz) on airplane (30m=100 ): 1000 lines per spatial dimension = 10 9 grid points in 3D! Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 44
The leapfrog scheme is VERY efficient Limitations of Leapfrog if the size of the structure is in the range of a few wavelength many technical applications work with or below the fundamental resonance microwave filter, antennas, resonators, connectors, waveguiding structures & transitions,... if one is interested in broadband results ecitation in time domain by pulses with broadband spectral content broadband results (such as S-parameter) within one simulation run details... Rolf Schuhmann TU Berlin, FG Theoretische Elektrotechnik 45