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

Commit

Permalink
Reduced the fraction of angular momentum put into spin so that my fra…
Browse files Browse the repository at this point in the history
…gments aren't always right at the spin barrier
  • Loading branch information
daminton committed Jan 20, 2023
1 parent 4f374ed commit 16334a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fraggle/fraggle_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
integer(I4B), parameter :: MAXLOOP = 50
integer(I4B), parameter :: MAXTRY = 50
real(DP), parameter :: MAX_REDUCTION_RATIO = 0.1_DP ! Ratio of difference between first and second fragment mass to remove from the largest fragment in case of a failure
real(DP), parameter :: ROT_MAX_FRAC = 0.05_DP !! Fraction of difference between current rotation and maximum to add when angular momentum budget gets too high
real(DP), parameter :: ROT_MAX_FRAC = 0.01_DP !! Fraction of difference between current rotation and maximum to add when angular momentum budget gets too high
real(DP), parameter :: SUCCESS_METRIC = 1.0e-2_DP
class(collision_fraggle), allocatable :: collider_local
character(len=STRMAX) :: message
Expand Down Expand Up @@ -590,7 +590,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu
fragments%rotmag(i) = .mag.fragments%rot(:,i)
else ! We would break the spin barrier here. Put less into spin and more into velocity shear.
drotmag = collider_local%max_rot - fragments%rotmag(i)
drot(:) = ROT_MAX_FRAC * drotmag * L_residual_unit(:) ! Put a fraction of the difference between the spin barrier and the current spin into the new rotation
drot(:) = -ROT_MAX_FRAC * drotmag * L_residual_unit(:) ! Put a fraction of the difference between the spin barrier and the current spin into the new rotation
fragments%rot(:,i) = fragments%rot(:,i) + drot(:)
dL(:) = -L_residual(:) * fragments%mass(i) / mfrag + drot(:) * fragments%Ip(3,i) * fragments%mass(i) * fragments%radius(i)**2
call fraggle_generate_velocity_torque(dL, fragments%mass(i), fragments%rc(:,i), fragments%vc(:,i))
Expand Down

0 comments on commit 16334a9

Please sign in to comment.