StatElecSolver and E field

Numerical methods and mathematical models of Elmer
Post Reply
Steffen
Posts: 3
Joined: 24 May 2015, 00:57
Antispam: Yes

StatElecSolver and E field

Post by Steffen »

Hello Elmer Forum Community,

I'm Steffen and new to Elmer. Currently my goal is to simulate the electric field of a GEM or/and parallel plate geometry. So far most of it works out just fine and the results for the electric potential are not bad. Even though I have a question regarding the Calculate Electric Field flag of the StatElecSolve Procedure. My solver setup (not all of it but the relevant parts):

Code: Select all

Equation 1
  Active Solvers(2) = 1 2
  Calculate Electric Energy = True
End

Solver 1
  Equation = Stat Elec Solver
  Variable = Potential
  Variable DOFs = 1
  Procedure = "StatElecSolve" "StatElecSolver"
  Calculate Electric Field = True
  Calculate Electric Flux = False
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 1000
  Linear System Abort Not Converged = True
  Linear System Convergence Tolerance = 1.0e-10
  Linear System Preconditioning = ILU1
  Steady State Convergence Tolerance = 5.0e-7
End

Solver 2
  Equation = ComputeFlux
  Procedure = "FluxSolver" "FluxSolver"
  Calculate Grad = Logical True  ! for electric field
  Target Variable = String Potential
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 1000
  Linear System Abort Not Converged = True
  Linear System Convergence Tolerance = 1.0e-10
  Linear System Preconditioning = ILU1
  ! possible linear system settings if problems with the defaults
End

The result of StatElecSolve is the elec. Potential which is fine but the E field (vector field) is everywhere returned to be (0,0,0). However the 2nd solver which gives the gradient of the Potential, returning -E works out ok.
So my question is what I'm doing wrong with the Calculate Electric Field Flag, why is it not working, what is it for.
Is there the possibility to get -grad(potential) with the 2nd solver?

Thank's a lot,

Steffen
jleman
Posts: 3
Joined: 16 Mar 2015, 05:44
Antispam: Yes

Re: StatElecSolver and E field

Post by jleman »

I had the same issue - did you ever resolve this?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: StatElecSolver and E field

Post by mzenker »

Hi,

I had the same problem, see this post. For the sign, you could try to use the Flux Coefficient keyword, adding a new parameter to the materials having a value of -1. I haven't tested it, however. You can also calculate the field in the postprocessing.

HTH,

Matthias
Post Reply