Simple exponential decay output wrong results

@Yotam_Ohad,

The issue comes from the line assigning directly to b_n += 0.7. You are messing with the Index b_n which is causing your exponential growth to 700 (0.7 / 1e-3). If you change the time step you should see the solution u scale to (0.7/dt). Instead you should initialize u_n with something like

u_n.sub(0).x.array[:] = np.ones(u_n.sub(0).x.array.size) * 0.7

-Sven

1 Like