|
| 1 | +--- |
| 2 | +number-depth: 2 |
| 3 | +--- |
| 4 | + |
| 5 | +# Orbits in Circular Three Body Dynamics |
| 6 | + |
| 7 | +*Orbits in e.g. the Earth-Moon system.* |
| 8 | + |
| 9 | +```{julia} |
| 10 | +using LinearAlgebra |
| 11 | +using AstrodynamicalCalculations |
| 12 | +``` |
| 13 | + |
| 14 | +## Coordinate Conversions |
| 15 | + |
| 16 | +The Circular Restricted Three Body (CR3B) Problem describes a massless spacecraft experiencing gravitational forces due to *two* point masses which orbit their common center of mass. |
| 17 | +There's a good bit there, so let's unpack that statement further. |
| 18 | +Consider the Earth and its moon. |
| 19 | +The Earth and the Moon both orbit the Sun, but if we neglect the Sun and watch the positions of the Earth and the Moon with respect to their common center of mass (in a rotating reference frame where the $\hat{x}$ axis points from the Earth to the Moon) then both the Earth and the Moon appear to move along *circular* orbits. |
| 20 | + |
| 21 | +When we analyze orbits within this problem, we typically use non-dimensional units: we scale all distance units by the distance $a$ between the two massive bodies, and we scale all time distances by the following function of $a$ and each body's mass parameter: $2\pi \sqrt{\frac{a^3}{\mu_1 + \mu_2}}$. |
| 22 | + |
| 23 | +```{julia} |
| 24 | +a = 1e5 # TODO replace with real value |
| 25 | +μ₁ = 1e5 # TODO replace with real value |
| 26 | +μ₂ = 14 # TODO replace with real value |
| 27 | +``` |
| 28 | + |
| 29 | +Both of these scalings are provided by the `distance_scaling` and `time_scaling` functions. |
| 30 | +The `velocity_scaling` is simply the result of the `distance_scaling` divided by the `time_scaling`. |
| 31 | + |
| 32 | +```{julia} |
| 33 | +L = distance_scaling(a, μ₁, μ₂) |
| 34 | +``` |
| 35 | + |
| 36 | +```{julia} |
| 37 | +T = time_scaling(a, μ₁, μ₂) |
| 38 | +``` |
| 39 | + |
| 40 | +```{julia} |
| 41 | +V = velocity_scaling(a, μ₁, μ₂) |
| 42 | +``` |
| 43 | + |
| 44 | +These scalings are applied to Cartesian state vectors in CR3B dynamics. |
| 45 | + |
| 46 | +```{julia} |
| 47 | +c = (; x = 1e6, y = -1e2, z = 3e3, ẋ = 1e2, ẏ = -1e3, ż = 0.0) |
| 48 | +t = 1e9 |
| 49 | +
|
| 50 | +c = nondimensional(c..., t, a, μ₁, μ₂) |
| 51 | +``` |
| 52 | + |
| 53 | +::: {.callout-important appearance="simple"} |
| 54 | +All CR3B calculations are performed using **nondimensional** units in the Synodic (rotating) reference frame! |
| 55 | +::: |
| 56 | + |
| 57 | +Given a particular Synodic (rotating reference frame) position $\overrightarrow{x}$, we can also compute the corresponding distance to the primary and secondary bodies using `distance_to_primary` and `distance_to_secondary` respectively. |
| 58 | + |
| 59 | +```{julia} |
| 60 | +r = norm((c.x, c.y, c.z)) |
| 61 | +``` |
| 62 | + |
| 63 | +```{julia} |
| 64 | +r₁ = distance_to_primary(r, c.μ) |
| 65 | +``` |
| 66 | + |
| 67 | +```{julia} |
| 68 | +r₂ = distance_to_secondary(r, c.μ) |
| 69 | +``` |
| 70 | + |
| 71 | +As mentioned above, all calculations are performed in the Synodic (rotating) reference frame. |
| 72 | +We can convert nondimensional Cartesian coordinates expressed in the Synodic frame to the barycentric inertial frame (an inertial frame centered at the center of mass of the system) using the `synodic_to_inertial` function with two additional pieces of information: the time $t$ since the coordinate frame epoch and the angular speed of the massive bodies $\omega$. |
| 73 | + |
| 74 | +```{julia} |
| 75 | +let t = 0.1, ω = 1.0 |
| 76 | + synodic_to_inertial(c.x, c.y, c.z, t, ω) |
| 77 | +end |
| 78 | +``` |
| 79 | + |
| 80 | +## Energy Calculations |
| 81 | + |
| 82 | +As always, we can compute the potential energy of the orbit using the `potential_energy` function. |
| 83 | + |
| 84 | +```{julia} |
| 85 | +P = potential_energy(c.x, c.y, c.z, c.μ) |
| 86 | +``` |
| 87 | + |
| 88 | +There is a second metric for measuring orbital energies in CR3B dynamics: the so-called Jacobi constant $C \triangleq 2 P - v^2$. |
| 89 | +We can use the `jacobi_constant` function to compute this value. |
| 90 | + |
| 91 | +```{julia} |
| 92 | +C = jacobi_constant(c.x, c.y, c.z, c.ẋ, c.ẏ, c.ż, c.μ) |
| 93 | +``` |
| 94 | + |
| 95 | +Every CR3B system has the potential for *contours* of zero-velocity dynamics: a spacecraft in the system may never cross such lines in state space. |
| 96 | +The `zero_velocity_curves` function computes these contours as collections of $(x,y)$ lines. |
| 97 | + |
| 98 | +## Lagrange Points |
| 99 | + |
| 100 | +As is the case for all nonlinear dynamical systems, there are special positions in state space where the induced accelerations are null. |
| 101 | +In CR3B dynamics, these points are known as Lagrange points. |
| 102 | +In theory, a spacecraft placed at one of these points will stay there for all time. |
| 103 | +In practice, of course, no system perfectly satisfies the assumptions set by the CR3B definition. |
| 104 | +Still, these points *are* practically useful, as demonstrated by e.g. the James Webb Space Telescope's orbit about an Earth-Moon Lagrange point. |
| 105 | + |
| 106 | +There are $5$ Lagrange points for every CR3B system: three along the $x$ axis, and two offset points which are mirrored across the $x$ axis. |
| 107 | +The positions for each of these points can be found using the `lagrange_point` function, given the nondimensional mass parameter $\mu$ for the CR3B system. |
| 108 | + |
| 109 | +```{julia} |
| 110 | +let L = 1:5 |
| 111 | + L .=> lagrange_point.(c.μ, L) |
| 112 | +end |
| 113 | +``` |
| 114 | + |
| 115 | +## Approximate Periodic Orbits |
| 116 | + |
| 117 | +There exist periodic orbits about Lagrange points in CR3B dynamics. |
| 118 | +Periodic orbits in three dimensions (extra-planar orbits) are known as *halo* orbits. |
| 119 | +Periodic orbits in two dimensions (planar orbits) are known as *Lyapunov* orbits. |
| 120 | +These orbits can only be found using (quite sensitive) numerical methods: these capabilities are provided by `AstrodynamicalSolvers.jl`, and are described in the package [documentation](https://JuliaAstro.org/GeneralAstrodynamics/lib/AstrodynamicalSolvers). |
| 121 | +Approximations for periodic initial conditions are available analytically, and this is provided in `AstrodynamicalCalculations` through the `richardson_ic` function. |
| 122 | + |
| 123 | +```{julia} |
| 124 | +let L = 2, Z = 1e-3 |
| 125 | + ic = richardson_ic(c.μ, L; Z = Z) |
| 126 | +end |
| 127 | +``` |
0 commit comments