parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Clearly defined bug reports and their fixes
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Takala »

Hello

I'm running a case with AVWhitney (see attached sif). The case is more or less similar to mgdyn_bh in tests but it is transient. Odd thing is that I cannot reproduce this error (see below) with the mgdyn_bh test case (with transient property).
Moreover, the problem occurs only with parallel calculation:
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
CRS_IncompleteLU: ILU(0) (Real), Starting Factorization:
CRS_IncompleteLU: ILU(0) (Real), NOF nonzeros: 5459874
CRS_IncompleteLU: ILU(0) (Real), filling (%) : 100
CRS_IncompleteLU: ILU(0) (Real), Factorization ready at (s): 0.09
1 0.6952-309
ERROR:: IterSolve: Failed convergence tolerances.
ERROR:: ComputeChange: Norm of solution exceeded given bounds
ERROR:: ComputeChange: Norm of solution exceeded given bounds
ComputeChange: Computed Norm: NaN
ERROR:: ComputeChange: Norm of solution exceeded given bounds
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 5039 on
node elmerbox exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
Please advise,

Eelis
Attachments
case.sif
(8.43 KiB) Downloaded 450 times
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Takala »

Hi,

I located the problem: It is the JfixPotentialSolver preconditioning.

I changed

Code: Select all

    CALL ListAddString(SolverParams,'Jfix: Linear System Preconditioning', 'ilu')
to

Code: Select all

    CALL ListAddString(SolverParams,'Jfix: Linear System Preconditioning', 'none')
But now I think I could have said

Code: Select all

Jfix: Linear System Preconditioning = none
In sif at solversection.

Anyway, now it works even with parallel calculation. But would be nice to know why it behaved like this.

Also, should the preconditioning be 'none' by default and not 'ilu'?

Cheers,

Eelis
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

transient AVWhitney with Current sourse: solution static

Post by Takala »

Hi Guys,

another problem I am having with this case (the sif is in the first post) is that the solution doesn't change for the MagnetoDynamics Solver. "P" (that is the potential) and the "Magnetic flux density" don't change over time. Could some one tell me why? It should change. The "volume current" calculated with the "Static Current Conduction" solver is changing according to the values defined in sif and even the "Jfix" scalar potential is changing.

Please advise!

Cheers,

Eelis
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Juha »

Hi Eelis,

impossible to say anything w/o having the whole model. Have you
tried with "Linear System Preconditioning=None"?

Regards,Juha
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Takala »

Found it.

I was using two time step sizes. Somehow this caused the MagnetoDynamics solver to fail updating the variables.

Code: Select all

Timestep Sizes(2) = 100 0.005
When I use only one timestep size, it works.

-Eelis
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Takala »

Juha wrote:Hi Eelis,

impossible to say anything w/o having the whole model. Have you
tried with "Linear System Preconditioning=None"?

Regards,Juha

Hi Juha,

sorry I didn't see your post yesterday. Yes, I use the line you suggested.

I present here yet another odd problem:

My goal is to run a steady state simulation and restart a transient simulation with it. This don't work for some reason (I can give details later). Then as for a back up plan I have used another method: using a big time step at first kills all the transient effects from the model and thus the first time step is effectively a steady state result. Then one can proceed with small time steps. This don't work as presented (causes a static solution, see above). Finally as a last option I use normal time steps, but I turn down all the conductive materials (by setting conductivity to 1) for the first time steps. This kills all the transient effects as well. Then turning them back on again for the second time step I effectively have the transient simulation restarted with a steady state solution. This seems to work at first.

However, there is a bug in this one as well. See the attached animation:
First everything works as a charm but then at time step around 30 Magnetic Flux Density freezes then at about time step 40 everything else freezes as well (except Volume Current) then again at around time step 52 the simulation restart working normally and freezes again at around time step 70.

So as a summary
Bug 1) I cannot restart transient simulation with a steady state solution from previous simulation.
Bug 2) As mentioned I cannot run different time steps.
Bug 3) Freezing fields with transient simulation.

The case is several megabytes so I cannot upload it. Maybe I could send it to your email?

Cheers,

Eelis
Attachments
error.ogg
(505.04 KiB) Downloaded 426 times
Takala
Posts: 186
Joined: 23 Aug 2009, 23:59

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by Takala »

Another thing:

Now I'm running the simulation with BDF order 3 (instead of 2). Same thing, freezing. And I can really see from the residuals that the (AVWhitney) solver is not doing any work (converges immediately) when the freezing is happening.

Cheers,

Eelis
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by raback »

Hi Eelis

An idea that comes to mind is that does the linear system solver think that it has already reached a solution. If you look closely at the linear system convergence are some iterations spent there? Sometimes one might relax the linear system convergence tolerance too much that the first test is already passed and no steps are actually taken.

-Peter
tetraeder
Posts: 44
Joined: 27 Sep 2012, 13:09
Antispam: Yes

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by tetraeder »

I think i have the same problem with HeatSolver including phase change on the current version of elmersolver. It produces NaN's when it tries to solve the linear system. The weird thing is, that it occurs, when i reduce the time step size. I've tested the same simulation with an older Windows Version of ElmerSolver and there was no problem.

Here's the 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 = Transient
  Steady State Max Iterations = 1
  Output Intervals(2) = 1 99
  Timestepping Method = BDF
  BDF Order = 1
  Timestep intervals(2) = 1 99
  Timestep Sizes(2) = 0 3600
  Solver Input File = case.sif
  Post File = case.ep
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
  Initial condition = 1
End

Solver 1
  Equation = Heat Equation
  Procedure = "HeatSolve" "HeatSolver"
  Variable = -dofs 1 Temperature
  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-5
  Nonlinear System Max Iterations = 5
  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 = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = True
  Linear System Residual Output = 1
  Linear System Precondition Recompute = 1
End

Solver 2
  Exec Solver = Always
  Equation = "flux compute"
  Procedure = "FluxSolver" "FluxSolver"
  Calculate Flux = Logical True
  Flux Variable = String Temperature
  Flux Coefficient = String "Heat Conductivity"
  Linear System Solver = "Iterative"
  Linear System Iterative Method = "cg"
  Linear System Preconditioning = ILU0
  Linear System Residual Output = 10
  Linear System Max Iterations = Integer 500
  Linear System Convergence Tolerance = 1.0e-5
  Linear System Abort Not Converged = True
End

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

Equation 1
  Name = "HeatEq"
  Phase Change Model = Spatial 2
  Active Solvers(2) = 1 2
End

Equation 2
  Name = "Output"
  Active Solvers(1) = 3
End

Material 1
  Name = "WaterIce"
  Phase Change Intervals(2,1) = 0 0.01
  Enthalpy = Variable Temperature;  Real; $ rho = 1000000; t = -60 -50 -40 -30 -20 -10 0 0.01 4 10 20 30 40 50 60;e= -112.7674 -95.8585 -78.1953 -59.7779 -40.6062 -20.6802 0.0 333.6419 350.3737 375.5330 417.4619 459.3866 501.3071 543.2234 585.1355;e=rho*e;n=size(t)[1];for(i=0:n-1){t(i) e(i)}$; End
  Heat Conductivity = Variable Temperature;  Real;    -20   2.3;    0    2.3;    0.1  0.6;    40    0.6;  End
  Heat Capacity = Variable Temperature;  Real;     -0.1   2000;    0.1  4200; End
  Density = 1000.0
End

Initial Condition 1
  Name = "InitialCondition 1"
  Temperature = -20.0
End

Boundary Condition 1
  Target Boundaries(1) = 1
  Name = "BoundaryCondition 1"
  Temperature = 40.0
End
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: parallel AVWhitney: DefaultDirichletBCs IterSolve Failed

Post by raback »

Hi

Is your whole case small enough to be shared. Just the sif does not help much.

-Peter
Post Reply