Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Elmer cases by the users for the users
Post Reply
TommyA
Posts: 5
Joined: 10 Jun 2023, 21:31
Antispam: Yes
Location: Japan

Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Post by TommyA »

Hi, I have been experimenting on Elmer for RF circuits analysis. As a first step I calculated eigenmodes of a simple rectangular cavity.
It seems that EMWaveSolver and WhitneyAVHarmonicSolver both has functionalities for an eigenvalue problem. I tried both solvers and got plausible eigenvalues. So I share my test cases here. Unzip the file and read "readme" in there. Below forum topic also gave me useful information. https://elmerfem.org/forum/viewtopic.php?t=7960

Attached picture is electric field modes (z-component, Ez) obtained by EMWaveSolver.
eigenmodes.png
eigenmodes.png (77.97 KiB) Viewed 1516 times
A few comments:
  • Although the calculated eigenfrequencies match theoretical predictions well, some of the shapes of the spatial modes don't quite look unique to the corresponding eigenvalues. They sometimes lack symmetry. Maybe they are too sensitive to frequencies. Experimenting on error tolerance etc is necessary. Some of modes lead to larger L2 norm even if the eigenvalue looks correct.
  • WhitneyAV solver doesn't export scalar potential properly and exports no electric fields.
  • While EMWave solver only exports real part of electric fields (complex part always zero), WhitneAV exports complex fields.
  • In this case, a nonezero component of magnetic flux density exported by WhitneyAV is By, which I thought a bit strange when I expected to get the same results as Ez from EMWaveSolver. Maybe I'm wrong.
It'd be very nice if people try this case and enlighten me about these points and others.

Thank you,
Tommy.
Attachments
closedCavity_eigen.zip
(6.99 KiB) Downloaded 100 times
Rich_B
Posts: 426
Joined: 24 Aug 2009, 20:18

Re: Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Post by Rich_B »

Hello,

Very nice case!

Here is an elmergrid file based on your geometry. With this file converted with the command 'elmergrid 1 2 plate3d.grd -out mesh', you can run the emwave case with 'Mesh Levels = 2'. If you end up making a consistency test case or two, then this elmergrid file may be useful.

Rich.
Attachments
plate3d.grd
(619 Bytes) Downloaded 78 times
raback
Site Admin
Posts: 4841
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Post by raback »

Hi,

The two solvers come historically from different paths. The WhitneyAV solvers has been long developed mainly for electrical machines and alike. They use vector potential A (and scalar potential V if needed). Only very recently the AV solver was added the 2nd order time derivatives.

The EMWaveSolver came from a desire to have time-dependent alternative for VectorHelmholtz equation. That easily becomes an eigenmode equation with: d/dt -> iw. However, you may be right that it currently assumes the eigenvalues to be real valued.

Neither of these was really developed to be eigenmode solvers (albeit that would not change anything). The idea came from the forum and we just quickly tested the functionality. Mainly there was something wrong with the saving of results related to some specifics how complex valued vector fields are treated. So with these tests you are already a main authority on the subject ;-) We have done eigenmodes analysis mainly related to structural mechanics e.g. for MEMS.

One of the prettier published eigenmode analysis by Elmer user may be this one:
https://www.linkedin.com/posts/dvlierop ... er_desktop

About the lacking symmetry: the mesh may break down the symmetry. Particularly the tetrahedral meshes are often not really symmetric even though the geometry is. Perhaps you may enforce them to be symmetric. E.g. only meshing half and then mirroring the mesh + joining them together.

Some eigenvalues have redundancy. Assume we would eigenmodes u and v with <uv>=\delta_{ij}. Do not the modes u'=(u+v)/sqrt(2) and v'=(u-v)/sqrt(2) then have the same property. The code does not not have any preference for symmetry so you might get funny combinations. But I guess there may be also real issues when eigenmodes are close while not being the same.

-Peter
TommyA
Posts: 5
Joined: 10 Jun 2023, 21:31
Antispam: Yes
Location: Japan

Re: Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Post by TommyA »

Hi, Rich. thank you for the file. I will make use of it.

Hi, Peter. Thank you for the detail. I really appreciate it.
As you suggest, yes there can be degenerated eigenmodes. So I guess this shouldn't be an issue specific to ELmer but more of a general problem coming with an eigenmodes analysis. Maybe I will dig into this a little more further.

Also, after trying the June 12th version, the exporting issue in WhitneyAV seems fixed. Great work!

Tom.
ttshaw
Posts: 2
Joined: 27 Mar 2024, 00:49
Antispam: Yes

Re: Rectangular RF cavity eigenmodes (EMWaveSolver and WhitneyAVHarmonicSolver)

Post by ttshaw »

I hope this thread isn't too old for a new post. Notes from a first time Elmer user:

I'm trying out this case using TommyA's files and process. In theory, I expect the modes should go as 1/(2*sqrt(mu_0 epsilon_0))*sqrt(x^2/(0.1m)^2+y^2/(0.1m)^2+z^2/(0.01m)^2). x, y, and z are integers, and we need two of them to be non-zero. z only comes into play for relatively high frequency modes, so x and y can take integer values 1 or higher.

Attached are the results when I ask for the first 20 modes. Accuracy decreases for higher frequency modes. Increasing the mesh resolution improves the simulation accuracy as expected. And all the modes predicted by theory are identified by the solver.

There are some junk modes the solver puts in. In eigenf.dat, they have significantly lower "eigen: re value", <1e10 for junk modes vs >1e20 for real modes. So they shouldn't be hard to filter out in post-processing. I'm guessing something like Eigen System Convergence Tolerance would let the solver filter out the junk modes as it runs, but I imagine that would require a priori knowledge of "eigen: re value" for a good mode, which may change too much from system to system to be able to predict. Is that the case? What would be really nice is if there was some way for the solver to note a new highest "eigen: re value" and discard every eigenmode with "eigen: re value" less than some user-defined fraction of that highest. That way, I could come up with a new geometry, tell the solver I want the 10 lowest modes, and let it deal with figuring out how to discard junk modes so that I get 10 real modes back.

I'm not sure why, but when I doubled the mesh resolution, I lost one of my x=4 y=2 modes and got a x=5 y=2 mode, skipping x=5 y=1 and x=4 y=3 modes (playing fast and loose with x, y, and degeneracy). Weird but I'm not going to try to troubleshoot that right now.

TommyA, how much further have you carried this? I'm interested in simulating essentially microwave PCBs in enclosures and I'm wondering if you've tackled any more complex geometries I can look over.
Attachments
20_modes.png
(37.86 KiB) Not downloaded yet
Post Reply