From b6e61d353e9cae167c606ff35574394317de8e2c Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sat, 20 May 2023 07:12:15 -0400 Subject: [PATCH] Fixed bug in example problem where escape velocity was miscalculated when setting test particle initial conditions --- .../rmvs_swifter_comparison/8pl_16tp_encounters/init_cond.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rmvs_swifter_comparison/8pl_16tp_encounters/init_cond.py b/examples/rmvs_swifter_comparison/8pl_16tp_encounters/init_cond.py index d59c068d6..725c123b1 100755 --- a/examples/rmvs_swifter_comparison/8pl_16tp_encounters/init_cond.py +++ b/examples/rmvs_swifter_comparison/8pl_16tp_encounters/init_cond.py @@ -17,7 +17,7 @@ for i,n in enumerate(pl.name): pli = pl.sel(name=n) rstart = 2 * pli['radius'].data[0] # Start the test particles at a multiple of the planet radius away - vstart = 1.5 * np.sqrt(2 * pli['Gmass'].data[0]) / rstart # Start the test particle velocities at a multiple of the escape speed + vstart = 1.5 * np.sqrt(2 * pli['Gmass'].data[0] / rstart) # Start the test particle velocities at a multiple of the escape speed rstart_vec = np.array([rstart / np.sqrt(2.0), rstart / np.sqrt(2.0), 0.0]) vstart_vec = np.array([vstart, 0.0, 0.0]) rp = pli['rh'].data[0]