Hi!
Is it possible to combine the eigen solver with the EM modules such as VectorHelmholtz, EMWaveSolver or WhitneyAVSolver (AV) solvers?
Essentially I would like to do something similar to what was discussed here: [viewtopic.php?t=7153] and discussed here: [https://computational-acoustics.gitlab. ... ed-part-3/], but for electromagnetics thus for RF cavities.
I created a simple case of a cylinder which have known solutions (can be found in most microwave books, e.g. Pozar) and would like to find the eigenvalues (or Modes) using Elmer. For simple forms such as rectangles and cylinders it is simple to both find and create solutions yourself, for instance see wolphram demonstartion project: [https://demonstrations.wolfram.com/Cyli ... Resonator/], but for more complex cases/geometries I hope Elmer would be a better fit!
I found this example using the WhitneyAV solver in your testcases: [https://github.com/ElmerCSC/elmerfem/bl ... n/case.sif].
But could not get it to work. I have also tried using the VectorHelmholtz solver since the helmholtz equation (eq 20.3 in the Elmer ModuleManual) naturally becomes a eigenproblem with w^2 as eigenvalue:
curl curl E = w^2 E assuming J = 0 and epsilon = mu = 1
For the AV solver I get error:
EigenSolveComplex: . Error occurred in umf4num: -1.0000000000000000
And for the Helmholtz I get error:
ERROR:: EigenSolveComplex: Unknown linear system method:
Best and thank in advance
Robin
RF cavity eigen solver
RF cavity eigen solver
- Attachments
-
- simpleCylinderMeshed.step
- (5.8 KiB) Downloaded 29 times
-
- case_WhitneyAV.sif
- (1.46 KiB) Downloaded 31 times
-
- case_Helmholtz.sif
- (2.13 KiB) Downloaded 33 times
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: RF cavity eigen solver
Hi
Look at test case "emwave_eigen".
There is a peculiarity in that solver due to the Coulomb gauge not being enforced. There would be ~n/4 almost zero eigenmodes where n is the number of edges. To overcome these there needs to be an offset for eigenvalues.
Funnily the transient solvers in Elmer are easier to utilize as eigensolvers. This is because there the Mu''+Du'+Ku=F system exists. For harmonic cases K is already K:=K+iw*D-w^2M and there is no easy way to go back and have the matrices individually.
-Peter
Look at test case "emwave_eigen".
There is a peculiarity in that solver due to the Coulomb gauge not being enforced. There would be ~n/4 almost zero eigenmodes where n is the number of edges. To overcome these there needs to be an offset for eigenvalues.
Funnily the transient solvers in Elmer are easier to utilize as eigensolvers. This is because there the Mu''+Du'+Ku=F system exists. For harmonic cases K is already K:=K+iw*D-w^2M and there is no easy way to go back and have the matrices individually.
-Peter
Re: RF cavity eigen solver
Thanks for suuper quick response!
So changing and adding,
Simulation Type = Transient
Timestep Intervals = 100 ! just for compiler to be happy at the moment
Timestep Sizes = 0.1
to/in Simulation section, and
Eigen System Shift = Real $ n / 4
in Solver 1 could help?
In this case I retrieve n from Model -> summary -> Edge elements in the GUI (approx 11700).
I still get using the AV solver:
EigenSolveComplex: . Error occurred in umf4num: -1.0000000000000000
Best,
Robin
So changing and adding,
Simulation Type = Transient
Timestep Intervals = 100 ! just for compiler to be happy at the moment
Timestep Sizes = 0.1
to/in Simulation section, and
Eigen System Shift = Real $ n / 4
in Solver 1 could help?
In this case I retrieve n from Model -> summary -> Edge elements in the GUI (approx 11700).
I still get using the AV solver:
EigenSolveComplex: . Error occurred in umf4num: -1.0000000000000000
Best,
Robin
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: RF cavity eigen solver
Error occurred in umf4num: -1.0000000000000000
is out an out of RAM error, umfpack requires a lot of memory.
If you have Mumps you can try Mumps instead, if not you can try an iterative solver instead of direct.
is out an out of RAM error, umfpack requires a lot of memory.
If you have Mumps you can try Mumps instead, if not you can try an iterative solver instead of direct.
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: RF cavity eigen solver
Hi Robin,
Why not start from the test case and make one variation at a time. I meant that modules that have been coded for transient use easily lent themselves also to eigenvalues. The test case has the setting defined.
-Peter
Why not start from the test case and make one variation at a time. I meant that modules that have been coded for transient use easily lent themselves also to eigenvalues. The test case has the setting defined.
-Peter
Re: RF cavity eigen solver
Hi Peter and Kevin, thank you for your help
I tried starting the emwave_eigen test case; loading the channel.grd file in the GUI and copy pasting the sif (only changing >Mesh DB "." "channel"< to >Mesh DB "." "."<) results in the error:
EigenSolveComplex: .ERROR:: EigenSolveComplex: Error with DNAUPD, info = -9
Reading the dnuapd.f file : [https://github.com/opencollab/arpack-ng ... C/dnaupd.f] it reads that (row 274)
"= -9: Starting vector is zero.".
I tried several changes on BC and body force, but nothing worked ... any idea here?
Kevin, I tried adding the parts such as
Linear System Solver = Iterative ! Direct
Linear System Iterative Method = BiCGStab ! CG
Linear System Convergence Tolerance = 1e-5
Linear System Max Iterations = 100
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILUO
to solver 1. I mainly end up with IEEE_DIVIDE_BY_ZERO errors, which I assume is the same problem as above. Trying Mumps gave me
>>ERROR:: CheckLinearSolverOptions: MUMPS solver has not been installed.<< so I guess it is not installed. I run the windows GUI mpi version
Best,
Robin
I tried starting the emwave_eigen test case; loading the channel.grd file in the GUI and copy pasting the sif (only changing >Mesh DB "." "channel"< to >Mesh DB "." "."<) results in the error:
EigenSolveComplex: .ERROR:: EigenSolveComplex: Error with DNAUPD, info = -9
Reading the dnuapd.f file : [https://github.com/opencollab/arpack-ng ... C/dnaupd.f] it reads that (row 274)
"= -9: Starting vector is zero.".
I tried several changes on BC and body force, but nothing worked ... any idea here?
Kevin, I tried adding the parts such as
Linear System Solver = Iterative ! Direct
Linear System Iterative Method = BiCGStab ! CG
Linear System Convergence Tolerance = 1e-5
Linear System Max Iterations = 100
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILUO
to solver 1. I mainly end up with IEEE_DIVIDE_BY_ZERO errors, which I assume is the same problem as above. Trying Mumps gave me
>>ERROR:: CheckLinearSolverOptions: MUMPS solver has not been installed.<< so I guess it is not installed. I run the windows GUI mpi version
Best,
Robin
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: RF cavity eigen solver
I ran the test case the same way you did, no errors.
Re: RF cavity eigen solver
hmm, then I probably make some very basic mistakes. I apologize for the inconvenience, but is it ok to still ask for help regarding this?
This is the files I use, and the SolverLog is the output I get, still with the DNUAPD error. At this point it is 99.9 % copy-paste so I don't really understand were it goes wrong. I must miss something very obvious ...
This is the files I use, and the SolverLog is the output I get, still with the DNUAPD error. At this point it is 99.9 % copy-paste so I don't really understand were it goes wrong. I must miss something very obvious ...
- Attachments
-
- SolverLog.txt
- (4.03 KiB) Downloaded 32 times
-
- channel.grd
- (880 Bytes) Downloaded 39 times
-
- case.sif
- (1.86 KiB) Downloaded 39 times
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: RF cavity eigen solver
I downloaded your files, and they ran just fine. There must be something about the installation. I am assuming you are using windows.
Did you install it according the instructions in this document?
https://www.nic.funet.fi/pub/sci/physic ... dElmer.pdf
Did you install it according the instructions in this document?
https://www.nic.funet.fi/pub/sci/physic ... dElmer.pdf
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: RF cavity eigen solver
I see your version was compiled last August, there were code updates to these solvers just 3 weeks ago. So an update to the latest may resolve it.