Mathematica Mathematica : NDSolve on 2-D steady state heat eqn

  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    2d State Steady
AI Thread Summary
The discussion focuses on using NDSolve in Mathematica to solve the steady-state heat equation represented as −k∇²u = e^(-(x²+y²)). The user encounters an error indicating that the equations are not valid differential equations due to the incorrect formulation of the Laplacian operator. The correct syntax should involve specifying the function u as u[x, y] within the Laplacian. Additionally, it is noted that the stationary heat equation is also referred to as the Poisson equation. The key takeaway is to ensure the function u is properly defined in the Laplacian to avoid errors in the solution process.
Swamp Thing
Insights Author
Messages
1,028
Reaction score
763
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
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

Replies
4
Views
3K
Replies
3
Views
5K
Replies
2
Views
2K
Replies
4
Views
3K
Replies
1
Views
2K
Back
Top