# How can I solve a 3D heat transfer partial differential equation? [closed]

It's a problem about heat transfer. Here is the equation :

Is it solvable using this software?

### Edit

Sorry, I'm new to Mathematica. I have the following code for this problem

k = 1;
eqn =
Derivative[0, 0, 2, 0][u][x, y, z, t] + Derivative[0, 2, 0, 0][u][x, y, z, t] +
Derivative[2, 0, 0, 0][u][x, y, z, t] == k*D[u[x, y, z, t], t];
inti = u[x, y, z, 0] == 314;
bon1 =  DirichletCondition[u[x, y, z, t] == 304, x == 0];
bon2 =  DirichletCondition[u[x, y, z, t] == 304, x == 50];
bon3 =  DirichletCondition[u[x, y, z, t] == 304, y == 0];
bon4 =  DirichletCondition[u[x, y, z, t] == 304, y == 180];
bon5 =  DirichletCondition[u[x, y, z, t] == 300, z == 0];
bon6 = DirichletCondition[u[x, y, z, t] == 304, z == 40];
bon7 = DirichletCondition[u[x, y, 0, t] == 345, 39 <= x <= 41 && 0 <= y <= 2];
usol =
NDSolveValue[
{eqn, inti, bon1, bon2, bon3, bon4, bon5, bon6, bon7},
u, {x, 0, 80}, {y, 0, 150}, {z, 0, 70}, {t, 0, 600}]


and I got errors:

NDSolveValue::femcscd: The PDE is convection dominated and the result may not be stable. Adding artificial diffusion may help.

NDSolveFEMNumericalRegion[FullRegion[4],{{0.,80.},{0.,150.},{0.,70.},{0.,600.}}]


NDSolveValue::femcscd: The PDE is convection dominated and the result may not be stable. Adding artificial diffusion may help.

(NDSolveFEMNumericalRegion[FullRegion[4],{{0.,80.},{0.,150.},{0.,70.},{0.,600.}}])


I hope someone can tell me why the code is wrong.

• What exactly is the issue you're asking about? What have you tried? Without evidence of some effort, the question is likely to be closed. – Jens Jan 30 '16 at 16:58
• Please post properly formatted, copy-and-paste-able code instead of screen-shots. For help with that, click the grey edit button below your post and the grey question mark on the right side of the editing toolbar. – march Jan 30 '16 at 17:23
• Your problem doesn't have any initial condition.What's u[x,y,z] at t=0 ? – andre314 Jan 30 '16 at 17:30
• To answer your specific question, this problem most likely is solvable numerically with NDSolve after initial and boundary conditions are provided, if f is sufficiently well behaved.. – bbgodfrey Jan 30 '16 at 17:34
• In your boundary conditions you have used Set (x=0) where you should be using Equal (x==0). – Simon Woods Jan 31 '16 at 14:48

Now that we have your initial conditions, the problem turns out to be simple and not CPU intensive.

eqn = Derivative[0, 0, 2, 0][u][x, y, z, t] + Derivative[0, 2, 0, 0][u][x, y, z, t] +
Derivative[2, 0, 0, 0][u][x, y, z, t] == D[u[x, y, z, t], t];
inti = u[x, y, z, 0] == 314;
bon1 =  DirichletCondition[u[x, y, z, t] == 304, x == 0];
bon2 =  DirichletCondition[u[x, y, z, t] == 304, x == 50];
bon3 =  DirichletCondition[u[x, y, z, t] == 304, y == 0];
bon4 =  DirichletCondition[u[x, y, z, t] == 304, y == 180];
bon5 =  DirichletCondition[u[x, y, z, t] == 300, z == 0];
bon6 = DirichletCondition[u[x, y, z, t] == 304, z == 40];
usol = NDSolveValue[{eqn, inti, bon1, bon2, bon3, bon4, bon5, bon6},
u, {x, 0, 50}, {y, 0, 180}, {z, 0, 40}, {t, 0, 600}]


The computing time is short (<10s).

Here is the isotherm u=310 at t=40 (It takes at least 10 minutes to obtain the image) :

Something nicer, isotherms u=306,308,310,312 at t=40 :

ContourPlot3D[usol[x, y, z, 40], {x, 0, 50}, {y, 0, 180}, {z, 0, 40},
RegionFunction -> Function[{x, y, z}, x < 25 || y > 90 || z < 20],
Contours -> {306, 308, 310, 312}]


Result two hours later :

Edit

Here is a animation :

To make it, it has token 40h on a I7 with 4 kernels running in parallel. I have not tried to optimize.

• WOW ! Thank you very much for fixing my stupid faults. Did you mean it took two hours to get the second image? Unbelievable both for the two hours and your great zeal for my problem ! Thx again ! But, the boundary conditions was not well defined for my goal, so you may stop your program which will waste your much time. – Jachin Jan 31 '16 at 16:23
• Great work! Anyhow, thank you for your enthusiasm. – Jachin Feb 6 '16 at 7:30