Total angular momentum about the origin at every time step.
Sums \(m\,\mathbf{r} \times \mathbf{v}\) over every body. Gravity between two bodies acts along the line joining them, so it exerts no net torque and the total angular momentum of an isolated system is constant. For a system that orbits counterclockwise in the x-y plane the vector points along +z.
Parameters
Name
Type
Description
Default
sim_data
DataFrame
The output of simulate_system(): a pandas or polars DataFrame with columns id, mass, x, y, z, vx, vy, vz and time, in SI units.
required
Returns
Name
Type
Description
DataFrame
The same kind of DataFrame it was given (pandas or polars), with one row per time step, sorted by time, and these columns: • time: time in seconds. • Lx, Ly, Lz: the components of the total angular momentum in kg m^2/s.
Raises
Name
Type
Description
TypeError
If sim_data is not a pandas or polars DataFrame with the columns simulate_system() produces.
See Also
conserved_quantities: energy, momentum and angular momentum with relative errors.
The total is \(\mathbf{L} = \sum_i m_i\,\mathbf{r}_i \times \mathbf{v}_i\), measured about the origin of the coordinates in sim_data. Its value depends on that origin. It is conserved in the simulation’s own frame and in the barycentric frame, but not in a frame centered on an accelerating body.