-
Notifications
You must be signed in to change notification settings - Fork 0
/
relative.Rmd
166 lines (120 loc) · 5.51 KB
/
relative.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
title: "Relative motion"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
if(!require("r2d3")) { install.packages('r2d3', repos = "http://cran.us.r-project.org"); library("r2d3") }
```
***
We now use the approximate masses of the sun and earth system.
```{r}
m_sun <- 2.0e30
m_earth <- 6.0e24
df <- data.frame(m = c(m_sun, m_earth), x = c(100, 150), y = c(120, 50))
```
Whoops, the earth disappears!
```{r echo=FALSE, fig.height=2, out.width="50%"}
r2d3(script="../scripts/rcog.js", data=df, options=list(relative = "true", masses = "true"))
```
The sizes on the figure correspond to the masses, not the dimensions; we are treating these as point particles with no internal structure. This is just to say that the sun is massively more... massive than the earth, so we want to see how that works out for the physics of their motion.
Lets take a moment to review our previous results. We had a state vector of 12 quantities, $S = [{\bf r}_0, {\bf r}_1, {\bf \dot{r}}_0, {\bf \dot{r}}_1]$, and a system of two differential equations describing the motion of the bodies:
$$
\begin{align}
\ddot{\bf r}_0 &= -G m_1 \frac{{\bf r}_0 - {\bf r}_1}{r^3} \\
\ddot{\bf r}_1 &= -G m_0 \frac{{\bf r}_1 - {\bf r}_0}{r^3} \\
\end{align}
$$
Note the signs chosen to show the similar form of the equations.
Now taking ${\bf r}$ as the position of the earth, $m_1$ around the sun, $m_0$, we have equations for its position, velocity, and acceleration:
$$
{\bf r} = {\bf r}_1 - {\bf r}_0 \\
\dot{\bf r} = \dot{\bf r}_1 - \dot{\bf r}_0 \\
\ddot{\bf r} = \ddot{\bf r}_1 - \ddot{\bf r}_0
$$
Substituting the accelerations derived from Newton's [law of gravitation](https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation), we develop the equations of motion.
$$
\begin{align}
\ddot{\bf r} &= \ddot{\bf r}_1 - \ddot{\bf r}_0 \\
\ddot{\bf r} &= -G m_0 \frac{\bf r}{r^3} - G m_1 \frac{\bf r}{r^3} \\
\ddot{\bf r} &= -G(m_0 + m_1) \frac{\bf r}{r^3}
\end{align}
$$
we now have a single equation, with only six quantities in the state vector, $S = [{\bf r}, {\bf \dot{r}}]$.
## Scalar form
Writing the *standard gravitational parameter*, $\mu = G(m_0 + m_1)$,
$$
\ddot{\bf r} = -\mu \frac{\bf r}{r^3} = -\mu \frac{\hat{\bf r}}{r^2}
$$
So the acceleration is along the path between the two and decreases as the square of the distance. The equations are proportional to some negative constant, signalling an attractive force relating to a characteristic mass.
We want to recast this vector equation into some scalar form and see if we can tease out some of the properties of the motion.
We cross both sides of the equation by the *specific angular momentum*, ${\bf h}$. Note that this differs from ${\bf l}$ by a factor of the mass.
$$
\begin{align}
{\bf l} &= {\bf r} \times {\bf p} \\
{\bf h} &= {\bf r} \times \dot{\bf r} = \frac{\bf l}{m}
\end{align}
$$
$$
\begin{align}
\ddot{\bf r} \times {\bf h} &= -\left(\frac{\mu}{r^3}\right) {\bf r} \times {\bf h} \\
\frac{\mathrm{d}}{\mathrm{d} t}(\dot{\bf r} \times {\bf h}) - \dot{\bf r} \times \dot{\bf h} &= -\left(\frac{\mu}{r^3}\right) {\bf r} \times {\bf h} \\
\frac{\mathrm{d}}{\mathrm{d} t}(\dot{\bf r} \times {\bf h}) &= \mu \frac{\mathrm{d}}{\mathrm{d} t} \frac{\bf r}{r} \\
\frac{\mathrm{d}}{\mathrm{d} t}\left(\dot{\bf r} \times {\bf h} - \mu \frac{\bf r}{r} \right) &= {\bf 0}
\end{align}
$$
Where we have cancelled the term $\dot{\bf r} \times \dot{\bf h}$ since the angular momentum is constant.
Integrating, we get
$$
\dot{\bf r} \times {\bf h} - \mu \frac{\bf r}{r} = \mu {\bf e}
$$
where the eccentricity vector, ${\bf e}$, is a constant vector along the *apse line*, the line between the farthest and nearest points of the orbit. Rearranging:
$$
\frac{\bf r}{r} + {\bf e} = \frac{\dot{\bf r} \times {\bf h}}{\mu}
$$
Now taking the dot product with ${\bf r}$:
$$
\begin{align}
\frac{\bf r}{r} + {\bf e} &= \frac{\dot{\bf r} \times {\bf h}}{\mu} \\
\frac{\bf r}{r} \cdot {\bf r} &= \left( \frac{\dot{\bf r} \times {\bf h}}{\mu} - {\bf e} \right) \cdot {\bf r} \\
r &= \frac{{\bf r} \cdot \left( \dot{\bf r} \times {\bf h}\right)}{\mu} - {\bf r} \cdot {\bf e}
\end{align}
$$
Introducing the *true anomaly*, $\nu$,
$$
\nu = \arccos \frac{{\bf e}\cdot{\bf r}}{er}
$$
we find the *orbit equation*.
$$
r = \frac{h^2}{\mu}\frac{1}{1 + e cos(\nu)}
$$
So here we have an equation for the radius of the motion with respect to one of the foci, and the angle from the major axis.
## Planets
Let's try to [ballpark][1] something more familiar. Using the relevant masses, eccentricities, and orbital periods, we can estimate the other parameters for Earth and Pluto.
```{r}
E_earth <- -1.5501749e36 # kg m / s^2
l_earth <- 1.1e39 # kg m^2 / s
m_earth <- 5.972e24 # kg
G <- 6.67e-11 # N m^2 / kg^2
m_sun <- 1.99e30 # kg
earth_df <- data.frame(E = E_earth, l = l_earth, m = m_earth, G = G, M = m_sun)
```
```{r echo=FALSE, fig.height=2, out.width="50%"}
r2d3(script="../scripts/ellipse.js", data=earth_df, options=list(orbit = "true"))
```
```{r}
E_pluto <- -1.2405e32 # kg m / s^2
l_pluto <- 1.2140e37 # kg m^2 / s
m_pluto <- 1.303e22 # kg
G <- 6.67e-11 # N m^2 / kg^2
m_sun <- 1.99e30 # kg
pluto_df <- data.frame(E = E_pluto, l = l_pluto, m = m_pluto, G = G, M = m_sun)
```
```{r echo=FALSE, fig.height=2, out.width="50%"}
r2d3(script="../scripts/ellipse.js", data=pluto_df, options=list(orbit = "true"))
```
***
[<- Center of Gravity](./center.html)
[1]: https://observablehq.com/@je-miralles/orbits
***
[Orbits!](../index.html) | [code](https://github.com/je-miralles/orbits/blob/main/rmd_sources/physics/relative.Rmd)