# How to solve a 3D permanent conjugate heat transfer problem?

I want to solve this conjugate heat transfer problem on NDSolve but Mathematica always quits the Kernel. Can you help me? I do not know exactly how to use the numerical methods that are NDSolve method options. Besides, does it takes too long to solve a problem like that one? I want it in order to compare solutions.

k[x_, y_, z_]:=Piecewise[{{1, 0.25 <= x <= 0.75 ∧ 0.25 <= y <= 0.75 ∧ 0 <= z <= 5}}, 0.25]
w[x_, y_, z_]:=Piecewise[{{1, 0.25 <= x <= 0.75 ∧ 0.25 <= y <= 0.75 ∧ 0 <= z <= 5}}, 0.339266]
Bi = 1;

U[x_, y_] := Piecewise[{{(
74076188 Sin[(491701844 (-(1/4) + x))/78256779] Sin[(
491701844 (-(1/4) + y))/78256779])/31356257 + (
67207613 Sin[(491701844 (-(1/4) + x))/26085593] Sin[(
491701844 (-(1/4) + y))/78256779])/426732107 + (
67207613 Sin[(491701844 (-(1/4) + x))/78256779] Sin[(
491701844 (-(1/4) + y))/26085593])/426732107,
0.25 <= x <= 0.75 ∧ 0.25 <= y <= 0.75}}, 0]

solnum = NDSolve[{w[x, y, z] U[x, y] D[θ[x, y, z], z] ==
Div[k[x, y, z] Grad[θ[x, y, z], {x, y, z}], {x, y,
z}], (D[θ[x, y, z], x] /. x -> 0) ==
0, (D[θ[x, y, z], x] /. x -> 1) ==
0, (-D[θ[x, y, z], y] /. y -> 0) ==
1, ((D[θ[x, y, z], y] /. y -> 1) + Bi θ[x, 1, z]) ==
0, θ[x, y, 0] == 1, (D[θ[x, y, z], z] /. z -> 5) ==
0}, θ[x, y, z], {x, 0, 1}, {y, 0, 1}, {z, 0, 5},
MaxStepSize -> 0.01, AccuracyGoal -> 3, PrecisionGoal -> 3]

Export["solnum.mx", solnum];

• As far as I know, there are no derivatives allowed in" DiricletCondition". NeumanCondition deal with flux about the boundary, that is flux perpendicular to the boundary. But NeumanCondition are specified differently as: NeumanCondition[value, predicat] – Daniel Huber Sep 22 '20 at 19:06
• @DanielHuber NeumannValue? – Tim Laska Sep 22 '20 at 19:43
• See in MMA's help under NeumannCondition. – Daniel Huber Sep 22 '20 at 20:05
• You should take a look at the Heat Transfer Tutorial. It will show you how to set various types of BC's with the FEM. Since no flux is the default BC, you really only need to specify a DC and a Robin Conditions. Also, 204907 is an example of a relatively complex conjugate heat transfer problem using anisotropic meshing to capture thermal boundary layers and reduce model sizes. – Tim Laska Sep 23 '20 at 4:21

solnum = NDSolve[{w[x, y, z] U[x, y] D[\[Theta][x, y, z], z] ==