PyPDE icon indicating copy to clipboard operation
PyPDE copied to clipboard

Scalar field becomes filled with NaN s

Open yohad opened this issue 2 years ago • 0 comments

Hi, I'm trying to solve the Swift-Hohenbeg model's PDE as such:

l = 3
k_c = 0.5

grid = pde.CartesianGrid([[0, 100], [0, 100]], [100, 100])
field = pde.ScalarField.random_normal(grid, mean=10)

storage = pde.MemoryStorage()
eq = pde.PDE({"u": f"u -{l}*u**3 -laplace(laplace(u)) -{k_c**4}*u - 2*{k_c**2}*laplace(u)"})
result = eq.solve(field, t_range=100, dt=1e-2, tracker=["progress", storage.tracker(1)])
result.plot()

But for many values of l and k_c, The final result becomes a scalar field filled with NaN.

The current values causes this error. Thanks

yohad avatar Jun 16 '22 11:06 yohad