i am new to the board and, searching for people who may help me with my task.
Basicly, i want to perform electrostatic FEM to get the capacitance matrix of the system under investigation. Usually, it's the capacitance between a finger an a sensor. The geometries are generated in 3rd party programs and the final mesh is created in Gmesh as .msh.
Then i use ElmerGrid to convert and load the .msh and use it in ElmerSover.
Now, i want to avoid having to use a very detailed mesh, because it needs a lot of time to process. Instead, i want to higher order approximation of the electrostatic FEM to generate the potential distribution and capacitance matrix.
I have tried to add "Element = p:2" to the Solver, but i often run into convergence problems. The first iteration result is already "NaN". I have trouble to identify the issue. The simple example attached sometimes converges, but not in a reproducable manner. Most of the time it's "NaN" though. For more complex systems its always "NaN"
Are there additional things i need to take into account when using "Element=p:2"? Are my settings for "Linear System" and "Nonlinear Systems" senseful?
Here is a typical Solver log:
Code: Select all
ELMER SOLVER (v 8.2) STARTED AT: 2017/10/18 12:50:05
ParCommInit: Initialize #PEs: 1
MAIN:
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 8.2 (Rev: Release, Compiled: 2016-03-15)
MAIN: =============================================================
MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
Loading user function library: [StatElecSolve]...[StatElecSolver_Init0]
LoadMesh: Base mesh name: CurrentModel/.
LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03
PElementMaps::InitializeMappings: Initializing mappings for elements
LoadMesh: Elapsed time (CPU,REAL): 0.0750 0.0750 (s)
MAIN: -------------------------------------
Loading user function library: [StatElecSolve]...[StatElecSolver_Init]
Loading user function library: [StatElecSolve]...[StatElecSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: electrostatics...done.
OptimizeBandwidth: Half bandwidth without optimization: 12005
OptimizeBandwidth:
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 2885
OptimizeBandwidth: ---------------------------------------------------------
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 1
MAIN: -------------------------------------
MAIN:
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: electrostatics
StatElecSolve: -------------------------------------
StatElecSolve: STATELEC SOLVER:
StatElecSolve: -------------------------------------
StatElecSolve:
StatElecSolve: Electrostatic iteration: 1
StatElecSolve: Starting Assembly...
DefaultFinishBulkAssembly: Saving bulk values for: electrostatics
Number of permutation BCs
Capacitance body: 1 no 520
Capacitance body: 2 no 337
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
StatElecSolve: Assembly (s) : 0.84699999999999998
CRS_IncompleteLU: ILU(1) (Real), Starting Factorization:
CRS_IncompleteLU: ILU(1) (Real), NOF nonzeros: 764468
CRS_IncompleteLU: ILU(1) (Real), filling (%) : 223
CRS_IncompleteLU: ILU(1) (Real), Factorization ready at (s): 0.09
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 NaN
8 NaN
9 NaN
10 NaN
...
500 NaN
501 NaN
ERROR:: IterSolve: Failed convergence tolerances.
ERROR:: ComputeChange: Norm of solution appears to be NaN
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "CurrentModel" "."
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.ep
Coordinate Scaling = 0.001
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 1"
Material = 2
Equation = 1
End
Body 2
Target Bodies(1) = 2
Name = "Body 2"
Material = 2
Equation = 1
End
Body 3
Target Bodies(1) = 3
Name = "Body 3"
Material = 1
Equation = 1
End
Solver 1
Equation = Electrostatics
Variable = Potential
Procedure = "StatElecSolve" "StatElecSolver"
Element = p:2
Capacitance Matrix Filename = capa.dat
Calculate Capacitance Matrix = true
Capacitance Bodies = 2
Exec Solver = Always
Stabilize = True
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 = 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
Linear System Preconditioning = ILU1
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Equation 1
Name = "Equation 1"
Active Solvers (6) = 1 2 3 4 5 6
End
Material 1
Name = "Air (room temperature)"
Relative Permittivity = 1.00059
End
Material 2
Name = "Copper (generic)"
Relative Permittivity = 1
End
Boundary Condition 1
Target Boundaries(1) = 1
Name = "Sensor (Meshed)"
Potential = 3.3
Capacitance Body = 1
End
Boundary Condition 2
Target Boundaries(1) = 2
Name = "Finger (Meshed)"
Potential = 0
Capacitance Body = 2
End
Boundary Condition 3
Target Boundaries(6) = 3 4 5 6 7 8
Name = "Infinity"
Electric Infinity BC = True
End
Thank you very much!