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

Commit

Permalink
Improved convergence of Fraggle by reducing minimum velocity used to …
Browse files Browse the repository at this point in the history
…compute available kinetic energy to below the escape velocity on each successive try
  • Loading branch information
daminton committed Feb 10, 2023
1 parent ae92f15 commit 6be045f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
}

vel_vectors = {"disruption_headon" : [np.array([ 0.00, 6.280005, 0.0]),
np.array([ 0.00, 4.28, 0.0])],
np.array([ 0.00, 3.28, 0.0])],
"disruption_off_axis" : [np.array([ 0.00, 6.280005, 0.0]),
np.array([ 0.05, 4.28, 0.0])],
np.array([ 0.05, 3.28, 0.0])],
"supercatastrophic_headon": [np.array([ 0.00, 6.28, 0.0]),
np.array([ 0.00, 4.28, 0.0])],
"supercatastrophic_off_axis": [np.array([ 0.00, 6.28, 0.0]),
Expand Down
2 changes: 1 addition & 1 deletion src/fraggle/fraggle_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
! Remove a constant amount of velocity from the bodies so we don't shift the center of mass and screw up the momentum
ke_avail = 0.0_DP
do i = fragments%nbody, 1, -1
ke_avail = ke_avail + 0.5_DP * fragments%mass(i) * max(fragments%vmag(i) - vesc,0.0_DP)**2
ke_avail = ke_avail + 0.5_DP * fragments%mass(i) * max(fragments%vmag(i) - vesc/try,0.0_DP)**2
end do

ke_remove = min(E_residual, ke_avail)
Expand Down

0 comments on commit 6be045f

Please sign in to comment.