Mathematica : NDSolve on 2-D steady state heat eqn

  • #1
Swamp Thing
Insights Author
908
572
I am trying to implement this equation ##−k∇^2 u = e^{-(x^2+y^2)}##
using NDSolve in Mathematica. The idea is to solve for the temperature of a plate 10 x 10 units, with heat inputs as per the RHS.
Here is my attempt:
Code:
NDSolve[{ - Laplacian[u, {x, y}] == Exp[-(x^2 + y^2)], u[x, -5] == 0,
  u[x, 5] == 0, u[-5, y] == 0, u[5, y] == 0}, u, {x, -5, 5}, {y, -5,
  5}]

I get this error:
Code:
NDSolve::ndode: The equations {0==E^(-x^2-y^2)} are not
 differential equations or initial conditions
in the dependent variables {u}.

What is my mistake?
 
Physics news on Phys.org
  • #2
The u in your Laplacian does not depend on x or y so the result is zero.

Try Laplacian[u[x,y],{x,y}]

Edit: Note on nomenclature: The stationary heat equation is the Poisson equation.
 
  • Like
Likes Swamp Thing

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
263
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top