Consider this initial-boundary-value problem: $$\frac{\partial u}{\partial t}=\frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2},\quad \Omega=(0,1)\times(0,1),\quad t>0.$$ $$u(x,0,t)=1,u(x,1,t)=0,u_x(0,y,t)=u_x(1,y,t)=0,\quad t>0$$ $$u(x,y,0)=0,\quad (x,y)\in\Omega.$$ For this code
f[t_] := Piecewise[{{0, t <= 0}, {1, t > 0}}]
NDSolveValue[{D[u[x, y, t], t] ==
D[u[x, y, t], x, x] + D[u[x, y, t], y, y], u[x, 0, t] == f[t],
u[x, 1, t] == 0, Derivative[1, 0, 0][u][0, y, t] == 0,
Derivative[1, 0, 0][u][1, y, t] == 0, u[x, y, 0] == 0}, u, {x, 0,
1}, {y, 0, 1}, {t, 0, 10}]
I got error message
Encountered non-numerical value for a derivative at t == 0
Piecewise function works well on my other code. I don't know how to fix this one.
t >= 0
anyways, why do you need the discontinuity in the time derivative? $\endgroup$