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
Oriented the fragment ellipse to align with the distance vector instead of the velocity vector. This makes it look more natural
  • Loading branch information
daminton committed May 7, 2021
1 parent 87a54d9 commit 27248be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ subroutine symba_frag_pos_initialize_fragments(xcom, vcom, x, v, L_spin, mass, m
! We will initialize fragments on a planet defined by the pre-impact system, with the z-axis aligned with the angular momentum
! and the x-axis aligned with the impact velocity vector.
z_col_unit = Ltot(:) / norm2(Ltot(:))
x_col_unit(:) = delta_v(:) / v_col_norm
x_col_unit(:) = delta_r(:) / r_col_norm
! The cross product of the z- by x-axis will give us the y-axis
call util_crossproduct(z_col_unit, x_col_unit, y_col_unit)

Expand All @@ -216,7 +216,7 @@ subroutine symba_frag_pos_initialize_fragments(xcom, vcom, x, v, L_spin, mass, m
! The orientation and angular spacing of fragments on the ellipse
theta = (2 * PI) / nfrag
! Impirically determined phase angle that depends on the impact paarameter
phase_ang = 0.0_DP
phase_ang = PI
orientation = reshape([cos(phase_ang), sin(phase_ang), -sin(phase_ang), cos(phase_ang)], shape(orientation))

! Re-normalize position and velocity vectors by the fragment number so that for our initial guess we weight each
Expand Down

0 comments on commit 27248be

Please sign in to comment.