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
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
  • Loading branch information
daminton committed May 20, 2021
1 parent 1b6e81f commit 0a36937
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 0a36937

Please sign in to comment.