Flux Computation

Numerical methods and mathematical models of Elmer
Post Reply
benoit
Posts: 8
Joined: 11 Jun 2010, 17:48

Flux Computation

Post by benoit »

Hello Elmag users,

I use Elmer to solve the Static Current Conduction equation, and since I want to see vectors I use also the solver for Flux computation. When I run the sif file with the ElmerSolve command in my terminal, the Stat Current solver works well but for the Flux solver I have got this error message : IterSolve: Failed convergence tolerances.

I wrote the flux solver like this :

Solver 2
Equation = ComputeFlux
Procedure = "FluxSolver" "FluxSolver"
Flux Variable = String "Potential"
Flux Coefficient = String "Electric Conductivity"
End

I would like to understand the origin of the error to correct it.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Flux Computation

Post by raback »

Hi, the FluxSolver uses Galerkin method to compute the fluxes i.e. there is a linear system solved for each component. This should be an easy equation. Therefore I coded in some optimistic defaults (see FluxSolver_init in FluxSolver.src). Most importantly,

Code: Select all

Linear System Iterative Method = CG
Linear System Preconditioning = diagonal
You might try to add these lines with perhaps BiCGstab and ILU0 instead to the sif to override the too optimistic defaults.

-Peter
benoit
Posts: 8
Joined: 11 Jun 2010, 17:48

Re: Flux Computation

Post by benoit »

Thank you for your quick answer.

Unfotunately the solution you proposed did not work. I wrote this :

Solver 2
Equation = ComputeFlux
Procedure = "FluxSolver" "FluxSolver"
Flux Variable = String "Potential"
Flux Coefficient = String "Electric Conductivity"

Linear System Iterative Method = BiCGStab
Linear System Preconditioning = ILU0
End

It failed again. Maybe there are some other parameters I can change to have a convergence ?
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Flux Computation

Post by raback »

Hi, all the "Linear System *" settings. Just copy-paste from some other solver. You could also add verbosity by increasing "Max Output Level" so you see the output from the iteration. -Peter
benoit
Posts: 8
Joined: 11 Jun 2010, 17:48

Re: Flux Computation

Post by benoit »

It works with this :

Linear System Convergence Tolerance = 1.0E-06
Linear System Solver = "Iterative"
Linear System Iterative Method = "BiCGStab"
Linear System Max Iterations = 500
Linear System Preconditioning = ILU2
Linear System Residual Output = 1
Linear System Abort Not Converged = Logical False

Actually it does not work without the last line. I do not really understand what it means, but anyway it works.

Thank you Peter.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Flux Computation

Post by raback »

It means that even though the system did not really converge the termination of the program is not terminated. This really shouldn't be this hard of a problem. Maybe you have drastic variations in the coefficient or challenching aspect ratios...
Post Reply