Microwave cavity issue

Numerical methods and mathematical models of Elmer
Post Reply
kdunn926
Posts: 4
Joined: 23 Apr 2021, 00:02
Antispam: Yes

Microwave cavity issue

Post by kdunn926 »

Hello,

I'm trying to model a microwave cavity with only a single in-port and am having issues when running the solver. The error is:

Code: Select all

Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
STOP 1
ERROR:: GetEdgeBasis: Can't handle but linear elements, sorry.
My SIF file is here:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = case.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body Property 1"
  Equation = 1
  Material = 1
End

Solver 1
  Equation = Vector Helmholtz Equation
  Procedure = "VectorHelmholtz" "VectorHelmholtzSolver"
  Variable = E[E re:1 E:1]
!  Use Piola Transform = True
  Linear System Preconditioning Damp Coefficient im = 1.0
  Exec Solver = Always
  Stabilize = False
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 1
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 1000
  Linear System Convergence Tolerance = 1.0e-7
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = none
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Equation 1"
  Angular Frequency = $ 2*pi*2.5e9
$ a = 10e-2
$ b = 5e-2
$ c0 = 1/sqrt(8.854e-12*4*pi*10^-7)
$ omega = 2*pi*2.5e9
$ k0 = omega/c0
$ kc = pi/a
$ beta0 = sqrt(k0^2-kc^2)
  Active Solvers(2) = 1 0
End

Material 1
  Name = "Air (room temperature)"
  Viscosity = 1.983e-5
  Heat expansion Coefficient = 3.43e-3
  Heat Conductivity = 0.0257
  Relative Permittivity = 1.00059
  Sound speed = 343.0
  Heat Capacity = 1005.0
  Density = 1.205
End

Boundary Condition 1
  Target Boundaries(2) = 2 3 
  Name = "BoundaryCondition 2"
  E re {e} = 0
  E im {e} = 0
End

Boundary Condition 2
  Target Boundaries(1) = 1 
  Name = "BoundaryCondition 3"
  Magnetic Boundary Load 2 = Variable Coordinate 1;Real MATC "-2*beta0*k0/kc*sin(kc*(tx+a/2))"
  Electric Robin Coefficient im = $ beta0
End
My mesh is here.

Any help is much appreciated.

-Kyle
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Microwave cavity issue

Post by raback »

Hi

This is the key line:

Code: Select all

ERROR:: GetEdgeBasis: Can't handle but linear elements, sorry.
so try with linear elements.

-Peter
mika
Posts: 230
Joined: 15 Sep 2009, 07:44

Re: Microwave cavity issue

Post by mika »

The solution with the second-order basis functions could also be attempted by giving "Quadratic Approximation = True" in the solver section. This might work if the background (nodal) mesh consists of either the lowest-order or second-order elements.

-- Mika
kdunn926
Posts: 4
Joined: 23 Apr 2021, 00:02
Antispam: Yes

Re: Microwave cavity issue

Post by kdunn926 »

raback wrote: 23 Apr 2021, 00:56 Hi

This is the key line:

Code: Select all

ERROR:: GetEdgeBasis: Can't handle but linear elements, sorry.
so try with linear elements.

-Peter
Thanks for the help. How do I do that? I am very unfamiliar with Elmer still.
mika wrote: 23 Apr 2021, 12:00 The solution with the second-order basis functions could also be attempted by giving "Quadratic Approximation = True" in the solver section. This might work if the background (nodal) mesh consists of either the lowest-order or second-order elements.

-- Mika
Thank you for the suggestion. When I added that option in the solver section and tried to run it, the solver crashed. Is there something wrong in my SIF?

Code: Select all

LoadMesh: Elapsed REAL time:     0.2698 (s)
MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: vector helmholtz equation...done.
OptimizeBandwidth: Half bandwidth without optimization: 106440
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 11898
OptimizeBandwidth: ---------------------------------------------------------
ElmerSolver: Number of timesteps to be saved: 1
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x1037c6d9d
#1  0x1037c61cd
#2  0x7fff632d6f59
#3  0x101efc63a
#4  0x101f08d2c
#5  0x108e9e447
#6  0x10209d861
#7  0x1020b3f43
#8  0x1020b5847
#9  0x1020b6b43
#10  0x1022e4700
#11  0x101e49b97
#12  0x101e49d2e
mika
Posts: 230
Joined: 15 Sep 2009, 07:44

Re: Microwave cavity issue

Post by mika »

I converted your mesh file as

ElmerGrid 8 2 body.unv -autoclean

and then run the case under a debugger (with "Quadratic Approximation = True" added) which didn't find anything suspicious. The mesh conversion however gives a geometry model which has just one group of boundary elements while the sif file assumes three groups, so I guess there is nevertheless some problem with the model.
kdunn926 wrote: 23 Apr 2021, 18:58 How do I do that?
To this end you should create a mesh consisting of the lowest-order elements (4-node tetrahedra etc.). When the solver uses curl-conforming basis functions (the case here), the second-order approximation can actually be created over the lowest-order (nodal) mesh. So a good approach here is to create just the lowest-order mesh. Giving "Quadratic Approximation = True" remains an option even then.

-- Mika
kdunn926
Posts: 4
Joined: 23 Apr 2021, 00:02
Antispam: Yes

Re: Microwave cavity issue

Post by kdunn926 »

mika wrote: 24 Apr 2021, 10:06 I converted your mesh file as

ElmerGrid 8 2 body.unv -autoclean

and then run the case under a debugger (with "Quadratic Approximation = True" added) which didn't find anything suspicious. The mesh conversion however gives a geometry model which has just one group of boundary elements while the sif file assumes three groups, so I guess there is nevertheless some problem with the model.
kdunn926 wrote: 23 Apr 2021, 18:58 How do I do that?
To this end you should create a mesh consisting of the lowest-order elements (4-node tetrahedra etc.). When the solver uses curl-conforming basis functions (the case here), the second-order approximation can actually be created over the lowest-order (nodal) mesh. So a good approach here is to create just the lowest-order mesh. Giving "Quadratic Approximation = True" remains an option even then.

-- Mika
Thanks again for the help. I'll mess around some more and see what I can get working. For the one group versus three groups - I used the UI to split the body into 3 parts so I could assign an in-port. I assumed it would save the modification but it seems like it did not.
Post Reply