Problem with tutorial 14

The graphical user interface of Elmer
Post Reply
adoldesa
Posts: 9
Joined: 26 Sep 2018, 18:46
Antispam: Yes
Contact:

Problem with tutorial 14

Post by adoldesa » 27 Sep 2018, 11:42

Hi all,
I am new to this forum as I am new to Elmer. I have been using it for a while now to perform some linear elasticity simultaneous and recently I am trying to simulate electrostatics. I was following the tutorial 14 (Electrostatic equation – Capacitance of perforated plate) but the result is wrong and I can't figure out why.

Here is my .sif:

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.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"
  Equation = 1
  Material = 1
End

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

Solver 2
  Equation = Electrostatics
  Calculate Electric Energy = True
  Calculate Electric Field = True
  Variable = Potential
  Procedure = "StatElecSolve" "StatElecSolver"
  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
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = Diagonal
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Equation 1"
  Active Solvers(2) = 1 2
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(1) = 4 
  Name = "Ground"
  Potential = 0.0
End

Boundary Condition 2
  Target Boundaries(4) = 1 2 3 7 
  Name = "Cap"
  Potential = 2.0
End
And this is the log from the solver:

Code: Select all

ELMER SOLVER (v 8.2) STARTED AT: 2018/09/26 17:27:34
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: [ResultOutputSolve]...[ResultOutputSolver_Init0]
Loading user function library: [StatElecSolve]...[StatElecSolver_Init0]
LoadMesh: Base mesh name: ./.

LoadMesh: Scaling coordinates: 1.000E-03 1.000E-03 1.000E-03

LoadMesh: Elapsed time (CPU,REAL):     0.6300    0.6300 (s)

MAIN: -------------------------------------

Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
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: 960
OptimizeBandwidth: 

OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 1468
OptimizeBandwidth: Bandwidth optimization rejected, using original ordering.
OptimizeBandwidth: ---------------------------------------------------------

MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: result output
ResultOutputSolver: -------------------------------------
ResultOutputSolve: Saving with prefix: case
ResultOutputSolver: Dimension of mesh: 3
ResultOutputSolver: Creating list for saving - if not present
CreateListForSaving: Field Variables for Saving
CreateListForSaving: Scalar Field 1: potential
CreateListForSaving: Scalar Field 2: electric energy density
CreateListForSaving: Vector Field 1: electric field
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving results in VTK XML format with prefix: case
VtuOutputSolver: Saving number of partitions: 1
VtuOutputSolver: Number of geometry nodes to save:   33159
VtuOutputSolver: Number of dof nodes to save:   33159
VtuOutputSolver: Number of elements to save:   36474

ResultOutputSolver: -------------------------------------
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: electrostatics
StatElecSolve: -------------------------------------
StatElecSolve: STATELEC SOLVER:
StatElecSolve: -------------------------------------
StatElecSolve: 
StatElecSolve: Electrostatic iteration: 1
StatElecSolve: Starting Assembly...

StatElecSolve:    Assembly:  32 % done

StatElecSolve:    Assembly:  64 % done

StatElecSolve:    Assembly:  96 % done

DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
StatElecSolve:  Assembly (s)          :   3.2009999999999996
       1 0.3027E+00
       2 0.1705E+00
       3 0.1163E+00
       4 0.8689E-01
       5 0.6855E-01
       6 0.5485E-01
       7 0.4352E-01
       8 0.3449E-01
       9 0.2829E-01
      10 0.2498E-01
      11 0.2238E-01
      12 0.2013E-01
      13 0.1819E-01

      14 0.1652E-01
      15 0.1503E-01
      16 0.1369E-01
      17 0.1255E-01
      18 0.1162E-01
      19 0.1092E-01
      20 0.1032E-01
      21 0.9752E-02
      22 0.9164E-02
      23 0.8584E-02
      24 0.8032E-02
      25 0.7542E-02
      26 0.7121E-02
      27 0.6761E-02
      28 0.6452E-02
      29 0.6223E-02
      30 0.6025E-02
      31 0.5842E-02
      32 0.5669E-02
      33 0.5496E-02
      34 0.5325E-02
      35 0.5156E-02
      36 0.4991E-02
      37 0.4841E-02
      38 0.4689E-02
      39 0.4582E-02
      40 0.4443E-02
      41 0.4390E-02
      42 0.4347E-02
      43 0.4071E-02

      44 0.3904E-02
      45 0.3907E-02
      46 0.3873E-02
      47 0.3513E-02
      48 0.3311E-02
      49 0.3142E-02
      50 0.3144E-02
      51 0.2824E-02
      52 0.2437E-02
      53 0.3306E-02
      54 0.2428E-02
      55 0.2336E-02
      56 0.2264E-02
      57 0.1734E-02
      58 0.2136E-02
      59 0.1881E-02
      60 0.1731E-02
      61 0.1812E-02
      62 0.1820E-02
      63 0.1696E-02
      64 0.1533E-02
      65 0.1410E-02
      66 0.1193E-02
      67 0.1021E-02
      68 0.9107E-03
      69 0.7019E-03
      70 0.6946E-03
      71 0.6482E-03
      72 0.4764E-03
      73 0.4325E-03

      74 0.3432E-02
      75 0.2996E-03
      76 0.2572E-03
      77 0.2930E-03
      78 0.2070E-03
      79 0.1378E-03
      80 0.1347E-03
      81 0.1078E-03
      82 0.8650E-04
      83 0.7075E-04
      84 0.3985E-03
      85 0.5382E-04
      86 0.4750E-04
      87 0.2873E-04
      88 0.3651E-04
      89 0.3647E-04
      90 0.3576E-04
      91 0.2490E-04
      92 0.2301E-04
      93 0.3711E-04
      94 0.3058E-04
      95 0.1243E-04
      96 0.1241E-04
      97 0.8033E-05
      98 0.7024E-05
      99 0.4352E-05
     100 0.4575E-05
     101 0.4409E-05
     102 0.3137E-05

     103 0.2430E-05
     104 0.1566E-05
     105 0.9230E-06
     106 0.7750E-06
     107 0.6698E-06
     108 0.4397E-06
     109 0.4326E-06
     110 0.4244E-06
     111 0.9548E-06
     112 0.2945E-06
     113 0.2921E-06
     114 0.2642E-06
     115 0.2413E-06
     116 0.2403E-06
     117 0.2288E-06
     118 0.2164E-06
     119 0.2106E-06
     120 0.1978E-06
     121 0.1642E-06
     122 0.1391E-06
     123 0.1271E-06
     124 0.1279E-06
     125 0.1225E-06
     126 0.1857E-06
     127 0.9513E-07
     128 0.7831E-07
     129 0.7957E-07
     130 0.6817E-07
     131 0.6771E-07

     132 0.5815E-07
     133 0.5840E-07
     134 0.4723E-07
     135 0.4682E-07
     136 0.4444E-07
     137 0.3663E-07
     138 0.3059E-07
     139 0.2590E-07
     140 0.1955E-07
     141 0.8292E-08
     142 0.1632E-07
     143 0.1033E-07
     144 0.1112E-07
     145 0.9636E-08
     146 0.7126E-08
     147 0.6497E-08
     148 0.9832E-08
     149 0.5409E-08
     150 0.4159E-08
     151 0.4171E-08
     152 0.3091E-08
     153 0.2637E-08
     154 0.2288E-08
     155 0.1853E-08
     156 0.1905E-08
     157 0.1086E-08
     158 0.1027E-08
     159 0.1079E-08
     160 0.5358E-09
     161 0.4295E-09

     162 0.2846E-09
     163 0.2359E-09
     164 0.1600E-09
     165 0.1100E-09
     166 0.3813E-10
     166 0.3813E-10
ComputeChange: NS (ITER=1) (NRM,RELC): (  1.7692182      2.0000000     ) :: electrostatics
StatElecSolve:  Solve (s)             :  0.62300000000000022

StatElecSolve:  Tot. Electric Energy  :   0.0000000000000000
StatElecSolve:  Capacitance           :   0.0000000000000000
StatElecSolve:  Result Norm   :    1.7692181939142007
StatElecSolve:  Relative Change :    2.0000000000000000
StatElecSolve: 
StatElecSolve: 
StatElecSolve: Electrostatic iteration: 2
StatElecSolve: Starting Assembly...

StatElecSolve:    Assembly:  32 % done

StatElecSolve:    Assembly:  64 % done

StatElecSolve:    Assembly:  96 % done

DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
StatElecSolve:  Assembly (s)          :   3.1980000000000004
       1 0.5483E-10
       1 0.5483E-10
ComputeChange: NS (ITER=2) (NRM,RELC): (  1.7692182     0.26869305E-09 ) :: electrostatics
StatElecSolve:  Solve (s)             :   1.0999999999999233E-002

StatElecSolve:  Tot. Electric Energy  :   0.0000000000000000
StatElecSolve:  Capacitance           :   0.0000000000000000
StatElecSolve:  Result Norm   :    1.7692181943895773
StatElecSolve:  Relative Change :    2.6869304674967502E-010
StatElecSolve: 
ComputeChange: SS (ITER=1) (NRM,RELC): (  1.7692182      2.0000000     ) :: electrostatics
WritePostFile: Saving results in ElmerPost format to file ./case.ep

ElmerSolver: *** Elmer Solver: ALL DONE ***
ElmerSolver: The end
SOLVER TOTAL TIME(CPU,REAL):        21.81       21.81
ELMER SOLVER FINISHED AT: 2018/09/26 17:27:56
I followed the instructions on the tutorial and used the file hexole.grd provided, but still the capacitance is 0 and the total Electric energy is 0. When displaying it in paraview the electric field and the other quantities are simply 0. Any ideas?

I also tried to simply make a parallel plate capacitor using a cube with a volume mesh (I use gmsh for meshing) and I get the same results (I apply a potential between two faces).

I am using ElmerGUI 8.2 under widows 7 professional SP1.

Thanks for your help.

adoldesa
Posts: 9
Joined: 26 Sep 2018, 18:46
Antispam: Yes
Contact:

Re: Problem with tutorial 14

Post by adoldesa » 28 Sep 2018, 15:46

I found a solution to the problem. It was actually already been seen but hidden in this post:

viewtopic.php?f=3&t=4382

The problem was bug in the 8.2 version, installing the latest nightly build soled the issue, now I get a sensible value for the capacitance and the electric energy.

Hope this helps others as well.

Post Reply