Demo 1: Rectangular waveguide filter

In this demonstration I will show how just a couple of lines of code in EMerge can reproduce the results from a geometrically simple rectangular waveguide filter. The filter design is courtesy of Gouni Slimane, Damou Mehdi, Chetioui Mohammed, and Boudkhil Abdelhakim in their 2022 paper titled “Design of a Bandpass Rectangular Waveguide Filter Based on Direct Coupled Technique”.

The paper can be accessed through this link: https://ijet.ise.pw.edu.pl/index.php/ijet/article/view/10.24425-ijet.2022.141264/988

Which is public under the license: https://creativecommons.org/licenses/by/4.0/

For this demo we will not go into detail on how the filter works and why it works.

The Original

The design features a simple MR75 waveguide. Due to the z-axis symmetry, I reduced the height of the waveguide to 2mm to save mesh size and speedup simulation. In fact, such a design could be simulated in 2D as well but this part of the EMerge solver is currently not active anymore.

A screenshot of the design from the paper.

The simulated (HFSS) and predicted filter performance according to the paper.

The dimensions can be taken from the paper. The S-parameters from their paper in their Fig. 14 shows quite a difference in the passband characteristics. I think part of this is explained possibly due to a low mesh resolution. The mesh of this specific 4th pole bandpass filter is not shown but a mesh from a different filter suggest quite a coarse meshing.

The Geometry plus an overlay of the mesh.

EMerge Simulation Setup

Since the latest version of EMerge, you can save and load project files to separate the simulation from the data processing. This is still a feature under development as all savable data must be Pickleable in Python.

import emerge as em
from emerge.pyvista import PVDisplay
import numpy as np

# Constants
cm = 0.01
mm = 0.001
mil = 0.0254
um = 0.000001
PI = np.pi

# Variable definitions
a1 = 19.05*mm
w2 = 10.84*mm
w3 = 44.1*mm
w4 = 10.2*mm
w5 = 41.96*mm
w6 = 9.3*mm
T1 = 2.8*mm
T2 = 8.92*mm
T3 = 0.7*mm
L1 = 10*mm
L2 = 23.09*mm
L3 = 23.96*mm
h = 2*mm#9.53*mm

with em.Simulation3D("Design1", PVDisplay, save_file=True) as m:
    m['b1'] = em.geo.Box(L1,a1,h,(0,-a1/2,0))
    m['b2'] = em.geo.Box(T1,w2,h,(L1,-w2/2,0))
    m['b3'] = em.geo.Box(L2, w3, h, (L1+T1,-w3/2,0))
    m['b4'] = em.geo.Box(T2,w4,h,(L1+L2+T1,-w4/2,0))
    m['b5'] = em.geo.Box(L3,w5,h,(L1+L2+T1+T2,-w5/2,0))
    m['b6'] = em.geo.Box(T3,w6,h,(L1+L2+L3+T1+T2,-w6/2,0))
    m['b7'] = em.geo.Box(L1,a1,h,(L1+L2+L3+T1+T2+T3, -a1/2,0))

    m.define_geometry()

    m.physics.set_frequency_range(11e9,13e9,201)
    m.physics.set_resolution(0.1)

    m.mesher.set_size_in_domain(m['b2'].tags, 1*mm)
    m.mesher.set_size_in_domain(m['b4'].tags, 1*mm)
    m.mesher.set_size_in_domain(m['b6'].tags, 1*mm)
    m.generate_mesh()

    m.view(use_gmsh=True)

    # Set boundary conditions
    port1 = em.bc.RectangularWaveguide(m['b1'].face('left'), 1)
    port2 = em.bc.RectangularWaveguide(m['b7'].face('right'), 2)

    # Assign boundary conditions
    m.physics.assign(port1)
    m.physics.assign(port2)

    # Run simulation steps
    m.physics.frequency_domain_par(njobs=4, frequency_groups=16)

The simulation is Run on a Dell laptop with an Intel vPRO i7 with 4 parallel jobs using the SuperLU solver. The total simulation time of 201 frequency points took 96 seconds (1.5 minutes).

The results

The following simple file shows the frequency response of the filter, smith chart and the field amplitude inside the waveguide at a frequency in the passband.

import emerge as em
from emerge.pyvista import PVDisplay
import emerge.plot as plt
import numpy as np

# Constants
cm = 0.01
mm = 0.001
mil = 0.0254
um = 0.000001
PI = np.pi

with em.Simulation3D("Design1", PVDisplay, load_file=True) as m:
    
    fdata = m.physics.freq_data

    f, S11 = fdata.ax('freq').S(1,1)
    f, S21 = fdata.ax('freq').S(2,1)
    plt.plot_sp(f/1e9, [S11, S21], labels=['S11','S21'], dblim=[-50,0])
    plt.smith(f, S11)
    [m.display.add_object(m[f'b{i}']) for i in range(1,8)]
    m.display.add_surf(*fdata.item(101).cutplane(1*mm, z=1*mm).scalar('Ez','real'))
    m.display.show()

The mesh from the EMerge simulation. Notice the refinement around the narrow regions.

The resultant real part of the Ez-field.

The computed S-parameters for the filter

Next
Next

We are live!