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

Commit

Permalink
Initialize central body bookkeeping terms and corrected missing G in …
Browse files Browse the repository at this point in the history
…pe calc
  • Loading branch information
daminton committed Aug 19, 2021
1 parent b80d682 commit 18b497e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,13 @@ module subroutine io_read_cb_in(self, param)

if (self%j2rp2 /= 0.0_DP) param%loblatecb = .true.
if (param%rmin < 0.0) param%rmin = self%radius

select type(cb => self)
class is (symba_cb)
cb%M0 = cb%mass
cb%R0 = cb%radius
cb%L0(:) = cb%Ip(3) * cb%mass * cb%radius**2 * cb%rot(:)
end select

return

Expand Down
2 changes: 1 addition & 1 deletion src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ subroutine symba_discard_conserve_mtm(pl, system, param, ipl, lescape_body)
system%Mescape = system%Mescape + pl%mass(ipl)
do i = 1, pl%nbody
if (i == ipl) cycle
pe = pe - pl%mass(i) * pl%mass(ipl) / norm2(pl%xb(:, ipl) - pl%xb(:, i))
pe = pe - pl%Gmass(i) * pl%mass(ipl) / norm2(pl%xb(:, ipl) - pl%xb(:, i))
end do

Ltot(:) = 0.0_DP
Expand Down

0 comments on commit 18b497e

Please sign in to comment.