NDSolve::parpiv NDSolveValue::parpiv ParametricNDSolve::parpiv ParametricNDSolveValue::parpiv LinearSolve::parpiv LinearSolveFunction::parpiv
Examples
Basic Examples (3)
The following differential algebraic equation issues this message when performing structural analysis:
Clear["Global`*"]
eqns = (| |
| ------------------------------------------------------ |
| x1'[t] == Cos[t] - x2[t] + x3[t] |
| x2'[t] == Cos[t] - x3[t] + x4[t] |
| x3'[t] == Cos[t] - x4[t] + x5[t] |
| x4'[t] == Cos[t] - x5[t] + x6[t] |
| x5'[t] == Cos[t] + Sin[t] - x6[t] |
| 0 == x1[t] + x2[t] + x3[t] + x4[t] + x5[t] - 5 * Sin[t] |);
ics = {x1[0] == x2[0] == x3[0] == x4[0] == x5[0] == x6[0] == 0};
vars = {x1, x2, x3, x4, x5, x6};Short[NDSolve[{eqns, ics}, vars, {t, 0, 4Pi}], 2]NDSolve uses the "Pantelides" method for structural analysis:
Short[NDSolve[{eqns, ics}, vars, {t, 0, 4 Pi}, Method -> {"IndexReduction" -> "Pantelides"}], 2]Use a different index-reduction method to reduce the system and solve the system:
Short[NDSolve[{eqns, ics}, vars, {t, 0, 4 Pi}, Method -> {"IndexReduction" -> "StructuralMatrix"}], 2]This message can also come up when time-dependent PDEs without a time derivative are present. Consider the following example:
dr = 1 / 2;rx = 5 / 4;xs = -(dr + rx);ys = 0;
ec = RegionUnion[Disk[{-rx, 0}, dr], Rectangle[{-rx, -dr}, {rx, dr}], Disk[{rx, 0}, dr]];
u0 = 11.2;v0 = 1;d0 = 0.97;V2 = -0.2;
Eqs = {
D[u[t, x, y], t] - d0 (Laplacian[u[t, x, y], {x, y}] + w[t, x, y]), D[v[t, x, y], t] - (Laplacian[v[t, x, y], {x, y}] - w[t, x, y]),
-Laplacian[w[t, x, y], {x, y}] - 4 π (v[t, x, y] - u[t, x, y])};Note that the last equation does not have a time derivative for
. When you solve the equation, you get the following message:
ics = {u[0, x, y] == u0, v[0, x, y] == v0, w[0, x, y] == 0};
bcs = DirichletCondition[w[t, x, y] == V2, True];
solution = NDSolveValue[{Eqs == {0, 0, 0}, ics, bcs}, {u, v, w}, {x, y}∈ec, {t, 0, 5}];This can be fixed by adding a small time-dependent component for
:
fix = {0, 0, 10 ^ -5 D[w[t, x, y], t]};
solution = NDSolveValue[{Eqs + fix == {0, 0, 0}, ics, bcs}, {u, v, w}, {x, y}∈ec, {t, 0, 5}];In some cases, this message can come up during time integration of finite element models in NDSolve. When this happens, it can help to set the IDA method to use a different linear solver method with the NDSolve option:
Method -> {"TimeIntegration" -> {"IDA", "ImplicitSolver" -> {"Newton", "LinearSolveMethod" -> "Multifrontal"}}}