0
$\begingroup$

My question regards the following boundary value problem:

NDSolve[
 {
  D[u[t, x], t] == D[u[t, x], x, x],
  u[0, x] == 0, 
  u[t, 0] == Sin[t], u[t, 5] == 0
 }, u, {t, 0, 10}, {x, 0, 5}
]

The equations describe the temperature u[t,x] in a slab or bar. The problem I encounter is when I try to change the boudary condition u[t,5]==0 into one which prescribes (thermal) isolation for every instant (t) on the boundary x=5. That means the x derivative on x=5 is zero at every instant. How do I define such a boundary condition?

$\endgroup$
1
  • $\begingroup$ If you use the finite element method, the problem become very simple. See here $\endgroup$
    – andre314
    Sep 16, 2017 at 12:31

1 Answer 1

1
$\begingroup$

Use this

(D[u[t, x], x] /. x -> 5) == 0

or

Derivative[0, 1][u][t, 5] == 0
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.