System divergence and division by zero errors on linear elasticity stresssolve problem

Numerical methods and mathematical models of Elmer
Post Reply
Max_van_der_Ree
Posts: 1
Joined: 29 Aug 2023, 19:55
Antispam: Yes

System divergence and division by zero errors on linear elasticity stresssolve problem

Post by Max_van_der_Ree »

Hello,

While attempting to solve a linear elasticity problem (including a stress solver) I am running into the following error:

Code: Select all

ERROR:: IterSolve: Numerical Error: System diverged over maximum tolerance.
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
STOP 1
I do not know what might be causing this division by zero error and am wondering if anyone can provide any insight on what the culprit might be.

The full output of the solver is as follows:

Code: Select all

ELMER SOLVER (v 9.0) STARTED AT: 2023/08/29 19:08:23
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: 9.0 (Rev: Release, Compiled: 2023-07-13)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  Lua interpreter linked in.
MAIN: =============================================================
MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: mid_load.sif
LoadInputFile: Scanning input file: mid_load.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file
LoadInputFile: Loading input file: mid_load.sif
LoadInputFile: Reading base load of sif file
CheckKeyword:  Unlisted keyword: [force 2 normalize by area] in section: [boundary condition 1]
CheckKeyword:  Unlisted keyword: [force 1 normalize by area] in section: [boundary condition 2]
CheckKeyword:  Unlisted keyword: [force 2 normalize by area] in section: [boundary condition 3]
CheckKeyword:  Unlisted keyword: [force 2 normalize by area] in section: [boundary condition 4]
CheckKeyword:  Unlisted keyword: [force 1 normalize by area] in section: [boundary condition 4]
LoadInputFile: Number of BCs: 4
LoadInputFile: Number of Body Forces: 0
LoadInputFile: Number of Initial Conditions: 0
LoadInputFile: Number of Materials: 1
LoadInputFile: Number of Equations: 1
LoadInputFile: Number of Solvers: 2
LoadInputFile: Number of Bodies: 1
ListTagKeywords: Setting weight for keywords!
ListTagKeywords: Adding dist tag to "force 2"
ListTagKeywords: Tagged 1 parameters in list
ListTagKeywords: Adding dist tag to "force 1"
ListTagKeywords: Tagged 1 parameters in list
ListTagKeywords: Adding dist tag to "force 2"
ListTagKeywords: Tagged 1 parameters in list
ListTagKeywords: Adding dist tag to "force 2"
ListTagKeywords: Adding dist tag to "force 1"
ListTagKeywords: Tagged 2 parameters in list
ListTagKeywords: Tagged 5 parameters with suffix: normalize by area
ListTagKeywords: Setting weight for keywords!
ListTagKeywords: No parameters width suffix: normalize by volume
ElmerAsciiMesh: Base mesh name: ./.
ERROR:: ReadBoundaryFile:            0 BOUNDARY PARENT out of range:          697         174
LoadMesh: Elapsed REAL time:     0.0080 (s)
MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case
StressSolve_init: --------------------------------------------------
StressSolve_init: Solving displacements from linear elasticity model
StressSolve_init: --------------------------------------------------
OptimizeBandwidth: Initial bandwidth for linear elasticity: 48
OptimizeBandwidth: Optimized bandwidth for linear elasticity: 58
OptimizeBandwidth: Bandwidth optimization rejected, using original ordering.
MAIN: Number of timesteps to be saved: 1
MAIN:
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN:
 BC weight:           1  0.65600000000000036
 BC weight:           2  0.32000000000000023
 BC weight:           3   6.4000000000000001E-002
 BC weight:           4   9.5999999999999974E-002
 BF weight:           1   0.0000000000000000
 Body weight:           1  0.40396800000003263
 Mat weight:           1  0.40396800000003263
StressSolve:
StressSolve: --------------------------------------------------
StressSolve: Solving displacements from linear elasticity model
StressSolve: --------------------------------------------------
StressSolve: Displacement iteration: 1
StressSolve: Starting assembly...
StressSolve: Assembly:
      10 0.1503E+00
      20 0.7380E-01
      30 0.4330E-01
      40 0.2514E-01
      50 0.2228E-01
      60 0.2001E-01
      70 0.1609E-01
      80 0.1651E-01
      90 0.1625E-01
     100 0.1638E-01
     110 0.1662E-01
     120 0.1728E-01
     130 0.2651E-01
     140 0.2226E-01
     150 0.1783E-01
     160 0.1971E-01
     170 0.1700E-01
     180 0.2901E-01
     190 0.4050E-01
     200 0.2721E-01
     210 0.3620E-01
     212        NaN
ERROR:: IterSolve: Numerical Error: System diverged over maximum tolerance.
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
STOP 1
Attached is a copy of my model in elmer and .msh format.
This is the contents of my .sif file:

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
  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

Solver 1
  Equation = Linear elasticity
  Procedure = "StressSolve" "StressSolver"
  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 2
Equation = Result Output VTK
Single Precision = True
Binary Output = True
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Vector Field 1 = Stresses
Output Format = vtk
Scalar Field 1 = Displacement
Output File Name = mid_load_
End

Equation 1
  Name = "Linear elasticity"
  Calculate Stresses = True
  Active Solvers(1) = 1
End

Material 1
  Name = "Bone"
  Poisson ratio = 0.4
  Youngs modulus = 10e9
  Density = 1895
End

Boundary Condition 1
  Target Boundaries(41) = 18 19 20 21 22 23 24 25 26 37 38 39 40 41 42 43 44 45 46 47 48 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 
  Name = "force_muscle"
  Force 1 = 0
  Force 3 = 0
  Force 2 = -68e3
  Force 2 Normalize by Area = Logical True
End

Boundary Condition 2
  Target Boundaries(20) = 1 2 3 4 5 6 7 8 9 10 11 12 283 284 285 286 287 288 289 290 
  Name = "constraint_occipital"
  Displacement 3 = 0
  Displacement 2 = 0
  Displacement 1 = 0
  Force 1 = 55e3
  Force 1 Normalize by Area = Logical True
End

Boundary Condition 3
  Target Boundaries(4) = 174 175 176 177 
  Name = "force_bite"
  Force 2 = 35488
  Force 2 Normalize by Area = Logical True
End

Boundary Condition 4
  Target Boundaries(6) = 249 250 251 252 253 254 
  Name = "force_joint"
  Force 2 = 32513
  Force 2 Normalize by Area = Logical True
  Force 1 = -55e3
  Force 1 Normalize by Area = Logical True
End

Interestingly, if I comment out the line

Code: Select all

Force 2 Normalize by Area = Logical True
in the third boundary condition specification, the solver runs fine.
Also, an alternative .sif file, with similar external forces but applied at different boundaries, also runs fine on this model (even if normalization by area for the third boundary condition is left active). I have attached this .sif file for your reference.

I will be glad to supply additional information if needed.
Any assistance you can provide would be greatly appreciated.

Cheers,

Max
Attachments
model.zip
(59.74 KiB) Downloaded 16 times
alternative.sif
(3.25 KiB) Downloaded 17 times
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: System divergence and division by zero errors on linear elasticity stresssolve problem

Post by Rich_B »

Hello,

Adding -autoclean allows the solution to run successfully. Running -autoclean also renumbers the boundaries, so the sif file probably needs the boundary numbers to be adjusted.
ElmerGrid 14 2 mesh -autoclean
2D-model.png
2D-model.png (133.88 KiB) Viewed 246 times
Rich.
Post Reply