# Fenics documentation or demonstration using to solve Poisson-Nernst-Planck equation

**URL:** <https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601>\
**Category:** General\
**Created:** [May 10, 2024, 6:27am UTC](https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601 "2024-05-10T06:27:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rachel](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/rachel/32/6609_2.png) [@Rachel](https://fenicsproject.discourse.group/u/Rachel)\
**Post date:** [May 10, 2024, 6:27am UTC](https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601/1 "2024-05-10T06:27:33Z")

</div>

Hello dear all,  
Please someone can help me with some Fenics documents or demonstration for Poisson-Nernst-Planck equation?

I don’t know if it is possible to solve this with Fenics. I need your help please even if it’s some tips for solving this equation.

Thank you for your kind help

---

<div class="post-metadata">

**Author:** ![leshinka](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/leshinka/32/5789_2.png) [@leshinka](https://fenicsproject.discourse.group/u/leshinka)\
**Post date:** [May 11, 2024, 9:25pm UTC](https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601/2 "2024-05-11T21:25:09Z")

</div>

Someone else is trying to solve the same problem in FEniCSx so perhaps you can learn from them at [How to debug the PETSC ERROR?](https://fenicsproject.discourse.group/t/how-to-debug-the-petsc-error/13406). I **may** be solving coupled potential and concentration problem at the turn of the year. Good luck.

---

<div class="post-metadata">

**Author:** ![Rachel](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/rachel/32/6609_2.png) [@Rachel](https://fenicsproject.discourse.group/u/Rachel)\
**Post date:** [May 13, 2024, 2:48am UTC](https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601/3 "2024-05-13T02:48:06Z")

</div>

> [@leshinka](#):
>
> Someone else is trying to solve the same problem in FEniCSx so perhaps you can learn from them at [How to debug the PETSC ERROR?](https://fenicsproject.discourse.group/t/how-to-debug-the-petsc-error/13406). I **may** be solving coupled potential and concentration problem at the turn of the year. Good luck.

I will try with this code.  
Thank you for your response.

---

<div class="post-metadata">

**Author:** ![Smith\_Jack](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/smith_jack/32/6093_2.png) [@Smith\_Jack](https://fenicsproject.discourse.group/u/Smith_Jack)\
**Post date:** [May 15, 2024, 8:42am UTC](https://fenicsproject.discourse.group/t/fenics-documentation-or-demonstration-using-to-solve-poisson-nernst-planck-equation/14601/4 "2024-05-15T08:42:15Z")

</div>

I decide to turn to COMSOL now, because I find it very difficult to solve the PNP equation by Fenics. 😂  
The most difficult problem is I have to discrete the time by myself, however, PNP equation is usually stiff, using the simple backward Euler formula never works.  
Another possible solution is to use the TS module of PETSC, however, I have to write an interface to TS module. It is again very difficult, because I have to care about the matrix layout or something like that.
