Hi Thorsten,

I have gone through several of the tutorials posted on the OpenEMS website. At a first attempt to use the code I have generated a unit cell of a grating waveguide. The guide consists of a top grating layer of 1/2 of a dielectric and the other half air. The second layer is made up of the top layer dielectric. The third layer is the substrate and consists of a second dielectric. I’m trying to plot the transmittance and reflectance of the cell in the frequency range from 525THz to 527THz when subjected to a plane wave (TE polarized) perpendicular to the top layer of the cell. I set all boundary conditions as absorbing boundary conditions (MUR). For the excitation, I used the Gaussian pulse as a total-field/scattered-field source along with the plane wave excite as outlined in the user documentation. I added the E-field and H-field magnitudes using the AddExcitation function. I set up a probe at the interface of the top of the first layer and a second one within the substrate to measure the voltage and current. I used the voltage and current from these probes to compute the incident and transmitted power and then computed the transmittance and reflectance. The resulting plot is not correct. Does the above method seem like a reasonable way to model this waveguide? It might be easier for me to send you the matlab script for you to review. Let me know if this would be an easier way for you to see what is going on with the simulation and I will send you the script.

Thanks.

Scott.

## Simulation using OpenEMS

**Moderator:** thorsten

### Re: Simulation using OpenEMS

Hi,

this sounds that many details can be problematic. First use a pml instead of MUR with the TFSF approach. Does the TFSF field excitation enclose your entire structure?? If you only excite perpendicular, maybe you want to model the sides using PEC and PMC to mimic an infinite size (and in this case use a TFST plane only on top) ...

About the probes I wouldn't be to sure too. Maybe you better use E/H dump boxes in frequency domain and do some (E x H) calculations instead ...

This is really not the kind of model I would call a

regards

Thorsten

this sounds that many details can be problematic. First use a pml instead of MUR with the TFSF approach. Does the TFSF field excitation enclose your entire structure?? If you only excite perpendicular, maybe you want to model the sides using PEC and PMC to mimic an infinite size (and in this case use a TFST plane only on top) ...

About the probes I wouldn't be to sure too. Maybe you better use E/H dump boxes in frequency domain and do some (E x H) calculations instead ...

This is really not the kind of model I would call a

*"first attempt"*... this is really difficult to do right (if possible at all).regards

Thorsten

### Re: Simulation using OpenEMS

Hi Thorsten,

The TFSF does enclose the entire structure, and I have tried the PML boundary conditions without success. I like your suggestion of modeling the sides using PMC and PEC to mimic an infinite size. I will also set the propagation direction with PML's at the boundary. Do you have any documentation that I can reference to set-up the TFSF as a plane only at the top?

Thanks.

Scott.

The TFSF does enclose the entire structure, and I have tried the PML boundary conditions without success. I like your suggestion of modeling the sides using PMC and PEC to mimic an infinite size. I will also set the propagation direction with PML's at the boundary. Do you have any documentation that I can reference to set-up the TFSF as a plane only at the top?

Thanks.

Scott.

### Re: Simulation using OpenEMS

Hi,

But I guess you would not need the TFSF for that. Just a normal excitation and from the free space wave impedance you could calculate/separate incoming and reflected waves.

But I'm not really sure what you want to investigate or find out...

regards

Thorsten

I obviously meant that the structure is well inside and does not intersect with it.TFSF does enclose the entire structure

The pml has a thickness of 8 cells (by default) did the TFSF source have the appropriate distance?I have tried the PML boundary conditions without success

I have not tries it yet and I'm not sure it it works or makes much sense. But the idea would be that if you have say E_x and H_y with k_z only. You could use PEC in x-, PMC in y- and PML in z-direction to guide the wave (see parallel plate tutorial).Do you have any documentation that I can reference to set-up the TFSF as a plane only at the top?

But I guess you would not need the TFSF for that. Just a normal excitation and from the free space wave impedance you could calculate/separate incoming and reflected waves.

But I'm not really sure what you want to investigate or find out...

regards

Thorsten