I am attempting to solve the transient heat equation for a very simple geometry and I am getting a junk solution. I have identified two distinct regions (wall and super-heated fluid layer) with their own properties (density,thermal conductivity and specific heat) and solved for the steady state solution which works fine.
Then I define an initial condition for the system using part of the steady state solution.
Finally I define the transient heat equation/boundary conditions and solve as follows:
The boundary conditions are basically suposed to be a constant heat flux at z = 0 and a constant temperature on the other side. Am I using the NeumannValue correctly for a constant heat flux? The results I get are junk and it throws the following two errors:
NDSolveValue::femcscd: The PDE is convection dominated and the result may not be stable. Adding artificial diffusion may help. >>
CompiledFunction::cfexe: Could not complete external evaluation; proceeding with uncompiled evaluation. >>
Can someone please help me understand exactly what the NeumannValue function is defining the way I am using it and how to fix these errors? I want the NeumannValue to be setting the first derivative of Temperature with respect to the z axis equal to a constant value.
Here is a condensed version of the code to replicate the issue:
<< "NDSolve`FEM`"
\[Rho]s = 3980; \[Rho]sl = 958; (* kg/m3 *)
ks = .035; ksl = .00067; (* kW/m/K *)
cs = .75; csl = 4.22; (* kJ/kg/K *)
\[Rho] = If[0 <= z < .00025, \[Rho]s, \[Rho]sl];
k = If[0 <= z < .00025, ks, ksl];
c = If[0 <= z < .00025, cs, csl];
eqn1 = k*\!\(
\*SubscriptBox[\(\[PartialD]\), \(z\)]\(T1[z]\)\) + 28;
Subscript[\[CapitalGamma]1, D] =
DirichletCondition[T1[z] == 100, z == .00048];
BCr = NDSolveValue[{eqn1 == 0, Subscript[\[CapitalGamma]1, D]},
T1, {z, 0, .00048}];
Ti[z_] := \[Piecewise] {
{BCr[z], 0 <= z < .00025},
{100, True}
};
eqn2 = \[Rho]*c*\!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]\(T[t, z]\)\) - k*\!\(
\*SubscriptBox[\(\[PartialD]\), \(z, z\)]\(T[t, z]\)\);
Subscript[\[CapitalGamma], D] =
DirichletCondition[T[t, z] == 100, z == .00048];
Subscript[\[CapitalGamma], N] = NeumannValue[28/k, z == 0];
soln = NDSolveValue[{eqn2 == Subscript[\[CapitalGamma], N],
Subscript[\[CapitalGamma], D], T[0, z] == Ti[z]},
T, {t, 0, .01}, {z, 0, .00048}]