I would like to perform a 3d FEM transient heat transfer in fluid and solid, which should have also included fluid dynamic simulation. But I want to simplify it into a 3d FEM without fluid dynamic simulation, but with a boundary condition which also requires to solve a 1d differential equation. A simplified steady-state example of "the simplified model" can be seen as follows.
Let's say I have an element and it looks like this
region =
RegionDifference[Cuboid[{0, 0, 0}, {0.006536/2, 0.05, 0.0047}],
Cuboid[{0, 0, 0.0007}, {0.0015, 0.05, 0.0017}]];
DiscretizeRegion[region]
The equations for steady-state heat transfer are as follows
eq = With[{lambda = 1, c = 4200, rho = 1000,
w = 0.02}, {lambda Laplacian[u[x, y, z], {x, y, z}] ==
NeumannValue[0,
x == 0 || x == 0.006536/2 || z == 0 || z == 0.05] +
NeumannValue[8 (u[x, y, z] - 20), y == 0] +
NeumannValue[0.8 (u[x, y, z] - 20), y == 0.0047] +
NeumannValue[
1000 (u[x, y, z] - t[z]), (y == 0.0007 &&
x < 0.0015) || (y == 1.7/1000 &&
x < 0.0015) || (x == 0.0015 && (0.0007 < y < 0.0017))],
-c rho 0.003 0.001 w D[t[z], z] == 1000 (t[z] - u[x, y, z]),
t[0] == 30}]
All the outer surfaces have normal Robin/Neumann type boundary conditions. The inner surface has also Robin type boundary conditions, but it requires solving t[z]. This t[z] is only dependent on z in the steady-state case.
Solving this equation with NDSolveValue
sol = NDSolveValue[eq, {u, t}, {x, y, z} \[Element] region, Method -> {"PDEDiscretization" -> {"FiniteElement", "MeshOptions" -> {"MaxCellMeasure" -> 10^(-6)}}}]
gives quite a lot of errors
Transpose::nmtx: The first two levels of {NDSolve`xs$20949,t} cannot be transposed.
Part::partw: Part 2 of Transpose[{NDSolve`xs$20949,t}] does not exist.
Transpose::nmtx: The first two levels of {NDSolve`xs$20949,Function[{x,y,z},30]} cannot be transposed.
Part::partw: Part 2 of Transpose[{NDSolve`xs$20949,Function[{x,y,z},30]}] does not exist.
Set::partw: Part 2 of Transpose[{NDSolve`xs$20949,t}] does not exist.
Rule::argr: Rule called with 1 argument; 2 arguments are expected.
Function::fpct: Too many parameters in {x,y,z} to be filled from Function[{x,y,z},30][z].
NDSolveValue::overdet: There are fewer dependent variables, {u[x,y,z]}, than equations, so the system is overdetermined.
Any suggestion to solve this problem is highly appreciated.
NDSolve`ProcessEquations[... , DependentVariables-> {u,t}]
, you have an unique and clear error message : "The function t[z] does not have the same number of arguments as independent variables (3)" (NDSolve`ProcessEquations
is the first step of the process of resolution of the pde used by NDSolve ) $\endgroup$