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

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed distance scaling to mutual radii rather than initial distance to try to get it to be more consistent with different values of DT
  • Loading branch information
daminton committed May 25, 2021
1 parent 273aacf commit 0b0b39d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi
integer(I4B) :: try, ntry
integer(I4B), parameter :: NFRAG_MIN = 6 !! The minimum allowable number of fragments (set to 6 because that's how many unknowns are needed in the tangential velocity calculation)
real(DP) :: r_max_start = 1.0_DP
logical, save :: lfirst = .true.
real(DP), parameter :: Ltol = 2 * epsilon(1.0_DP)
real(DP), parameter :: Etol = 1e-8_DP
integer(I4B), parameter :: MAXTRY = 1000
integer(I4B) :: iflip = 1

if (nfrag < NFRAG_MIN) then
write(*,*) "symba_frag_pos needs at least ",NFRAG_MIN," fragments, but only ",nfrag," were given."
Expand Down Expand Up @@ -272,7 +272,7 @@ subroutine set_scale_factors()

! Set scale factors
mscale = mtot !! Because of the implied G, mass is actually G*mass with units of distance**3 / time**2
rscale = norm2(x(:,2) - x(:,1))
rscale = sum(radius(:))
vscale = sqrt(mscale / rscale)
tscale = rscale / vscale
Lscale = mscale * rscale * vscale
Expand Down Expand Up @@ -778,7 +778,6 @@ subroutine restructure_failed_fragments()
!! it is called.
implicit none
integer(I4B) :: i
integer(I4B), save :: iflip = 1

if (ke_offset < 0.0_DP) then
if (iflip == 1) then
Expand Down

0 comments on commit 0b0b39d

Please sign in to comment.