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

Commit

Permalink
Fixed bug in angular momentum conservation in mergers
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 17, 2023
1 parent 2defff3 commit 9683841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collision/collision_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module subroutine collision_generate_merge(self, nbody_system, param, t)
if (param%lrotation) then
do concurrent(i = 1:NDIM)
fragments%Ip(i,1) = sum(impactors%mass(:) * impactors%Ip(i,:))
L_spin_new(i) = sum(impactors%L_orbit(i,:) + impactors%L_orbit(i,:))
L_spin_new(i) = sum(impactors%L_orbit(i,:) + impactors%L_spin(i,:))
end do
fragments%Ip(:,1) = fragments%Ip(:,1) / fragments%mass(1)
fragments%rot(:,1) = L_spin_new(:) / (fragments%Ip(3,1) * fragments%mass(1) * fragments%radius(1)**2)
Expand Down

0 comments on commit 9683841

Please sign in to comment.