Circuit Boundary Condition #81
Replies: 2 comments 2 replies
-
It looks to me like the code is perfectly documented so I don't see what your problem is 🤣 |
Beta Was this translation helpful? Give feedback.
-
Ok this is probably really brutal to run through just here on github, so we may have to do a video call where we can walk through it together. But essentially the boundary term falling out of integration by parts of the weak form of the Poisson equation is: -test * normal * epsilon * grad_potential You know everything there except for grad_potential. We know what we want our boundary condition to be. It is what you already listed: V_source + V_cathode = (\Gamma_i - \Gamma_e) * eAR Now you also have expressions for \Gamma_i and \Gamma_e, and those expressions contain grad_potential. Essentially what you want to do is substitute expressions in for \Gamma_i and \Gamma_e and then rearrange such that you wind up with grad_potential isolated all by itself on the LHS of an equality (or the RHS if you like to write things backwards 😄 ). Once you have that expression for grad_potential, you can sub that in to the top equation I shared and you have your BC...and hopefully that BC looks like the one I programmed haha |
Beta Was this translation helpful? Give feedback.
-
Hey all,
This is a bit of a silly question.
I'm getting some behavior running a DC problem with the driven electrode acting like an anode rather than a cathode. Specifically, I'm getting the potential, electron temperature, and some charged species to just jump back and forth instead of converging to a steady state. I'm trying to see if this is just some kind of charge conservation issue in the (AD)NeumannCircuitVoltageMoles_KV boundary condition, but I'm running into another issue: I genuinely do not understand how this BC is derived, and that's making it impossible for me to tell if there's a bug. The equation it is solving is
V_source + V_cathode = (e * \Gamma_i - e * \Gamma_e)AR
but that is nothing like the residual shown in the code. I realize that the dirichlet BC above was somehow cast into a Neumann BC and that's the form we see in the code, but how exactly was that done? I really just want to make sure that this BC isn't hard coded to use only positively charged ion species or something.
Tagging @lindsayad since he's the one who wrote this, but if anyone else has any idea feel free to respond!
Beta Was this translation helpful? Give feedback.
All reactions