From 91df16f2b135bffa9c607bc133a65c8c99cf9c60 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 7 Feb 2023 11:24:56 -0500 Subject: [PATCH] Fixed bugs in the velocity guess values --- src/fraggle/fraggle_generate.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fraggle/fraggle_generate.f90 b/src/fraggle/fraggle_generate.f90 index 9d3dac19c..c91676621 100644 --- a/src/fraggle/fraggle_generate.f90 +++ b/src/fraggle/fraggle_generate.f90 @@ -60,7 +60,6 @@ module subroutine fraggle_generate(self, nbody_system, param, t) call self%disrupt(nbody_system, param, t, lfailure) if (lfailure) then call swiftest_io_log_one_message(COLLISION_LOG_OUT, "Fraggle failed to find an energy-losing solution. Simplifying the collisional model.") - impactors%mass_dist(1) = impactors%mass(1) impactors%mass_dist(2) = max(0.5_DP * impactors%mass(2), self%min_mfrag) impactors%mass_dist(3) = impactors%mass(2) - impactors%mass_dist(2) @@ -496,7 +495,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu real(DP), dimension(collider%fragments%nbody) :: vscale real(DP), parameter :: L_ROT_VEL_RATIO = 0.2_DP ! Ratio of angular momentum to put into rotation relative to velocity shear of fragments ! For the initial "guess" of fragment velocities, this is the minimum and maximum velocity relative to escape velocity that the fragments will have - real(DP) :: vmin_guess = 1.01_DP + real(DP) :: vmin_guess real(DP) :: vmax_guess real(DP) :: delta_v, GC integer(I4B), parameter :: MAXINNER = 100 @@ -539,6 +538,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu vimp = .mag. (impactors%vc(:,2) - impactors%vc(:,1)) vmax_guess = 1.1_DP * vimp + vmin_guess = 1.001_DP * vesc E_residual_best = huge(1.0_DP) lfailure = .false. @@ -682,7 +682,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu collider_local%fail_scale = collider_local%fail_scale * 1.001_DP ! Bring the minimum and maximum velocities closer together - delta_v = 0.125_DP * (vmax_guess - vmin_guess) + delta_v = (vmax_guess - vmin_guess) / 16.0_DP vmin_guess = vmin_guess + delta_v vmax_guess = vmax_guess - delta_v end do outer