Unexpected result after irradiating a PEC plate

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Post Reply
khashabri
Posts: 4
Joined: Wed 13 Nov 2019, 12:45

Unexpected result after irradiating a PEC plate

Post by khashabri » Thu 23 Jan 2020, 12:49

Hello guys,
in the following script, a metal (PEC) plate, which is standing crooked, will be irradiated with a plane wave.
This CSXCAD image shows the structure.
Screenshot_2020-01-23_11-35-55.png
Screenshot_2020-01-23_11-35-55.png (109.31 KiB) Viewed 1659 times
I saved the result as an HDF5 file and plotted it afterward. The following mp4 animation shows the process of irradiating the plate with the plane-wave.
Anim_to_show_transmission.mp4.zip
(122.01 KiB) Downloaded 97 times
Unexpectedly, the wave goes through the plate even if the plate is bigger than the source :shock: . Can anyone explain the reason or is it an OpenEMS bug? :?

PS.: Making the plate smaller or letting it stand vertically didn't change that effect.

Code:

Code: Select all

### Import Libraries
import os, tempfile
from pylab import *

from CSXCAD import ContinuousStructure, CSTransform
from openEMS import openEMS
from openEMS.physical_constants import *
from openEMS.ports import UI_data
from selfDefinedPlotting import *

start_frequency = 50e6
stop_frequency = 2e9


def rcs(inc_angle, polarisation):
    ### Setup the simulation
    Sim_Path = os.path.join(tempfile.gettempdir(), os.path.basename(__file__)[:-3])

    unit = 1e-3  # all length in mm

    # size of the simulation box
    SimBox = 1200
    PW_Box = 1000

    ### Setup FDTD parameters & excitation function
    FDTD = openEMS(EndCriteria=1e-1)

    FDTD.SetGaussExcite(0.5 * (start_frequency + stop_frequency), 0.5 * (stop_frequency - start_frequency))

    FDTD.SetBoundaryCond(['PML_8', 'PML_8', 'PML_8', 'PML_8', 'PML_8', 'PML_8'])

    ### Setup Geometry & Mesh
    CSX = ContinuousStructure()
    FDTD.SetCSX(CSX)
    mesh = CSX.GetGrid()
    mesh.SetDeltaUnit(unit)

    # create mesh
    mesh.SetLines('x', [-SimBox / 2, 0, SimBox / 2])
    mesh.SmoothMeshLines('x', C0 / stop_frequency / unit / 20)  # cell size: lambda/20
    mesh.SetLines('y', mesh.GetLines('x'))
    mesh.SetLines('z', mesh.GetLines('x'))

    ### Create a metal sphere and plane wave source
    metal = CSX.AddMetal('metal')
    metal.AddBox([-185, -900, -900], [-170, 900, 900]).AddTransform('RotateAxis', 'z', 45)

        # plane wave excitation
    k_dir = -1 * e_r(inc_angle, 90)

    E_dir = polarisation
    print("E.k_dir = {}".format(dot(E_dir, k_dir)))

    pw_exc = CSX.AddExcitation('plane_wave', exc_type=10, exc_val=E_dir)
    pw_exc.SetPropagationDir(k_dir)

    start = np.array([-PW_Box / 2, -PW_Box / 2, -PW_Box / 2])
    stop = -start
    pw_exc.AddBox(start, stop)

    # Anim
    edump = CSX.AddDump('efield{}'.format(inc_angle), dump_type=0, dump_mode=2, file_type=1)
    start = np.array([-SimBox, -SimBox, -SimBox])
    stop = -start
    edump.AddBox(start, stop)

    CSX_file = os.path.join(Sim_Path, 'plate.xml')
    if not os.path.exists(Sim_Path):
        os.mkdir(Sim_Path)
    CSX.Write2XML(CSX_file)

    FDTD.Run(Sim_Path, verbose=3, cleanup=True)




if __name__ == '__main__':

    rcs(0, array([0,0,1]))

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: Unexpected result after irradiating a PEC plate

Post by thorsten » Sat 25 Jan 2020, 10:45

That does not work like this....
A plane wave excitation tries to create a plane wave all inside its space. That means exciting a wave on all 6 sides with the right phase and timings etc. This is meant to irradiate e.g. an object to calculate its scattering.
An object should not/cannot cut through that box. Well it can, but that does not result in anything reasonable .... (as you noticed)
The question is what you really want to do...

regards
Thorsten

khashabri
Posts: 4
Joined: Wed 13 Nov 2019, 12:45

Re: Unexpected result after irradiating a PEC plate

Post by khashabri » Thu 30 Jan 2020, 18:39

Hi Thorsten,
The question is what you really want to do...
the idea was to send a plane wave to an infinitely extended, oblique plate which has different roughness and electromagnetic properties (epsilon and mue) and study how it reflects the wave in different directions and how its polarimetric properties change. I started the project by just animating the session to have a better overview of my settings. After looking at my animation, it didn't make sense for me that the plane wave is being transmitted through the plate. Therefore, I made the plate bigger than the excitation box (#infinitely extended) but it was still going behind it.
  • Do you know any way to realize roughness and infinity extension for a surface?
  • Also do you think whether it is problematic for reflection measurement when the whole volume is generating the wave and not just a single surface?

Regards, Khashayar

PS.: I'm using the python interface.

Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

Re: Unexpected result after irradiating a PEC plate

Post by Hale_812 » Thu 06 Feb 2020, 04:14

I've been making scattering simulations, with a help from Thorsten, including irradiation of weird surfaces.
It was a time ago, so I don't remember details, but it works like this:

when is the the wave called "plane"? only when d/x=d/dy=0, where propagation is along z.
Is it possible if we place a small box and look what happens outside? NO! the wave will go in all directions. since every point of that box is a dipole source. So at some distance it will look like one spherical source... and at some distance farther away it will finally become a true plane wave with assimptotically 0(zero) amplitude due to DIVergence. So what does the simulator do? synthesize a perfect boundary excitation on the sides of the box, so inside the field is stretched. But if some surface reflects, a part of the power goes aside. Now, outside of the box the same field is subtructed. It means, no parasitic divergense, and all the scattered field(at the boundary) is clean for analysis.
So you can calculat the scattering profile in power, in far field. But can not see it.
If you want to see the pulse, create an antenna with large aperture, or just a Laaarge field probe (H or E -dipole) with soft excitation.
CSX = AddExcitation( CSX, 'Dipole', 2, [1 0 0] ); %magnetic with H along x... you can make it electric, as you like
start = [mesh.x(1), 0, mesh.z(1)];
stop = [mesh.x(end), max_res, mesh.z(end)]; %on practice we mesh denser than max_res around objects, but in free space it is a reference parameter.
CSX = AddBox( CSX, 'Dipole', 1, start, stop );
... don't forget to place PML at the back.

Post Reply