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.
Undefined value found in the stiffness matrix.
Posted 13.11.2025, 01:42 GMT-5 Computational Fluid Dynamics (CFD), Porous Media Flow, Studies & Solvers 0 Replies
Please login with a confirmed email address before reporting spam
I was simulating the Darcy flow-fracture module and introduced pressure-dependent permeability and porosity. Then, I performed calculations on a two-dimensional rectangular area containing several simple fractures. However, within less than three seconds of computation, the following error popped up:
Undefined value found.
Details: There is an undefined value in the stiffness matrix. There are 229721 equations, and NaN/Inf appears in the matrix rows for the variable comp1.p. At coordinates: (140,60), (139.079,59.1385), (139.586,58.4897), (138.92,58.3842), (137.275,58.76), ... Similarly, NaN/Inf appears in the matrix columns for the degrees of freedom.
Based on this error message, I attempted the following steps:
Adjusted the mesh density.
Handled variables that might result in zero in the denominator. For example, I rewrote "a/p" as "a/max(p, 1e-7[MPa])".
Checked the boundary conditions to ensure no conflicting Dirichlet boundary conditions were applied to two adjacent boundaries. In reality, the external boundaries of the model are all set to no flow, and a pressure condition is only applied at the midpoint of one boundary, using a step function to ensure a smooth transition of the pressure at that point.
After taking these measures, the error still persists. The error coordinates are concentrated in the upper-right and lower-right corners of the rectangle. How can I resolve this issue?
Attachments:
Hello Shine Sun
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.
