From 0a3693707fa57d29db57bded3df36373182c3b21 Mon Sep 17 00:00:00 2001 From: David Minton Date: Thu, 20 May 2021 11:27:55 -0400 Subject: [PATCH] Added additional alteration for when initializing fragments fails. If the problem is due to the L constraint leading to too much KE, increase the initial fragment distance to reduce the tangential velocity --- src/symba/symba_frag_pos.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/symba/symba_frag_pos.f90 b/src/symba/symba_frag_pos.f90 index 2f3ccafa3..93fe11f08 100644 --- a/src/symba/symba_frag_pos.f90 +++ b/src/symba/symba_frag_pos.f90 @@ -134,6 +134,7 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi integer(I4B) :: nseed 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. if (nfrag < NFRAG_MIN) then @@ -526,7 +527,7 @@ subroutine set_fragment_position_vectors() ! Place the fragments into a region that is big enough that we should usually not have overlapping bodies ! An overlapping bodies will collide in the next time step, so it's not a major problem if they do (it just slows the run down) - r_max = 1.0_DP + r_max = r_max_start ! We will treat the first fragment of the list as a special case. It gets initialized the maximum distance along the original impactor distance vector. ! This is done because in a regular disruption, the first body is the largest fragment. @@ -768,6 +769,7 @@ subroutine restructure_failed_fragments() else iflip = 1 end if + if (ke_offset > 0.0_DP) r_max_start = r_max_start + 1.0_DP ! The larger lever arm can help if the problem is in the angular momentum step end subroutine restructure_failed_fragments