Issue with numerical drift with two Neumann BCs #1100
Unanswered
muntasirms
asked this question in
Q&A
Replies: 1 comment
-
The internal pinning is not implemented correctly:
All that being said, you don't need this term. Because of the Regardless, I see no evidence of a Dirichlet condition at one end. I'm also not sure what drift you are experiencing. The solutions seems stable to me. Can you describe what you expect to see? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working on a 1D transient PDE and have been running into some solver issues. I was wondering if I could ask for some advice. The problem describes the discharge of a biphasic electrode which is generally described as a fixed flux entering through one phase, and the same flux leaving at the other end of the domain out of the other phase. Here is the problem:
The first equation is the mass balance around a particle and the second is a charge balance across the porous electrode.
with BCs
At (x = 0):
$\left. \frac{\partial \eta}{\partial x} \right|_{x=0} = -\frac{I}{\sigma}$
$\left. \frac{\partial {C_s}}{\partial x} \right|_{x=0} = 0$
At (x = L) :
$\left. \frac{\partial \eta}{\partial x} \right|_{x=L} = \frac{I}{\kappa}$
$\left. \frac{\partial {C_s}}{\partial x} \right|_{x=L} = 0$
and ICs:
$C_s = 0.5$
$\eta = E_o$ (generally set to zero)
I understand that invariant problems with two neumann boundary conditions are generally susceptible to this numerical drift in their solutions. My main question is how to address this: I've found suggestions for "pinning" a value to create a gauge - but this seems to change the physics by creating a Dirichlet condition at one end. This inherently changes the problem physics, which is an issue since I am looking for information about the charge balance alongside the final solution. Do you have any suggestions for other ways to address this drift? I've also attached a functional version of my code that shows the drift when run.
Thanks so much for your help and take care!
fipyHybridCapacitorBattery.txt
Beta Was this translation helpful? Give feedback.
All reactions