# How do I solve a PDE with a strange boundary condition?

How do I solve the PDE with boundary value like this

$$u(t,x,y)=0, \textrm{when } F(x,y)=0$$

using DSolve?

As a specific example, I want to solve heat equation

$$\frac{\partial u}{\partial t}=\alpha\left(\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}\right)$$

with a strange boundary condition $u(t,x,y)=0$ where $x^6+y^4=1$. (Or I want to solve it numerically with a strange closed curve.)

-
Could you make a specific, concrete example ? –  b.gatessucks Feb 2 '13 at 13:39
@b.gatessucks OK,I will edit it. –  Golbez Feb 2 '13 at 13:42
Have you tried NDSolve for a numerical solution? –  user21 Feb 2 '13 at 20:29

Here is a solution for your specific example.
I didn' t succeed in finding a more general solution.

The idea is to use NDSolve.
As NDSolve accept only rectangular boundary conditions, I take a rectangular boundary that enclose your domain, I make u(t, x, y) = 0 on this new boundary, and I make the thermal conductivity between the old and the new boundary very high.

The new problem is therefore of the kind :
Heat equation in a non-homogeneous media with rectangular boundary

After many attempts, I succeed in implementing a non-homogeous conductivity equal to :
- ~1 if (x^4 + y^6) < 1
- >>1 otherwise

Any improvement would be very appreciated

sol = NDSolve[
With[{thermalConductivity = (1 + (x^4 + y^6)^4)},
{(* heat equation *)
D[u[x, y, t], t] ==
D[thermalConductivity * D[u[x, y, t], x], x]
+ D[thermalConductivity * D[u[x, y, t], y], y],
(* boundary conditions *)
u[-1.5, y, t] == 0,
u[1.5, y, t] == 0,
u[x, -1.5, t] == 0,
u[x, 1.5, t] == 0,
(* initial condition *)
u[x, y, 0] == (2 Exp[-8 (x^2 + y^2)] )
}],
{u},
{t, 0, 0.13}, {x, -1.5, 1.5}, {y, -1.5, 1.5},
AccuracyGoal -> 2,
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {
"TensorProductGrid",
"MinPoints" -> {30, 30}
},
"TemporalVariable" -> t}]


the solution at t=0.12 :

Plot3D[Evaluate[u[x, y, 0.12] /. sol], {x, -1.5, 1.5}, {y, -1.5, 1.5},
PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}, {-.1, .5}},
MeshFunctions -> {#3 &},
Mesh -> {{0.02, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5}}, PlotPoints -> 30]


The foot of the bump is the shape of x^4+y^6, ie the boundary u(x,y,t)==0 :

ContourPlot[x^4 + y^6 == 1, {x, -1.5, 1.5}, {y, -1.5, 1.5}]


-