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 + ConvectionTerm(coeff=-1 
/ q, var=Jn) == 0
potential.equation = DiffusionTerm(1 / q * epsilon) + Pion * Nion == 0
Jp.equation = ImplicitSourceTerm() + ConvectionTerm(coeff=-q * mu_p * Pion, 
var=potential) + ConvectionTerm(coeff=-q * Dp, var=Pion) == 0
Jn.equation = ImplicitSourceTerm() + ConvectionTerm(coeff=-q * mu_n * Nion, 
var=potential) + ConvectionTerm(coeff=q * Dn, var=Nion) == 0
```
FiPy does not know what Variable TransientTerm() applies to in Pion.equation 
and Nion.equation, DiffusionTerm() in potential.equation, nor 
ImplicitSourceTerm() in Jp.equation and Jn.equation.

As a further point, you should not solve Pion.equation and Jp.equation 
separately nor Nion.equation/Jn.equation. Combine them for a single, second 
order PDE each for n and for p. You will want to take care that, e.g., the 
equation should not be taking the gradient (\nabla) of a vector (Jn), which 
would give you a tensor; rather, the expression should be divergence 
(\nabla\cdot) of a vector (Jn), giving a scalar.

As to comparing to your experimental data, I'd need to know what form it takes 
to advise further.

- Jon

> On Jul 23, 2019, at 9:09 PM, Justin Pothoof <jpoth...@uw.edu> wrote:
> 
> Hello,
> 
> I understand that modeling the drift diffusion equations are very 
> challenging, but I'm having issues actually writing the equations.  I keep 
> encountering the error: "fipy.terms.ExplicitVariableError: Terms with 
> explicit Variables cannot mix with Terms with implicit Variables."
> 
> Additionally, I have fitted experimental data that describes what the initial 
> conditions for my system should be, but I don't know how to include that into 
> FiPy.  I would appreciate any guidance that you can offer.  I will include a 
> pdf of what the equations I'm trying to write are as well as the file I have 
> written thus far. 
> 
> Thank you,
> Justin
> <FiPy 
> Testing.py><Equations.pdf>_______________________________________________
> fipy mailing list
> fipy@nist.gov
> http://www.ctcms.nist.gov/fipy
>  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]


_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to