Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

How to debug electrochemistry simulations?

Fathaah Process and Energy - TU Delft

Please login with a confirmed email address before reporting spam

I am trying to model the porous cathode of a CO2 reduction in 1D, using Secondary Current Distribution, Chemistry and Transport of Dilute Species physics. The simulations works with concentration dependencies in the Butler-Volmer equation, and the homogeneous chemical reactions. However, the moment I add the Porous Electrode coupling or use the electrolyte potential in the migration term of the transport equation, my simulation does not converge even after 1000 iterations

Error message: Undefined value found. - Detail: Undefined value found in the equation residual vector. There are 201 degrees of freedom giving NaN/Inf in the vector for the variable (all the variables I've defined)

From what I can understand, the current densities are really high in the porous electrode and electrolyte, but I have no explanation of why, and emailed the authors of the paper for that.

But on a general sense, how does one debug simulations in COMSOL? I understand that boundary conditions could be one of the main issues, but I have seperately checked my boundary conditions for each module, and the results were correct. I've also compared the boundary conditions with the two-phase 5 layer PEM MEA application file (https://www.comsol.com/model/a-two-phase-model-for-a-five-layer-pem-fuel-cell-mea-79191), and it checks out too.

As I've only been working with COMSOL for the past 3 months, I am trying to understand how experienced modellers decode errors in electrochemistry. Thank you in advance!


0 Replies Last Post 2023年5月12日 GMT-4 06:00
COMSOL Moderator

Hello Fathaah

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.