VectorHelmholtz: imaginary permittivity material

Numerical methods and mathematical models of Elmer
Post Reply
giulian
Posts: 11
Joined: 05 Dec 2023, 12:21
Antispam: Yes

VectorHelmholtz: imaginary permittivity material

Post by giulian »

Dear Elmer community,

I'm trying to simulate the EM scattering of a metallic sphere in air. I encountered a problem with the imaginary part of the permittivity of my sphere. Indeed the solver log prints me the following :

Code: Select all

ERROR:: LoadInputFile: 
ERROR:: LoadInputFile:  Unknown specifier: [Value of the imaginary part]
Could you please help me to understand how solve this issue?

My dearest regards
-Giulian
PS
I also put here the sif file for better understanding:

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) = 1
  Coordinate Scaling = 0.01
  Solver Input File = case.sif
  Post File = case.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.670374419e-08
  Permittivity of Vacuum = 8.85418781e-12
  Permeability of Vacuum = 1.25663706e-6
  Boltzmann Constant = 1.380649e-23
  Unit Charge = 1.6021766e-19
End

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

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

Solver 3
  Equation = Result Output
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output File Name = case
  Binary Output = False
  Output Format = Vtu
  Exec Solver = Always
End

Solver 2
  Equation = Vector Helmholtz Post Process
  Procedure = "VectorHelmholtz" "VectorHelmholtzCalcFields"
  Calculate Energy Functional = True
  Calculate Magnetic Field Strength = True
  Field Variable = E
  Calculate Electric Field = True
  Calculate Poynting Vector = True
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  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 = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Solver 1
  Equation = Vector Helmholtz Equation
  Variable = E[E re:1 E:1]
  Linear System Preconditioning Damp Coefficient im = 1.0
  Procedure = "VectorHelmholtz" "VectorHelmholtzSolver"
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  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 = 500
  Linear System Convergence Tolerance = 1.0e-6
  BiCGstabl polynomial degree = 6
  Linear System Preconditioning = vanka
  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(3) = 3 2 1
End

Material 1
  Name = "metal"
  Relative Permittivity = -4500
  Relative Permittivity im = 10
End

Material 2
  Name = "air"
  Relative Permittivity = 1
End

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

Boundary Condition 2
  Target Boundaries(1) = 1 
  Name = "inlet"
  Magnetic Boundary Load 2 = Variable Coordinate 1 
Real MATC "-2*beta0*k0/kc*sin(kc*(tx+a/2))"
  Electric Robin Coefficient im = $ beta0
End

Boundary Condition 3
  Target Boundaries(1) = 7 
  Name = "outlet"
  Electric Robin Coefficient im = $ beta0
End

kevinarden
Posts: 2313
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: VectorHelmholtz: imaginary permittivity material

Post by kevinarden »

try

Relative Permittivity = REAL -4500
Relative Permittivity im = REAL 10

that error usually occurs when a variable has not been declared, some variables are declared in the code some are not, but you can declare them in the sif.
giulian
Posts: 11
Joined: 05 Dec 2023, 12:21
Antispam: Yes

Re: VectorHelmholtz: imaginary permittivity material

Post by giulian »

Dear Kevin,

Thank you very much. It was indeed a problem of declaration of variables
Post Reply