open EMS - ate.uni-due.de · Properties openEMS model Simulation Results Outline 1 Motivation 2...
Transcript of open EMS - ate.uni-due.de · Properties openEMS model Simulation Results Outline 1 Motivation 2...
Advances (and Surprises) inElectrodynamics
- Time Domain Simulations -
Thorsten Liebig
General and Theoretical Electrical Engineering (ATE)University of Duisburg-Essen, 47048 Duisburg, Germany
26.05.2011
EMSopen
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
Outline
1 Motivation
2 Rectangular Waveguide
3 Metamaterial and Plane Waves
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 2 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
Outline
1 Motivation
2 Rectangular Waveguide
3 Metamaterial and Plane Waves
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 3 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
Visualize electromagnetic fields to get a deeperunderstanding of the different speeds of light.
An inspiration to create your own electromagneticsimulations (maybe by using openEMS)
Just some nice field plots to look at...
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 4 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Outline
1 Motivation
2 Rectangular Waveguide
3 Metamaterial and Plane Waves
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 5 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Properties of a rectangular waveguide I
1 TE- and TM-modes propagable2 Highly dispersive wave propagation (β = β(ω))
TE-10 Mode properties
Electric field in y-direction only (Ey = A · sin(πxa ))
Magnetic fields in x- and z-direction
ab
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 6 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Properties of a rectangular waveguide I
y−→
x →
~E-field~H-field
a
b
00
(a) XY-plane
1.5
x→
z →
a
00
~H-field
(b) XZ-plane
Figure: Field distribution (TE-10 Mode)1
1pictures provided by Fedor Schreiber
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 7 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Dispersion and velocities
0 1 2 3 4 5 6 70
50
100
150
200
250
300
f(M
Hz)
→
β (1/m)
βlightβ
Figure: Dispersion diagram forthe rectangular waveguide
175 180 185 190 195 200 205 210 215 220 2250.5
1
1.5
2
vp = 1.51*c
0
vg = 0.66*c
0
f (MHz) →v p/c
0,v
g/c
0
vph/c0
vgrp/c0
Figure: Phase- andgroup-velocity in a rectangularwaveguide
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 8 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Model in openEMS I
Create a rectangulare waveguide model using theopenEMS-Matlab-Interface:First step: After defining your parameter etc.Initialize the FDTD options...
1 % initialize the FDTD structure and set the max number ot timesteps to "numTS"
2 % and the end criteria to 1e-5
3 FDTD = InitFDTD(numTS, 1e-5):
4 % excite the simulation using a gaussian puls
5 % center frequency: 0.5*(f_start+f_stop)
6 % 20dB cutoff frequency: 0.5*(f_stop-f_start)
7 FDTD = SetGaussExcite(FDTD, 0.5*(f_start+f_stop),0.5*(f_stop-f_start));
8 % define the boundary conditions for x_min, x_max, y_min, y_max, z_min, z_max
9 FDTD = SetBoundaryCond(FDTD, {’PEC’,’PEC’,’PEC’,’PEC’,’PEC’,’PML’});
...done!
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 9 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Model in openEMS II
Setup your FDTD mesh & model...10 % setup the FDTD mesh
11 CSX = InitCSX();
12 mesh.x = SmoothMeshLines([0 a], 10);
13 mesh.y = SmoothMeshLines([0 b], 10);
14 mesh.z = SmoothMeshLines([0 length], 10);
15 CSX = DefineRectGrid(CSX, unit,mesh);
16 % setup your excitation
17 CSX = AddExcitation(CSX,’excite’,0,[1 1 0]);
18 weight{1} = func_Ex; % for TE-10 this is ’0’
19 weight{2} = func_Ey; % for TE-10 this is ’sin(0.0031416*x)’
20 weight{3} = 0;
21 CSX = SetExcitationWeight(CSX,’excite’,weight);
2223 start=[mesh.x(1) mesh.y(1) mesh.z(1) ];
24 stop =[mesh.x(end) mesh.y(end) mesh.z(1) ];
25 CSX = AddBox(CSX,’excite’,0 ,start,stop);
...done.
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 10 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Model in openEMS III
Setup your dumps...26 % e-field dump on an xz-plane (vtk file format)
27 CSX = AddDump(CSX,’Et_xz’,’FileType’,0,’DumpMode’,1,’SubSampling’,’2,2,2’);
28 start = [mesh.x(1) b/2 mesh.z(1)];
29 stop = [mesh.x(end) b/2 mesh.z(end)];
30 CSX = AddBox(CSX,’Et_xz’,0 , start,stop);
3132 % e-field dump line along the center-axis of the waveguide (hdf5 file format)
33 CSX = AddDump(CSX,’Et_z’,’FileType’,1,’DumpMode’,1,’SubSampling’,’1,1,1’);
34 start = [a/2 b/2 mesh.z(1)];
35 stop = [a/2 b/2 mesh.z(end)];
36 CSX = AddBox(CSX,’Et_z’,0 , start,stop);
...done.
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 11 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Model in openEMS IV
That’s it! Write file and run...37 WriteOpenEMS([Sim_Path ’/’ Sim_CSX],FDTD,CSX);
38 RunOpenEMS(Sim_Path, Sim_CSX)
Do your post-processing...39 % Read the center-axis dump and display time-domain fields in a matlab figure
40 [Et_field Et_mesh] = ReadHDF5Dump([Sim_Path ’/Et_z.h5’]);
41 mesh_z = Et_mesh.lines{3};
42 for n=1:numel(Et_field.TD.values)
43 Ey = squeeze(Et_field.TD.values{n}(1,1,:,2)); %reduce dimensions to Ey(z)
44 plot(mesh_z, Ey); %plot Ey over z-coodinates
45 pause(0.1);
46 end
to be continued ...
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 12 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Time domain results I
Figure: Paraview: Gaussian pulse in a time-domain numericalsimulation
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 13 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Dispersion and velocities
Another look at the dispersion and velocities:
0 1 2 3 4 5 6 70
50
100
150
200
250
300
f(M
Hz)
→
β (1/m)
βlightβ
Figure: Dispersion diagram forthe rectangular waveguide
175 180 185 190 195 200 205 210 215 220 2250.5
1
1.5
2
vp = 1.51*c
0
vg = 0.66*c
0
f (MHz) →
v p/c
0,v
g/c
0
vph/c0
vgrp/c0
Figure: Phase- andgroup-velocity in a rectangularwaveguide
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 14 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS modelSimulation Results
Time domain results II
0 5 10 15 20 25 30−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
z (m) →
Ey (
V/m
) →
t = 0.00ns
Figure: Gaussian pulse in a time-domain numerical simulation
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 15 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Outline
1 Motivation
2 Rectangular Waveguide
3 Metamaterial and Plane Waves
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 16 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Properties of a rectangular waveguide
Metamaterial Properties for Drude type materials
εr = εr, ∞
(
1 −f 2pe
f 2
)
and µr = µr, ∞
(
1 −f 2pm
f 2
)
with the plasma frequency fpe and fpm.
Both εr and µr are frequency dependent and can benegative for frequencies below their respective plasmafrequencies.
In case of εr < 0 and µr < 0 the refractive index isnegative as well.
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 17 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Material Dispersion
−30 −20 −10 0 10 20 300
100
200
300
400
500
600
700
800
900
1000
f(M
Hz)
→
β
βlight
|β|β
fn=−1
fn=0
fn=+1
Figure: Dispersion diagram
300 400 500 600 700 800 900 1000−4
−3
−2
−1
0
1
2
f (MHz) →
εr
µr
neff
fn=−1
fn=0
fn=+1
Figure: Material constants andrefractive index n
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 18 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Phase and group velocity
0 100 200 300 400 500 600 700 800 900 10000
0.5
1
1.5
2
2.5
3
replacementsv p/c
0,v
g/c
0→
f (MHz) →
vph/c0
vgrp/c0
vp,n=+1
vg,n=+1vg,n=0
vp,n=−1
vg,n=−1
Figure: Phase and group velocity
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 19 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Model in openEMS I
Simulate a plane wave in openEMS:1 % initialize the FDTD structure and set the max number ot timesteps to "numTS"
2 % and the end criteria to 1e-5
3 FDTD = InitFDTD(numTS, 1e-5):
4 % excite the simulation using a gaussian puls
5 FDTD = SetGaussExcite(FDTD, f0, f0/sqrt(2));
6 % define the boundary conditions for x_min, x_max, y_min, y_max, z_min, z_max
7 FDTD = SetBoundaryCond(FDTD, {’PMC’,’PMC’,’PEC’,’PEC’,’MUR’,’MUR’});
...done!
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 20 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Model in openEMS II
Setup your FDTD mesh & model:8 % setup the FDTD mesh
9 CSX = InitCSX();
10 mesh.x = -width/2 : mesh_res : width/2;
11 mesh.y = -height/2 : mesh_res : height/2;
12 mesh.z = -length/2 : mesh_res : length/2;
13 CSX = DefineRectGrid(CSX, 1e-3,mesh);
14 % setup your excitation
15 CSX = AddExcitation(CSX,’excite’,0,[0 1 0]); % excite E_y
1617 start=[-width/2 -height/2 mesh.z(3)];
18 stop =[ width/2 height/2 mesh.z(3)];
19 CSX = AddBox(CSX ,’excite’ ,0 ,start ,stop);
20 % apply drude material
21 CSX = AddProperty(CSX,’LorentzMaterial’,’drude’);
22 CSX = SetPropertyArgs(CSX,’LorentzMaterial’,’drude’,’Property’,’Epsilon’,2);
23 CSX = SetPropertyArgs(CSX,’LorentzMaterial’,’drude’,’Property’,’Mue’ ,2);
24 CSX = SetPropertyArgs(CSX,’LorentzMaterial’,’drude’,’PlasmaFrequency’,’Epsilon’,MTM.f0);
25 CSX = SetPropertyArgs(CSX,’LorentzMaterial’,’drude’,’PlasmaFrequency’,’Mue’ ,MTM.f0);
2627 start=[mesh.x(1) mesh.y(1) -MTM.length/2];
28 stop =[mesh.x(end) mesh.y(end) MTM.length/2];
29 CSX = AddBox(CSX,’drude’, 10 ,start,stop);
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 21 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Model in openEMS III
Setup your dumps:30 % e-field dump on an xz-plane (vtk file format)
31 CSX = AddDump(CSX,’Et_xz’,’FileType’,0,’DumpMode’,1,’SubSampling’,’2,2,2’);
32 start = [mesh.x(1) 0 mesh.z(1)];
33 stop = [mesh.x(end) 0 mesh.z(end)];
34 CSX = AddBox(CSX,’Et_xz’,0 , start,stop);
3536 % e-field dump line along the center-axis (x=y=0) (hdf5 file format)
37 CSX = AddDump(CSX,’Et_z’,’FileType’,1,’DumpMode’,1,’SubSampling’,’1,1,1’);
38 start = [0 0 mesh.z(1)];
39 stop = [0 0 mesh.z(end)];
40 CSX = AddBox(CSX,’Et_z’,0 , start,stop);
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 22 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Model in openEMS IV
That’s it! Write file and run...41 WriteOpenEMS([Sim_Path ’/’ Sim_CSX],FDTD,CSX);
42 RunOpenEMS(Sim_Path, Sim_CSX)
Do your post-processing...43 % Read the center-axis dump and display frequency-domain fields in a matlab figure
44 [Et_field Et_mesh] = ReadHDF5Dump([Sim_Path ’/Et_z.h5’],’Frequency’,[f_m f0 f_p]);
45 mesh_z = Et_mesh.lines{3};
4647 phase = linspace(0,360,51);
48 phase = phase(1:end-1);
4950 for n=1:numel(Et_field.FD.values) % loop through all frequencies
5152 Ey = squeeze(Et_field.FD.values{n}(1,1,:,2)); %reduce dimensions to Ey(z)
5354 for p = phase %loop through phase
55 plot(mesh_z, real( Ey * exp(1j*p*pi/180) ) ); %plot Ey over z-coodinates
56 pause(0.1);
57 end
5859 end
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 23 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Time domain results
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−1
−0.8
−0.6
−0.4
−0.2
0
0.2
0.4
0.6
0.8
1
z (m) →
Ey (
V/m
) →
t = 0.00ns
Figure: Gaussian pulse in a time-domain numerical simulation
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 24 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
Material Dispersion
A closer look at the dispersion and materials constants:
−30 −20 −10 0 10 20 300
100
200
300
400
500
600
700
800
900
1000
f(M
Hz)
→
β
βlight
|β|β
fn=−1
fn=0
fn=+1
Figure: Dispersion diagram
300 400 500 600 700 800 900 1000−4
−3
−2
−1
0
1
2
f (MHz) →
εr
µr
neff
fn=−1
fn=0
fn=+1
Figure: Material constants andrefractive index.
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 25 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
The perfect lens - The wave front...
Figure: The wave front travels through the lens. Source:www.trnmag.com/Pendry-perfect-lens-diagram.gif
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 26 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
The perfect lens - Refocus Effect?
Figure: The perfect lens effect? Source:www.trnmag.com/Pendry-perfect-lens-diagram.gif
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 27 / 28
EMSopen
MotivationRectangular Waveguide
Metamaterial and Plane Waves
PropertiesopenEMS model
For further information:
www.ate.uni-due.de
www.openEMS.de(under construction)
Thank you for your attention!
Thorsten Liebig – [email protected] ASED 3 - openEMS Time Domain Simulations 28 / 28