I want to resolve a PDE model of 2-step 1D heat diffusion equation.
1st step: If 0< t < 60, it has a constant heat flax at x = 0, and has a Neumann boundary conditions at x = 6000.
2nd step: If t >= 60, it as a Neumann boundary conditions at both edge (x = 0, and x = 6000).
The key problem is that I have some trouble when I use the 1st step results as 2nd step initial value. Any suggestions how to fix it? Consider the following code:
[1st step]
Needs["NDSolve`FEM`"]
SoD = 100;
Dif = 69340;
deqN = D[u[t, x], t] - Dif*D[u[t, x], {x, 2}] - If[x == 0 , SoD, 0] ==
NeumannValue[-SoD, x == 0] + NeumannValue[0, x == 6000];
ic = u[0, x] == 0;
sol = NDSolveValue[{deqN, ic}, u, {t, 0, 60}, {x, 0, 6000}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"FiniteElement",
"MeshOptions" -> {"MaxCellMeasure" -> {"Length" -> 0.1}}}}];
Plot3D[sol[t, x], {t, 0, 60}, {x, 0, 6000}, PlotRange -> Full,
PlotStyle -> Automatic]
I sucessfully got a 1st step result, but I cannot use this result in following 2nd step.
[2nd step]
deqN2 = D[u2[t, x], t] - Dif*D[u2[t, x], {x, 2}] ==
NeumannValue[0, x == 0] + NeumannValue[0, x == h];
ic2 = u2[0, x] == Evaluate[sol[t, x] /. t -> 0];
sol2 = NDSolveValue[{deqN2, ic2}, u2, {t, 0, 100}, {x, 0, 60000}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"FiniteElement", "MeshOptions" -> {"MaxCellMeasure" -> {"Length" -> 0.1}}}}];
Thank you for your cooperation.