Coupled system convergence tolerance

Numerical methods and mathematical models of Elmer

Coupled system convergence tolerance

Postby mzenker » 26 Jun 2012, 11:56

Hi,

I have a convergence problem with a transient coupled thermal-electric simulation with phase change. The after doing some timesteps with apparently good results, the solver starts to accept poor convergence for the current timestep and continues with the next one, even though the max. coupled iterations are by far not reached. The temperature distribution starts to look spotted
for those poorly converged timesteps.
Here are the relevant parts of the sif file:

Code: Select all
Simulation
  (...)
  Simulation Type = Transient
  Steady State Max Iterations = 100
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Timestep intervals = 50
  Timestep Sizes = 0.02
  (...)
End

Solver 1
  Equation = Static Current Conduction
  Calculate Volume Current = True
  Procedure = "StatCurrentSolve" "StatCurrentSolver"
  Variable = -dofs 1 Potential
  Calculate Joule Heating = True
  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-8
  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 = BiCGStabl
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-12
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Solver 2
  Equation = Result Output
  (...)
End

Solver 3
  Equation = Heat Equation
  Variable = -dofs 1 Temperature
  Procedure = "HeatSolve" "HeatSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-8
  Nonlinear System Convergence Tolerance = 1.0e-8
  Nonlinear System Max Iterations = 2
  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 = GCR
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-8
  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 = "Current + Heat"
  Phase Change Model = Spatial 2
  Active Solvers(3) = 1 2 3
End


And here is an extract of the solver log for a timestep with poor convergence:

Code: Select all
(...)
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            1
SolveEquations: -------------------------------------
StatCurrentSolve: -------------------------------------
StatCurrentSolve: STAT CURRENT SOLVER:
StatCurrentSolve: -------------------------------------
StatCurrentSolve: Starting Assembly...

StatCurrentSolve:  Assembly (s)          :   1.9999999999999236
ComputeChange: NS (ITER=1) (NRM,RELC): (  117.00480      0.0000000     ) :: static current conduction
StatCurrentSolve:  Solve (s)             : -7.63833440942107700E-014

StatCurrentSolve:  Total Heating Power   :   31804.078264161995
StatCurrentSolve:  Effective Resistance  :   1.2577003385466281
ComputeChange: SS (ITER=1) (NRM,RELC): (  117.00480      0.0000000     ) :: static current conduction
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           1
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.1762E-01
     (...)
     112 0.8881E-08
ComputeChange: NS (ITER=1) (NRM,RELC): (  83.300085     0.45161252E-01 ) :: heat equation
HeatSolve: iter:    1 Assembly: (s)    6.11    6.11
HeatSolve: iter:    1 Solve:    (s)    0.23    0.23
HeatSolve:  Result Norm   :    83.300085462793945
HeatSolve:  Relative Change :   4.51612520398491507E-002
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           2
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.1396E-02
       (...)
      54 0.8864E-08
ComputeChange: NS (ITER=2) (NRM,RELC): (  81.139800     0.26274471E-01 ) :: heat equation
HeatSolve: iter:    2 Assembly: (s)    6.11   12.22
HeatSolve: iter:    2 Solve:    (s)    0.09    0.33
HeatSolve:  Result Norm   :    81.139799978051713
HeatSolve:  Relative Change :   2.62744708067722023E-002
ComputeChange: SS (ITER=1) (NRM,RELC): (  81.139800     0.18892386E-01 ) :: heat equation
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            2
SolveEquations: -------------------------------------
StatCurrentSolve: -------------------------------------
StatCurrentSolve: STAT CURRENT SOLVER:
StatCurrentSolve: -------------------------------------
StatCurrentSolve: Starting Assembly...

StatCurrentSolve:  Assembly (s)          :   1.9849999999999235
       1 0.5787E-09 0.5787E-09
    (...)
      15 0.9473E-12 0.9473E-12
ComputeChange: NS (ITER=1) (NRM,RELC): (  116.98967     0.12931152E-03 ) :: static current conduction
StatCurrentSolve:  Solve (s)             :  4.70000000000236895E-002

StatCurrentSolve:  Total Heating Power   :   31904.711572778178
StatCurrentSolve:  Effective Resistance  :   1.2537333211352051
ComputeChange: SS (ITER=2) (NRM,RELC): (  116.98967     0.12931152E-03 ) :: static current conduction
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           1
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.9249E-02
      (...)
      64 0.9661E-08
ComputeChange: NS (ITER=1) (NRM,RELC): (  83.313707     0.26437953E-01 ) :: heat equation
HeatSolve: iter:    1 Assembly: (s)    6.11    6.11
HeatSolve: iter:    1 Solve:    (s)    0.11    0.11
HeatSolve:  Result Norm   :    83.313706986101451
HeatSolve:  Relative Change :   2.64379525639863305E-002
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           2
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done
       1 0.1405E-02
      (...)
      54 0.9047E-08
ComputeChange: NS (ITER=2) (NRM,RELC): (  81.133379     0.26517074E-01 ) :: heat equation
HeatSolve: iter:    2 Assembly: (s)    6.11   12.22
HeatSolve: iter:    2 Solve:    (s)    0.08    0.19
HeatSolve:  Result Norm   :    81.133379175050379
HeatSolve:  Relative Change :   2.65170744213057592E-002
ComputeChange: SS (ITER=2) (NRM,RELC): (  81.133379     0.79135727E-04 ) :: heat equation
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            3
SolveEquations: -------------------------------------
StatCurrentSolve: -------------------------------------
StatCurrentSolve: STAT CURRENT SOLVER:
StatCurrentSolve: -------------------------------------
StatCurrentSolve: Starting Assembly...

StatCurrentSolve:  Assembly (s)          :   1.9839999999999471

       1 0.4685E-11 0.4685E-11
      (...)
       4 0.9764E-12 0.9764E-12
ComputeChange: NS (ITER=1) (NRM,RELC): (  116.98979     0.10205233E-05 ) :: static current conduction
StatCurrentSolve:  Solve (s)             :  1.60000000000236620E-002

StatCurrentSolve:  Total Heating Power   :   31904.464872124234
StatCurrentSolve:  Effective Resistance  :   1.2537430156037204
ComputeChange: SS (ITER=3) (NRM,RELC): (  116.98979     0.10205233E-05 ) :: static current conduction
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           1
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.9249E-02
      (...)
      62 0.9749E-08
ComputeChange: NS (ITER=1) (NRM,RELC): (  83.313655     0.26516446E-01 ) :: heat equation
HeatSolve: iter:    1 Assembly: (s)    6.09    6.09
HeatSolve: iter:    1 Solve:    (s)    0.09    0.09
HeatSolve:  Result Norm   :    83.313654659938592
HeatSolve:  Relative Change :   2.65164464696391669E-002
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           2
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.1405E-02
      (...)
      54 0.9048E-08
ComputeChange: NS (ITER=2) (NRM,RELC): (  81.133398     0.26516210E-01 ) :: heat equation
HeatSolve: iter:    2 Assembly: (s)    6.11   12.20
HeatSolve: iter:    2 Solve:    (s)    0.09    0.19
HeatSolve:  Result Norm   :    81.133398389646985
HeatSolve:  Relative Change :   2.65162096840275627E-002
ComputeChange: SS (ITER=3) (NRM,RELC): (  81.133398     0.23682724E-06 ) :: heat equation
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            4
SolveEquations: -------------------------------------
StatCurrentSolve: -------------------------------------
StatCurrentSolve: STAT CURRENT SOLVER:
StatCurrentSolve: -------------------------------------
StatCurrentSolve: Starting Assembly...

StatCurrentSolve:  Assembly (s)          :   1.9839999999999200
       1 0.6384E-12 0.6384E-12
       1 0.6384E-12 0.6384E-12
ComputeChange: NS (ITER=1) (NRM,RELC): (  116.98980     0.13411593E-06 ) :: static current conduction
StatCurrentSolve:  Solve (s)             : -3.66373598126301658E-015

StatCurrentSolve:  Total Heating Power   :   31904.465489607817
StatCurrentSolve:  Effective Resistance  :   1.2537429913385989
ComputeChange: SS (ITER=4) (NRM,RELC): (  116.98980     0.13411593E-06 ) :: static current conduction
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           1
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.9249E-02
       (...)
      62 0.9737E-08
ComputeChange: NS (ITER=1) (NRM,RELC): (  83.313655     0.26516209E-01 ) :: heat equation
HeatSolve: iter:    1 Assembly: (s)    6.12    6.12
HeatSolve: iter:    1 Solve:    (s)    0.11    0.11
HeatSolve:  Result Norm   :    83.313654600430993
HeatSolve:  Relative Change :   2.65162089698932589E-002
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           2
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.1405E-02
      (...)
      54 0.9047E-08
ComputeChange: NS (ITER=2) (NRM,RELC): (  81.133399     0.26516198E-01 ) :: heat equation
HeatSolve: iter:    2 Assembly: (s)    6.11   12.23
HeatSolve: iter:    2 Solve:    (s)    0.08    0.19
HeatSolve:  Result Norm   :    81.133399245450335
HeatSolve:  Relative Change :   2.65161984236455782E-002
ComputeChange: SS (ITER=4) (NRM,RELC): (  81.133399     0.10548102E-07 ) :: heat equation
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            5
SolveEquations: -------------------------------------
StatCurrentSolve: -------------------------------------
StatCurrentSolve: STAT CURRENT SOLVER:
StatCurrentSolve: -------------------------------------
StatCurrentSolve: Starting Assembly...

StatCurrentSolve:  Assembly (s)          :   1.9840000000000964
ComputeChange: NS (ITER=1) (NRM,RELC): (  116.98980      0.0000000     ) :: static current conduction
StatCurrentSolve:  Solve (s)             :  1.59999999999453912E-002

StatCurrentSolve:  Total Heating Power   :   31904.465516701024
StatCurrentSolve:  Effective Resistance  :   1.2537429902739228
ComputeChange: SS (ITER=5) (NRM,RELC): (  116.98980      0.0000000     ) :: static current conduction
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           1
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done

       1 0.9249E-02
      (...)
      62 0.9732E-08
ComputeChange: NS (ITER=1) (NRM,RELC): (  83.313655     0.26516199E-01 ) :: heat equation
HeatSolve: iter:    1 Assembly: (s)    6.11    6.11
HeatSolve: iter:    1 Solve:    (s)    0.09    0.09
HeatSolve:  Result Norm   :    83.313654610791588
HeatSolve:  Relative Change :   2.65161985479802145E-002
HeatSolve:
HeatSolve:
HeatSolve: -------------------------------------
HeatSolve:  TEMPERATURE ITERATION           2
HeatSolve: -------------------------------------
HeatSolve:
HeatSolve: Starting Assembly...

HeatSolve: Assembly done
       1 0.1405E-02
       (...)
      54 0.9047E-08
ComputeChange: NS (ITER=2) (NRM,RELC): (  81.133399     0.26516198E-01 ) :: heat equation
HeatSolve: iter:    2 Assembly: (s)    6.13   12.23
HeatSolve: iter:    2 Solve:    (s)    0.08    0.17
HeatSolve:  Result Norm   :    81.133399293935781
HeatSolve:  Relative Change :   2.65161979504836900E-002
ComputeChange: SS (ITER=5) (NRM,RELC): (  81.133399     0.59760157E-09 ) :: heat equation
MAIN:
MAIN: -------------------------------------
MAIN:  Time: 19/50  0.38000000000000006
MAIN:  Estimated time left: 44 minutes.
MAIN: -------------------------------------
MAIN:
ResultOutputSolver: -------------------------------------
ResultOutputSolver: Working on mesh: .
ResultOutputSolver: Dimension of mesh: 2
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving to file: ./myresult0019.vtu

ResultOutputSolver: -------------------------------------
SolveEquations: -------------------------------------
SolveEquations:  Coupled system iteration:            1
SolveEquations: -------------------------------------
(...)


So the relative change is still 2.65e-3 (it is below 1e-8 for the timesteps where the convergence was OK), but the solver contiunes with the next timestep after only 5 coupled interations.
I have already tried if setting the steady state convergence tolerance to 1e-8 (was 1e-5 before) in HeatSolver changes anything - it doesn't.
What did I do wrong here?

Thank you for a helpful hint,

Matthias
mzenker
 
Posts: 665
Joined: 07 Dec 2009, 11:49

Re: Coupled system convergence tolerance

Postby mzenker » 26 Jun 2012, 18:39

Hi again,

I am stuck with this convergence issue at the moment - could someone from the Elmer team enlighten me on the subject? I have read the corresponding sections in the Elmersolver manual, but didn't find the answer there...

Thank you,

Matthias
mzenker
 
Posts: 665
Joined: 07 Dec 2009, 11:49

Re: Coupled system convergence tolerance

Postby mzenker » 29 Jun 2012, 15:21

Hi,

after digging into the Elmersolver code and studying the solver log again, I think I have found the answer myself:

The convergence measure for the coupled simulation is found by comparing the norm of the heat equation between the last two iterations. The important point is that the norm is taken at the end of the coupled interations.
The convergence measure for the heat equation alone is found by comparing the norms of two successive iterations of the heat equation.
Now the problem is that the heat equation may not have converged, but the relative change to the norm at the end of the last coupled iteration may be so small that the coupled iteration thinks that convergence is reached altogether.

Solution: Set Nonlinear System Max Iterations = 1 in heat solver.

Now I still have convergence problems, but at least the iterations are not aborted before convergence is reached...

Matthias
mzenker
 
Posts: 665
Joined: 07 Dec 2009, 11:49


Return to ElmerSolver

Who is online

Users browsing this forum: Google [Bot] and 1 guest