Seite 1 von 1

n-Body: Gravitation, Ladung, Expansion

Verfasst: Di 9. Feb 2016, 07:33
von Yukterez
Bild

Ableitung der Position p nach der Zeit t in abstandstreuen Koordinaten, Beschleunigung:

Bild

mit der Distanz d zwischen den jeweiligen Körpern i und j:

Bild

und der Coulomb-Konstante k:

Bild

Wenn die Expansion des Universums berücksichtigt wird ist die kosmologische Konstante

Bild

Schwerpunkt des Systems:

Bild

Zwei Körper bleiben stationär zueinander wenn das Ladung/Masse-Verhältnis

Bild

wobei f eine beliebige Zahl ist. Mit berücksichtigter Expansion ist das Gleichgewicht beim Abstand/Masse-Verhältnis

Bild

Notation: Newton. Variablen: M=Masse, Q=Ladung, p=Position, v=Geschwindigkeit, G=Gravitationskonstante, ε₀=Feldkonstante, Λ=Lambda.
Bild

3 Körper, links: symmetrische Startpositionen, rechts: asymmetrisch; t: Sekunden
BildBild
Bild

2 mit Q=M√(G/k) geladene und 1 neutraler Körper (grün); links: masseloser Testpartikel, rechts: massiver neutraler Drittkörper
BildBild
Bild

6 Körper, zufällig gewählte Startbedingungen; links: Seitenansicht, rechts: Draufsicht, Schweiflänge: 100 sek
BildBild
Bild

8 Körper mit jeweils 10¹⁰ kg, geschlossene Orbits in symmetrischer Anordnung:
BildBild
Bild

Diskussion: hier und hier

n-Body: geschlossene Loops

Verfasst: Sa 16. Feb 2019, 06:14
von Yukterez
Bild

Instabile geschlossene Orbits mit 5 Körpern; t: Sekunden, Periodendauer: 2π sek, M=m³/sek²/G, Schweiflänge: 1 sek
BildBild
Bild

Instabile geschlossene Orbits mit 5 Körpern; Periodendauer: 2π sek, M=m³/sek²/G, Schweiflänge: π/3 sek
BildBild
Bild

Stationäre Punkte markieren die Startpositionen. Die Startbedingungen für die Ensembles wurden von Carles Simó ausgearbeitet.

n-Body 3D: Sonnensystem

Verfasst: Sa 16. Feb 2019, 06:15
von Yukterez
Bild

Inneres Sonnensystem Standbild, Trajektorien der Planeten:
Bild
Bild
Bild

Inneres Sonnensystem Animation, t: SI Tage, Schweiflänge: 2 Monate
Bild
Bild
Bild

Äußeres Sonnensystem Standbild, Trajektorien der Planeten:
Bild
Bild
Bild

Äußeres Sonnensystem Animation, t: julianische Jahre, Schweiflänge: 10 Jahre
Bild
Bild
Bild

Ephemeriden für die Startbedingungen: ssd.jpl.nasa.gov/horizons.cgi, Startzeit: 19.02.2019, 0:00:00 TDB

n-Body: Code

Verfasst: Sa 16. Feb 2019, 08:52
von Yukterez
Bild

Mehrkörpersimulatoren für Masse und Ladung. Masselose Testpartikel sind erlaubt, ebenso negative und selbstverständlich positive Massen. Geladene Körper müssen jedoch Masse haben da sie ohne im elektromagnetischen Feld aufgrund der ansonsten fehlenden Trägheit unter Krafteinwirkung unendlich stark beschleunigen würden.
Bild

2 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 2 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 24 sek;
tMax      = Min[Tmax, plunge];
trail     = 12 sek;
point     = 0.015;
thk       = 0.004;
plotrange = 1.2 m {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {0, Infinity, 0};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
 
(* Körper 1 *)
 
m1  = 1000000000 kg;
q1  = 0;

x1x = 1/2 m;
y1y = 0 m;
z1z = 0 m;

v1x = 0 m/sek;
v1y = 0 m/sek;
v1z = Sqrt[G m2] Sqrt[1/2];
 
(* Körper 2 *)
 
m2  = m1/2;
q2  = 0 Amp sek;
 
x2x = -1/2 m;
y2y = 0 m;
z2z = 0 m;
 
v2x = 0 m/sek;
v2y = 0 m/sek;
v2z = -Sqrt[G m1] Sqrt[1/2];
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]]+
Λ/3*c^2*x1[t],

vy1'[t] ==
(G m2 (y2[t]-y1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (y2[t]-y1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]]+
Λ/3*c^2*y1[t],
 
vz1'[t] ==
(G m2 (z2[t]-z1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (z2[t]-z1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]]+
Λ/3*c^2*z1[t],
 
vx2'[t] ==
(G m1 (x1[t]-x2[t]))/Sqrt[((x1[t]-x2[t])^2+(y1[t]-y2[t])^2+(z1[t]-z2[t])^2)^3]+
If[q2 == 0, 0,
(-q2*q1/(4Pi ε0 )/m2 (x1[t]-x2[t]))/Sqrt[((x1[t]-x2[t])^2+(y1[t]-y2[t])^2+(z1[t]-z2[t])^2)^3]]+
Λ/3*c^2*x2[t],
 
vy2'[t] ==
(G m1 (y1[t]-y2[t]))/Sqrt[((x1[t]-x2[t])^2+(y1[t]-y2[t])^2+(z1[t]-z2[t])^2)^3]+
If[q2 == 0, 0,
(-q2*q1/(4Pi ε0 )/m2 (y1[t]-y2[t]))/Sqrt[((x1[t]-x2[t])^2+(y1[t]-y2[t])^2+(z1[t]-z2[t])^2)^3]]+
Λ/3*c^2*y2[t],
 
vz2'[t] ==
(G m1 (z1[t]-z2[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
If[q2 == 0, 0,
(-q2*q1/(4Pi ε0 )/m2 (z1[t]-z2[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]]+
Λ/3*c^2*z2[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z},
 
{x1, x2, y1, y2, z1, z2,
vx1, vx2, vy1, vy2, vz1, vz2},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]])/(m1+m2);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red], Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],Point[{x2x, y2y, z2z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,  Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue, Point[Evaluate[f2p[T]][[2]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










3 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 3 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 10000 sek;
tMax      = Min[Tmax, plunge];
trail     = 3000 sek;
point     = 0.015;
thk       = 0.004;
plotrange = 1 m {{-0.2, +1.2}, {-0.6, +0.6}, {-0.2, +1.2}};
viewpoint = {0, Infinity, 0};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
 
(* Körper 1 *)
 
m1  = 1000 kg;
q1  = 0;

x1x = 1/2 m;
y1y = 0 m;
z1z = Sqrt[3]/2 m;

v1x = 0 m/sek;
v1y = 0 m/sek;
v1z = 0 m/sek;
 
(* Körper 2 *)
 
m2  = 2000/3 kg;
q2  = 0 Amp sek;
 
x2x = 1/10 m;
y2y = 0 m;
z2z = 0 m;
 
v2x = 0 m/sek;
v2y = 0 m/sek;
v2z = 0 m/sek;
 
(* Körper 3 *)
 
m3  = 500 kg;
q3  = 0 Amp sek;
 
x3x = 4/5 m;
y3y = 0 m;
z3z = 1/5 m;
 
v3x = 0 m/sek;
v3y = 0 m/sek;
v3z = 0 m/sek;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(-q1*q3/(4Pi ε0 )/m1 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]]+
Λ/3*c^2*x1[t],
 
vy1'[t] ==
(G m2 (y2[t]-y1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (y3[t]-y1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])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2+(y2[t]-y3[t])^2+(z2[t]-z3[t])^2)^3]]+
Λ/3*c^2*x3[t],
 
vy3'[t] ==
(G m1 (y1[t]-y3[t]))/Sqrt[((x1[t]-x3[t])^2+(y1[t]-y3[t])^2+(z1[t]-z3[t])^2)^3]+
(G m2 (y2[t]-y3[t]))/Sqrt[((x2[t]-x3[t])^2+(y2[t]-y3[t])^2+(z2[t]-z3[t])^2)^3]+
If[q3 == 0, 0,
(-q3*q1/(4Pi ε0 )/m3 (y1[t]-y3[t]))/Sqrt[((x1[t]-x3[t])^2+(y1[t]-y3[t])^2+(z1[t]-z3[t])^2)^3]+
(-q3*q2/(4Pi ε0 )/m3 (y2[t]-y3[t]))/Sqrt[((x2[t]-x3[t])^2+(y2[t]-y3[t])^2+(z2[t]-z3[t])^2)^3]]+
Λ/3*c^2*y3[t],
 
vz3'[t] ==
(G m1 (z1[t]-z3[t]))/Sqrt[((x1[t]-x3[t])^2+(y1[t]-y3[t])^2+(z1[t]-z3[t])^2)^3]+
(G m2 (z2[t]-z3[t]))/Sqrt[((x2[t]-x3[t])^2+(y2[t]-y3[t])^2+(z2[t]-z3[t])^2)^3]+
If[q3 == 0, 0,
(-q3*q1/(4Pi ε0 )/m3 (z1[t]-z3[t]))/Sqrt[((x1[t]-x3[t])^2+(y1[t]-y3[t])^2+(z1[t]-z3[t])^2)^3]+
(-q3*q2/(4Pi ε0 )/m3 (z2[t]-z3[t]))/Sqrt[((x2[t]-x3[t])^2+(y2[t]-y3[t])^2+(z2[t]-z3[t])^2)^3]]+
Λ/3*c^2*z3[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z},
 
{x1, x2, x3, y1, y2, y3, z1, z2, z3,
vx1, vx2, vx3, vy1, vy2, vy3, vz1, vz2, vz3},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]])/(m1+m2+m3);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










4 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 4 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 2π sek;
tMax      = Min[Tmax, plunge];
trail     = π/3 sek;
point     = 0.015;
thk       = 0.004;
plotrange = 1.2 m {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {0, Infinity, 0};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
 
(* Körper 1 *)
 
m1  = 1 m^3/sek^2/G;
q1  = 0 Amp sek;
 
x1x = 1.00231488346205 m;
y1y = 0 m;
z1z = 0 m;
 
v1x = 0 m/sek;
v1y = 0 m/sek;
v1z = -0.293790277732029 m/sek;
 
(* Körper 2 *)
 
m2  = 1 m^3/sek^2/G;
q2  = 0 Amp sek;
 
x2x = -0.52869409402363 m;
y2y = 0 m;
z2z = 0.567125954067238 m;
 
v2x = -0.175826619093916 m/sek;
v2y = 0 m/sek;
v2z = 1.02361310165052 m/sek;
 
(* Körper 3 *)
 
m3  = 1 m^3/sek^2/G;
q3  = 0 Amp sek;
 
x3x = 0.0550733045852099 m;
y3y = 0 m;
z3z = 0 m;
 
v3x = 0 m/sek;
v3y = 0 m/sek;
v3z = -1.75343592556901 m/sek;
 
(* Körper 4 *)
 
m4  = 1 m^3/sek^2/G;
q4  = 0 Amp sek;
 
x4x = -0.528694094023634 m;
y4y = 0 m;
z4z = -0.567125954067235 m;
 
v4x = 0.175826619093915 m/sek;
v4y = 0 m/sek;
v4z = 1.02361310165051 m/sek;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(-q1*q3/(4Pi ε0 )/m1 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(-q1*q4/(4Pi ε0 )/m1 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]]+
Λ/3*c^2*x1[t],
 
vy1'[t] ==
(G m2 (y2[t]-y1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (y3[t]-y1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (y4[t]-y1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
If[q1 ==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((x3[t]-x4[t])^2+(y3[t]-y4[t])^2+(z3[t]-z4[t])^2)^3]]+
Λ/3*c^2*y4[t],
 
vz4'[t] ==
(G m1 (z1[t]-z4[t]))/Sqrt[((x1[t]-x4[t])^2+(y1[t]-y4[t])^2+(z1[t]-z4[t])^2)^3]+
(G m2 (z2[t]-z4[t]))/Sqrt[((x2[t]-x4[t])^2+(y2[t]-y4[t])^2+(z2[t]-z4[t])^2)^3]+
(G m3 (z3[t]-z4[t]))/Sqrt[((x3[t]-x4[t])^2+(y3[t]-y4[t])^2+(z3[t]-z4[t])^2)^3]+
If[q4 == 0, 0,
(-q4*q1/(4Pi ε0 )/m4 (z1[t]-z4[t]))/Sqrt[((x1[t]-x4[t])^2+(y1[t]-y4[t])^2+(z1[t]-z4[t])^2)^3]+
(-q4*q2/(4Pi ε0 )/m4 (z2[t]-z4[t]))/Sqrt[((x2[t]-x4[t])^2+(y2[t]-y4[t])^2+(z2[t]-z4[t])^2)^3]+
(-q4*q3/(4Pi ε0 )/m4 (z3[t]-z4[t]))/Sqrt[((x3[t]-x4[t])^2+(y3[t]-y4[t])^2+(z3[t]-z4[t])^2)^3]]+
Λ/3*c^2*z4[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z},
 
{x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4,
vx1, vx2, vx3, vx4, vy1, vy2, vy3, vy4, vz1, vz2, vz3, vz4},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]])/(m1+m2+m3+m4);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],                sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],                sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}],    sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],                sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],                sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}],    sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],                sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],                sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}],    sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],                sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],                 sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}],    sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                               sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                              sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],                  sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










5 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 5 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 2π sek;
tMax      = Min[Tmax, plunge];
trail     = π/3 sek;
point     = 0.015;
thk       = 0.004;
plotrange = 1.2 m {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {0, Infinity, 0};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
 
(* Körper 1 *)
 
m1  = 1 m^3/sek^2/G;
q1  = 0 Amp sek;
 
x1x = 0.3673027525587564 m;
y1y = 0 m;
z1z = 0 m;
 
v1x = 0 m/sek;
v1y = 0 m/sek;
v1z = 2.134808238913507 m/sek;
 
(* Körper 2 *)
 
m2  = 1 m^3/sek^2/G;
q2  = 0 Amp sek;
 
x2x = 0.6760231721222919 m;
y2y = 0 m;
z2z = -0.1852023639618821 m;
 
v2x = -2.138115663581648 m/sek;
v2y = 0 m/sek;
v2z = -0.7311482987140561 m/sek;
 
(* Körper 3 *)
 
m3  = 1 m^3/sek^2/G;
q3  = 0 Amp sek;
 
x3x = -0.859674548416703 m;
y3y = 0 m;
z3z = -0.3897351750882059 m;
 
v3x = 0.5365854530502069 m/sek;
v3y = 0 m/sek;
v3z = -0.3362558207426968 m/sek;
 
(* Körper 4 *)
 
m4  = 1 m^3/sek^2/G;
q4  = 0 Amp sek;
 
x4x = -0.8596745484016705 m;
y4y = 0 m;
z4z = 0.3897351750882059 m;
 
v4x = -0.5365854530502073 m/sek;
v4y = 0 m/sek;
v4z = -0.3362558207426963 m/sek;
 
(* Körper 5 *)
 
m5  = 1 m^3/sek^2/G;
q5  = 0 Amp sek;
 
x5x = 0.6760231721222916 m;
y5y = 0 m;
z5z = 0.1852023639618821 m;
 
v5x = 2.138115663581649 m/sek;
v5y = 0 m/sek;
v5z = -0.7311482987140556 m/sek;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
(G m5 (x5[t]-x1[t]))/Sqrt[((x5[t]-x1[t])^2+(y5[t]-y1[t])^2+(z5[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4Pi ε0 )/m1 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])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-z5[t])^2)^3]]+
Λ/3*c^2*z5[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z},
 
{x1, x2, x3, x4, x5, y1, y2, y3, y4, y5, z1, z2, z3, z4, z5,
vx1, vx2, vx3, vx4, vx5, vy1, vy2, vy3, vy4, vy5, vz1, vz2, vz3, vz4, vz5},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]])/(m1+m2+m3+m4+m5);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta},
{Thickness[thk], Cyan}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Lighter[Cyan],    Point[{x5x, y5y, z5z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Cyan,     Point[Evaluate[f2p[T]][[5]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],             sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],             sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}], sw[1/2]},
{ },
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],             sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],             sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










6 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 6 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 300 sek;
tMax      = Min[Tmax, plunge];
trail     = 300 sek;
point     = 0.015;
thk       = 0.004;
plotrange = 1.2 m {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {40, 30, 20};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
 
(* Körper 1 *)
 
m1  = 1*^6 kg;
q1  = 0 Amp sek;
 
x1x = 1*^-16 m;
y1y = 0 m;
z1z = 0 m;
 
v1x = 0 m/sek;
v1y = 0 m/sek;
v1z = 0 m/sek;
 
(* Körper 2 *)
 
m2  = 1000 kg;
q2  = 0 Amp sek;
 
x2x = 0.2 m;
y2y = 0 m;
z2z = 0 m;
 
v2x = 0 m/sek;
v2y = 0 m/sek;
v2z = Abs@Sqrt[G m1/x2x];
 
(* Körper 3 *)
 
m3  = 100000 kg;
q3  = 0 Amp sek;
 
x3x = 0 m;
y3y = 0.4 m;
z3z = 0 m;
 
v3x = Abs@Sqrt[G (m1+m2)/y3y];
v3y = 0 m/sek;
v3z = 0 m/sek;
 
(* Körper 4 *)
 
m4  = 10000 kg;
q4  = 0 Amp sek;
 
x4x = 0 m;
y4y = 0 m;
z4z = 0.6 m;
 
v4x = Sqrt[1/2] Abs@Sqrt[G (m1+m2+m3)/z4z];
v4y = Sqrt[1/2] Abs@Sqrt[G (m1+m2+m3)/z4z];
v4z = 0 m/sek;
 
(* Körper 5 *)
 
m5  = 50000 kg;
q5  = 0 Amp sek;
 
x5x = -0.8 m;
y5y = 0 m;
z5z = 0 m;
 
v5x = 0 m/sek;
v5y = Abs@Sqrt[G (m1+m2+m3+m4)/x5x];
v5z = 0 m/sek;

(* Körper 6 *)
 
m6  = 10000 kg;
q6  = 0 Amp sek;
 
x6x = 0 m;
y6y = -1 m;
z6z = 0 m;
 
v6x = Sqrt[1/2] Abs@Sqrt[G (m1+m2+m3+m4+m5)/y6y];
v6y = 0 m/sek;
v6z = Sqrt[1/2] Abs@Sqrt[G (m1+m2+m3+m4+m5)/y6y];
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
x6'[t] == vx6[t], y6'[t] == vy6[t], z6'[t] == vz6[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
(G m5 (x5[t]-x1[t]))/Sqrt[((x5[t]-x1[t])^2+(y5[t]-y1[t])^2+(z5[t]-z1[t])^2)^3]+
(G m6 (x6[t]-x1[t]))/Sqrt[((x6[t]-x1[t])^2+(y6[t]-y1[t])^2+(z6[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
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2)^3]]+
Λ/3*c^2*z6[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
x6[0] == x6x, y6[0] == y6y, z6[0] == z6z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z,
vx6[0] == v6x, vy6[0] == v6y, vz6[0] == v6z},
 
{x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6, z1, z2, z3, z4, z5, z6,
vx1, vx2, vx3, vx4, vx5, vx6, vy1, vy2, vy3, vy4, vy5, vy6, vz1, vz2, vz3, vz4, vz5, vz6},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}, {x6[t], y6[t], z6[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}, {vx6[t], vy6[t], vz6[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]]+m6 Evaluate[f2p[t][[6]]])/(m1+m2+m3+m4+m5+m6);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta},
{Thickness[thk], Cyan},
{Thickness[thk], Orange}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Lighter[Cyan],    Point[{x5x, y5y, z5z}]},
{PointSize[2point/3], Lighter[Orange],  Point[{x6x, y6y, z6z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Cyan,     Point[Evaluate[f2p[T]][[5]]]}],
Graphics3D[{PointSize[point], Orange,   Point[Evaluate[f2p[T]][[6]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],             sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],             sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}], sw[1/2]},
{ },
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],             sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],             sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}], sw[1/2]},
{ },
{s["p6{x,y,z}"-> Evaluate[f2p[T][[6]]]],             sw[1/2]},
{s["v6{x,y,z}"-> Evaluate[f2v[T][[6]]]],             sw[1/2]},
{s["v6{total}"->{Evaluate[Chop@Norm[f2v[T][[6]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










7 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 7 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 40 yr;
tMax      = Min[Tmax, plunge];
trail     = 10 yr;
point     = 0.015;
thk       = 0.004;
plotrange = 12 Au {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {40, 30, 20};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
                                               (* Ephemeriden vom 19.02.2019, 0:00:00 TDB *)
(* Sonne *)

m1  = +1.988435*^30 kg;
q1  = +77 Amp sek;

x1x = -1.147196570503204*^-03 Au;
y1y = +7.515074431920434*^-03 Au;
z1z = -4.730273651193038*^-05 Au;

v1x = -8.107931162902937*^-06 Au/dy;
v1y = +1.520849732928662*^-06 Au/dy;
v1z = +2.095554598567427*^-07 Au/dy;
 
(* Merkur *)

m2  = +3.30104*^23 kg;
q2  = +0 Amp sek;
 
x2x = +2.493682187528474*^-01 Au;
y2y = +2.060848667278006*^-01 Au;
z2z = -6.803162776737710*^-03 Au;

v2x = -2.301828852252654*^-02 Au/dy;
v2y = +2.326003199133993*^-02 Au/dy;
v2z = +4.011640539083395*^-03 Au/dy;
 
(* Venus *)

m3  = +4.86732*^24 kg;
q3  = +0 Amp sek;
 
x3x = -5.604572600267276*^-01 Au;
y3y = -4.500554270408416*^-01 Au;
z3z = +2.595073246894732*^-02 Au;

v3x = +1.265689462094818*^-02 Au/dy;
v3y = -1.574829638876520*^-02 Au/dy;
v3z = -9.467652690844731*^-04 Au/dy;
 
(* Erde + Mond *)

m4  = +5.9721986*^24 kg+7.3459*^22 kg;
q4  = +0 Amp sek;

x4x = -8.552072163834489*^-01 Au;
y4y = +5.049715021822364*^-01 Au;
z4z = -6.849877545851131*^-05 Au;

v4x = -8.942912568116291*^-03 Au/dy;
v4y = -1.492365678503182*^-02 Au/dy;
v4z = +2.741178622694643*^-07 Au/dy;
 
(* Mars *)

m5  = +6.41693*^23 kg;
q5  = +0 Amp sek;
 
x5x = +5.580724605736193*^-01 Au;
y5y = +1.416261572201534*^+00 Au;
z5z = +1.574925082740965*^-02 Au;

v5x = -1.248544019487808*^-02 Au/dy;
v5y = +6.355083417008326*^-03 Au/dy;
v5z = +4.394992947386628*^-04 Au/dy;
 
(* Jupiter *)

m6  = +1.89813*^27 kg;
q6  = +0 Amp sek;
 
x6x = -1.795821860926694*^+00 Au;
y6y = -5.016469167174772*^+00 Au;
z6z = +6.097587180308248*^-02 Au;
 
v6x = +7.014525824256318*^-03 Au/dy;
v6y = -2.183010990796764*^-03 Au/dy;
v6z = -1.478090774743338*^-04 Au/dy;

(* Saturn *)

m7  = +5.68319*^26 kg;
q7  = +0 Amp sek;

x7x = +2.211165351380597*^+00 Au;
y7y = -9.803846216723874*^+00 Au;
z7z = +8.244475037063657*^-02 Au;

v7x = +5.133965065556525*^-03 Au/dy;
v7y = +1.210333590471664*^-03 Au/dy;
v7z = -2.255855621236429*^-04 Au/dy;

(* Pluto + Charon *)

m0  = +1.303*^22 kg+1.586*^21 kg;
q0  = +0 Amp sek;

x0x = +1.202894612500549*^+01 Au;
y0y = -3.151878221568063*^+01 Au;
z0z = -1.067812248721266*^-01 Au;

v0x = +3.004427922255182*^-03 Au/dy;
v0y = +4.501898344345873*^-04 Au/dy;
v0z = -9.299030165680609*^-04 Au/dy;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
x6'[t] == vx6[t], y6'[t] == vy6[t], z6'[t] == vz6[t],
x7'[t] == vx7[t], y7'[t] == vy7[t], z7'[t] == vz7[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
(G m5 (x5[t]-x1[t]))/Sqrt[((x5[t]-x1[t])^2+(y5[t]-y1[t])^2+(z5[t]-z1[t])^2)^3]+
(G m6 (x6[t]-x1[t]))/Sqrt[((x6[t]-x1[t])^2+(y6[t]-y1[t])^2+(z6[t]-z1[t])^2)^3]+
(G m7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^2)^3]]+
Λ/3*c^2*z7[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
x6[0] == x6x, y6[0] == y6y, z6[0] == z6z,
x7[0] == x7x, y7[0] == y7y, z7[0] == z7z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z,
vx6[0] == v6x, vy6[0] == v6y, vz6[0] == v6z,
vx7[0] == v7x, vy7[0] == v7y, vz7[0] == v7z},
 
{x1, x2, x3, x4, x5, x6, x7, y1, y2, y3, y4, y5, y6, y7, z1, z2, z3, z4, z5, z6, z7,
vx1, vx2, vx3, vx4, vx5, vx6, vx7, vy1, vy2, vy3, vy4, vy5, vy6, vy7, vz1, vz2, vz3, vz4, vz5, vz6, vz7},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}, {x6[t], y6[t], z6[t]}, {x7[t], y7[t], z7[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}, {vx6[t], vy6[t], vz6[t]}, {vx7[t], vy7[t], vz7[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]]+m6 Evaluate[f2p[t][[6]]]+m7 Evaluate[f2p[t][[7]]])/(m1+m2+m3+m4+m5+m6+m7);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta},
{Thickness[thk], Cyan},
{Thickness[thk], Orange},
{Thickness[thk], Purple}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Lighter[Cyan],    Point[{x5x, y5y, z5z}]},
{PointSize[2point/3], Lighter[Orange],  Point[{x6x, y6y, z6z}]},
{PointSize[2point/3], Lighter[Purple],  Point[{x7x, y7y, z7z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Cyan,     Point[Evaluate[f2p[T]][[5]]]}],
Graphics3D[{PointSize[point], Orange,   Point[Evaluate[f2p[T]][[6]]]}],
Graphics3D[{PointSize[point], Purple,   Point[Evaluate[f2p[T]][[7]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],             sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],             sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}], sw[1/2]},
{ },
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],             sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],             sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}], sw[1/2]},
{ },
{s["p6{x,y,z}"-> Evaluate[f2p[T][[6]]]],             sw[1/2]},
{s["v6{x,y,z}"-> Evaluate[f2v[T][[6]]]],             sw[1/2]},
{s["v6{total}"->{Evaluate[Chop@Norm[f2v[T][[6]]]]}], sw[1/2]},
{ },
{s["p7{x,y,z}"-> Evaluate[f2p[T][[7]]]],             sw[1/2]},
{s["v7{x,y,z}"-> Evaluate[f2v[T][[7]]]],             sw[1/2]},
{s["v7{total}"->{Evaluate[Chop@Norm[f2v[T][[7]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










8 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 8 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 2 Sqrt[15/7] Pi;
tMax      = Min[Tmax, plunge];
trail     = Tmax/20;
point     = 0.015;
thk       = 0.004;
plotrange = 1.5 {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {0, Infinity, 0};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;

(* Anfangsgeschwindigkeit und Radius *)

v0  =  Sqrt[28/15];
fk  =  10025/10000;

(* Körper 1 *)

m1  =  1*^10;
q1  =  0;

x1x = -fk;
y1y =  0;
z1z =  0;

v1x =  0;
v1y =  0;
v1z =  v0;
 
(* Körper 2 *)

m2  =  m1;
q2  =  0 Amp sek;
 
x2x =  fk;
y2y =  0;
z2z =  0;

v2x =  0;
v2y =  0;
v2z = -v0;
 
(* Körper 3 *)

m3  =  m1;
q3  =  0;
 
x3x =  0;
y3y =  0;
z3z =  fk;

v3x =  v0;
v3y =  0;
v3z =  0;
 
(* Körper 4 *)

m4  =  m1;
q4  =  0;

x4x =  0;
y4y =  0;
z4z = -fk;

v4x = -v0;
v4y =  0;
v4z =  0;
 
(* Körper 5 *)

m5  =  m1;
q5  =  0;
 
x5x =  Sqrt[1/2] fk;
y5y =  0;
z5z =  Sqrt[1/2] fk;

v5x =  Sqrt[1/2] v0;
v5y =  0;
v5z = -Sqrt[1/2] v0;
 
(* Körper 6 *)

m6  =  m1;
q6  =  0;
 
x6x = -Sqrt[1/2] fk;
y6y =  0;
z6z =  Sqrt[1/2] fk;
 
v6x =  Sqrt[1/2] v0;
v6y =  0;
v6z =  Sqrt[1/2] v0;

(* Körper 7 *)

m7  =  m1;
q7  =  0;

x7x =  Sqrt[1/2] fk;
y7y =  0;
z7z = -Sqrt[1/2] fk;

v7x = -Sqrt[1/2] v0;
v7y =  0;
v7z = -Sqrt[1/2] v0;

(* Körper 8 *)

m8  =  m1;
q8  =  0;

x8x = -Sqrt[1/2] fk;
y8y =  0;
z8z = -Sqrt[1/2] fk;

v8x = -Sqrt[1/2] v0;
v8y =  0;
v8z =  Sqrt[1/2] v0;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
x6'[t] == vx6[t], y6'[t] == vy6[t], z6'[t] == vz6[t],
x7'[t] == vx7[t], y7'[t] == vy7[t], z7'[t] == vz7[t],
x8'[t] == vx8[t], y8'[t] == vy8[t], z8'[t] == vz8[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
(G m5 (x5[t]-x1[t]))/Sqrt[((x5[t]-x1[t])^2+(y5[t]-y1[t])^2+(z5[t]-z1[t])^2)^3]+
(G m6 (x6[t]-x1[t]))/Sqrt[((x6[t]-x1[t])^2+(y6[t]-y1[t])^2+(z6[t]-z1[t])^2)^3]+
(G m7 (x7[t]-x1[t]))/Sqrt[((x7[t]-x1[t])^2+(y7[t]-y1[t])^2+(z7[t]-z1[t])^2)^3]+
(G m8 (x8[t]-x1[t]))/Sqrt[((x8[t]-x1[t])^2+(y8[t]-y1[t])^2+(z8[t]-z1[t])^2)^3]+
If[q1 == 0, 0,
(-q1*q2/(4P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])^2+(z5[t]-z8[t])^2)^3]+
(G m6 (z6[t]-z8[t]))/Sqrt[((x6[t]-x8[t])^2+(y6[t]-y8[t])^2+(z6[t]-z8[t])^2)^3]+
(G m7 (z7[t]-z8[t]))/Sqrt[((x7[t]-x8[t])^2+(y7[t]-y8[t])^2+(z7[t]-z8[t])^2)^3]+
If[q8 == 0, 0,
(-q8*q1/(4Pi ε0 )/m8 (z1[t]-z8[t]))/Sqrt[((x1[t]-x8[t])^2+(y1[t]-y8[t])^2+(z1[t]-z8[t])^2)^3]+
(-q8*q2/(4Pi ε0 )/m8 (z2[t]-z8[t]))/Sqrt[((x2[t]-x8[t])^2+(y2[t]-y8[t])^2+(z2[t]-z8[t])^2)^3]+
(-q8*q3/(4Pi ε0 )/m8 (z3[t]-z8[t]))/Sqrt[((x3[t]-x8[t])^2+(y3[t]-y8[t])^2+(z3[t]-z8[t])^2)^3]+
(-q8*q4/(4Pi ε0 )/m8 (z4[t]-z8[t]))/Sqrt[((x4[t]-x8[t])^2+(y4[t]-y8[t])^2+(z4[t]-z8[t])^2)^3]+
(-q8*q5/(4Pi ε0 )/m8 (z5[t]-z8[t]))/Sqrt[((x5[t]-x8[t])^2+(y5[t]-y8[t])^2+(z5[t]-z8[t])^2)^3]+
(-q8*q6/(4Pi ε0 )/m8 (z6[t]-z8[t]))/Sqrt[((x6[t]-x8[t])^2+(y6[t]-y8[t])^2+(z6[t]-z8[t])^2)^3]+
(-q8*q7/(4Pi ε0 )/m8 (z7[t]-z8[t]))/Sqrt[((x7[t]-x8[t])^2+(y7[t]-y8[t])^2+(z7[t]-z8[t])^2)^3]]+
Λ/3*c^2*z8[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
x6[0] == x6x, y6[0] == y6y, z6[0] == z6z,
x7[0] == x7x, y7[0] == y7y, z7[0] == z7z,
x8[0] == x8x, y8[0] == y8y, z8[0] == z8z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z,
vx6[0] == v6x, vy6[0] == v6y, vz6[0] == v6z,
vx7[0] == v7x, vy7[0] == v7y, vz7[0] == v7z,
vx8[0] == v8x, vy8[0] == v8y, vz8[0] == v8z},
 
{x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8, z1, z2, z3, z4, z5, z6, z7, z8,
vx1, vx2, vx3, vx4, vx5, vx6, vx7, vx8, vy1, vy2, vy3, vy4, vy5, vy6, vy7, vy8, vz1, vz2, vz3, vz4, vz5, vz6, vz7, vz8},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}, {x6[t], y6[t], z6[t]}, {x7[t], y7[t], z7[t]}, {x8[t], y8[t], z8[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}, {vx6[t], vy6[t], vz6[t]}, {vx7[t], vy7[t], vz7[t]}, {vx8[t], vy8[t], vz8[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]]+m6 Evaluate[f2p[t][[6]]]+m7 Evaluate[f2p[t][[7]]]+m8 Evaluate[f2p[t][[8]]])/(m1+m2+m3+m4+m5+m6+m7+m8);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta},
{Thickness[thk], Cyan},
{Thickness[thk], Orange},
{Thickness[thk], Purple},
{Thickness[thk], Pink}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Lighter[Cyan],    Point[{x5x, y5y, z5z}]},
{PointSize[2point/3], Lighter[Orange],  Point[{x6x, y6y, z6z}]},
{PointSize[2point/3], Lighter[Purple],  Point[{x7x, y7y, z7z}]},
{PointSize[2point/3], Lighter[Pink],    Point[{x8x, y8y, z8z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Cyan,     Point[Evaluate[f2p[T]][[5]]]}],
Graphics3D[{PointSize[point], Orange,   Point[Evaluate[f2p[T]][[6]]]}],
Graphics3D[{PointSize[point], Purple,   Point[Evaluate[f2p[T]][[7]]]}],
Graphics3D[{PointSize[point], Pink,     Point[Evaluate[f2p[T]][[8]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T-trail]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],             sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],             sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}], sw[1/2]},
{ },
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],             sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],             sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}], sw[1/2]},
{ },
{s["p6{x,y,z}"-> Evaluate[f2p[T][[6]]]],             sw[1/2]},
{s["v6{x,y,z}"-> Evaluate[f2v[T][[6]]]],             sw[1/2]},
{s["v6{total}"->{Evaluate[Chop@Norm[f2v[T][[6]]]]}], sw[1/2]},
{ },
{s["p7{x,y,z}"-> Evaluate[f2p[T][[7]]]],             sw[1/2]},
{s["v7{x,y,z}"-> Evaluate[f2v[T][[7]]]],             sw[1/2]},
{s["v7{total}"->{Evaluate[Chop@Norm[f2v[T][[7]]]]}], sw[1/2]},
{ },
{s["p8{x,y,z}"-> Evaluate[f2p[T][[8]]]],             sw[1/2]},
{s["v8{x,y,z}"-> Evaluate[f2v[T][[8]]]],             sw[1/2]},
{s["v8{total}"->{Evaluate[Chop@Norm[f2v[T][[8]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, trail, Tmax/2+trail, trail}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










9 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || 9 Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 40 yr;
tMax      = Min[Tmax, plunge];
trail     = 10 yr;
point     = 0.015;
thk       = 0.004;
plotrange = 50 Au {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {40, 30, 20};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
                                               (* Ephemeriden vom 19.02.2019, 0:00:00 TDB *)
(* Sonne *)

m1  = +1.988435*^30 kg;
q1  = +77 Amp sek;

x1x = -1.147196570503204*^-03 Au;
y1y = +7.515074431920434*^-03 Au;
z1z = -4.730273651193038*^-05 Au;

v1x = -8.107931162902937*^-06 Au/dy;
v1y = +1.520849732928662*^-06 Au/dy;
v1z = +2.095554598567427*^-07 Au/dy;
 
(* Merkur *)

m2  = +3.30104*^23 kg;
q2  = +0 Amp sek;
 
x2x = +2.493682187528474*^-01 Au;
y2y = +2.060848667278006*^-01 Au;
z2z = -6.803162776737710*^-03 Au;

v2x = -2.301828852252654*^-02 Au/dy;
v2y = +2.326003199133993*^-02 Au/dy;
v2z = +4.011640539083395*^-03 Au/dy;
 
(* Venus *)

m3  = +4.86732*^24 kg;
q3  = +0 Amp sek;
 
x3x = -5.604572600267276*^-01 Au;
y3y = -4.500554270408416*^-01 Au;
z3z = +2.595073246894732*^-02 Au;

v3x = +1.265689462094818*^-02 Au/dy;
v3y = -1.574829638876520*^-02 Au/dy;
v3z = -9.467652690844731*^-04 Au/dy;
 
(* Erde + Mond *)

m4  = +5.9721986*^24 kg+7.3459*^22 kg;
q4  = +0 Amp sek;

x4x = -8.552072163834489*^-01 Au;
y4y = +5.049715021822364*^-01 Au;
z4z = -6.849877545851131*^-05 Au;

v4x = -8.942912568116291*^-03 Au/dy;
v4y = -1.492365678503182*^-02 Au/dy;
v4z = +2.741178622694643*^-07 Au/dy;
 
(* Mars *)

m5  = +6.41693*^23 kg;
q5  = +0 Amp sek;
 
x5x = +5.580724605736193*^-01 Au;
y5y = +1.416261572201534*^+00 Au;
z5z = +1.574925082740965*^-02 Au;

v5x = -1.248544019487808*^-02 Au/dy;
v5y = +6.355083417008326*^-03 Au/dy;
v5z = +4.394992947386628*^-04 Au/dy;
 
(* Jupiter *)

m6  = +1.89813*^27 kg;
q6  = +0 Amp sek;
 
x6x = -1.795821860926694*^+00 Au;
y6y = -5.016469167174772*^+00 Au;
z6z = +6.097587180308248*^-02 Au;
 
v6x = +7.014525824256318*^-03 Au/dy;
v6y = -2.183010990796764*^-03 Au/dy;
v6z = -1.478090774743338*^-04 Au/dy;

(* Saturn *)

m7  = +5.68319*^26 kg;
q7  = +0 Amp sek;

x7x = +2.211165351380597*^+00 Au;
y7y = -9.803846216723874*^+00 Au;
z7z = +8.244475037063657*^-02 Au;

v7x = +5.133965065556525*^-03 Au/dy;
v7y = +1.210333590471664*^-03 Au/dy;
v7z = -2.255855621236429*^-04 Au/dy;

(* Uranus *)

m8  = +8.68103*^25 kg;
q8  = +0 Amp sek;

x8x = +1.691367572961052*^+01 Au;
y8y = +1.040615964042521*^+01 Au;
z8z = -1.804702052122950*^-01 Au;

v8x = -2.089933372733080*^-03 Au/dy;
v8y = +3.166549064213605*^-03 Au/dy;
v8z = +3.884093561739733*^-05 Au/dy;

(* Neptun *)

m9  = +1.02413*^26 kg;
q9  = +0 Amp sek;

x9x = +2.901867480863295*^+01 Au;
y9y = -7.331260396521146*^+00 Au;
z9z = -5.177914737734761*^-01 Au;

v9x = +7.476131405747911*^-04 Au/dy;
v9y = +3.062101642790218*^-03 Au/dy;
v9z = -8.000840096853115*^-05 Au/dy;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
x6'[t] == vx6[t], y6'[t] == vy6[t], z6'[t] == vz6[t],
x7'[t] == vx7[t], y7'[t] == vy7[t], z7'[t] == vz7[t],
x8'[t] == vx8[t], y8'[t] == vy8[t], z8'[t] == vz8[t],
x9'[t] == vx9[t], y9'[t] == vy9[t], z9'[t] == vz9[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])^2)^3]+
(G m3 (x3[t]-x1[t]))/Sqrt[((x3[t]-x1[t])^2+(y3[t]-y1[t])^2+(z3[t]-z1[t])^2)^3]+
(G m4 (x4[t]-x1[t]))/Sqrt[((x4[t]-x1[t])^2+(y4[t]-y1[t])^2+(z4[t]-z1[t])^2)^3]+
(G m5 (x5[t]-x1[t]))/Sqrt[((x5[t]-x1[t])^2+(y5[t]-y1[t])^2+(z5[t]-z1[t])^2)^3]+
(G m6 (x6[t]-x1[t]))/Sqrt[((x6[t]-x1[t])^2+(y6[t]-y1[t])^2+(z6[t]-z1[t])^2)^3]+
(G m7 (x7[t]-x1[t]))/Sqrt[((x7[t]-x1[t])^2+(y7[t]-y1[t])^2+(z7[t]-z1[t])^2)^3]+
(G m8 (x8[t]-x1[t]))/Sqrt[((x8[t]-x1[t])^2+(y8[t]-y1[t])^2+(z8[t]-z1[t])^2)^3]+
(G m9 (x9[t]-x1[t]))/Sqrt[((x9[t]-x1[t])^2+(y9[t]-y1[t])^2+(z9[t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== 0, 0,
(-q9*q1/(4Pi ε0 )/m9 (z1[t]-z9[t]))/Sqrt[((x1[t]-x9[t])^2+(y1[t]-y9[t])^2+(z1[t]-z9[t])^2)^3]+
(-q9*q2/(4Pi ε0 )/m9 (z2[t]-z9[t]))/Sqrt[((x2[t]-x9[t])^2+(y2[t]-y9[t])^2+(z2[t]-z9[t])^2)^3]+
(-q9*q3/(4Pi ε0 )/m9 (z3[t]-z9[t]))/Sqrt[((x3[t]-x9[t])^2+(y3[t]-y9[t])^2+(z3[t]-z9[t])^2)^3]+
(-q9*q4/(4Pi ε0 )/m9 (z4[t]-z9[t]))/Sqrt[((x4[t]-x9[t])^2+(y4[t]-y9[t])^2+(z4[t]-z9[t])^2)^3]+
(-q9*q5/(4Pi ε0 )/m9 (z5[t]-z9[t]))/Sqrt[((x5[t]-x9[t])^2+(y5[t]-y9[t])^2+(z5[t]-z9[t])^2)^3]+
(-q9*q6/(4Pi ε0 )/m9 (z6[t]-z9[t]))/Sqrt[((x6[t]-x9[t])^2+(y6[t]-y9[t])^2+(z6[t]-z9[t])^2)^3]+
(-q9*q7/(4Pi ε0 )/m9 (z7[t]-z9[t]))/Sqrt[((x7[t]-x9[t])^2+(y7[t]-y9[t])^2+(z7[t]-z9[t])^2)^3]+
(-q9*q8/(4Pi ε0 )/m9 (z8[t]-z9[t]))/Sqrt[((x8[t]-x9[t])^2+(y8[t]-y9[t])^2+(z8[t]-z9[t])^2)^3]]+
Λ/3*c^2*z9[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
x6[0] == x6x, y6[0] == y6y, z6[0] == z6z,
x7[0] == x7x, y7[0] == y7y, z7[0] == z7z,
x8[0] == x8x, y8[0] == y8y, z8[0] == z8z,
x9[0] == x9x, y9[0] == y9y, z9[0] == z9z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z,
vx6[0] == v6x, vy6[0] == v6y, vz6[0] == v6z,
vx7[0] == v7x, vy7[0] == v7y, vz7[0] == v7z,
vx8[0] == v8x, vy8[0] == v8y, vz8[0] == v8z,
vx9[0] == v9x, vy9[0] == v9y, vz9[0] == v9z},
 
{x1, x2, x3, x4, x5, x6, x7, x8, x9, y1, y2, y3, y4, y5, y6, y7, y8, y9, z1, z2, z3, z4, z5, z6, z7, z8, z9,
vx1, vx2, vx3, vx4, vx5, vx6, vx7, vx8, vx9, vy1, vy2, vy3, vy4, vy5, vy6, vy7, vy8, vy9, vz1, vz2, vz3, vz4, vz5, vz6, vz7, vz8, vz9},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}, {x6[t], y6[t], z6[t]}, {x7[t], y7[t], z7[t]}, {x8[t], y8[t], z8[t]}, {x9[t], y9[t], z9[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}, {vx6[t], vy6[t], vz6[t]}, {vx7[t], vy7[t], vz7[t]}, {vx8[t], vy8[t], vz8[t]}, {vx9[t], vy9[t], vz9[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]]+m6 Evaluate[f2p[t][[6]]]+m7 Evaluate[f2p[t][[7]]]+m8 Evaluate[f2p[t][[8]]]+m9 Evaluate[f2p[t][[9]]])/(m1+m2+m3+m4+m5+m6+m7+m8+m9);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Red},
{Thickness[thk], Blue},
{Thickness[thk], Green},
{Thickness[thk], Magenta},
{Thickness[thk], Cyan},
{Thickness[thk], Orange},
{Thickness[thk], Purple},
{Thickness[thk], Pink},
{Thickness[thk], Brown}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Lighter[Red],     Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Lighter[Blue],    Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Lighter[Green],   Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Lighter[Magenta], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Lighter[Cyan],    Point[{x5x, y5y, z5z}]},
{PointSize[2point/3], Lighter[Orange],  Point[{x6x, y6y, z6z}]},
{PointSize[2point/3], Lighter[Purple],  Point[{x7x, y7y, z7z}]},
{PointSize[2point/3], Lighter[Pink],    Point[{x8x, y8y, z8z}]},
{PointSize[2point/3], Lighter[Brown],   Point[{x9x, y9y, z9z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Red,      Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Blue,     Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Green,    Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Magenta,  Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Cyan,     Point[Evaluate[f2p[T]][[5]]]}],
Graphics3D[{PointSize[point], Orange,   Point[Evaluate[f2p[T]][[6]]]}],
Graphics3D[{PointSize[point], Purple,   Point[Evaluate[f2p[T]][[7]]]}],
Graphics3D[{PointSize[point], Pink,     Point[Evaluate[f2p[T]][[8]]]}],
Graphics3D[{PointSize[point], Brown,    Point[Evaluate[f2p[T]][[9]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],             sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],             sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}], sw[1/2]},
{ },
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],             sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],             sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}], sw[1/2]},
{ },
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],             sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],             sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}], sw[1/2]},
{ },
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],             sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],             sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}], sw[1/2]},
{ },
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],             sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],             sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}], sw[1/2]},
{ },
{s["p6{x,y,z}"-> Evaluate[f2p[T][[6]]]],             sw[1/2]},
{s["v6{x,y,z}"-> Evaluate[f2v[T][[6]]]],             sw[1/2]},
{s["v6{total}"->{Evaluate[Chop@Norm[f2v[T][[6]]]]}], sw[1/2]},
{ },
{s["p7{x,y,z}"-> Evaluate[f2p[T][[7]]]],             sw[1/2]},
{s["v7{x,y,z}"-> Evaluate[f2v[T][[7]]]],             sw[1/2]},
{s["v7{total}"->{Evaluate[Chop@Norm[f2v[T][[7]]]]}], sw[1/2]},
{ },
{s["p8{x,y,z}"-> Evaluate[f2p[T][[8]]]],             sw[1/2]},
{s["v8{x,y,z}"-> Evaluate[f2v[T][[8]]]],             sw[1/2]},
{s["v8{total}"->{Evaluate[Chop@Norm[f2v[T][[8]]]]}], sw[1/2]},
{ },
{s["p9{x,y,z}"-> Evaluate[f2p[T][[9]]]],             sw[1/2]},
{s["v9{x,y,z}"-> Evaluate[f2v[T][[9]]]],             sw[1/2]},
{s["v9{total}"->{Evaluate[Chop@Norm[f2v[T][[9]]]]}], sw[1/2]},
{ },
{s["ps{x,y,z}"-> swp[T]],                            sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                           sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],               sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










10 Körper:

Code: Alles auswählen

(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)
(* ||| Mathematica Syntax || yukterez.net || n Body Newtonian Mass & Charge Simulator ||| *)
(* |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| *)

ClearAll["Global`*"]; ClearAll["Local`*"];
Needs["DifferentialEquations`NDSolveProblems`"];
Needs["DifferentialEquations`NDSolveUtilities`"];

Amp = 1; kg = 1; m = 1; sek = 1; km = 1000 m; (* SI Einheiten *)
 
mt1 = {"StiffnessSwitching", Method-> {"ExplicitRungeKutta", Automatic}};
mt2 = {"ImplicitRungeKutta", "DifferenceOrder"-> 20};
mt3 = {"EquationSimplification"-> "Residual"};
mt0 = Automatic;
mta = mt2;
wp  = MachinePrecision;
 
(* Plot Optionen *)
 
Tmax      = 40 yr;
tMax      = Min[Tmax, plunge];
trail     = 10 yr;
point     = 0.015;
thk       = 0.004;
plotrange = 50 Au {{-1, +1}, {-1, +1}, {-1, +1}};
viewpoint = {40, 30, 20};
imagesize = 430;
startpos  = 0;

(* Konstanten *)
 
G  = 667384/10^16 m^3/kg/sek^2;
Λ  = 0*11056*^-56/m^2;
ε0 = 8854187817*^-21 Amp^2 sek^4/kg/m^3;
c  = 299792458 m/sek;
Au = 149597870700 m;
dy = 24*3600 sek;
yr = 36525*dy/100;
                                               (* Ephemeriden vom 19.02.2019, 0:00:00 TDB *)
(* Sonne *)

m1  = +1.988435*^30 kg;
q1  = +77 Amp sek;

x1x = -1.147196570503204*^-03 Au;
y1y = +7.515074431920434*^-03 Au;
z1z = -4.730273651193038*^-05 Au;

v1x = -8.107931162902937*^-06 Au/dy;
v1y = +1.520849732928662*^-06 Au/dy;
v1z = +2.095554598567427*^-07 Au/dy;
 
(* Merkur *)

m2  = +3.30104*^23 kg;
q2  = +0 Amp sek;
 
x2x = +2.493682187528474*^-01 Au;
y2y = +2.060848667278006*^-01 Au;
z2z = -6.803162776737710*^-03 Au;

v2x = -2.301828852252654*^-02 Au/dy;
v2y = +2.326003199133993*^-02 Au/dy;
v2z = +4.011640539083395*^-03 Au/dy;
 
(* Venus *)

m3  = +4.86732*^24 kg;
q3  = +0 Amp sek;
 
x3x = -5.604572600267276*^-01 Au;
y3y = -4.500554270408416*^-01 Au;
z3z = +2.595073246894732*^-02 Au;

v3x = +1.265689462094818*^-02 Au/dy;
v3y = -1.574829638876520*^-02 Au/dy;
v3z = -9.467652690844731*^-04 Au/dy;
 
(* Erde + Mond *)

m4  = +5.9721986*^24 kg+7.3459*^22 kg;
q4  = +0 Amp sek;

x4x = -8.552072163834489*^-01 Au;
y4y = +5.049715021822364*^-01 Au;
z4z = -6.849877545851131*^-05 Au;

v4x = -8.942912568116291*^-03 Au/dy;
v4y = -1.492365678503182*^-02 Au/dy;
v4z = +2.741178622694643*^-07 Au/dy;
 
(* Mars *)

m5  = +6.41693*^23 kg;
q5  = +0 Amp sek;
 
x5x = +5.580724605736193*^-01 Au;
y5y = +1.416261572201534*^+00 Au;
z5z = +1.574925082740965*^-02 Au;

v5x = -1.248544019487808*^-02 Au/dy;
v5y = +6.355083417008326*^-03 Au/dy;
v5z = +4.394992947386628*^-04 Au/dy;
 
(* Jupiter *)

m6  = +1.89813*^27 kg;
q6  = +0 Amp sek;
 
x6x = -1.795821860926694*^+00 Au;
y6y = -5.016469167174772*^+00 Au;
z6z = +6.097587180308248*^-02 Au;
 
v6x = +7.014525824256318*^-03 Au/dy;
v6y = -2.183010990796764*^-03 Au/dy;
v6z = -1.478090774743338*^-04 Au/dy;

(* Saturn *)

m7  = +5.68319*^26 kg;
q7  = +0 Amp sek;

x7x = +2.211165351380597*^+00 Au;
y7y = -9.803846216723874*^+00 Au;
z7z = +8.244475037063657*^-02 Au;

v7x = +5.133965065556525*^-03 Au/dy;
v7y = +1.210333590471664*^-03 Au/dy;
v7z = -2.255855621236429*^-04 Au/dy;

(* Uranus *)

m8  = +8.68103*^25 kg;
q8  = +0 Amp sek;

x8x = +1.691367572961052*^+01 Au;
y8y = +1.040615964042521*^+01 Au;
z8z = -1.804702052122950*^-01 Au;

v8x = -2.089933372733080*^-03 Au/dy;
v8y = +3.166549064213605*^-03 Au/dy;
v8z = +3.884093561739733*^-05 Au/dy;

(* Neptun *)

m9  = +1.02413*^26 kg;
q9  = +0 Amp sek;

x9x = +2.901867480863295*^+01 Au;
y9y = -7.331260396521146*^+00 Au;
z9z = -5.177914737734761*^-01 Au;

v9x = +7.476131405747911*^-04 Au/dy;
v9y = +3.062101642790218*^-03 Au/dy;
v9z = -8.000840096853115*^-05 Au/dy;

(* Pluto + Charon *)

m0  = +1.303*^22 kg+1.586*^21 kg;
q0  = +0 Amp sek;

x0x = +1.202894612500549*^+01 Au;
y0y = -3.151878221568063*^+01 Au;
z0z = -1.067812248721266*^-01 Au;

v0x = +3.004427922255182*^-03 Au/dy;
v0y = +4.501898344345873*^-04 Au/dy;
v0z = -9.299030165680609*^-04 Au/dy;
 
(* Differentialgleichung *)
 
nds=NDSolve[{
 
x1'[t] == vx1[t], y1'[t] == vy1[t], z1'[t] == vz1[t],
x2'[t] == vx2[t], y2'[t] == vy2[t], z2'[t] == vz2[t],
x3'[t] == vx3[t], y3'[t] == vy3[t], z3'[t] == vz3[t],
x4'[t] == vx4[t], y4'[t] == vy4[t], z4'[t] == vz4[t],
x5'[t] == vx5[t], y5'[t] == vy5[t], z5'[t] == vz5[t],
x6'[t] == vx6[t], y6'[t] == vy6[t], z6'[t] == vz6[t],
x7'[t] == vx7[t], y7'[t] == vy7[t], z7'[t] == vz7[t],
x8'[t] == vx8[t], y8'[t] == vy8[t], z8'[t] == vz8[t],
x9'[t] == vx9[t], y9'[t] == vy9[t], z9'[t] == vz9[t],
x0'[t] == vx0[t], y0'[t] == vy0[t], z0'[t] == vz0[t],
 
vx1'[t] ==
(G m2 (x2[t]-x1[t]))/Sqrt[((x2[t]-x1[t])^2+(y2[t]-y1[t])^2+(z2[t]-z1[t])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0 (z8[t]-z0[t]))/Sqrt[((x8[t]-x0[t])^2+(y8[t]-y0[t])^2+(z8[t]-z0[t])^2)^3]+
(-q0*q9/(4Pi ε0 )/m0 (z9[t]-z0[t]))/Sqrt[((x9[t]-x0[t])^2+(y9[t]-y0[t])^2+(z9[t]-z0[t])^2)^3]]+
Λ/3*c^2*z0[t],
 
x1[0] == x1x, y1[0] == y1y, z1[0] == z1z,
x2[0] == x2x, y2[0] == y2y, z2[0] == z2z,
x3[0] == x3x, y3[0] == y3y, z3[0] == z3z,
x4[0] == x4x, y4[0] == y4y, z4[0] == z4z,
x5[0] == x5x, y5[0] == y5y, z5[0] == z5z,
x6[0] == x6x, y6[0] == y6y, z6[0] == z6z,
x7[0] == x7x, y7[0] == y7y, z7[0] == z7z,
x8[0] == x8x, y8[0] == y8y, z8[0] == z8z,
x9[0] == x9x, y9[0] == y9y, z9[0] == z9z,
x0[0] == x0x, y0[0] == y0y, z0[0] == z0z,
 
vx1[0] == v1x, vy1[0] == v1y, vz1[0] == v1z,
vx2[0] == v2x, vy2[0] == v2y, vz2[0] == v2z,
vx3[0] == v3x, vy3[0] == v3y, vz3[0] == v3z,
vx4[0] == v4x, vy4[0] == v4y, vz4[0] == v4z,
vx5[0] == v5x, vy5[0] == v5y, vz5[0] == v5z,
vx6[0] == v6x, vy6[0] == v6y, vz6[0] == v6z,
vx7[0] == v7x, vy7[0] == v7y, vz7[0] == v7z,
vx8[0] == v8x, vy8[0] == v8y, vz8[0] == v8z,
vx9[0] == v9x, vy9[0] == v9y, vz9[0] == v9z,
vx0[0] == v0x, vy0[0] == v0y, vz0[0] == v0z},
 
{x1, x2, x3, x4, x5, x6, x7, x8, x9, x0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z0,
vx1, vx2, vx3, vx4, vx5, vx6, vx7, vx8, vx9, vx0, vy1, vy2, vy3, vy4, vy5, vy6, vy7, vy8, vy9, vy0, vz1, vz2, vz3, vz4, vz5, vz6, vz7, vz8, vz9, vz0},
 
{t, 0, Tmax},

WorkingPrecision-> wp,
MaxSteps-> Infinity,
Method-> mta,
InterpolationOrder-> All,
StepMonitor :> (laststep=plunge; plunge=t;
stepsize=plunge-laststep;), Method->{"EventLocator",
"Event" :> (If[stepsize<1*^-4, 0, 1])}];
 
(* Position, Geschwindigkeit *)
 
f2p[t_]={{x1[t], y1[t], z1[t]}, {x2[t], y2[t], z2[t]}, {x3[t], y3[t], z3[t]}, {x4[t], y4[t], z4[t]}, {x5[t], y5[t], z5[t]}, {x6[t], y6[t], z6[t]}, {x7[t], y7[t], z7[t]}, {x8[t], y8[t], z8[t]}, {x9[t], y9[t], z9[t]}, {x0[t], y0[t], z0[t]}}/.nds[[1]];
f2v[t_]={{vx1[t], vy1[t], vz1[t]}, {vx2[t], vy2[t], vz2[t]}, {vx3[t], vy3[t], vz3[t]}, {vx4[t], vy4[t], vz4[t]}, {vx5[t], vy5[t], vz5[t]}, {vx6[t], vy6[t], vz6[t]}, {vx7[t], vy7[t], vz7[t]}, {vx8[t], vy8[t], vz8[t]}, {vx9[t], vy9[t], vz9[t]}, {vx0[t], vy0[t], vz0[t]}}/.nds[[1]];
swp[t_]=(m1 Evaluate[f2p[t][[1]]]+m2 Evaluate[f2p[t][[2]]]+m3 Evaluate[f2p[t][[3]]]+m4 Evaluate[f2p[t][[4]]]+m5 Evaluate[f2p[t][[5]]]+m6 Evaluate[f2p[t][[6]]]+m7 Evaluate[f2p[t][[7]]]+m8 Evaluate[f2p[t][[8]]]+m9 Evaluate[f2p[t][[9]]]+m0 Evaluate[f2p[t][[10]]])/(m1+m2+m3+m4+m5+m6+m7+m8+m9+m0);
 
(* Formatierung *)
 
s[text_]=Style[text, FontSize->11];
sw[text_]=Style[text, White, FontSize->11];
colorfunc[n_]=Function[{x, y, z, t},
Hue[0, n, 0.5,
If[Tmax<0, Max[Min[(+T+(-t+trail))/trail, 1], 0],
Max[Min[(-T+(t+trail))/trail, 1], 0]]]];
 
(* Animation *)
 
Do[Print[Rasterize[
Grid[{{
Show[

If[T == 0, {},

ParametricPlot3D[Evaluate[f2p[t]],
{t, Max[0, T-trail], T},

PlotStyle->{
{Thickness[thk], Hue[10/10]},
{Thickness[thk], Hue[05/10]},
{Thickness[thk], Hue[09/10]},
{Thickness[thk], Hue[04/10]},
{Thickness[thk], Hue[08/10]},
{Thickness[thk], Hue[03/10]},
{Thickness[thk], Hue[07/10]},
{Thickness[thk], Hue[02/10]},
{Thickness[thk], Hue[06/10]},
{Thickness[thk], Hue[01/10]}},

PlotRange->plotrange, AspectRatio->1, MaxRecursion->15, Axes->True, ImageSize->imagesize]],
 
Graphics3D[
If[startpos==1, {
{PointSize[2point/3], Hue[10/10], Point[{x1x, y1y, z1z}]},
{PointSize[2point/3], Hue[05/10], Point[{x2x, y2y, z2z}]},
{PointSize[2point/3], Hue[09/10], Point[{x3x, y3y, z3z}]},
{PointSize[2point/3], Hue[04/10], Point[{x4x, y4y, z4z}]},
{PointSize[2point/3], Hue[08/10], Point[{x5x, y5y, z5z}]},
{PointSize[2point/3], Hue[03/10], Point[{x6x, y6y, z6z}]},
{PointSize[2point/3], Hue[07/10], Point[{x7x, y7y, z7z}]},
{PointSize[2point/3], Hue[02/10], Point[{x8x, y8y, z8z}]},
{PointSize[2point/3], Hue[06/10], Point[{x9x, y9y, z9z}]},
{PointSize[2point/3], Hue[01/10], Point[{x0x, y0y, z0z}]}
}, {}],

PlotRange->plotrange, AspectRatio->1, Axes->True, ImageSize->imagesize],
 
Graphics3D[{PointSize[point], Hue[10/10], Point[Evaluate[f2p[T]][[1]]]}],
Graphics3D[{PointSize[point], Hue[05/10], Point[Evaluate[f2p[T]][[2]]]}],
Graphics3D[{PointSize[point], Hue[09/10], Point[Evaluate[f2p[T]][[3]]]}],
Graphics3D[{PointSize[point], Hue[04/10], Point[Evaluate[f2p[T]][[4]]]}],
Graphics3D[{PointSize[point], Hue[08/10], Point[Evaluate[f2p[T]][[5]]]}],
Graphics3D[{PointSize[point], Hue[03/10], Point[Evaluate[f2p[T]][[6]]]}],
Graphics3D[{PointSize[point], Hue[07/10], Point[Evaluate[f2p[T]][[7]]]}],
Graphics3D[{PointSize[point], Hue[02/10], Point[Evaluate[f2p[T]][[8]]]}],
Graphics3D[{PointSize[point], Hue[06/10], Point[Evaluate[f2p[T]][[9]]]}],
Graphics3D[{PointSize[point], Hue[01/10], Point[Evaluate[f2p[T]][[10]]]}],
 
ViewPoint->viewpoint]},
 
{ },
{s["t"->N[T]], sw[1/2]},
{ },
{s["Sun    {}" -> {N@m1}], sw[1/2]},
{s["p1{x,y,z}"-> Evaluate[f2p[T][[1]]]],                 sw[1/2]},
{s["v1{x,y,z}"-> Evaluate[f2v[T][[1]]]],                 sw[1/2]},
{s["v1{total}"->{Evaluate[Chop@Norm[f2v[T][[1]]]]}],     sw[1/2]},
{ },
{s["Mercury{}" -> {N@m2} ], sw[1/2]},
{s["p2{x,y,z}"-> Evaluate[f2p[T][[2]]]],                 sw[1/2]},
{s["v2{x,y,z}"-> Evaluate[f2v[T][[2]]]],                 sw[1/2]},
{s["v2{total}"->{Evaluate[Chop@Norm[f2v[T][[2]]]]}],     sw[1/2]},
{ },
{s["Venus  {}" -> {N@m3}], sw[1/2]},
{s["p3{x,y,z}"-> Evaluate[f2p[T][[3]]]],                 sw[1/2]},
{s["v3{x,y,z}"-> Evaluate[f2v[T][[3]]]],                 sw[1/2]},
{s["v3{total}"->{Evaluate[Chop@Norm[f2v[T][[3]]]]}],     sw[1/2]},
{ },
{s["Earth  {}" -> {N@m4} ], sw[1/2]},
{s["p4{x,y,z}"-> Evaluate[f2p[T][[4]]]],                 sw[1/2]},
{s["v4{x,y,z}"-> Evaluate[f2v[T][[4]]]],                 sw[1/2]},
{s["v4{total}"->{Evaluate[Chop@Norm[f2v[T][[4]]]]}],     sw[1/2]},
{ },
{s["Mars   {}" -> {N@m5} ], sw[1/2]},
{s["p5{x,y,z}"-> Evaluate[f2p[T][[5]]]],                 sw[1/2]},
{s["v5{x,y,z}"-> Evaluate[f2v[T][[5]]]],                 sw[1/2]},
{s["v5{total}"->{Evaluate[Chop@Norm[f2v[T][[5]]]]}],     sw[1/2]},
{ },
{s["Jupiter{}" -> {N@m6 }], sw[1/2]},
{s["p6{x,y,z}"-> Evaluate[f2p[T][[6]]]],                 sw[1/2]},
{s["v6{x,y,z}"-> Evaluate[f2v[T][[6]]]],                 sw[1/2]},
{s["v6{total}"->{Evaluate[Chop@Norm[f2v[T][[6]]]]}],     sw[1/2]},
{ },
{s["Saturn {}" -> {N@m7 }], sw[1/2]},
{s["p7{x,y,z}"-> Evaluate[f2p[T][[7]]]],                 sw[1/2]},
{s["v7{x,y,z}"-> Evaluate[f2v[T][[7]]]],                 sw[1/2]},
{s["v7{total}"->{Evaluate[Chop@Norm[f2v[T][[7]]]]}],     sw[1/2]},
{ },
{s["Uranus {}" -> {N@m8}], sw[1/2]},
{s["p8{x,y,z}"-> Evaluate[f2p[T][[8]]]],                 sw[1/2]},
{s["v8{x,y,z}"-> Evaluate[f2v[T][[8]]]],                 sw[1/2]},
{s["v8{total}"->{Evaluate[Chop@Norm[f2v[T][[8]]]]}],     sw[1/2]},
{ },
{s["Neptune{}" -> {N@m9}], sw[1/2]},
{s["p9{x,y,z}"-> Evaluate[f2p[T][[9]]]],                 sw[1/2]},
{s["v9{x,y,z}"-> Evaluate[f2v[T][[9]]]],                 sw[1/2]},
{s["v9{total}"->{Evaluate[Chop@Norm[f2v[T][[9]]]]}],     sw[1/2]},
{ },
{s["Pluto  {}" -> {N@m0} ], sw[1/2]},
{s["p0{x,y,z}"-> Evaluate[f2p[T][[10]]]],                sw[1/2]},
{s["v0{x,y,z}"-> Evaluate[f2v[T][[10]]]],                sw[1/2]},
{s["v0{total}"->{Evaluate[Chop@Norm[f2v[T][[10]]]]}],    sw[1/2]},
{ },
{s["System {}" -> {N@(m1+m2+m3+m4+m5+m6+m7+m8+m9+m0)}],  sw[1/2]},
{s["ps{x,y,z}"-> swp[T]],                                sw[1/2]},
{s["vs{x,y,z}"-> swp'[T]],                               sw[1/2]},
{s["vs{total}"->{Chop@Norm[swp'[T]]}],                   sw[1/2]}
}, Alignment->Left]]],
 
(* Zeitregler *)
 
{T, 0, tMax, tMax/5}]

(* Export als HTML Dokument *)
(* Export["dateiname.html", EvaluationNotebook[], "GraphicsOutput" -> "PNG"] *)
(* Export direkt als Bildsequenz *)
(* ParallelDo[Export["dateiname" <> ToString[T] <> ".png", Rasterize[...] ], {T, 0, 10, 5}] *)










nächstes Kapitel: die Periheldrehung des Merkur
Bild
Animations by Simon Tyran, Vienna (Yukterez) - reuse permitted under the Creative Commons License CC BY-SA 4.0