3D Electromagnetic Simulation. Howto?

General discussion about Elmer
Post Reply
Shino
Posts: 1
Joined: 30 Jan 2021, 20:58
Antispam: Yes

3D Electromagnetic Simulation. Howto?

Post by Shino »

Hi,

I have a private RF project for which I want to simulate an RF coupler. I've been previously using commercial tools like CST, ADS Momentum, HFSS etc.
However, for a private project all of these commercial tools are anavailable. After a little bit of search, I stumbled across elmer. From the Tutorial for ElmerGUI, I did the "bent Waveguide example" and after a little bit of struggling, managed to get it somehow working.

Unfortunately, I don't really know how to proceed from there. I haven't found any tutorials etc, showing an EM simulation besides the one waveguide example (http://www.nic.funet.fi/index/elmer/doc ... orials.pdf). I still have a lot of open questions:

Question 1:

I understood most of the settings, of the example. However, the input and output port boundary conditions really confuse me. The tutorial says:

Code: Select all

Magnetic Boundary Load 2 [enter]
Variable Coordinate 1
Real MATC "-2*beta0*k0/kc*sin(kc*(tx+a/2))"
Close
Electric Robin Coefficient im = $ beta0
for the input port. I'm sorry, but my university years are a little behind. I recognize these values as the field distribution of the TE10 mode of an rectangular waveguide. However, can someone disect this a little for me?

What is Magnetic boundary Load 2? The 2 somehow has someting to do with tangenntial/parallel etc. But I don't really get it.

What is Variable Coordinate 1? (reading the docs, it specifies the X coordinate axis, but I'm not sure)

Real MATC somehow allows you to calculate stuff, right? What is the difference to the simple $-sign used in other equations?

What is tx? It is never set anywhere. I guess it is the x coordiante and is filled in by the simulator

Can someone explain the Electric robin coefficient?

(small sidenote: I basically hang 1 Week at this point. The solver always complained about some invalid syntax. I needed serveral days to figure out that
I need a semicolon between "Variable Coordinate 1" and the "Real MATC ...". Why isn't it present in the tutorial?)

Question 2:

If I basically have to know the field distribution of my input port, how am I going to simulate a microstrip line? I don't have an analytical solution for this. I couldn't find anything online regarding this.

Is there a possibility to somehow let Elmer automatically determine the mode of a given port? The commercial tools I've used basically do this on their own. It's fine, if this won't work with elmer. But I need some hint on how to model a microstrip port.

A coax Port would also be very helpful. I know the fields of a coaxial cable. Unfortunately I'm currently unable to transfer this knowledge into the Elmer boundary settings :?

Question 3

How do I get my electrical parameters? Basically, I need S-Parameters.
How do I get S-Parameters?
How do I do an automatic frequency sweep?

I'm really sorry, if a lot of these questions are basic knowledge. However, I'm a little overwhelmed by the amount of questions and documentation and can't really wrap my head around all of it.

Is there any tutorial on EM simulations with Elmer besides the "Bent waveguide example"?

If someone could give me a few answers that would be great! My next goal is to draw a coaxial cable in Freecad and simulate it in Elmer. However, I'm stuck with the boundary setting. I model it basically as an air cylinder and set the inner and outer boundaries to PEC, so I only have to mesh the air inside the coax cable. However, I'm stuck with the input and output port boundaries.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: 3D Electromagnetic Simulation. Howto?

Post by raback »

Hi

Have you studies the Vector Helmholtz chapter in the Elmer Models Manual? There is not much application area specific information for RF and I cannot comment the BCs by heart.

The "1" and "2" refer to component of a vector. Coordinate is the variable containing [x,y,z] values, so "Coorinate 1" refers to x.

"Real" is the type of expected keyword and "MATC" tells that this is evaluated on-the-fly when needed whereas "$" tells that things are evaluted only once when parsing the sif file. "tx" is by convention the name of variables that are communicated to MATC (or LUA) scripting. It is always called "tx". It can be scalar or vector depending on the number of variables. Semicolon is alternative to linefeed.

Generally, nobody in Elmer team has used the code for RF applications. We are of course happy if this takes off. Implementing modes for given ports would probably be no biggie if somebody tells what to implement and does the testing. This is often the case. Mere coding is actually done quite quickly once you know what to do.

For electrostatics we can automatically compute the capacitance matrix. It would not much more work to create impedance matrix computation for acoustic Helmholtz equation. I guess similar ideas could be used for RF as well? How do you define S-parameter here?

You can have "Simulation type = scanning" and then your time becomes a pseudotime [1,2,3,...] that you can use to sweep over parameter space.

I would encourage people in different application areas coming together and defining tutorials cases and asking help when hitting the wall. Elmer can be applied in some many different areas but we are active mainly on where the current project portfolio lies. The vector Helmholtz equation, its GUI and tutorial are probably represents about 1 person month of work. So given this limited focus you may perhaps understand the lack of detail.

-Peter
MaxWolfMarrin
Posts: 1
Joined: 09 Feb 2021, 22:55
Antispam: Yes

Re: 3D Electromagnetic Simulation. Howto?

Post by MaxWolfMarrin »

Shino-

Were you able to make any progress or did you abandon this? I also am attempting to implement. I have used COMSOL but i am having trouble like you understanding the appropriate port settings.
robnil
Posts: 19
Joined: 13 Apr 2023, 11:05
Antispam: Yes

Re: 3D Electromagnetic Simulation. Howto?

Post by robnil »

I believe this has already been covered in other topics, but for folks coming to this page first, in my opinion the best way to learn the RF modules is following the examples of other projects. For instance, look at pages as

https://github.com/ElmerCSC/elmer-elmag -- open source for applications. Geometries, meshes, sifs all included.
https://github.com/ElmerCSC/elmerfem/tr ... /fem/tests -- For test cases of solvers. Geometries, meshes, sifs all included.
https://www.youtube.com/@elmerfem/playlists -- online videos.

If you have access to articles, there are some interesting use cases to be found also (of course there are plenty more, just google):

https://journals.aps.org/prapplied/abst ... .15.034082 -- "Keyhole Resonators for Subwavelength Focusing of Microwave Magnetic Fields in Optically Detected Electron Spin Resonance". Simulation of 'Key-hole resonator' using a coupling loop to excite waves. Mesh and code is provided following the link. (Need access or buy)

https://ieeexplore.ieee.org/document/6404553 -- "Mutual coupling modeling of NFC antennas". They did Self and Mutual Inductance calculations using first the StatCurrentSolve procedure to calc the current density, then use it as body force for the MagnetoDynamics procedure. No code, no sif but good explanation. (Need access or buy)

https://aaltodoc.aalto.fi/bitstream/han ... sequence=1 -- "3 DIMENSIONAL ELECTROMAGNETIC ANALYSIS OF AN AXIAL ACTIVE MAGNETIC BEARING". Open for everyone, Sif file included in pdf as appendix. Detailed explanation.

Best,
Robin
Post Reply