2

I have been trying to solve the transient heat equation using finite elements. When I set the thermal diffusivity to a realistic number I get instabilities in the solution. It seems that larger diffusivities work but smaller ones don't. This is backward from what one would typically expect with numerical solutions to the heat equation. I don't know if Mathematica is trying an implicit time integrator and I don't seem to be able to set one. Adding artificial diffusion at the level necessary to stabilize the problem is completely non-physical. I eventually want to create regions with different diffusivities in the domain, which is why there are extra lines in the code below.

boundarylayerthickness = 10^-5;
traythickness = 1*10^-2;
traywidth = 300*10^-3;
traydepth = 200*10^-3;
trayalpha = 14*10^-7;
oilalpha = 10^-7;
oilthickness = 10^-3;
objectthickness = 2*10^-2;
objectwidth = 100*10^-3;
objectdepth = 70*10^-3;
tray = ImplicitRegion[
x >= 0 && x <= traywidth && y >= 0 && y <= traydepth && z >= 0 && 
z <= traythickness, {x, y, z}];
oil = ImplicitRegion[
x >= 0 && x <= traywidth && y >= 0 && y <= traydepth && 
z > traythickness && z <= traythickness + oilthickness, {x, y, 
z}]; 
object = ImplicitRegion[
x >= (traywidth - objectwidth)/2 && 
x <= (traywidth + objectwidth)/2 && 
y >= (traydepth - objectdepth)/2 && 
y <= (traydepth + objectdepth)/2 && 
z > traythickness + oilthickness && 
z <= traythickness + oilthickness + objectthickness, {x, y, z}]; 
gammad[t_] = {DirichletCondition[u[t, x, y, z] == 200.*t, 
z == 0 && x >= 0 && x <= traywidth && y >= 0 && y <= traydepth]};
omega = RegionUnion[tray, oil, object];
uinit = NDSolveValue[{10^-7 \!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y, z}\), \(2\)]\(u[0, x, y, 
    z]\)\) == 0, gammad[0]}, 
  u[0, x, y, z], {x, y, z} \[Element] omega, 
  Method -> {"PDEDiscretization" -> {"FiniteElement", 
          "MeshOptions" -> {"BoundaryMeshGenerator" -> 
                "Continuation"}}}];
uif = NDSolveValue[{D[u[t, x, y, z], t] - 10^-7 \!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y, z}\), \(2\)]\(u[t, x, y, 
     z]\)\) == 0, gammad[t], u[0, x, y, z] == uinit}, 
u, {t, 0, 25}, {x, y, z} \[Element] omega];
SliceContourPlot3D[
uif[2, x, y, z], {x, 0, traywidth}, {y, 0, traydepth}, {z, 0, 
traythickness + oilthickness + objectthickness}, 
PlotTheme -> "Detailed"]
tensor
  • 121
  • 2

0 Answers0