| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
Hallo Alexander,
@Udo: Hatte einen Vorzeichenfehler, daher waren die beiden Graphen "unabhängig" voneinander, hab jetzt also alle Probleme beseitigen können.
Ich gestehe in aller Bescheidenheit, dass ich mit dem Morsepotential
keine einzige vernünftige Lösung - d.h. eine Lösung, bei der die
Massen auf das Potential reagierten - erhielt.
Mit einem Cos-Potential ging es allerdings gut:
In[132]:= Clear[m1, m2, g, l0, d, \[Alpha], x10, x11, x20, x21, y10, \
y11, y20, y21]
m1 = 2; m2 = 2; g = 9.81; l0 = 4; d = 1; \[Alpha] = 0.21;
x10 = -\[Pi]/4; x11 = 3; y10 = 0; y11 = -7;
x20 = \[Pi]/4; x21 = -3; y20 = 0; y21 = 7;
In[136]:= Clear[\[Phi], Fx1, Fx2, Fy1, Fy2, x1, x2, y1, y2, t]
(* \[Phi] = d (Exp[-2 \[Alpha] Sqrt[(x2[t] - x1[t])^2 + (y2[t] - \
y1[t])^2] - l0] - 2 Exp[-\[Alpha] Sqrt[(x2[t] - x1[t])^2 + (y2[t] - \
y1[t])^2] - l0]); *)
\[Phi] = 500 (1 + Cos[Sqrt[(x2[t] - x1[t])^2 + (y2[t] - y1[t])^2]])
Fx1[t] = -D[\[Phi], x1[t]];
Fx2[t] = -D[\[Phi], x2[t]];
Fy1[t] = -D[\[Phi], y1[t]];
Fy2[t] = -D[\[Phi], y2[t]];
Out[137]= 500 (1 + Cos[Sqrt[(-x1[t] + x2[t])^2 + (-y1[t] + y2[t])^2]])
In[142]:= Clear[s]
s = NDSolve[{x1''[t] == Fx1[t]/m1, x1[0] == x10, x1'[0] == x11,
x2''[t] == Fx2[t]/m2, x2[0] == x20, x2'[0] == x21,
y1''[t] == -g + Fy1[t]/m1, y1[0] == y10, y1'[0] == y11,
y2''[t] == -g + Fy2[t]/m2, y2[0] == y20, y2'[0] == y21},
{x1[t], x2[t], y1[t], y2[t]}, {t, 0, 10}];
In[151]:= ParametricPlot[
Evaluate[{{x1[t], y1[t]}, {x2[t], y2[t]}} /. s], {t, 0, 1}]
mit Bildchen im Anhang. Wie sieht Ihre Lösung für das Morsepotential aus?
Gruss
Udo.
knoettnerCos.jpeg
Description: JPEG image
| Frühere | Chronologischer Index | Spätere | ||
| Vorherige | Thematischer Index | Nächste |
DMUG-Archiv, http://www.mathematica.ch/archiv.html