为什么会显示“无法求得一个明确的导数公式,考虑使用选项设置SolveDelayed->Ture”.这个选项设置在哪里?我没有找到。我的微分方程编辑逻辑应该没问题,在matlab里面能算出数据,但是不理想,来mathmatical算结果直接出错,大佬们帮我看看^_^。
代码如下:
m = 0.15;
g = 10;
a1 = (2.5^0.5)*10^-1;
a2 = (50^0.5)*10^-2;
a3 = 10^-3;
I1 = 2.019*10^-4;
I2 = 4.481*10^-4;
I3 = 6.*10^-4;
I12 = -2.1706*10^-6;
I21 = -2.1706*10^-6;
\!\(\*
TagBox[
RowBox[{"II", "=",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"I1", ",", "I12", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"I21", ",", "I2", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "I3"}], "}"}]}], "}"}]}],
"MathMLPresentationTag",
AutoDelete->True]\);
omega = {{omegax[t]}, {omegay[t]}, {omegaz[t]}};
omegaa = {{0, -omegaz[t], omegay[t]}, {omegaz[t],
0, -omegax[t]}, {-omegay[t], omegax[t], 0}};
n = {{n1[t]}, {n2[t]}, {n3[t]}};
nn = {{0, -n3[t], n2[t]}, {n3[t], 0, -n1[t]}, {-n2[t], n1[t], 0}};
nt = nn.omega;
derta = -0.5*(a1*a1*n1[t]*n1[t] + a2*a2*n2[t]*n2[t] +
a3*a3*n3[t]*n3[t])^0.5;
dertat = D[derta, t];
r1 = a1*a1*n1[t]/2./derta;
rt1 = D[r1, t];
r2 = a2*a2*n2[t]/2./derta;
rt2 = D[r2, t];
r3 = a3*a3*n3[t]/2./derta;
rt3 = D[r3, t];
r = {{r1}, {r2}, {r3}};
rr = {{0, -r3, r2}, {r3, 0, -r1}, {-r2, r1, 0}};
rt = {{rt1}, {rt2}, {rt3}};
omegat = Inverse[
II - m.rr.rr].(-omegaa.II.omega - m.rr.omegaa.omegaa.r -
m.rr.omegaa.rt + m.g.rr.n);
Equations = {omegax'[t] == omegat[[1, 1]],
omegay'[t] == omegat[[2, 1]], omegaz'[t] == omegat[[3, 1]],
n1'[t] == nt[[1, 1]], n2'[t] == nt[[2, 1]], n3'[t] == nt[[3, 1]]};
Initial = {omegax[0] == 0, omegay[0] == 0, omegaz[0] == 5,
n1[0] == 0.0001, n2[0] == 0.0001, n3[0] == -0.9996};
RESULTS =
NDSolve[{Equations, Initial}, {omegax[t], omegay[t], omegaz[t],
n1[t], n2[t], n3[t]}, {t, 0, 30}]
代码如下:
m = 0.15;
g = 10;
a1 = (2.5^0.5)*10^-1;
a2 = (50^0.5)*10^-2;
a3 = 10^-3;
I1 = 2.019*10^-4;
I2 = 4.481*10^-4;
I3 = 6.*10^-4;
I12 = -2.1706*10^-6;
I21 = -2.1706*10^-6;
\!\(\*
TagBox[
RowBox[{"II", "=",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"I1", ",", "I12", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"I21", ",", "I2", ",", "0"}], "}"}], ",",
RowBox[{"{",
RowBox[{"0", ",", "0", ",", "I3"}], "}"}]}], "}"}]}],
"MathMLPresentationTag",
AutoDelete->True]\);
omega = {{omegax[t]}, {omegay[t]}, {omegaz[t]}};
omegaa = {{0, -omegaz[t], omegay[t]}, {omegaz[t],
0, -omegax[t]}, {-omegay[t], omegax[t], 0}};
n = {{n1[t]}, {n2[t]}, {n3[t]}};
nn = {{0, -n3[t], n2[t]}, {n3[t], 0, -n1[t]}, {-n2[t], n1[t], 0}};
nt = nn.omega;
derta = -0.5*(a1*a1*n1[t]*n1[t] + a2*a2*n2[t]*n2[t] +
a3*a3*n3[t]*n3[t])^0.5;
dertat = D[derta, t];
r1 = a1*a1*n1[t]/2./derta;
rt1 = D[r1, t];
r2 = a2*a2*n2[t]/2./derta;
rt2 = D[r2, t];
r3 = a3*a3*n3[t]/2./derta;
rt3 = D[r3, t];
r = {{r1}, {r2}, {r3}};
rr = {{0, -r3, r2}, {r3, 0, -r1}, {-r2, r1, 0}};
rt = {{rt1}, {rt2}, {rt3}};
omegat = Inverse[
II - m.rr.rr].(-omegaa.II.omega - m.rr.omegaa.omegaa.r -
m.rr.omegaa.rt + m.g.rr.n);
Equations = {omegax'[t] == omegat[[1, 1]],
omegay'[t] == omegat[[2, 1]], omegaz'[t] == omegat[[3, 1]],
n1'[t] == nt[[1, 1]], n2'[t] == nt[[2, 1]], n3'[t] == nt[[3, 1]]};
Initial = {omegax[0] == 0, omegay[0] == 0, omegaz[0] == 5,
n1[0] == 0.0001, n2[0] == 0.0001, n3[0] == -0.9996};
RESULTS =
NDSolve[{Equations, Initial}, {omegax[t], omegay[t], omegaz[t],
n1[t], n2[t], n3[t]}, {t, 0, 30}]