3

I'm trying to solve 3D heat equation to understand how the temperature varies with time on cubical. i have mixed boundary conditions: Dirichlet on the bottom surface (constant Temp) Neumann on all the other surfaces (convection and radiation)

Im using the 3D heat equation, but first i tried to solve for the 1D:

op = Derivative[1, 0][u][t, x] - Derivative[0, 2][u][t, x]
BC1 = DirichletCondition[u[t, x] == 873 - Exp[-100 t], x == 0];
BC2 = NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56) - 
Exp[-100 t], x == 0.3];
uifHeat = 
NDSolveValue[{op == BC2, BC1, u[0, x] == 298}, 
u, {t, 0, 100}, {x, 0, 0.3}];
Plot3D[Evaluate[u[x, t] /. %], {t, 0, 3600}, {x, 0, 0.25}, 
PlotRange -> All]

But then i got the next error:

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

I tried the suggested solution - Exp[-100 t] but it didn't help. Then i tried to solve it in 3D:

k = 25.5;(*W/(m K)*)
sig = 5.67*10^-8;(*W/(m^2 K^4)*)
h = 6.98;(*W/(m^2K)*)
Reg= ImplicitRegion[0 <= x <= 0.4 && 0 <= y <= 1.4 && 0 <= z <= 0.3, {x, y, z}];
op = Derivative[1,0,0,0][u][t,x,y,z]-Laplacian[u[t,x, y, z], {x, y, z}]
BC1 = DirichletCondition[u[t, x, y, z] == 873, 
z == 0 && 0 <= y <= 1.4 && 0 <= x <= 0.4];
BC2= {NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(
 k 0.56), z == 0.3 && 0 <= y <= 1.4 && 0 <= x <= 0.4], 
NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56),
  x == 0 && 0 <= y <= 1.4 && 0 <= z <= 0.3], 
NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56),
  x == 0.4 && 0 <= y <= 1.4 && 0 <= z <= 0.3], 
NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56),
  y == 0 && 0 <= x <= 0.4 && 0 <= z <= 0.3], 
NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56),
 y == 1.4 && 0 <= x <= 0.4 && 0 <= z <= 0.3]};
uifHeat = NDSolveValue[{op == BC2, BC1, u[0, x, y, z] == 298}, 
u, {t, 0, 100}, {x, y, z} ∈ Reg];
Animate[Plot3D[uifHeat[t, x, y, 0], {x, y, z} ∈ uifHeat["ElementMesh"], 
PlotRange -> {0, 160}], {{t, 10}, 0, 40, 2}, 
SaveDefinitions -> True]

This time i got the error:

"PDE parsing error of \
{{u$46316-u$46317-u$46318-u$46319-NeumannValue[-49.1575,z==0.3&&0<=y<=\
1.4&&0<=x<=0.4],u$46316-u$46317-u$46318-u$46319-NeumannValue[-49.1575,\
x==0&&0<=y<=1.4&&0<=z<=0.3],u$46316-u$46317-u$46318-u$46319-\
NeumannValue[-49.1575,x==0.4&&0<=y<=1.4&&0<=z<=0.3],u$46316-u$46317-u$\
    46318-u$46319-NeumannValue[-49.1575,y==0&&0<=x<=0.4&&0<=z<=0.3],u$\
    46316-u$46317-u$46318-u$46319-NeumannValue[-49.1575,y==1.4&&0<=x<=0.4&&\
0<=z<=0.3]}}. Inconsistent equation dimensions"

I can't figure what is the problem

  • Greetings! Make the most of Mma.SE and take the [tour] now. Help us to help you, write an excellent question. Edit if improvable, show due diligence, give brief context, include minimal working examples of code and data in formatted form. As you receive give back, vote and answer questions, keep the site useful, be kind, correct mistakes and share what you have learned. – rhermans Feb 15 '16 at 16:19
  • You should avoid using Subscript while defining symbols (variables). Subscript[x, 1] is not a symbol, but a compound expression where Subscript is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doing Set[Subscript[x, 1], 2] which is to assign a Downvalue to the oprator Subscript and not an Ownvalue to an indexed x as you may intend. Read how to properly define indexed variables here – rhermans Feb 15 '16 at 16:20
  • 1
    Sorry for all the mistakes i fixed it i hope. it's my first time. thank you for your fast response and your desire to help – Maxim Kozminov Feb 15 '16 at 16:57
  • 1
    Concerning your first lock of code Plot3D[Evaluate[u[x, t] /. %], {t, 0, 3600}, {x, 0, 0.25} should be Plot3D[Evaluate[%[x,t]], {t, 0, 100}, {x, 0, 0.25}, . Then it works despite the message "...convection dominated...". Concerning the second block, there are still problems ... – andre314 Feb 15 '16 at 18:03
  • 2
    Concerning the second block, you can't use as Neumann condition BC2 a List of NeumannValue[...]. BC2 must be a single NeumannValue[], in your case BC2 = NeumannValue[-((h*100)/(k 0.56)) - (0.7 sig (100)^4)/(k 0.56), (z == 0.3 && 0 <= y <= 1.4 && 0 <= x <= 0.4) || (x == 0 && 0 <= y <= 1.4 && 0 <= z <= 0.3) || (x == 0.4 && 0 <= y <= 1.4 && 0 <= z <= 0.3) || (y == 0 && 0 <= x <= 0.4 && 0 <= z <= 0.3) || (y == 1.4 && 0 <= x <= 0.4 && 0 <= z <= 0.3)] Then NDSolve works and gives a InterpolatingFunction[...] – andre314 Feb 15 '16 at 19:17
  • 1
    Concerning the end of the second block : Animate[Plot3D ... . What you want to do is not clear : Plot3D is for plotting 2 dimensionnal functions, but {x,y,z} element of ... determine a tree dimensionnal space. One thing more : implement Animate only when your Plot will be OK. – andre314 Feb 15 '16 at 19:29
  • Thank you andre, you helped me a lot. I use animate to check how the temperature changes with time on different planes, if you know a better way please share. – Maxim Kozminov Feb 15 '16 at 19:59
  • 1
    To see the function, I suggest you do for example for the plan at z=0.15 : Labeled[Plot3D[uifHeat[#, x, y, 0.15], {x, 0, 0.4}, {y, 0, 1.4}], "t=" <> ToString[#]] & /@ Range[0, 100, 20] . I don't know what you are waiting for physically. – andre314 Feb 16 '16 at 20:42
  • 3D representation of isotherms 860K and 865K : Labeled[ContourPlot3D[ uifHeat[#, x, y, z], {x, 0, 0.4}, {y, 0, 1.4}, {z, 0, 0.3}, Contours -> {860, 865}], "t=" <> ToString[#]] & /@ Range[0, 100, 20] .Computing time = several minutes – andre314 Feb 16 '16 at 21:21

0 Answers0