0
$\begingroup$

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

enter image description here enter image description here

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.
NDSolveValue::fem3: "-- Message text not found --

NDSolve`FEM`NumericalRegion[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.
NDSolveValue::fem3: "-- Message text not found --

(NDSolve`FEM`NumericalRegion[FullRegion[4],{{0.,80.},{0.,150.},{0.,70.},{0.,600.}}])

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

$\endgroup$

closed as off-topic by user9660, MarcoB, m_goldberg, Michael E2, Yves Klett Feb 1 '16 at 10:59

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Michael E2, Yves Klett
  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Community, MarcoB, m_goldberg
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ 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. $\endgroup$ – Jens Jan 30 '16 at 16:58
  • $\begingroup$ 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. $\endgroup$ – march Jan 30 '16 at 17:23
  • $\begingroup$ Your problem doesn't have any initial condition.What's u[x,y,z] at t=0 ? $\endgroup$ – andre314 Jan 30 '16 at 17:30
  • $\begingroup$ 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.. $\endgroup$ – bbgodfrey Jan 30 '16 at 17:34
  • 1
    $\begingroup$ In your boundary conditions you have used Set (x=0) where you should be using Equal (x==0). $\endgroup$ – Simon Woods Jan 31 '16 at 14:48
8
$\begingroup$

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}]

enter image description here

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) :

enter image description here

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 :

enter image description here

Edit

Here is a animation :

enter image description here

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Jachin Jan 31 '16 at 16:23
  • $\begingroup$ Great work! Anyhow, thank you for your enthusiasm. $\endgroup$ – Jachin Feb 6 '16 at 7:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.