I have problem with my code in Mathematica. I have introduced the set of coupled non-linear ODES. This is the resolution part:
(*Initial parameters*)
A = 0.5;
a = 0.9;
Ω = 0.24;
(*Initial conditions*)
υ0 = 0.22;
α0 = Pi;
ψ0 = Pi/2;
r0 = 20;
θ0 = Pi/8;
φ0 = 0;
Needs["DifferentialEquations`NDSolveProblems`"]; \
Needs["DifferentialEquations`NDSolveUtilities`"];
(*Systems to integrate*)
system = {x1'[t] ==
Eq1[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x2'[t] ==
Eq2[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x3'[t] ==
Eq3[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x4'[t] ==
Eq4[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x5'[t] ==
Eq5[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x6'[t] ==
Eq6[A, a, Ω, x1[t], x2[t], x3[t], x4[t], x5[t]],
x1[0] == υ0, x2[0] == α0, x3[0] == ψ0,
x4[0] == r0, x5[0] == θ0, x6[0] == φ0};
sol = NDSolve[system, {x1, x2, x3, x4, x5, x6}, {t, 0, 14000},
Method -> {"StiffnessSwitching",
Method -> {"ExplicitRungeKutta", Automatic}}, AccuracyGoal -> 22,
MaxSteps -> Infinity, PrecisionGoal -> 15, WorkingPrecision -> 22];
ParametricPlot3D[
Evaluate[{x4[t]*Sin[x5[t]]*Cos[x6[t]], x4[t]*Sin[x5[t]]*Sin[x6[t]],
x4[t]*Cos[x5[t]]} /. sol], {t, 0, 14000}, PlotPoints -> 10000,
ColorFunction -> {Red}, ImageSize -> 500]
I receive the following error messages
NDSolve::precw
: "The precision of the differential equation ({<<1>>}) is less than \ WorkingPrecision (22.`
)"NDSolve::ndsz
: Att == 140.91450584595810589848638366914914657367`22.
, step size is \ effectively zero; singularity or stiff system suspected
Someone could suggest me how to improve my code? Thank you in advance.
Comments
Post a Comment