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

Commit

Permalink
symba_frag_pos set Escale to be ke_family and adjust all scale factors
Browse files Browse the repository at this point in the history
  • Loading branch information
cwishard committed Jun 1, 2021
1 parent 58d65af commit e3d1cfb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/symba/symba_frag_pos.f90
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ subroutine set_scale_factors()
! Set scale factors
mscale = mtot !! Because of the implied G, mass is actually G*mass with units of distance**3 / time**2
rscale = sum(radius(:))
vscale = sqrt(mscale / rscale)
Escale = ke_family !mscale * vscale**2
vscale = sqrt(2 * Escale / mscale) !sqrt(mscale / rscale)
tscale = rscale / vscale
Lscale = mscale * rscale * vscale
Escale = mscale * vscale**2

xcom(:) = xcom(:) / rscale
vcom(:) = vcom(:) / vscale
Expand All @@ -173,7 +173,15 @@ subroutine set_scale_factors()

m_frag = m_frag / mscale
rad_frag = rad_frag / rscale
rot_frag = rot_frag * tscale
Qloss = Qloss / Escale
ke_family = ke_family / Escale
Etot_before = Etot_before / Escale
pe_before = pe_before / Escale
ke_spin_before = ke_spin_before / Escale
ke_orbit_before = ke_orbit_before / Escale
Ltot_before = Ltot_before / Lscale
Lmag_before = Lmag_before / Lscale

return
end subroutine set_scale_factors
Expand Down

0 comments on commit e3d1cfb

Please sign in to comment.