Solving a system of coupled PDEs in fenicsx

Hi dear Dokken, thanks for pointing this out, it’s very helpful!
Reading the documentation and some older questions, I learned that this is a common problem when solving nonlinear PDEs. Following Nate’s advice (‘some tips and tricks for nonlinear problems with a Newton solver’), I tried increasing the relative tolerance (i.e. 10^{-14} and 0.0) and also the number of cells (from 8 \times 8 to 96 \times 96).

However, the same error is displayed, i.e. ‘Newton solver did not converge because maximum number of iterations reached’.

According to Solution nonconvergence - #6 by violetus and Default absolute tolerance and relative tolerance - #4 by nate, the error could be due to a malformed Jacobian.

Can you help me further?

Thanks in advance.