【发布时间】:2014-08-06 19:30:28
【问题描述】:
我编写了以下代码,在 Mathematica 8 中运行良好。但是,当我在 Mathematica 9 中打开同一个笔记本时,出现以下消息:“InterpolatingFunction::dmval:”输入值 {0.000408163} 超出范围插值函数中的数据。将使用外推法。 ",并且没有图表。
代码如下:
Manipulate[
ParametricPlot[
Evaluate[{x1[t], a YP[[2]]/YP[[1]] x1[t] + (1 - a) YP[[2]] x3[t]} /.
Quiet@NDSolve[
{x1'[t] == x2[t],
x2'[t] == -1/
Mass (c x2[t] +
a YP[[2]]/YP[[1]] x1[t] + (1 - a) YP[[2]] x3[t] -
Fmax Sin[(2 π)/T t]),
x3'[t] ==
x2[t]/YP[[
1]] (1 - Abs[x3[t]]^n (γ Sign[x2[t] x3[t]] + (1 - γ))),
x1[0] == 0,
x2[0] == 0,
x3[0] == 0},
{x1[t], x2[t], x3[t]},
{t, 0, tTotal}]],
{t, 0, tTotal},
ImageSize -> {450, 450}, PlotRange -> 10, AxesLabel -> {"u", "F"}],
{{tTotal, 20, "Total time"}, 0.5, 100, Appearance -> "Labeled"},
{{Mass, 2.86, "m"}, 0.1, 10, 0.01, Appearance -> "Labeled"},
{{T, 4.0, "T"}, 0.1, 10, 0.01, Appearance -> "Labeled"},
{{Fmax, 8.0, "Fmax"}, 0.1, 10, 0.01, Appearance -> "Labeled"},
{{n, 2.0, "n"}, 0.1, 10, 0.01, Appearance -> "Labeled"},
{{c, 0.0, "c"}, 0.0, 10, 0.01, Appearance -> "Labeled"},
{{a, 0.05, "a"}, 0.0, 1, 0.01, Appearance -> "Labeled"},
{{γ, 0.5, "γ"}, 0.01, 1, 0.01, Appearance -> "Labeled"},
{{YP, {0.111, 2.86}}, {0, 0}, {10, 10}, Locator}]
有什么想法吗?
TIA
【问题讨论】:
-
回复。有任何想法吗?是的,隔离导致问题的代码。
-
NDSolve 在 Mathematica 8 中没有错误继续进行,而在 Mathematica 9 中失败并显示消息 NDSolve::smpf: Failure to project to the discontinuity surface when computing Filippov continuation at time 0.`.