From 8cb1433777c5211171eb8a53710cde3f580e4e9a Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 27 Sep 2021 14:53:46 -0400 Subject: [PATCH] Repaired RMVS 1pl 1tp test case inputs --- .../1pl_1tp_encounter/cb.swiftest.in | Bin 80 -> 216 bytes .../1pl_1tp_encounter/init_cond.py | 24 +++++++++++++----- .../1pl_1tp_encounter/param.swiftest.in | 6 ++--- .../1pl_1tp_encounter/pl.swifter.in | 4 +-- .../1pl_1tp_encounter/pl.swiftest.in | Bin 176 -> 312 bytes .../1pl_1tp_encounter/tp.swifter.in | 2 +- .../1pl_1tp_encounter/tp.swiftest.in | Bin 128 -> 264 bytes 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/cb.swiftest.in b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/cb.swiftest.in index 96c7f920c5e7fef09dc566576eaaa5d9558f556a..572e1c58a05bd4ea69ce5101029cf4ebf8222b45 100644 GIT binary patch literal 216 zcmd;JKmZOPvjK>Mfw&Zi^MF`k0B{4)PLNxSGB&*7-s|iDVuSEq{{ud8JjM1f{sS)_ Vd)J0uI~aedPL#9yVv~I!J^%^n6Dt4! delta 20 Tcmcb?7{JTHfB+m5r#b@w8$<%I diff --git a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/init_cond.py b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/init_cond.py index f17e000fa..34072613e 100755 --- a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/init_cond.py +++ b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/init_cond.py @@ -18,7 +18,7 @@ swiftest_pl = "pl.swiftest.in" swiftest_tp = "tp.swiftest.in" swiftest_cb = "cb.swiftest.in" -swiftest_bin = "bin.swiftest.dat" +swiftest_bin = "bin.swiftest.nc" swiftest_enc = "enc.swiftest.dat" MU2KG = swiftest.MSun @@ -39,8 +39,8 @@ rmax = 1000.0 npl = 1 -plid = 2 -tpid = 100 +plid = 1 +tpid = 2 radius = np.double(4.25875607065041e-05) Gmass = np.double(0.00012002693582795244940133) @@ -60,7 +60,7 @@ #Make Swifter files plfile = open(swifter_pl, 'w') print(npl+1, f'! Planet input file generated using init_cond.py',file=plfile) -print(1,GMSun,file=plfile) +print(0,GMSun,file=plfile) print('0.0 0.0 0.0',file=plfile) print('0.0 0.0 0.0',file=plfile) print(plid,"{:.23g}".format(Gmass),rhill, file=plfile) @@ -106,9 +106,19 @@ sys.stdout = sys.__stdout__ #Now make Swiftest files +NAMELEN = 32 +cbname = "Sun" +plname = "Planet" +tpname = "TestParticle" + +cbname = cbname.ljust(NAMELEN) +plname = plname.ljust(NAMELEN) +tpname = tpname.ljust(NAMELEN) + cbfile = FortranFile(swiftest_cb, 'w') Msun = np.double(1.0) cbfile.write_record(0) +cbfile.write_record(cbname) cbfile.write_record(np.double(GMSun)) cbfile.write_record(np.double(rmin)) cbfile.write_record(np.double(swiftest.J2Sun)) @@ -119,6 +129,7 @@ plfile.write_record(npl) plfile.write_record(plid) +plfile.write_record(plname) plfile.write_record(p_pl[0]) plfile.write_record(p_pl[1]) plfile.write_record(p_pl[2]) @@ -133,6 +144,7 @@ ntp = 1 tpfile.write_record(ntp) tpfile.write_record(tpid) +tpfile.write_record(tpname) tpfile.write_record(p_tp[0]) tpfile.write_record(p_tp[1]) tpfile.write_record(p_tp[2]) @@ -154,8 +166,8 @@ print(f'ISTEP_OUT {iout:d}') print(f'ISTEP_DUMP {iout:d}') print(f'BIN_OUT {swiftest_bin}') -print(f'OUT_TYPE REAL8') -print(f'OUT_FORM XV') +print(f'OUT_TYPE NETCDF_DOUBLE') +print(f'OUT_FORM XVEL') print(f'OUT_STAT REPLACE') print(f'RHILL_PRESENT yes') print(f'CHK_CLOSE yes') diff --git a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/param.swiftest.in b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/param.swiftest.in index d9c20a3be..d81a1d316 100644 --- a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/param.swiftest.in +++ b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/param.swiftest.in @@ -8,9 +8,9 @@ TP_IN tp.swiftest.in IN_TYPE REAL8 ISTEP_OUT 1 ISTEP_DUMP 1 -BIN_OUT bin.swiftest.dat -OUT_TYPE REAL8 -OUT_FORM XV +BIN_OUT bin.swiftest.nc +OUT_TYPE NETCDF_DOUBLE +OUT_FORM XVEL OUT_STAT REPLACE RHILL_PRESENT yes CHK_CLOSE yes diff --git a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swifter.in b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swifter.in index 17d461561..fb6b10800 100644 --- a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swifter.in +++ b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swifter.in @@ -1,8 +1,8 @@ 2 ! Planet input file generated using init_cond.py -1 39.476926408897625196 +0 39.476926408897625196 0.0 0.0 0.0 0.0 0.0 0.0 -2 0.00012002693582795244940133 0.010044724833237892 +1 0.00012002693582795244940133 0.010044724833237892 4.25875607065041e-05 1.0 0.0 0.0 0.0 6.283185307179586 0.0 diff --git a/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swiftest.in b/examples/rmvs_swifter_comparison/1pl_1tp_encounter/pl.swiftest.in index c94c6ae61581655ba2acb43d632ec99b4c8d1cc3..15fcca632273f5b8ad2e0a8f29d44b1a7ebc5675 100644 GIT binary patch literal 312 zcmd;JU|?VbVi4efVq|^;P%Hq5bAUJzi1UCr6^KiKSbL-^1c(EGI1z}8p!`fAoeab|Knzl+KxNzj jG!Nu9&6xf}Uo}41!`ulJ0s~_Cjke3hc$p*}u&D