Charge relaxation problem

 Posts: 3
 Joined: 24 Aug 2018, 23:47
 Antispam: Yes
Charge relaxation problem
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
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

 Site Admin
 Posts: 3613
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Charge relaxation problem
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
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

 Site Admin
 Posts: 3613
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Charge relaxation problem
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.
Would this solve the charge relaxation problem. Any other ideas while we are at it?
Peter
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.
Would this solve the charge relaxation problem. Any other ideas while we are at it?
Peter

 Posts: 3
 Joined: 24 Aug 2018, 23:47
 Antispam: Yes
Re: Charge relaxation problem
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
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

 Site Admin
 Posts: 3613
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Charge relaxation problem
Hi Paulo
This solver has been there for some time. Would you have some test case to try it out?
Peter
This solver has been there for some time. Would you have some test case to try it out?
Peter

 Posts: 3
 Joined: 24 Aug 2018, 23:47
 Antispam: Yes
Re: Charge relaxation problem
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
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
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
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.0D10
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: 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
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
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.raback wrote: ↑18 Sep 2018, 19:46Hi 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 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.0D10
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: 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

 Site Admin
 Posts: 3613
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Charge relaxation problem
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.0e18s then there is certainly something wrong.
Peter
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.0e18s then there is certainly something wrong.
Peter
Re: Charge relaxation problem
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
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