# Why do I see Part::partw error when using NDSolveValue?

Bug introduced in version 12.0 (or earlier) and fixed in version 13.0 (or earlier)

I am using Mathematica 12.0. The present calculation is a simple "test case" to prove efficacy, but I am receiving an error I haven't seen before. e.g:

Part: Part{32, 30, 534} of {} does not exist


I have put together a simple 2D transient heat transfer problem with 4 Neumann conditions and a known initial condition of u = 1. The top surface, at y = 2, is subject to radiation cooling. The other surfaces are all subject to the standard Neumann/convection condition. My code is provided below:

Remove["Global*"]
Needs["NDSolveFEM"];

\[CapitalOmega] = Rectangle[{0, 0}, {1, 2}];
op = D[u[t, x, y], t] - \!$$\*SubsuperscriptBox[\(\[Del]$$, $${x, y}$$, $$2$$]$$u[t, x, y]$$\);
NeumannValue[-\[Epsilon] \[Sigma] (u[t, x, y]^4 - Subscript[T,
0]^4), y == 2];
Subscript[\[CapitalGamma], conv] =
NeumannValue[-h (u[t, x, y] - Subscript[T, 0]),
x == 0 || x == 1 || y == 0];
Subscript[\[CapitalGamma], ic] = u[0, x, y] == 1;
parameters = {\[Epsilon] -> 0.5, \[Sigma] -> 5.67*10^-8,
Subscript[T, 0] -> 0, Subscript[T, i] -> 0.5, h -> 1};
pde = {op ==
conv], Subscript[\[CapitalGamma], ic]} //. parameters;
uSol = NDSolveValue[pde,
u, {t, 0, 1}, {x, y} \[Element] \[CapitalOmega]];


I've tried refining the mesh using

uSol = NDSolveValue[pde,
u, {t, 0, 1}, {x, y} \[Element] \[CapitalOmega],
Method -> {"PDEDiscretization" -> {Automatic,
"SpatialDiscretization" -> {"FiniteElement",
"MeshOptions" -> {MaxCellMeasure -> 0.001}}}}]
`

but to no avail. Unless I'm missing something, there seems to be precious little information on this error when using NDSolveValue. Perhaps the most perplexing part of this is that I still get a converged solution after the computation ends, but this comes with a screen full of "Part" error (and subsequent errors afterward). This, naturally, gives me pause.

Any thoughts?

• Looks like a bug, you should report it Feb 21, 2022 at 22:57
• Your first code block gives me no errors (V13.0 Mac M1 Max) and the solution looks like this: i.stack.imgur.com/mUXPO.png -- if it looks right, I'm not sure what the problem is. Feb 21, 2022 at 23:16
• I just tested the code with "13.0.0 for Microsoft Windows (64-bit) (December 3, 2021)" with no errors either. Feb 21, 2022 at 23:22
• I get the same errors with v12.0, but the plots looks fine anyway. Feb 22, 2022 at 1:22