poor convergence with flux solver

Numerical methods and mathematical models of Elmer
Post Reply
aminer2k
Posts: 20
Joined: 14 Dec 2009, 00:34
Location: Northern California, USA

poor convergence with flux solver

Post by aminer2k »

I am calculating the electric field from the electrical potential using fluxsolver. It has very poor convergence. I simplified the model to only about 85 volumes, but the convergence is worse.

Solver section:

Code: Select all

Solver 2 # solve for E field, from the flux of the potential E=-flux(phi)
  Exec Solver = always
  Equation = "phi"
  Procedure = "FluxSolver" "FluxSolver"
  Calculate Flux = Logical True
  Flux Variable = String "Potential"
  Flux Coefficient = String "None" # no constant used
  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
 
End
The output is:

Code: Select all

FluxSolver: -------------------------------------
FluxSolver: Computing the flux
FluxSolver: -------------------------------------
FluxSolver:  Assembly Time:   2.17604637145996094E-003
CRS_IncompleteLU: ILU(0) (Real), Starting Factorization:
CRS_IncompleteLU: ILU(0) (Real), NOF nonzeros:       977
CRS_IncompleteLU: ILU(0) (Real), filling (%) :       100
CRS_IncompleteLU: ILU(0) (Real), Factorization ready at (s):     0.00
       1 0.1294E-15
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.50000000E-01  2.0000000     ) :: phi
CRS_IncompleteLU: ILU(0) (Real), Starting Factorization:
CRS_IncompleteLU: ILU(0) (Real), NOF nonzeros:       977
CRS_IncompleteLU: ILU(0) (Real), filling (%) :       100
CRS_IncompleteLU: ILU(0) (Real), Factorization ready at (s):     0.00
      10 0.1317E+00
      13 0.1317E+00
ERROR:: IterSolve: Failed convergence tolerances.
I tried cg and bicgstab for methods, and ILUO or none for preconditioning, but there is little difference. Is there perhaps a direct solver for the flux? I have similar problems when solving for the flux based on temperature in the same model. Is there a method perhaps that will work better?
Andy
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: poor convergence with flux solver

Post by raback »

Hmm, you have propbably large variations in the flux. Does better preconditioner help, i.e. BiCGstab+ILU2, for example. -Peter
aminer2k
Posts: 20
Joined: 14 Dec 2009, 00:34
Location: Northern California, USA

Re: poor convergence with flux solver

Post by aminer2k »

Hello,
Thank you for the suggestions. I tried the settings for the solver that you recommended, but without a positive result.

I am solving the heat equation using a heat source, h, then finding the flux of Temperature. When I turn off h, or significantly reduce the magnitude of h, the flux solver will converge. The temperature distribution is a smooth curve without dramatic gradients. Is there a chance that using a heat source could screw up the flux solver?

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

Re: poor convergence with flux solver

Post by raback »

Hi

Is it a serial or parallel case? If the case is relatively small you could always use a direct method:

Code: Select all

Linear System Solver = direct
Linear System Direct Method = umfpack
-Peter
Post Reply