Diffusion/recombination problem

You must not overwrite n before solving. Drop the redefinition of n before solve, and you’ll see the code entering in the nonlinear solver.

The bad news is that the nonlinear solver doesn’t converge.

  • some tips are reported in Default absolute tolerance and relative tolerance by @nate
  • out of those you may want to try with a non zero initial guess, if you know a good one
  • seeing that n_g = 1e10, you may also want to make your problem dimensionless to avoid having to deal with big numbers in arithmetic precision.