import fipy as fp
nx = 20
ny = nx
dx = 1
dy = dx
mesh = fp.Grid2D(dx=dx, dy=dy, nx=nx, ny=ny)
phi = fp.CellVariable(mesh=mesh, value=0.)
eq = fp.TransientTerm() == fp.DiffusionTerm(coeff=1)
eq.solve(var=phi, dt=1.)
raises
RuntimeError: Factor is exactly singular
StagnatedSolverWarning: The solver stagnated. Iterations: 2. Relative error: nan
RuntimeWarning: invalid value encountered in true_divide
depending on solver.
dx = 1. fixes this.
raises
RuntimeError: Factor is exactly singularStagnatedSolverWarning: The solver stagnated. Iterations: 2. Relative error: nanRuntimeWarning: invalid value encountered in true_dividedepending on solver.
dx = 1.fixes this.