How do I implement Quasi-Fermi approximation for drift-diffusion problem in fipy? #1070
Replies: 1 comment
-
There isn't an implicit way to set the exponential inside the convection term. You need to run the derivatives through by hand: If you're careful with signs, combining this with the first term should leave you a single DiffusionTerm in |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to solve a drift-diffusion problem for a solar cell in fipy.
These are the currently implemented equations:
`
#Continuity Equation For Electrons
eq1 = (self.gen_rate - (1.00 / -q) * (ExponentialConvectionTerm(coeff=q * self.nmob * phi.grad, var=n) + DiffusionTerm(coeff=q * self.nmob * D, var=n)))
#Poisson Equation
eq2 = (DiffusionTerm(coeff=epsilon, var=phi) + (- n) * q / (epsilon_0) == 0)
eq = eq1 & eq2
`
To implement the QF approximation we need this equation: "n = Nc * numerix.exp((χ - Φn + phi)/D)" or like this in logarithmic form "Φn = χ + phi - D * numerix.log((n.value / Nc))".
As one can see, in the current two equations we solved for n and phi, however in the QF approximation, I should solve for the state variables Φn and phi.
However, I can't find any appropriate way to define this change of variables since I'm not aware of a way of setting an exponential inside a convection term. Is there a solution for this?
Cheers,
Tristan
Beta Was this translation helpful? Give feedback.
All reactions