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
Subscriptwhile defining symbols (variables).Subscript[x, 1]is not a symbol, but a compound expression whereSubscriptis an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]which is to assign a Downvalue to the opratorSubscriptand not an Ownvalue to an indexedxas you may intend. Read how to properly define indexed variables here – rhermans Feb 15 '16 at 16:20Plot3D[Evaluate[u[x, t] /. %], {t, 0, 3600}, {x, 0, 0.25}should bePlot3D[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:03ListofNeumannValue[...]. BC2 must be a singleNeumannValue[], in your caseBC2 = 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 aInterpolatingFunction[...]– andre314 Feb 15 '16 at 19:17Animate[Plot3D .... What you want to do is not clear :Plot3Dis for plotting 2 dimensionnal functions, but{x,y,z} element of ...determine a tree dimensionnal space. One thing more : implementAnimateonly when your Plot will be OK. – andre314 Feb 15 '16 at 19:29Labeled[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:42Labeled[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