Open Sheptor opened 5 months ago
I agree that this applies to the discussion section, but due to inattention, this problem has been posted in this section. A few hours later, I noticed this and duplicated it in the discussion section https://github.com/thliebig/openEMS-Project/discussions/194. I conducted additional studies with an smoothed grid, the results of which I added to the discussion.
The simulation was performed with a smoothed grid near the waveguide (figures 7, 9) boundary. The result (figure 10) of modeling a rectangular waveguide demonstrates a decrease in reflection and a more similar appearance, as in the case when the walls of the waveguide are described by boundary conditions.
The result of the magic tee simulation is still significantly different from the analytical one (figures 11, 12).
Algorithms with a smoothed mesh: waveguide2.py
and magic_tee2.py
into https://github.com/Sheptor/test-issue
The problem was changing the arguments in the AddRectWaveGuidePort function for H-arm and E-arm. It was necessary to swap arguments a
and b
, as well as change mode from TE10
to TE01
.
Python interface:
# from
ports.append(FDTD.AddRectWaveGuidePort(2, start, stop, 'y', a*unit, b*unit, "TE10"))
...
ports.append(FDTD.AddRectWaveGuidePort(3, start, stop, 'x', a*unit, b*unit, "TE10"))
# to
ports.append(FDTD.AddRectWaveGuidePort(2, start, stop, 'y', b*unit, a*unit, "TE01"))
...
ports.append(FDTD.AddRectWaveGuidePort(3, start, stop, 'x', b*unit, a*unit, "TE01"))
Octave interface:
% from
[CSX, port{3}] = AddRectWaveGuidePort( CSX, 0, 3, start, stop, 'y', a*unit, b*unit, 'TE10', ext_port(3));
...
[CSX, port{4}] = AddRectWaveGuidePort( CSX, 0, 4, start, stop, 'x', a*unit, b*unit, 'TE10', ext_port(4));
% to
[CSX, port{3}] = AddRectWaveGuidePort( CSX, 0, 3, start, stop, 'y', b*unit, a*unit, 'TE01', ext_port(3));
...
[CSX, port{4}] = AddRectWaveGuidePort( CSX, 0, 4, start, stop, 'x', b*unit, a*unit, 'TE01', ext_port(4));
Figures 13 and 14 show the results of simulations using python and octave interfaces.
python
interfaceoctave
interfaceThe simulation results using the octave interface are consistent with the results [1], but the implementation of the program with the python interface incorrectly calculates port 3.
Python and octane scripts added to repository with names magic_tee3.py
and magic_tee3.m
respectively. https://github.com/Sheptor/test-issue
[1] Sieverding, Thomas, and Fritz Arndt. "Modal analysis of the magic tree." IEEE microwave and guided wave letters 3.5 (1993): 150-152. https://ieeexplore.ieee.org/abstract/document/217212
The problem of calculating the S-parameters of Magic tee and a rectangular waveguide
Introduction
Hello! I am engaged in research on the propagation of an electromagnetic wave in a segment of the magic tee waveguide with cross section 23x10mm^2. But in the simulation results, the sum of the squares of the s-parameters is not equal to 1 (figure 2). I tried to create a waveguide in different ways:
stl
file;Figure 1. Magic tee (metall hidden)
Figure 2. Magic tee (s-parameters)
Problem
To verify the results, a rectangular waveguide with a size of 23x10mm^2 was modeled. In the first case: the boundaries of the grid coincide with the section of the waveguide. in the second case, the border is shifted and metal is added to the place of free space (figures 5 - 8).
Question:
How does adding metal walls differ from setting boundary conditions ["PEC", "PEC", "PEC", "PEC", "PML_8", "PML_8"]?
Figгre 3. Empty waveguide
Figure 4. Empty waveguide (s-parameters)
Figure 5. Waveguide with thin metal walls (metal walls hidden)
Figure 6. Waveguide with thin metal walls (metal walls hidden) (s-parameters)
Figure 7. The walls of the waveguide are larger than the cavity of the waveguide
Figure 8. The walls of the waveguide are larger than the cavity of the waveguide (s-parameters)
Code
The simulation was carried out using both the python interface and the octave interface: https://github.com/Sheptor/test-issue