Page 1 of 1

Charge relaxation problem

Posted: 25 Aug 2018, 23:04
by PauloFonte
Dear Elmer experts

I would like to solve a charge relaxation problem. That is
div(sigma*grad(V)) = div(d/dt (epsilon*grad(V)))

The related Elmer solver seems to be the StatCurrentSolver
div(sigma*grad(V)) = d/dt (rho)

Searched the forum and the most relevant discussion I could found was
http://elmerfem.org/forum/viewtopic.php ... =10#p16162
It seems that the time derivative is not included in StatCurrentSolver and there is a suggestion of a modification, but I have no idea how to use it (and don't want to become an expert myself...).

I also dreamed that the rhs term could be calculated in a parallel solver, but couldn't find a way to calculate the time derivative. Also, have no clue about the chances of convergence of such contraption.

Any suggestions welcome. Thanks in advance

Re: Charge relaxation problem

Posted: 02 Sep 2018, 22:12
by raback
Hi

As written before this would be just a few lines of code. We may be soon writing an optimized version of the StatCurrentSolver and could include that term in the process.

-Peter

Re: Charge relaxation problem

Posted: 18 Sep 2018, 19:46
by raback
Hi All,

I'm in the process of writing a new optimized version of StatCurrentSolver. At the same time I could augment it to be more complete. Hence I thought about adding this relaxation term. Here \sigma is electric conductivity and \eps is permittivity and the source term is given.
NewStatCurrent.PNG
NewStatCurrent.PNG (5.93 KiB) Viewed 4807 times
Would this solve the charge relaxation problem. Any other ideas while we are at it?

-Peter

Re: Charge relaxation problem

Posted: 18 Sep 2018, 21:43
by PauloFonte
For me this will be fine.
Don't know how this fits the general philosophy of Elmer, but in some cases the frequency domain version (d/dt -> Iw) may be more useful (and, I guess, simpler to calculate).
Thanks in advance.
Paulo

Re: Charge relaxation problem

Posted: 09 Nov 2018, 13:14
by raback
Hi Paulo

This solver has been there for some time. Would you have some test case to try it out?

-Peter

Re: Charge relaxation problem

Posted: 09 Nov 2018, 21:20
by PauloFonte
Dear Peter

Sorry, but unfortunately right now I'm too busy with classes to tackle this. Must first learn Elmer...

Hope to be able to work on this in January. Will keep you informed.

Kjnd regards
Paulo

Re: Charge relaxation problem

Posted: 16 Jul 2019, 18:31
by jeremie
Hello Peter,

I am trying to simulate a charge relaxation problem by using the new solver: StatCurrentSolveVec.
The problem I want to solve is driven by the equation you wrote in the message below, i.e. -∇∙σ∇ϕ-∇∙ε∇ dϕ/dt=ρ_t
raback wrote: 18 Sep 2018, 19:46 Hi All,

I'm in the process of writing a new optimized version of StatCurrentSolver. At the same time I could augment it to be more complete. Hence I thought about adding this relaxation term. Here \sigma is electric conductivity and \eps is permittivity and the source term is given.

NewStatCurrent.PNG

Would this solve the charge relaxation problem. Any other ideas while we are at it?

-Peter
I would like to inject charges as a source term into a dielectric cube and then observe the evolution of the electric field, the potential and the volume current. I built a test case with a dielectric cube.
I used a transient simulation with the StatCurrentSolveVec and I activated the calculation of the electric field and the volume current.
I used a user function in the Body force section of the .sif file to inject charges at the node 784, corresponding to the middle of the dielectric cube face:

FUNCTION rho( model, n, var) RESULT( f )
USE DefUtils
IMPLICIT NONE
TYPE(Model_t) :: model
TYPE(Solver_t) :: solver
INTEGER :: n, ind, i
REAL(KIND=dp) :: f
REAL(KIND=dp) :: var
TYPE(Element_t),POINTER :: Element

IF (n==784) THEN
f = 1.0D-10
ELSE
f = 0.0
END IF

END FUNCTION rho

I expected that the charges build up and the potential and electric field grow up but they are constant in time, there is no variations.

See these two examples:
Figure1_Potential.png
(49.91 KiB) Not downloaded yet
Figure2_ElectricField.png
(67.39 KiB) Not downloaded yet
How can I define a time constant source term in order to accumulate charges in the dielectric? Does the StatCurrentSolveVec allow the transport of charges?
What is the source term unit in Elmer? Is it C/m^3/s ?

Thank you very much

Jeremie

Re: Charge relaxation problem

Posted: 11 Aug 2019, 01:54
by raback
Hi Jeremie,

Have you checked the timescale. With timestep approaching zero you should approach the initial guess. Relaxation may be very fast compared to the scales we are used to. So try not just with dt=~1s, but reduce the timestep until you see some transient behavior. If you have same results with dt=1s and dt=1.0e-18s then there is certainly something wrong.

-Peter

Re: Charge relaxation problem

Posted: 29 Aug 2019, 16:22
by jeremie
Hello Peter,

Thank you for your answer. I tried to reduce the timestep to observe a transient behavior but I got the same results.
I manage to get the relaxation that I was looking for with the reformulation of my problem.
With a time dependant source term, it works !

Jeremie