From fcf4d6057b67eb883eecc58eccca14873ab3a2ad Mon Sep 17 00:00:00 2001 From: David A Minton Date: Fri, 20 Jan 2023 08:37:44 -0500 Subject: [PATCH] Fixed bug caused by accidentally removing the line that updates the rotation of the central body after a collision --- src/symba/symba_discard.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index 05a5b45cf..5f55578ed 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -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(:)