I am trying to solve the 2D heat equation (or diffusion equation) in a disk:

    \*SubscriptBox[\(\[PartialD]\), \(t\)]\(f[x, y, t]\)\) == \!\(
    \*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(f[x, y, t]\)\), 
      f[x, y, 0] == E^(-x^2 - y^2)}, {t, 0, 1}, {x, y} \[Element] Disk[]]

but I get this error

NDSolve::underdet: There are more dependent variables, {f[x,y,0],f[x,y,t],(f^(0,0,1))[x,y,t]}, than equations, so the system is underdetermined.

I want to include the Neumann boundary condition such that the normal derivative is zero. How can I include that?

edit: user21 fixed my mistake, here is a density plot from the code

DensityPlot3D[f[x, y, t] /. sol, {x, -1, 1}, {y, -1, 1}, {t, 0, 1}, 
 PlotRange -> All, AxesLabel -> Automatic]

with sol the solution as found below.

enter image description here

  • $\begingroup$ Please, post the code of the 3D plot $\endgroup$ – Jose Enrique Calderon Jun 30 '17 at 17:43
  • $\begingroup$ done, see edit. $\endgroup$ – Ruud3.1415 Jul 2 '17 at 13:19

You need to add the dependent variable f like so:

NDSolve[{Derivative[0, 0, 1][f][x, y, t] == 
   Derivative[0, 2, 0][f][x, y, t] + Derivative[2, 0, 0][f][x, y, t], 
  f[x, y, 0] == E^(-x^2 - y^2)}, f, {t, 0, 1}, 
 Element[{x, y}, Disk[{0, 0}]]]

Concerning the Neumann zero boundary condition: Neumann zero boundary conditions are the default so nothing needs to be done.

| improve this answer | |
  • $\begingroup$ yes... I should have done that.. Thanks user21! Also thanks for the info andre! $\endgroup$ – Ruud3.1415 Jun 30 '17 at 17:30
  • $\begingroup$ @andre, thanks added your comment to the post. $\endgroup$ – user21 Jun 30 '17 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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