1
$\begingroup$

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["NDSolve`FEM`"];

\[CapitalOmega] = Rectangle[{0, 0}, {1, 2}];
op = D[u[t, x, y], t] - \!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[t, x, y]\)\);
Subscript[\[CapitalGamma], rad] = 
  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 == 
     Subscript[\[CapitalGamma], rad] + Subscript[\[CapitalGamma], 
      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?

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

1 Answer 1

1
$\begingroup$

This was a bug that's fixed in V13.0 (or earlier).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.