WOLFRAM|DEMONSTRATIONS PROJECT

Solution of the Laplace Equation for Temperature Distribution in a Square

​
collocation points
11
Consider the Laplace equation
2
∂
u
∂
2
x
+
2
∂
u
∂
2
y
=0
in a square region, where
0⩽x,y⩽1
. We wish to solve for the temperature distribution
u(x,y)
, subject to the following Dirichlet boundary conditions:
BC1:
u(x=0,y)=1
,
BC2:
u(x=1,y)=0
,
BC3:
u(x,y=0)=0
,
BC4:
u(x,y=1)=0
.
This Demonstration solves the problem using a spectral method [1] for a user-set value of the number of the Chebyshev–Gauss–Lobatto collocation points. The colored dots reflect the intensity of the scalar field
u
at the various nodes in the
[0,1]×[0,1]
square domain. You can clearly recognize the form of a contour plot of
u
in the third snapshot.