diff --git a/fragdisk_galactica.py b/fragdisk_galactica.py index bdadec8..f883e6b 100644 --- a/fragdisk_galactica.py +++ b/fragdisk_galactica.py @@ -80,9 +80,15 @@ nml_key = "cloud_params/beta_cool" # --- Runs ----- pp_params.astrophysix.simu_fmt = "beta{nml[cloud_params/beta_cool]:g}_{tag:.8}" -pp_params.astrophysix.descr_fmt = ( - "Group {tag:.8}, $\\beta$ = {nml[cloud_params/beta_cool]}" -) +pp_params.astrophysix.descr_fmt = """ +
Group {tag:.8}, $\\beta$ = {nml[cloud_params/beta_cool]}.
+ ++ The number behind jr gives the maximal level of refinement. + An ORP is an Outer Rotation Period and corresponds ro the time took by the gas at the border of the disk to rotates around the central object. + All quantities are in code units. +
+ """ pl_orp = Plotter( in_dir, @@ -122,9 +128,15 @@ pl_jr12_tic = Plotter( ) pp_params.astrophysix.simu_fmt = "beta{nml[cloud_params/beta_cool]:g}_{tag:.4}" -pp_params.astrophysix.descr_fmt = ( - "Group {tag:.4}, $\\beta$ = {nml[cloud_params/beta_cool]}" -) +pp_params.astrophysix.descr_fmt = """ +Group {tag:.4}, $\\beta$ = {nml[cloud_params/beta_cool]}
+ ++ The number behind jr gives the maximal level of refinement. + An ORP is an Outer Rotation Period and corresponds ro the time took by the gas at the border of the disk to rotates around the central object. + All quantities are in code units. +
+ """ print("JR12_TIC defined") # JR12 @@ -178,17 +190,39 @@ proj = Project( alias="FRAGDISK", short_description="Fragmentation of self-gravitating disks", general_description=""" - Study of the fragmentation of self-gravitating disks. See Brucy & Hennebelle 2021 (submitted) for more details. - +Study of the fragmentation of self-gravitating disks. See Brucy & Hennebelle 2021 (submitted) for more details. This database is currently being completed. +
- Abstract: ++ Self-gravitating disks are believed to play an important role in astrophysics in particular regarding the star and planet formation process. In this context, disks subject to an idealized cooling process, characterized by a cooling timescale $\\beta$ expressed in unit of orbital timescale, have been extensively studied. We take advantage of the Riemann solver and the 3D Godunov scheme implemented in the code Ramses to perform high resolution simulations, complementing previous studies that have used Smoothed Particle Hydrodynamics (SPH) or 2D grid codes. +
+ ++We simulate a disk of gas undergoing purely hydrodynamics forces, its own gravity and the $\\beta$-cooling. The simulation is ran with the 3D-grid code Ramses (Teyssier 2002) which uses a Godunov scheme. The flux between each cell is computed with the HLLC Riemann solver. The gravity potential is updated at each timestep with a Poisson solver, and a source term is added to the energy equation to implement the $\\beta$-cooling. +
+ ++The $\\beta$-cooling consists in removing internal energy from the gas with a cooling time: +$t_\\text{cool} = \\beta \Omega^{-1}$ with $\Omega$ the rotation frequency. +
+ ++We use the same initial conditions as in Meru & Bate (2012) to allow comparison. +The specific disk setup for Ramses was inspired by Hennebelle et al. (2017). +The disk is initially close to equilibrium with an initial column density profile $\Sigma \propto r^{-1}$ and a temperature profile $T \propto r^{-1/2}$ where $r$ is the cylindrical radius. The disk has a radius $r_d = 0.25$ (code units), after which the density is divided by 100. The density and temperature at the disk radius $r_d$ are chosen so that the mass of the disk $M_d = 0.1 M_\star$, where $M_\star$ is the mass of the central object, and the initial value of the Toomre parameter at the disk radius is $Q_{0,d} = 2$. The adiabatic index of the gas is $\gamma = 5/3$. +
+ ++The simulation is run within a cube of size $L=2$. Although the problem has a cylindrical symmetry, we use Cartesian coordinates. This prevents having a singularity at the centre of the box. One caveat is the poor resolution on the centre of the cube but this is mitigated by the use of the adaptive mesh refinement (AMR). +Another caveat is that having a cubic box may introduce spurious reflection at the border of the simulation. +To avoid this, we maintain a dead zone over a radius of $0.875$ (in code units) where all variables are replaced by their initial value at each timestep. This method has been used in Hennebelle et al. (2017) and has proven to be efficient. +
+ """, data_description="""The data available for this project is the underlying data of the article Brucy & Hennebelle 2021. The data is not already fully uploaded. 3D datacube extraction on demand is planned""", directory_path="~nbrucy/simus/fragdisk", @@ -211,6 +245,15 @@ for pl in pls: for pl in pls: select = {"time": 4.5} + + # Edit descriptions + + pl.rules["slice_rho"].description = "Density slice" + pl.rules["slice_P"].description = "Pressure slice" + pl.rules[ + "pdf_coldens" + ].description = "Probability function of the logarithm of the column density fluctuations $\sigma = \Sigma/\overline{\Sigma}$ with respect to its azimuthal average" + pl.coldens( "z", overwrite=redo, @@ -222,7 +265,7 @@ for pl in pls: vmax=1e2, put_units=False, select=select, - label=r"$\Sigma$", + label=r"$\Sigma$ [code_units]", ) pl.coldens( @@ -236,7 +279,7 @@ for pl in pls: vmax=1e2, put_units=False, select=select, - label=r"$\Sigma$", + label=r"$\Sigma$ [code_units]", ) pl.slice_rho( @@ -248,7 +291,7 @@ for pl in pls: nml_key="cloud_params/beta_cool", put_units=False, select=select, - label=r"$\rho$", + label=r"$\rho$ [code_units]", ) pl.slice_rho( @@ -260,7 +303,7 @@ for pl in pls: nml_key="cloud_params/beta_cool", put_units=False, select=select, - label=r"$\rho$", + label=r"$\rho$ [code_units]", ) pl.slice_P( @@ -272,7 +315,7 @@ for pl in pls: nml_key="cloud_params/beta_cool", put_units=False, select=select, - label=r"$P$", + label=r"$P$ [code_units]", ) pl.pdf_coldens( @@ -281,7 +324,7 @@ for pl in pls: overwrite_dep=False, unit_time=orp, nml_key="cloud_params/beta_cool", - label=r"$\log(\sigma)$", + label=r"$\log(\Sigma / \overline{\Sigma})$", kind="step", color="k", select=select, @@ -291,7 +334,20 @@ for pl in pls: # -------------------------------------------------------------------------------------------------------------------- # -# Create HDF5 files +pi = PlotInfo( + plot_type=PlotType.LINE_PLOT, + xaxis_values=N.array([10.0, 20.0, 30.0, 40.0, 50.0]), + yaxis_values=N.array([1.256, 2.456, 3.921, 4.327, 5.159]), + xaxis_log_scale=False, + yaxis_log_scale=False, + xaxis_label="Mass", + yaxis_label="Probability", + xaxis_unit=U.Msun, + plot_title="Initial mass function", + yaxis_unit=U.Mpc, +) + +# Convert plot_info to HDF5 files for simu in proj.simulations: for snap in simu.snapshots: for df in snap.datafiles: @@ -302,6 +358,8 @@ for simu in proj.simulations: df.plot_info.hsp_save_to_h5(p) h5.close() df[FileType.HDF5_FILE] = out_dir + "/" + name + df.plot_info = pi + for param in ramses.input_parameters: param.key = os.path.basename(param.key)