Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed bug caused by accidentally removing the line that updates the r…
Browse files Browse the repository at this point in the history
…otation of the central body after a collision
  • Loading branch information
daminton committed Jan 20, 2023
1 parent 95a88e9 commit fcf4d60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ subroutine symba_discard_conserve_energy_and_momentum(pl, nbody_system, param, i
! Update rotation of central body to by consistent with its angular momentum
if (param%lrotation) then
drot0(:) = cb%L0(:)/ (cb%Ip(3) * cb%mass * cb%radius**2)
drot1(:) = cb%dL(:) / (cb%Ip(3) * cb%mass * cb%radius**2)
drot1(:) = cb%dL(:) / (cb%Ip(3) * cb%mass * cb%radius**2)
cb%rot(:) = drot0(:) + drot1(:)
ke_spin = ke_spin - 0.5_DP * cb%mass * cb%radius**2 * cb%Ip(3) * dot_product(cb%rot(:), cb%rot(:))
end if
cb%rb(:) = xcom(:)
Expand Down

0 comments on commit fcf4d60

Please sign in to comment.