not be be used together.
From: Justin Pothoof
Sent: Friday, August 9, 2019 8:24 PM
To: Guyer, Jonathan E. Dr. (Fed); FIPY
Subject: Re: Drift Diffusion Equation Setup
When taking the divergence of current density: divergence.(-mu_p *
grad.potential(x,t
hoof
> Sent: Friday, August 9, 2019 2:51 PM
> To: Guyer, Jonathan E. Dr. (Fed); FIPY
> Subject: Re: Drift Diffusion Equation Setup
>
> Hi Jon,
>
> I've been continuing to work on my problem. I've implemented the
> divergence of the current density mathematically into the positiv
19 2:51 PM
To: Guyer, Jonathan E. Dr. (Fed); FIPY
Subject: Re: Drift Diffusion Equation Setup
Hi Jon,
I've been continuing to work on my problem. I've implemented the divergence of
the current density mathematically into the positive charge and negative charge
density equations. Now, I'm encounte
Hi Jon,
I've been continuing to work on my problem. I've implemented the divergence
of the current density mathematically into the positive charge and negative
charge density equations. Now, I'm encountering issues with the boundary
conditions.. the charges should be flowing towards the center of
A current density or flux is a rank-1 variable, typically defined on face
centers. Your expression
J_n = -mu_n * n.harmonicFaceValue * phi.faceGrad + D_n * n.faceGrad
appropriately declares a rank-1 FaceVariable.
If you attempt to assign this value to a CellVariable, FiPy complains because
Great, that makes a lot of sense!
I've tried to define the current density as a CellVariable with the value J_n
= -mu_n * n.harmonicFaceValue * phi.faceGrad + D_n * n.faceGrad
as I've seen you describe in the mailing list before. But, I keep
encountering the error "ValueError: could not
Justin -
I would define a function that takes an argument x for each of your analytical
expressions, e.g.,
```
def y01(x):
"""Initial positive ion charge density"""
return
pini*((special.gamma(k1+p1))/(special.gamma(k1)*special.gamma(p1))*((x/l)**(k1-1))*(1-(x/l))**(p1-1))/7.3572
def
Thank you Jon,
I will try writing it in one equation as you suggested. Regarding the
experimental data, I have an initial potential curve described by a sum of
sines fit as well as initial positive/negative charge density curves
described by a specific equation I'll show in a file.
Thanks for
Justin -
What that error means is that if you write 'var=' for any Term, then you must
write 'var=' for every Term.
In your equations:
```
Pion.equation = TransientTerm() + k_rec * Pion * Nion + ConvectionTerm(coeff=1
/ q, var=Jp) == 0
Nion.equation = TransientTerm() + k_rec * Pion * Nion +