diff --git a/examples/MHDTests/FastRotor/1DprofilerReference/1Dprofiles.py b/examples/MHDTests/FastRotor/1DprofilerReference/1Dprofiles.py new file mode 100644 index 0000000000000000000000000000000000000000..39c18e84987687fff7ef1305ab9cd09c975ff425 --- /dev/null +++ b/examples/MHDTests/FastRotor/1DprofilerReference/1Dprofiles.py @@ -0,0 +1,198 @@ +# Profiler compares rho, B, Berr from snapshots with Philip F. Hopkins, Matthias J. Raives https://arxiv.org/abs/1505.02783 + +import numpy as np +import h5py +import argparse +import unyt +import matplotlib.pyplot as plt + +from swiftsimio import load +from swiftsimio.visualisation.slice import slice_gas + +# load reference +with_reference = True + +# Load digitalized data, figure 16 from the paper +folder = "FastRotor_GIZMO_MFM_t=0.15_y=0.5" +if with_reference: + import pandas as pd + + rho_vs_x_data = pd.read_csv("./" + folder + "/rho_vs_x.csv", header=0).to_numpy() + Bx_vs_x_data = pd.read_csv("./" + folder + "/Bx_vs_x.csv", header=0).to_numpy() + By_vs_x_data = pd.read_csv("./" + folder + "/By_vs_x.csv", header=0).to_numpy() + Berr_vs_x_data = pd.read_csv("./" + folder + "/Berr_vs_x.csv", header=0).to_numpy() + +# Parse command line arguments +argparser = argparse.ArgumentParser() +argparser.add_argument("input") +argparser.add_argument("output") +args = argparser.parse_args() + +# Where we want to slice the slice +y0 = 0.5 + +# Load snapshot +filename = args.input +data = load(filename) + +# Retrieve some information about the simulation run +artDiffusion = data.metadata.hydro_scheme["Artificial Diffusion Constant"] +dedHyp = data.metadata.hydro_scheme["Dedner Hyperbolic Constant"] +dedHypDivv = data.metadata.hydro_scheme["Dedner Hyperbolic div(v) Constant"] +dedPar = data.metadata.hydro_scheme["Dedner Parabolic Constant"] +eta = data.metadata.hydro_scheme["Resistive Eta"] +git = data.metadata.code["Git Revision"] +gitBranch = data.metadata.code["Git Branch"] +hydroScheme = data.metadata.hydro_scheme["Scheme"] +kernel = data.metadata.hydro_scheme["Kernel function"] +neighbours = data.metadata.hydro_scheme["Kernel target N_ngb"] +n_gas = data.metadata.n_gas + +# Retrieve particle attributes of interest +rho = data.gas.densities + +P = data.gas.pressures + +B = data.gas.magnetic_flux_densities + +Bx, By = B[:, 0], B[:, 1] + +normB = np.sqrt(B[:, 0] ** 2 + B[:, 1] ** 2 + B[:, 2] ** 2) + +divB = data.gas.magnetic_divergences + +h = data.gas.smoothing_lengths + +errB = np.log10(h * abs(divB) / normB) + +# Generate mass weighted maps of quantities of interest +data.gas.mass_weighted_densities = data.gas.masses * rho + +data.gas.mass_weighted_pressures = data.gas.masses * P + +data.gas.mass_weighted_Bx = data.gas.masses * Bx + +data.gas.mass_weighted_By = data.gas.masses * By + +data.gas.mass_weighted_errB = data.gas.masses * errB + +common_arguments = dict( + data=data, z_slice=0.5 * data.metadata.boxsize[2], resolution=512, parallel=True +) + +mass_map = slice_gas(**common_arguments, project="masses") + +mass_weighted_density_map = slice_gas( + **common_arguments, project="mass_weighted_densities" +) + +mass_weighted_pressure_map = slice_gas( + **common_arguments, project="mass_weighted_pressures" +) + +mass_weighted_Bx_map = slice_gas(**common_arguments, project="mass_weighted_Bx") + +mass_weighted_By_map = slice_gas(**common_arguments, project="mass_weighted_By") + +mass_weighted_errB_map = slice_gas(**common_arguments, project="mass_weighted_errB") + +# Take out mass dependence +density_map = mass_weighted_density_map / mass_map +pressure_map = mass_weighted_pressure_map / mass_map +Bx_map = mass_weighted_Bx_map / mass_map +By_map = mass_weighted_By_map / mass_map +errB_map = mass_weighted_errB_map / mass_map + +map_pixel_length = len(mass_map) + +x = np.linspace(0.0, 1.0, map_pixel_length) +slice_ind = int(np.floor(y0 * map_pixel_length)) + +# Plot maps +plt.rcParams.update({"font.size": 16}) + +fig, axs = plt.subplots(5, 1, figsize=((2 * 4, 4 * 4)), sharex=True) +fig.subplots_adjust(hspace=0.1) + +axs[0].plot(x, density_map[:, slice_ind], "k-", color="black") +axs[0].set_yticks(np.arange(2.0, 14.0, 2.0)) +axs[0].set_ylabel(r"$\rho(x,y_0)$ $[g/cm^3]$") +axs[0].set_ylim(0.0, 13.0) + +axs[1].plot(x, Bx_map[:, slice_ind], "k-", color="black") +axs[1].set_yticks(np.arange(0.0, 2.0, 0.5)) +axs[1].set_ylabel(r"$B_x(x,y_0)$ $[g*s^{-2}*A^{-1}]$") +axs[1].set_ylim(-0.4, 1.6) + +axs[2].plot(x, By_map[:, slice_ind], "k-", color="black", label="SWIFT") +axs[2].set_yticks(np.arange(-1.0, 1.5, 0.5)) +axs[2].set_ylabel(r"$B_y(x,y_0)$ $[g*s^{-2}*A^{-1}]$") +axs[2].set_ylim(-1.2, 1.4) + +axs[3].plot(x, errB_map[:, slice_ind], "k-", color="black", label="SWIFT") +axs[3].set_yticks(np.arange(-6.0, 1.0, 1.0)) +axs[3].set_xlabel(r"$x$") +axs[3].set_ylabel(r"$\mathrm{log}_{10} \left( h \quad \nabla \cdot B / |B| \right)$") +axs[3].set_ylim(-6.5, 0.5) + +if with_reference: + axs[0].plot( + rho_vs_x_data[:, 0], rho_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[1].plot( + Bx_vs_x_data[:, 0], Bx_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[2].plot( + By_vs_x_data[:, 0], By_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[3].plot( + Berr_vs_x_data[:, 0], Berr_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + +axs[2].legend() + +# Add panel with infromation about the run +text_common_args = dict( + fontsize=10, ha="center", va="center", transform=axs[4].transAxes +) + +axs[4].text( + 0.5, + 0.8, + "Fast Rotor at $t=%.2f$, $y_0 = %.4f$" % (data.metadata.time, y0), + **text_common_args, +) +axs[4].text(0.5, 0.7, "SWIFT %s" % git.decode("utf-8"), **text_common_args) +axs[4].text(0.5, 0.6, "Branch %s" % gitBranch.decode("utf-8"), **text_common_args) +axs[4].text(0.5, 0.5, hydroScheme.decode("utf-8"), **text_common_args) +axs[4].text( + 0.5, + 0.4, + kernel.decode("utf-8") + " with $%.2f$ neighbours" % (neighbours), + **text_common_args, +) +axs[4].text( + 0.5, 0.3, "Artificial diffusion: $%.2f$ " % (artDiffusion), **text_common_args +) +axs[4].text( + 0.5, + 0.2, + "Dedner Hyp, Hyp_div(v), Par: $%.2f,%.2f,%.2f$ " % (dedHyp, dedHypDivv, dedPar), + **text_common_args, +) +axs[4].text( + 0.5, 0.1, r"Physical resistivity: $\eta$: $%.2f$ " % (eta), **text_common_args +) +axs[4].text( + 0.5, 0.0, r"Number of particles: $N_p$: $%.0f$ " % (n_gas), **text_common_args +) + +axs[4].axis("off") + + +for ax in axs: + ax.minorticks_on() + ax.grid() + +fig.tight_layout() +plt.savefig(args.output) diff --git a/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Berr_vs_x.csv b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Berr_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..d20fd629fa3bc784623fc14bd8a91ebe7e66bf9d --- /dev/null +++ b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Berr_vs_x.csv @@ -0,0 +1,173 @@ +x [cm],Log10 (divB * h / B) +0.0646525679758308,-6.18260869565217 +0.0670694864048338,-5.43478260869565 +0.0743202416918429,-5.4 +0.0803625377643504,-4.89565217391304 +0.086404833836858,-5.38260869565217 +0.091238670694864,-3.81739130434783 +0.0948640483383686,-3.50434782608696 +0.100906344410876,-4.18260869565217 +0.103323262839879,-4.6695652173913 +0.106948640483384,-3.22608695652174 +0.108157099697885,-2.96521739130435 +0.112990936555891,-3.08695652173913 +0.117824773413897,-2.2695652173913 +0.1202416918429,-1.93913043478261 +0.127492447129909,-2.02608695652174 +0.133534743202417,-1.59130434782609 +0.137160120845921,-1.99130434782609 +0.140785498489426,-1.69565217391304 +0.144410876132931,-2.21739130434783 +0.150453172205438,-2.72173913043478 +0.152870090634441,-2.35652173913043 +0.156495468277946,-2.91304347826087 +0.158912386706949,-3.4 +0.163746223564955,-2.89565217391304 +0.166163141993958,-3.4695652173913 +0.168580060422961,-3.36521739130435 +0.172205438066465,-4.32173913043478 +0.177039274924471,-3.74782608695652 +0.179456193353474,-4.37391304347826 +0.183081570996979,-3.88695652173913 +0.185498489425982,-3.83478260869565 +0.193957703927492,-4.82608695652174 +0.198791540785498,-3.95652173913043 +0.202416918429003,-3.74782608695652 +0.206042296072508,-3.69565217391304 +0.213293051359517,-4.1304347826087 +0.218126888217523,-3.78260869565217 +0.221752265861027,-3.67826086956522 +0.22416918429003,-3.78260869565217 +0.231419939577039,-3.4 +0.235045317220544,-3.55652173913043 +0.238670694864048,-3.4 +0.244712990936556,-3.26086956521739 +0.249546827794562,-3.52173913043478 +0.251963746223565,-3.31304347826087 +0.256797583081571,-4.33913043478261 +0.260422960725076,-3.01739130434783 +0.261631419939577,-2.91304347826087 +0.267673716012085,-3.67826086956522 +0.271299093655589,-3.01739130434783 +0.273716012084592,-2.75652173913043 +0.278549848942598,-3.26086956521739 +0.280966767371601,-3.08695652173913 +0.284592145015106,-3.71304347826087 +0.28821752265861,-2.09565217391304 +0.290634441087613,-1.8 +0.294259818731118,-1.60869565217391 +0.297885196374622,-1.62608695652174 +0.302719033232628,-1.71304347826087 +0.305135951661631,-1.67826086956522 +0.311178247734139,-1.7304347826087 +0.317220543806647,-1.74782608695652 +0.31963746223565,-1.8695652173913 +0.32809667673716,-1.55652173913043 +0.332930513595166,-2.06086956521739 +0.338972809667674,-2.70434782608696 +0.34380664652568,-2.89565217391304 +0.347432024169184,-2.79130434782609 +0.355891238670695,-2.70434782608696 +0.369184290030211,-1.90434782608696 +0.372809667673716,-1.7304347826087 +0.378851963746224,-1.97391304347826 +0.386102719033233,-2.04347826086957 +0.39214501510574,-2.46086956521739 +0.398187311178248,-3.29565217391304 +0.404229607250755,-3.93913043478261 +0.410271903323263,-4.11304347826087 +0.41631419939577,-4.33913043478261 +0.418731117824773,-4.40869565217391 +0.423564954682779,-3.8695652173913 +0.428398791540785,-3.20869565217391 +0.43202416918429,-3.01739130434783 +0.439274924471299,-3.22608695652174 +0.448942598187311,-3.55652173913043 +0.457401812688822,-3.92173913043478 +0.464652567975831,-4.40869565217391 +0.469486404833837,-4.5304347826087 +0.48036253776435,-4.30434782608696 +0.488821752265861,-4.21739130434783 +0.497280966767372,-4.33913043478261 +0.502114803625378,-4.40869565217391 +0.515407854984894,-4.30434782608696 +0.5202416918429,-4.28695652173913 +0.531117824773414,-4.40869565217391 +0.544410876132931,-3.99130434782609 +0.555287009063444,-3.50434782608696 +0.564954682779456,-3.0695652173913 +0.567371601208459,-3.03478260869565 +0.577039274924471,-3.57391304347826 +0.578247734138973,-3.93913043478261 +0.580664652567976,-4.00869565217391 +0.587915407854985,-3.69565217391304 +0.597583081570997,-3.57391304347826 +0.604833836858006,-2.84347826086957 +0.612084592145015,-2.14782608695652 +0.621752265861027,-1.92173913043478 +0.626586102719033,-1.62608695652174 +0.637462235649547,-2.16521739130435 +0.649546827794562,-2.70434782608696 +0.654380664652568,-2.98260869565217 +0.658006042296073,-3.05217391304348 +0.665256797583082,-2.21739130434783 +0.670090634441088,-1.67826086956522 +0.673716012084592,-1.52173913043478 +0.6797583081571,-1.85217391304348 +0.685800604229607,-1.67826086956522 +0.695468277945619,-1.71304347826087 +0.699093655589124,-1.85217391304348 +0.70392749244713,-1.52173913043478 +0.711178247734139,-2.04347826086957 +0.713595166163142,-3.4695652173913 +0.716012084592145,-3.59130434782609 +0.718429003021148,-2.73913043478261 +0.723262839879154,-3.52173913043478 +0.726888217522659,-2.80869565217391 +0.730513595166163,-3.26086956521739 +0.734138972809668,-2.77391304347826 +0.738972809667674,-3.41739130434783 +0.742598187311178,-4.44347826086957 +0.74380664652568,-4.56521739130435 +0.747432024169184,-3.34782608695652 +0.753474320241692,-3.12173913043478 +0.758308157099698,-3.50434782608696 +0.761933534743202,-3.4 +0.769184290030212,-3.38260869565217 +0.774018126888218,-3.67826086956522 +0.778851963746224,-3.38260869565217 +0.781268882175227,-3.45217391304348 +0.78368580060423,-4.35652173913044 +0.786102719033233,-4.44347826086957 +0.79214501510574,-3.59130434782609 +0.800604229607251,-3.81739130434783 +0.803021148036254,-3.95652173913043 +0.806646525679758,-4.72173913043478 +0.811480362537764,-4.28695652173913 +0.81631419939577,-3.95652173913043 +0.819939577039275,-4.6695652173913 +0.82356495468278,-3.99130434782609 +0.827190332326284,-4.77391304347826 +0.830815709969789,-3.67826086956522 +0.835649546827795,-3.29565217391304 +0.838066465256798,-2.80869565217391 +0.841691842900302,-3.41739130434783 +0.84773413897281,-2.44347826086957 +0.852567975830816,-2.32173913043478 +0.854984894259819,-2.46086956521739 +0.859818731117825,-1.66086956521739 +0.862235649546828,-2.18260869565217 +0.867069486404834,-1.41739130434783 +0.874320241691843,-1.92173913043478 +0.879154078549849,-1.8695652173913 +0.885196374622357,-2.91304347826087 +0.888821752265861,-3.03478260869565 +0.892447129909366,-3.03478260869565 +0.897280966767372,-4.2695652173913 +0.903323262839879,-3.59130434782609 +0.908157099697885,-3.62608695652174 +0.914199395770393,-5.8 +0.9202416918429,-4.72173913043478 +0.923867069486405,-5.41739130434783 +0.931117824773414,-5.3304347826087 +0.937160120845922,-6.1304347826087 diff --git a/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Bx_vs_x.csv b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Bx_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..63eacf02facf09dba29103675d3eb6673d651a16 --- /dev/null +++ b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/Bx_vs_x.csv @@ -0,0 +1,75 @@ +x [cm],Bx [g * s^-2 * A^-1] +0.0187311178247735,1.40526315789474 +0.109365558912387,1.40526315789474 +0.115407854984894,1.39473684210526 +0.1202416918429,1.37368421052632 +0.125075528700906,1.36842105263158 +0.131117824773414,1.42631578947368 +0.134743202416918,1.5 +0.13595166163142,1.52105263157895 +0.140785498489426,1.44736842105263 +0.148036253776435,1.21052631578947 +0.152870090634441,1.06842105263158 +0.156495468277946,1.03684210526316 +0.161329305135952,1.02631578947368 +0.169788519637462,1.04210526315789 +0.187915407854985,1.06315789473684 +0.207250755287009,1.08421052631579 +0.22416918429003,1.06842105263158 +0.247129909365559,0.973684210526316 +0.262839879154079,0.889473684210526 +0.276132930513595,0.821052631578947 +0.2797583081571,0.768421052631579 +0.285800604229607,0.626315789473684 +0.293051359516616,0.431578947368421 +0.301510574018127,0.0736842105263158 +0.302719033232628,0.00526315789473664 +0.305135951661631,-0.0315789473684212 +0.309969788519637,-0.036842105263158 +0.318429003021148,0.0105263157894735 +0.326888217522659,0.0526315789473684 +0.335347432024169,0.0736842105263158 +0.342598187311178,0.110526315789474 +0.35226586102719,0.142105263157895 +0.365558912386707,0.142105263157895 +0.376435045317221,0.131578947368421 +0.410271903323263,0.136842105263158 +0.590332326283988,0.136842105263158 +0.608459214501511,0.131578947368421 +0.626586102719033,0.131578947368421 +0.642296072507553,0.136842105263158 +0.647129909365559,0.136842105263158 +0.653172205438066,0.110526315789474 +0.661631419939577,0.0684210526315789 +0.668882175226586,0.0473684210526313 +0.674924471299094,0.0315789473684209 +0.683383685800604,-0.0315789473684212 +0.68821752265861,-0.0526315789473686 +0.693051359516616,-0.0263157894736845 +0.697885196374622,0.126315789473684 +0.701510574018127,0.268421052631579 +0.706344410876133,0.494736842105263 +0.713595166163142,0.678947368421053 +0.722054380664652,0.836842105263158 +0.736555891238671,0.921052631578947 +0.758308157099698,1.03157894736842 +0.771601208459214,1.07894736842105 +0.787311178247734,1.1 +0.805438066465257,1.07894736842105 +0.822356495468278,1.06315789473684 +0.835649546827794,1.04210526315789 +0.841691842900302,1.03157894736842 +0.84773413897281,1.08421052631579 +0.853776435045317,1.27894736842105 +0.857401812688822,1.40526315789474 +0.859818731117825,1.46315789473684 +0.861027190332326,1.5 +0.863444108761329,1.52631578947368 +0.867069486404834,1.47368421052632 +0.868277945619335,1.40526315789474 +0.87190332326284,1.37368421052632 +0.875528700906344,1.36315789473684 +0.88036253776435,1.38421052631579 +0.885196374622356,1.40526315789474 +0.906948640483384,1.40526315789474 +0.983081570996979,1.40526315789474 diff --git a/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/By_vs_x.csv b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/By_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..69ff9e90bec327b8bbf32423fcb0c382e52df0c6 --- /dev/null +++ b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/By_vs_x.csv @@ -0,0 +1,76 @@ +x [cm],By [g * s^-2 * A^-1] +0.0247734138972811,2.22044604925031E-16 +0.11178247734139,2.22044604925031E-16 +0.125075528700906,2.22044604925031E-16 +0.131117824773414,0.0479452054794522 +0.13595166163142,0.136986301369863 +0.139577039274925,0.178082191780822 +0.144410876132931,0.0753424657534247 +0.149244712990937,-0.335616438356165 +0.157703927492447,-0.780821917808219 +0.170996978851964,-0.86986301369863 +0.186706948640483,-0.945205479452055 +0.202416918429003,-0.993150684931507 +0.212084592145015,-1 +0.238670694864048,-0.86986301369863 +0.247129909365559,-0.767123287671233 +0.259214501510574,-0.671232876712329 +0.268882175226586,-0.623287671232877 +0.2797583081571,-0.527397260273973 +0.283383685800604,-0.328767123287671 +0.28821752265861,-0.0958904109589041 +0.291842900302115,0.0958904109589043 +0.295468277945619,0.321917808219178 +0.300302114803625,0.616438356164384 +0.30392749244713,0.828767123287671 +0.306344410876133,1.01369863013699 +0.308761329305136,1.1027397260274 +0.311178247734139,1.16438356164384 +0.316012084592145,1.15753424657534 +0.322054380664653,1.06164383561644 +0.332930513595166,0.876712328767124 +0.347432024169184,0.609589041095891 +0.357099697885196,0.479452054794521 +0.369184290030211,0.410958904109589 +0.382477341389728,0.404109589041096 +0.399395770392749,0.417808219178082 +0.421148036253777,0.424657534246576 +0.583081570996979,0.424657534246576 +0.601208459214502,0.417808219178082 +0.614501510574018,0.404109589041096 +0.625377643504532,0.404109589041096 +0.63987915407855,0.452054794520548 +0.64833836858006,0.561643835616439 +0.660422960725075,0.767123287671233 +0.672507552870091,0.986301369863014 +0.6797583081571,1.0958904109589 +0.682175226586103,1.13698630136986 +0.684592145015106,1.15068493150685 +0.690634441087613,1.06849315068493 +0.696676737160121,0.780821917808219 +0.701510574018127,0.424657534246576 +0.706344410876133,0.123287671232877 +0.713595166163142,-0.226027397260274 +0.71963746223565,-0.541095890410959 +0.726888217522659,-0.582191780821918 +0.730513595166163,-0.636986301369863 +0.736555891238671,-0.65068493150685 +0.748640483383686,-0.753424657534247 +0.760725075528701,-0.883561643835617 +0.772809667673716,-0.958904109589041 +0.787311178247734,-1 +0.798187311178248,-0.993150684931507 +0.811480362537764,-0.952054794520548 +0.827190332326284,-0.86986301369863 +0.841691842900302,-0.787671232876712 +0.846525679758308,-0.65068493150685 +0.853776435045317,-0.164383561643836 +0.85619335347432,0.0547945205479452 +0.857401812688822,0.136986301369863 +0.859818731117825,0.171232876712329 +0.864652567975831,0.13013698630137 +0.868277945619335,0.0410958904109588 +0.874320241691843,2.22044604925031E-16 +0.886404833836858,2.22044604925031E-16 +0.927492447129909,2.22044604925031E-16 +0.979456193353474,2.22044604925031E-16 diff --git a/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/rho_vs_x.csv b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/rho_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..f2003ae44e766a2fe6a67cdeb26c125c2d30941a --- /dev/null +++ b/examples/MHDTests/FastRotor/1DprofilerReference/FastRotor_GIZMO_MFM_t=0.15_y=0.5/rho_vs_x.csv @@ -0,0 +1,72 @@ +x [cm],rho [g/cm^3] +0.0126888217522659,0.983606557377049 +0.0912386706948641,0.983606557377049 +0.116616314199396,0.983606557377049 +0.128700906344411,0.95081967213115 +0.137160120845922,1.08196721311475 +0.144410876132931,1.34426229508197 +0.155287009063444,1.50819672131148 +0.170996978851964,1.40983606557377 +0.190332326283988,1.27868852459016 +0.21570996978852,1.14754098360656 +0.236253776435045,1.21311475409836 +0.250755287009063,1.31147540983607 +0.261631419939577,1.37704918032787 +0.266465256797583,1.34426229508197 +0.270090634441088,1.40983606557377 +0.273716012084592,1.11475409836066 +0.276132930513595,1.04918032786885 +0.278549848942598,3.54098360655738 +0.280966767371601,8.98360655737705 +0.282175226586103,10.4590163934426 +0.283383685800604,11.9016393442623 +0.284592145015106,12.5901639344262 +0.289425981873112,11.5409836065574 +0.294259818731118,10.327868852459 +0.299093655589124,8.45901639344262 +0.302719033232628,6.39344262295082 +0.309969788519638,3.9672131147541 +0.317220543806647,2.78688524590164 +0.326888217522659,2.13114754098361 +0.341389728096677,1.60655737704918 +0.354682779456193,1.18032786885246 +0.366767371601209,0.983606557377049 +0.384894259818731,0.95081967213115 +0.403021148036254,0.983606557377049 +0.422356495468278,0.983606557377049 +0.593957703927493,0.983606557377049 +0.614501510574018,0.95081967213115 +0.630211480362538,0.95081967213115 +0.638670694864048,1.04918032786885 +0.645921450151057,1.21311475409836 +0.65558912386707,1.50819672131148 +0.670090634441088,2.0327868852459 +0.678549848942598,2.59016393442623 +0.68821752265861,3.70491803278689 +0.691842900302115,4.81967213114754 +0.695468277945619,6 +0.699093655589124,7.9672131147541 +0.701510574018127,9.18032786885246 +0.702719033232628,10.0655737704918 +0.706344410876133,10.8524590163934 +0.708761329305136,11.5081967213115 +0.711178247734139,12.0655737704918 +0.713595166163142,12.8196721311475 +0.716012084592145,12.327868852459 +0.718429003021148,8.36065573770492 +0.71963746223565,6.13114754098361 +0.722054380664653,1.9344262295082 +0.724471299093656,1.34426229508197 +0.72809667673716,1.40983606557377 +0.741389728096677,1.34426229508197 +0.760725075528701,1.21311475409836 +0.781268882175227,1.14754098360656 +0.803021148036254,1.24590163934426 +0.827190332326284,1.37704918032787 +0.848942598187311,1.47540983606558 +0.858610271903323,1.24590163934426 +0.867069486404834,0.983606557377049 +0.873111782477341,0.95081967213115 +0.882779456193353,1.01639344262295 +0.926283987915408,1.01639344262295 +0.979456193353474,1.01639344262295 diff --git a/examples/MHDTests/OrszagTangVortex/1DprofilerReference/1Dprofiles.py b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/1Dprofiles.py new file mode 100644 index 0000000000000000000000000000000000000000..ee0b7e1fcdf9e95096906e5453ab417e7a1767b6 --- /dev/null +++ b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/1Dprofiles.py @@ -0,0 +1,198 @@ +# Profiler compares rho, B, Berr from snapshots with Philip F. Hopkins, Matthias J. Raives https://arxiv.org/abs/1505.02783 + +import numpy as np +import h5py +import argparse +import unyt +import matplotlib.pyplot as plt + +from swiftsimio import load +from swiftsimio.visualisation.slice import slice_gas + +# load reference +with_reference = True + +# Load digitalized data, at t=0.5, figure 11 from the paper +folder = "OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125" +if with_reference: + import pandas as pd + + rho_vs_x_data = pd.read_csv("./" + folder + "/rho_vs_x.csv", header=0).to_numpy() + Bx_vs_x_data = pd.read_csv("./" + folder + "/Bx_vs_x.csv", header=0).to_numpy() + By_vs_x_data = pd.read_csv("./" + folder + "/By_vs_x.csv", header=0).to_numpy() + Berr_vs_x_data = pd.read_csv("./" + folder + "/Berr_vs_x.csv", header=0).to_numpy() + +# Parse command line arguments +argparser = argparse.ArgumentParser() +argparser.add_argument("input") +argparser.add_argument("output") +args = argparser.parse_args() + +# Where we want to slice the slice +y0 = 0.3125 # 0.5 + +# Load snapshot +filename = args.input +data = load(filename) + +# Retrieve some information about the simulation run +artDiffusion = data.metadata.hydro_scheme["Artificial Diffusion Constant"] +dedHyp = data.metadata.hydro_scheme["Dedner Hyperbolic Constant"] +dedHypDivv = data.metadata.hydro_scheme["Dedner Hyperbolic div(v) Constant"] +dedPar = data.metadata.hydro_scheme["Dedner Parabolic Constant"] +eta = data.metadata.hydro_scheme["Resistive Eta"] +git = data.metadata.code["Git Revision"] +gitBranch = data.metadata.code["Git Branch"] +hydroScheme = data.metadata.hydro_scheme["Scheme"] +kernel = data.metadata.hydro_scheme["Kernel function"] +neighbours = data.metadata.hydro_scheme["Kernel target N_ngb"] +n_gas = data.metadata.n_gas + +# Retrieve particle attributes of interest +rho = data.gas.densities + +P = data.gas.pressures + +B = data.gas.magnetic_flux_densities + +Bx, By = B[:, 0], B[:, 1] + +normB = np.sqrt(B[:, 0] ** 2 + B[:, 1] ** 2 + B[:, 2] ** 2) + +divB = data.gas.magnetic_divergences + +h = data.gas.smoothing_lengths + +errB = np.log10(h * abs(divB) / normB) + +# Generate mass weighted maps of quantities of interest +data.gas.mass_weighted_densities = data.gas.masses * rho + +data.gas.mass_weighted_pressures = data.gas.masses * P + +data.gas.mass_weighted_Bx = data.gas.masses * Bx + +data.gas.mass_weighted_By = data.gas.masses * By + +data.gas.mass_weighted_errB = data.gas.masses * errB + +common_arguments = dict( + data=data, z_slice=0.5 * data.metadata.boxsize[2], resolution=512, parallel=True +) + +mass_map = slice_gas(**common_arguments, project="masses") + +mass_weighted_density_map = slice_gas( + **common_arguments, project="mass_weighted_densities" +) + +mass_weighted_pressure_map = slice_gas( + **common_arguments, project="mass_weighted_pressures" +) + +mass_weighted_Bx_map = slice_gas(**common_arguments, project="mass_weighted_Bx") + +mass_weighted_By_map = slice_gas(**common_arguments, project="mass_weighted_By") + +mass_weighted_errB_map = slice_gas(**common_arguments, project="mass_weighted_errB") + +# Take out mass dependence +density_map = mass_weighted_density_map / mass_map +pressure_map = mass_weighted_pressure_map / mass_map +Bx_map = mass_weighted_Bx_map / mass_map +By_map = mass_weighted_By_map / mass_map +errB_map = mass_weighted_errB_map / mass_map + +map_pixel_length = len(mass_map) + +x = np.linspace(0.0, 1.0, map_pixel_length) +slice_ind = int(np.floor(y0 * map_pixel_length)) + +# Plot maps +plt.rcParams.update({"font.size": 16}) + +fig, axs = plt.subplots(5, 1, figsize=((2 * 4, 4 * 4)), sharex=True) +fig.subplots_adjust(hspace=0.1) + + +axs[0].plot(x, density_map[:, slice_ind], "k-", color="black") +axs[0].set_yticks(np.arange(0.0, 0.35, 0.05)) +axs[0].set_ylabel(r"$\rho(x,y_0)$ $[g/cm^3]$") +axs[0].set_ylim(0.0, 0.35) + +axs[1].plot(x, Bx_map[:, slice_ind], "k-", color="black") +axs[1].set_yticks(np.arange(-0.5, 0.55, 0.25)) +axs[1].set_ylabel(r"$B_x(x,y_0)$ $[g*s^{-2}*A^{-1}]$") +axs[1].set_ylim(-0.5, 0.5) + +axs[2].plot(x, By_map[:, slice_ind], "k-", color="black", label="SWIFT") +axs[2].set_yticks(np.arange(-0.5, 0.55, 0.25)) +axs[2].set_ylabel(r"$B_y(x,y_0)$ $[g*s^{-2}*A^{-1}]$") +axs[2].set_ylim(-0.5, 0.5) + +axs[3].plot(x, errB_map[:, slice_ind], "k-", color="black", label="SWIFT") +axs[3].set_yticks(np.arange(-6.0, 1.0, 1.0)) +axs[3].set_xlabel(r"$x$") +axs[3].set_ylabel(r"$\mathrm{log}_{10} \left( h \quad \nabla \cdot B / |B| \right)$") +axs[3].set_ylim(-6.5, 0.5) + +if with_reference: + axs[0].plot( + rho_vs_x_data[:, 0], rho_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[1].plot( + Bx_vs_x_data[:, 0], Bx_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[2].plot( + By_vs_x_data[:, 0], By_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + axs[3].plot( + Berr_vs_x_data[:, 0], Berr_vs_x_data[:, 1], label="MFM $256^3$", color="red" + ) + +axs[2].legend() +# Add panel with infromation about the run +text_common_args = dict( + fontsize=10, ha="center", va="center", transform=axs[4].transAxes +) + +axs[4].text( + 0.5, + 0.8, + "Orszag Tang Vortex at $t=%.2f$, $y_0 = %.4f$" % (data.metadata.time, y0), + **text_common_args, +) +axs[4].text(0.5, 0.7, "SWIFT %s" % git.decode("utf-8"), **text_common_args) +axs[4].text(0.5, 0.6, "Branch %s" % gitBranch.decode("utf-8"), **text_common_args) +axs[4].text(0.5, 0.5, hydroScheme.decode("utf-8"), **text_common_args) +axs[4].text( + 0.5, + 0.4, + kernel.decode("utf-8") + " with $%.2f$ neighbours" % (neighbours), + **text_common_args, +) +axs[4].text( + 0.5, 0.3, "Artificial diffusion: $%.2f$ " % (artDiffusion), **text_common_args +) +axs[4].text( + 0.5, + 0.2, + "Dedner Hyp, Hyp_div(v), Par: $%.2f,%.2f,%.2f$ " % (dedHyp, dedHypDivv, dedPar), + **text_common_args, +) +axs[4].text( + 0.5, 0.1, r"Physical resistivity: $\eta$: $%.2f$ " % (eta), **text_common_args +) +axs[4].text( + 0.5, 0.0, r"Number of particles: $N_p$: $%.0f$ " % (n_gas), **text_common_args +) + +axs[4].axis("off") + + +for ax in axs: + ax.minorticks_on() + ax.grid() + +fig.tight_layout() +plt.savefig(args.output) diff --git a/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Berr_vs_x.csv b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Berr_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..486c3f64c9fbf93ae94e68567ac80565655c81d2 --- /dev/null +++ b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Berr_vs_x.csv @@ -0,0 +1,202 @@ +x [cm],Log10 (divB * h / B) +0.00496894409937893,-2.83870967741936 +0.00745341614906836,-3.01612903225806 +0.0111801242236025,-2.32258064516129 +0.0149068322981367,-2.96774193548387 +0.0149068322981367,-3.14516129032258 +0.0173913043478261,-3.08064516129032 +0.0211180124223603,-3.90322580645161 +0.0248447204968945,-3.01612903225806 +0.0260869565217391,-2.79032258064516 +0.031055900621118,-3.14516129032258 +0.0322981366459628,-3.09677419354839 +0.0372670807453417,-3.33870967741936 +0.0409937888198758,-3.38709677419355 +0.0472049689440994,-2.70967741935484 +0.0509316770186336,-3.74193548387097 +0.0521739130434783,-3.82258064516129 +0.053416149068323,-3.62903225806452 +0.0546583850931677,-3.29032258064516 +0.0559006211180125,-2.70967741935484 +0.0571428571428572,-2.16129032258065 +0.0608695652173913,-3.12903225806452 +0.0645962732919255,-2.17741935483871 +0.0658385093167702,-2.06451612903226 +0.0683229813664597,-1.83870967741936 +0.0732919254658386,-1.69354838709677 +0.0770186335403727,-1.75806451612903 +0.0807453416149069,-2.80645161290323 +0.0844720496894411,-1.75806451612903 +0.0869565217391305,-1.54838709677419 +0.0919254658385094,-2.01612903225807 +0.0944099378881988,-3.09677419354839 +0.098136645962733,-2.25806451612903 +0.100621118012422,-2.17741935483871 +0.105590062111801,-2.62903225806452 +0.11055900621118,-2.87096774193548 +0.114285714285714,-2.58064516129032 +0.118012422360248,-2.79032258064516 +0.124223602484472,-2.93548387096774 +0.130434782608696,-3.67741935483871 +0.136645962732919,-2.85483870967742 +0.139130434782609,-2.70967741935484 +0.144099378881988,-2.91935483870968 +0.146583850931677,-3.32258064516129 +0.151552795031056,-5.17741935483871 +0.156521739130435,-3.09677419354839 +0.159006211180124,-2.7741935483871 +0.166459627329193,-5.06451612903226 +0.172670807453416,-4.03225806451613 +0.17639751552795,-4.61290322580645 +0.181366459627329,-3.38709677419355 +0.181366459627329,-3.09677419354839 +0.183850931677019,-2.80645161290323 +0.193788819875776,-4.14516129032258 +0.2,-3.24193548387097 +0.20248447204969,-3.19354838709678 +0.211180124223603,-4.82258064516129 +0.216149068322981,-3.5 +0.219875776397516,-4.17741935483871 +0.22360248447205,-3.25806451612903 +0.231055900621118,-4.85483870967742 +0.234782608695652,-3.96774193548387 +0.236024844720497,-3.87096774193548 +0.240993788819876,-3 +0.24472049689441,-2.79032258064516 +0.253416149068323,-3.14516129032258 +0.255900621118012,-3.25806451612903 +0.259627329192547,-2.74193548387097 +0.262111801242236,-3.24193548387097 +0.267080745341615,-1.85483870967742 +0.270807453416149,-2.08064516129032 +0.275776397515528,-1.75806451612903 +0.280745341614907,-1.45161290322581 +0.284472049689441,-1.85483870967742 +0.28695652173913,-1.66129032258065 +0.291925465838509,-2.03225806451613 +0.299378881987578,-1.7258064516129 +0.305590062111801,-2.40322580645161 +0.311801242236025,-2.30645161290323 +0.318012422360249,-3.14516129032258 +0.324223602484472,-4.59677419354839 +0.33416149068323,-3.53225806451613 +0.339130434782609,-3.95161290322581 +0.342857142857143,-3.54838709677419 +0.346583850931677,-3.93548387096774 +0.35527950310559,-3.16129032258065 +0.357763975155279,-3.24193548387097 +0.363975155279503,-3.19354838709678 +0.373913043478261,-4.03225806451613 +0.381366459627329,-3.09677419354839 +0.388819875776398,-3.69354838709677 +0.391304347826087,-3.7258064516129 +0.395031055900621,-4.08064516129032 +0.406211180124224,-3.43548387096774 +0.411180124223603,-4.01612903225807 +0.419875776397516,-3.64516129032258 +0.432298136645963,-4.41935483870968 +0.438509316770186,-3.95161290322581 +0.44223602484472,-4.32258064516129 +0.447204968944099,-3.45161290322581 +0.450931677018634,-3.64516129032258 +0.453416149068323,-3.61290322580645 +0.457142857142857,-3.85483870967742 +0.460869565217391,-3.29032258064516 +0.46832298136646,-4.04838709677419 +0.470807453416149,-3.95161290322581 +0.475776397515528,-3.83870967741936 +0.479503105590062,-3.88709677419355 +0.484472049689441,-3.43548387096774 +0.48944099378882,-3.83870967741936 +0.493167701863354,-3.82258064516129 +0.495652173913044,-4 +0.501863354037267,-3.2258064516129 +0.505590062111801,-3.93548387096774 +0.508074534161491,-4.51612903225807 +0.51304347826087,-3.17741935483871 +0.520496894409938,-4.41935483870968 +0.527950310559006,-3.56451612903226 +0.537888198757764,-2.93548387096774 +0.544099378881988,-4.62903225806452 +0.550310559006211,-2.54838709677419 +0.556521739130435,-3.25806451612903 +0.561490683229814,-3.40322580645161 +0.567701863354037,-2.5 +0.573913043478261,-4.03225806451613 +0.57888198757764,-3.01612903225806 +0.583850931677019,-3.2258064516129 +0.587577639751553,-2.7741935483871 +0.590062111801242,-3.06451612903226 +0.596273291925466,-2.61290322580645 +0.601242236024845,-2.7741935483871 +0.604968944099379,-2.59677419354839 +0.613664596273292,-2.82258064516129 +0.617391304347826,-3.25806451612903 +0.622360248447205,-2.62903225806452 +0.628571428571429,-3.32258064516129 +0.634782608695652,-3.95161290322581 +0.640993788819876,-2.70967741935484 +0.647204968944099,-2.51612903225807 +0.652173913043478,-3.51612903225807 +0.654658385093168,-3.35483870967742 +0.660869565217391,-2.51612903225807 +0.663354037267081,-2.7741935483871 +0.669565217391304,-2.5 +0.674534161490683,-3.32258064516129 +0.678260869565217,-2.95161290322581 +0.681987577639752,-3.32258064516129 +0.686956521739131,-1.96774193548387 +0.690683229813665,-1.90322580645161 +0.693167701863354,-2.08064516129032 +0.703105590062112,-1.54838709677419 +0.71055900621118,-1.90322580645161 +0.716770186335404,-1.93548387096774 +0.725465838509317,-2.7258064516129 +0.73167701863354,-2.54838709677419 +0.736645962732919,-2.82258064516129 +0.741614906832298,-2.66129032258065 +0.745341614906832,-3.06451612903226 +0.750310559006211,-2.7258064516129 +0.75527950310559,-3.69354838709677 +0.759006211180124,-3.12903225806452 +0.766459627329193,-2.85483870967742 +0.775155279503106,-2.38709677419355 +0.786335403726708,-3.41935483870968 +0.795031055900621,-2.06451612903226 +0.801242236024845,-2.14516129032258 +0.806211180124224,-2.20967741935484 +0.813664596273292,-1.85483870967742 +0.818633540372671,-2.2258064516129 +0.826086956521739,-2.2741935483871 +0.831055900621118,-2.2741935483871 +0.837267080745342,-2.90322580645161 +0.843478260869565,-2.98387096774194 +0.848447204968944,-3.32258064516129 +0.855900621118012,-2.93548387096774 +0.863354037267081,-3.41935483870968 +0.86832298136646,-5.37096774193548 +0.874534161490683,-3.41935483870968 +0.875776397515528,-3.30645161290323 +0.879503105590062,-3.37096774193548 +0.885714285714286,-2.93548387096774 +0.890683229813665,-3.48387096774194 +0.891925465838509,-3.53225806451613 +0.901863354037267,-2.5 +0.91055900621118,-2.32258064516129 +0.916770186335404,-2.61290322580645 +0.926708074534162,-1.93548387096774 +0.929192546583851,-1.85483870967742 +0.935403726708075,-2.54838709677419 +0.937888198757764,-2.7741935483871 +0.944099378881988,-2.45161290322581 +0.949068322981367,-2.69354838709677 +0.952795031055901,-2.38709677419355 +0.95527950310559,-2.7258064516129 +0.957763975155279,-3.01612903225806 +0.963975155279503,-2.67741935483871 +0.966459627329192,-3.85483870967742 +0.970186335403727,-4.09677419354839 +0.977639751552795,-2.87096774193548 +0.982608695652174,-2.12903225806452 +0.986335403726708,-2.40322580645161 +0.991304347826087,-2.43548387096774 diff --git a/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Bx_vs_x.csv b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Bx_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..4ec2ad79e9775c01e6e572edef9158e4c59dec0a --- /dev/null +++ b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/Bx_vs_x.csv @@ -0,0 +1,102 @@ +x [cm],Bx [g * s^-2 * A^-1] +0.0111801242236025,-0.117647058823529 +0.022360248447205,-0.150980392156863 +0.0285714285714286,-0.180392156862745 +0.0347826086956522,-0.209803921568628 +0.0397515527950311,-0.229411764705882 +0.0459627329192547,-0.235294117647059 +0.0521739130434783,-0.241176470588235 +0.0546583850931677,-0.245098039215686 +0.0608695652173913,-0.23921568627451 +0.0658385093167702,-0.237254901960784 +0.0708074534161491,-0.172549019607843 +0.0732919254658386,-0.117647058823529 +0.075776397515528,-0.0274509803921568 +0.0770186335403727,0.0294117647058824 +0.0795031055900622,0.117647058823529 +0.0819875776397516,0.17843137254902 +0.0844720496894411,0.231372549019608 +0.0857142857142857,0.241176470588235 +0.0894409937888199,0.231372549019608 +0.0931677018633541,0.2 +0.098136645962733,0.13921568627451 +0.101863354037267,0.0882352941176471 +0.105590062111801,0.0431372549019608 +0.11055900621118,-0.00196078431372548 +0.119254658385093,-0.0372549019607843 +0.127950310559006,-0.0803921568627451 +0.136645962732919,-0.12156862745098 +0.146583850931677,-0.166666666666667 +0.152795031055901,-0.196078431372549 +0.162732919254658,-0.229411764705882 +0.180124223602484,-0.256862745098039 +0.198757763975155,-0.280392156862745 +0.208695652173913,-0.290196078431373 +0.217391304347826,-0.3 +0.22360248447205,-0.3 +0.232298136645963,-0.294117647058824 +0.248447204968944,-0.286274509803922 +0.260869565217391,-0.284313725490196 +0.26832298136646,-0.276470588235294 +0.272049689440994,-0.243137254901961 +0.273291925465839,-0.205882352941177 +0.275776397515528,-0.192156862745098 +0.279503105590062,-0.203921568627451 +0.281987577639752,-0.235294117647059 +0.284472049689441,-0.258823529411765 +0.285714285714286,-0.264705882352941 +0.291925465838509,-0.237254901960784 +0.295652173913044,-0.225490196078431 +0.303105590062112,-0.225490196078431 +0.316770186335404,-0.215686274509804 +0.335403726708075,-0.207843137254902 +0.356521739130435,-0.207843137254902 +0.372670807453416,-0.207843137254902 +0.413664596273292,-0.201960784313726 +0.467080745341615,-0.192156862745098 +0.479503105590062,-0.182352941176471 +0.490683229813665,-0.170588235294118 +0.53167701863354,-0.115686274509804 +0.554037267080745,-0.0764705882352941 +0.571428571428572,-0.0372549019607843 +0.582608695652174,0.00196078431372548 +0.597515527950311,0.0372549019607844 +0.614906832298137,0.0549019607843138 +0.627329192546584,0.0607843137254902 +0.643478260869565,0.0529411764705883 +0.653416149068323,0.0529411764705883 +0.664596273291926,0.0490196078431373 +0.673291925465839,0.0450980392156863 +0.683229813664596,0.0372549019607844 +0.688198757763975,0.0274509803921569 +0.694409937888199,0.0372549019607844 +0.699378881987578,0.0196078431372549 +0.703105590062112,0.00196078431372548 +0.706832298136646,-0.00392156862745097 +0.722981366459627,5.55111512312578E-17 +0.73416149068323,-0.00196078431372548 +0.740372670807453,5.55111512312578E-17 +0.750310559006211,-0.00392156862745097 +0.770186335403727,-0.011764705882353 +0.780124223602485,-0.0176470588235294 +0.787577639751553,-0.0333333333333333 +0.796273291925466,-0.0607843137254902 +0.802484472049689,-0.0862745098039216 +0.818633540372671,-0.141176470588235 +0.836024844720497,-0.16078431372549 +0.854658385093168,-0.170588235294118 +0.874534161490683,-0.172549019607843 +0.894409937888199,-0.174509803921569 +0.906832298136646,-0.168627450980392 +0.922981366459627,-0.166666666666667 +0.930434782608696,-0.174509803921569 +0.939130434782609,-0.188235294117647 +0.949068322981367,-0.192156862745098 +0.960248447204969,-0.168627450980392 +0.966459627329192,-0.125490196078431 +0.972670807453416,-0.0764705882352941 +0.97639751552795,-0.0470588235294118 +0.980124223602484,-0.0392156862745098 +0.983850931677019,-0.0450980392156862 +0.987577639751553,-0.0666666666666667 +0.992546583850932,-0.0784313725490196 diff --git a/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/By_vs_x.csv b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/By_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..58cc36ec49af219a4e9d0d3d71f17ead1bfcf1f8 --- /dev/null +++ b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/By_vs_x.csv @@ -0,0 +1,107 @@ +x [cm],Bx [g * s^-2 * A^-1] +0.00621118012422364,-0.197633136094675 +0.0124223602484473,-0.169230769230769 +0.0198757763975156,-0.100591715976331 +0.0273291925465839,-0.00118343195266263 +0.0347826086956522,0.0887573964497043 +0.0434782608695652,0.164497041420118 +0.0484472049689441,0.188165680473373 +0.0546583850931677,0.209467455621302 +0.0633540372670808,0.209467455621302 +0.0695652173913044,0.181065088757397 +0.0732919254658386,0.105325443786982 +0.075776397515528,0.01301775147929 +0.0782608695652174,-0.0627218934911242 +0.0807453416149069,-0.133727810650888 +0.0832298136645963,-0.202366863905325 +0.0857142857142857,-0.228402366863905 +0.0894409937888199,-0.218934911242604 +0.100621118012422,-0.143195266272189 +0.11055900621118,-0.0698224852071005 +0.124223602484472,-0.0295857988165679 +0.130434782608696,-0.0106508875739644 +0.135403726708075,-0.00591715976331358 +0.141614906832298,0.0106508875739646 +0.151552795031056,0.0390532544378699 +0.163975155279503,0.0603550295857989 +0.181366459627329,0.0840236686390533 +0.192546583850932,0.0958579881656805 +0.207453416149068,0.100591715976331 +0.22360248447205,0.107692307692308 +0.234782608695652,0.12189349112426 +0.247204968944099,0.150295857988166 +0.257142857142857,0.204733727810651 +0.264596273291926,0.240236686390533 +0.269565217391304,0.3301775147929 +0.270807453416149,0.365680473372781 +0.272049689440994,0.398816568047337 +0.274534161490683,0.431952662721894 +0.277018633540373,0.443786982248521 +0.281987577639752,0.401183431952663 +0.284472049689441,0.339644970414201 +0.288198757763975,0.261538461538462 +0.291925465838509,0.235502958579882 +0.301863354037267,0.216568047337278 +0.315527950310559,0.211834319526627 +0.339130434782609,0.218934911242604 +0.360248447204969,0.240236686390533 +0.388819875776398,0.282840236686391 +0.419875776397516,0.337278106508876 +0.447204968944099,0.377514792899408 +0.462111801242236,0.394082840236687 +0.474534161490683,0.398816568047337 +0.48944099378882,0.382248520710059 +0.499378881987578,0.346745562130178 +0.509316770186335,0.306508875739645 +0.518012422360249,0.261538461538462 +0.526708074534162,0.214201183431953 +0.536645962732919,0.162130177514793 +0.549068322981367,0.105325443786982 +0.560248447204969,0.0485207100591717 +0.570186335403727,-0.0248520710059171 +0.577639751552795,-0.0863905325443786 +0.583850931677019,-0.152662721893491 +0.593788819875777,-0.218934911242604 +0.6,-0.271005917159763 +0.608695652173913,-0.30887573964497 +0.618633540372671,-0.33491124260355 +0.622360248447205,-0.33491124260355 +0.627329192546584,-0.337278106508876 +0.632298136645963,-0.339644970414201 +0.638509316770186,-0.330177514792899 +0.649689440993789,-0.330177514792899 +0.657142857142857,-0.306508875739645 +0.670807453416149,-0.294674556213018 +0.675776397515528,-0.294674556213018 +0.683229813664596,-0.263905325443787 +0.690683229813665,-0.235502958579882 +0.698136645962733,-0.190532544378698 +0.704347826086957,-0.12189349112426 +0.714285714285714,-0.0934911242603549 +0.73167701863354,-0.0769230769230768 +0.754037267080745,-0.0579881656804733 +0.762732919254658,-0.0603550295857988 +0.780124223602485,-0.050887573964497 +0.790062111801242,-0.0698224852071005 +0.796273291925466,-0.0958579881656804 +0.807453416149068,-0.14792899408284 +0.813664596273292,-0.188165680473373 +0.827329192546584,-0.221301775147929 +0.845962732919255,-0.247337278106509 +0.872049689440994,-0.263905325443787 +0.900621118012422,-0.27810650887574 +0.91304347826087,-0.280473372781065 +0.927950310559006,-0.301775147928994 +0.939130434782609,-0.332544378698225 +0.945341614906832,-0.349112426035503 +0.95527950310559,-0.353846153846154 +0.962732919254658,-0.323076923076923 +0.967701863354037,-0.268639053254438 +0.972670807453416,-0.197633136094675 +0.975155279503105,-0.159763313609467 +0.977639751552795,-0.138461538461538 +0.980124223602484,-0.128994082840237 +0.985093167701863,-0.138461538461538 +0.986335403726708,-0.169230769230769 +0.988819875776397,-0.190532544378698 +0.993788819875776,-0.195266272189349 diff --git a/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/rho_vs_x.csv b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/rho_vs_x.csv new file mode 100644 index 0000000000000000000000000000000000000000..b59067a7215b12114fb9634cbaab74c7c7e6ce10 --- /dev/null +++ b/examples/MHDTests/OrszagTangVortex/1DprofilerReference/OrszagTangVortex_GIZMO_MFM_t=0.5_y=0.3125/rho_vs_x.csv @@ -0,0 +1,120 @@ +x [cm],rho [g/cm^3] +0.00496894409937893,0.256744186046512 +0.00993788819875782,0.253953488372093 +0.0149068322981367,0.25953488372093 +0.0298136645962734,0.260232558139535 +0.0385093167701864,0.257441860465116 +0.04472049689441,0.256744186046512 +0.0509316770186336,0.249767441860465 +0.0559006211180125,0.256046511627907 +0.0621118012422361,0.251860465116279 +0.067080745341615,0.262325581395349 +0.0695652173913045,0.270697674418605 +0.0732919254658386,0.273488372093023 +0.0795031055900622,0.266511627906977 +0.0832298136645963,0.256744186046512 +0.0881987577639752,0.237906976744186 +0.0906832298136647,0.235813953488372 +0.0931677018633541,0.233720930232558 +0.098136645962733,0.240697674418605 +0.103105590062112,0.244186046511628 +0.108074534161491,0.255348837209302 +0.111801242236025,0.261627906976744 +0.118012422360249,0.265116279069767 +0.127950310559006,0.265116279069767 +0.146583850931677,0.256046511627907 +0.161490683229814,0.247674418604651 +0.173913043478261,0.240697674418605 +0.183850931677019,0.235116279069767 +0.196273291925466,0.230232558139535 +0.201242236024845,0.232325581395349 +0.206211180124224,0.22953488372093 +0.213664596273292,0.231627906976744 +0.219875776397516,0.233023255813953 +0.22360248447205,0.235813953488372 +0.233540372670808,0.241395348837209 +0.243478260869565,0.248372093023256 +0.252173913043478,0.251860465116279 +0.26583850931677,0.251162790697674 +0.270807453416149,0.251162790697674 +0.275776397515528,0.238604651162791 +0.280745341614907,0.207209302325581 +0.283229813664596,0.189767441860465 +0.286956521739131,0.161860465116279 +0.28944099378882,0.148604651162791 +0.294409937888199,0.147906976744186 +0.301863354037267,0.159767441860465 +0.31055900621118,0.168139534883721 +0.321739130434783,0.173023255813953 +0.332919254658385,0.177906976744186 +0.346583850931677,0.182790697674419 +0.351552795031056,0.184883720930233 +0.35527950310559,0.184186046511628 +0.360248447204969,0.184186046511628 +0.370186335403727,0.182093023255814 +0.382608695652174,0.180697674418605 +0.396273291925466,0.178604651162791 +0.411180124223603,0.180697674418605 +0.418633540372671,0.178604651162791 +0.424844720496895,0.18 +0.439751552795031,0.180697674418605 +0.452173913043478,0.184186046511628 +0.46583850931677,0.191860465116279 +0.478260869565217,0.204418604651163 +0.48944099378882,0.22046511627907 +0.504347826086957,0.251860465116279 +0.509316770186336,0.263720930232558 +0.524223602484472,0.283953488372093 +0.537888198757764,0.297209302325581 +0.549068322981367,0.302790697674419 +0.560248447204969,0.312558139534884 +0.563975155279503,0.318837209302326 +0.570186335403727,0.322325581395349 +0.572670807453416,0.323023255813953 +0.577639751552795,0.320930232558139 +0.590062111801242,0.307674418604651 +0.595031055900621,0.3 +0.606211180124224,0.286046511627907 +0.619875776397516,0.27 +0.62360248447205,0.265116279069767 +0.626086956521739,0.263023255813953 +0.631055900621118,0.263023255813953 +0.643478260869565,0.256744186046512 +0.649689440993789,0.253953488372093 +0.662111801242236,0.255348837209302 +0.674534161490683,0.256744186046512 +0.680745341614907,0.258837209302326 +0.688198757763975,0.258139534883721 +0.691925465838509,0.251162790697674 +0.696894409937888,0.235116279069767 +0.699378881987578,0.212093023255814 +0.705590062111801,0.137441860465116 +0.706832298136646,0.127674418604651 +0.709316770186335,0.122093023255814 +0.71304347826087,0.12 +0.725465838509317,0.124186046511628 +0.746583850931677,0.127674418604651 +0.773913043478261,0.133255813953488 +0.783850931677019,0.136046511627907 +0.787577639751553,0.137441860465116 +0.796273291925466,0.131860465116279 +0.811180124223602,0.114418604651163 +0.817391304347826,0.111627906976744 +0.826086956521739,0.107441860465116 +0.836024844720497,0.103255813953488 +0.849689440993789,0.101162790697674 +0.86832298136646,0.104651162790698 +0.878260869565217,0.108837209302326 +0.893167701863354,0.113023255813953 +0.904347826086957,0.112325581395349 +0.91304347826087,0.10953488372093 +0.919254658385093,0.106744186046512 +0.929192546583851,0.110232558139535 +0.941614906832298,0.126279069767442 +0.954037267080745,0.144418604651163 +0.962732919254658,0.168139534883721 +0.966459627329193,0.186976744186046 +0.972670807453416,0.221860465116279 +0.977639751552795,0.24 +0.981366459627329,0.25046511627907 +0.991304347826087,0.251860465116279