Message Boards Message Boards

Avoid error called "Boundary condition is not specified on a single edge "?

Posted 6 years ago

I got an error when I want to find the numerical solution for this PDE. It says "Boundary condition is not specified on a single edge of the boundary of the computational domain." the code is following:

eqn = D[u[x, t], t] == D[D[u[x, t], x], x]

ic = {u[x, 0] == 1, u[0, t] == 0, Derivative[1, 0][u][10, t] == 0}

dsol2 = NDSolveValue[{eqn, ic}, u[x, t], {x, 0, 100}, {t, 0, 100}]

could anyone please give me some hint to solve it?

Attachments:
POSTED BY: Tim Zhang

What domain are you solving it on? If it's $x\in[0,100]$ then specify the boundary conditions at $x=0$ and $x=100$ (not $x=10$). Note that your initial conditions are inconsistent. Is u[0,0] $1$ or $0$?

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract