Skip to content

Test Problems: DiskHeating

hsinhaoHHuang edited this page Jan 28, 2025 · 1 revision

Caution

Please do not edit this file (page) manually since the workflow will overwrite your changes.

This file (page) is automatically generated by the workflow Update test problem wiki page using the script tool/wiki/sync_test_problem_pages.py.

The workflow is triggered by push changes to any of example/test_problem/*/*/README.md and tool/wiki/sync_test_problem_pages.py.

configure.py options

Note

  • DiskHeatingParticleIC uses the floating-point type for particle type and assumes single precision

Quick start

  1. Generate gamer

    1. Copy generate_make.sh to the directory src

    2. Generate Makefile

      sh generate_make.sh
    3. Compile gamer

      make clean
      make -j 4
  2. Download initial conditions of m_22=0.4, M_h=7e10 Msun halo and stellar disk with

    sh download_ic.sh
  3. Ensure PAR_INIT=1 and OPT__INIT=3 in Input__Parameter

  4. Default END_T is 2.5e-1 (about 3.5 Gyr) as in Yang et al. 2023 and OUTPUT_DT is 1.0e-2 (about 0.14 Gyr)

  5. Switch to the high-resolution run

    1. Link high-resolution DiskHeatingParticleIC

      ln -sf ic_files/PAR_IC_0.4_M7 DiskHeatingParticleIC
    2. Set PAR_NPAR=80000000, MAX_LEVEL=3, and change all values in Input__Flag_NParPatch to 800

General initial condition setup

  • Disk

    1. Generate the disk via modified GALIC. The snapshots have the filenames snap_XXX.hdf5

    2. Set the filename, and units in get_par_ic.py to match the GALIC set-up

    3. Set center to be the location of the soliton in get_par_ic.py

    4. Execute get_par_ic.py, it will generate DiskHeatingParticleIC

  • Halo

    • If the data is binary file UM_IC

      1. Set OPT__INIT=3 and PAR_INIT=1

      2. Input__UM_IC_RefineRegion is required

    • If the data is GAMER snapshot (Data_XXXXXX)

      1. Create a soft link for restart

        ln -s Data_XXXXXX RESTART
      2. Set OPT__INIT=2 and PAR_INIT=2 in Input__Parameter

      3. Turn on AddParWhenRestart and AddParWhenRestartByFile in Input__TestProb

      4. Set AddParWhenRestartNPar in Input__TestProb

      5. Turn on OPT__RESTART_RESET in Input__Parameter

        • Recommend to turn off AddParWhenRestart, AddParWhenRestartByFile, OPT__RESTART_RESET right after the simulation starts
    • The code for FDM halo reconstruction

  • Thin disk (optional)

    1. Create a soft link for restart

      ln -s Data_XXXXXX RESTART
    2. Set OPT__INIT=2 and PAR_INIT=2 and turn on OPT__RESTART_RESET in Input__Parameter

    3. Turn on AddParWhenRestart in Input__TestProb

    4. Set AddParWhenRestartNPar, Disk_Mass, Disk_R, and DispTableFile in Input__TestProb

Analysis scripts

  • particle_proj.py, plot_halo_slice.py

    • Plot the projection of disk particles or halo density slice
    • Output files: particle_proj_*.png, Data_*_Slice_x_Dens.png
  • plot_halo_density.py, plot_halo_potential.py

    • Compute and plot shell-averaged halo density or gravitational potential profiles
    • Output files: Data_*_1d-Profile_radius_Dens.png, Halo_Dens_Data_*.npy, Data_*_1d-Profile_radius_Pote.png, and Halo_Pote_Data_*.npy
  • data_disk.py

    • Compute the disk information (rotation speed, velocity dispersion, surface density, scale height, etc.)
    • Output files: Data_Disk_*.npy
  • data_halo.py

    • Compute the halo information (enclosed mass, velocity dispersion, etc.)
    • Required files: Halo_Dens_*.npy (generated by plot_halo_density.py) and Halo_Pote_*.npy (by plot_halo_potential.py)
    • Output files: Data_Halo_*.npy
  • vel_distribution.py

    • Compute the velocity distribution in 2-kpc-wide radial bins centered on R = 4, 6, 8, 10 kpc
    • Output files: Vel_data_*.npz, vel_*.png
  • get_heating.py

    • Compute the theoretical heating rate of the stellar disk as a function of radius
    • Required files: Data_Disk_*.npy (generated by data_disk.py), Data_Halo_*.npy (by data_halo.py)
    • Output files: Heating_*.npz
  • get_heating_rate_theory.py

    • Get the time-averaged theoretical heating rate
    • Required files: Heating_*.npz (generated by get_heating.py)
    • Output files: printed plain text
  • get_heating_rate_simulation.py

    • Compute ensemble- and time-averaged disk heating rates measured from simulation data
    • Required files: Vel_data_*.npz (generated by vel_distribution.py)
    • Output files: sigma_z_sqr.png and printed plain text
  • plot_data_example.py

    • An example script to plot the angle-averaged disk rotation curve and shell-averaged density profile
    • Required files: Data_Disk_*.npy (generated by data_disk.py) and/or Data_Halo_*.npy (by data_halo.py)
    • Output files: Rotation_Curve.png, Halo_Density_Profile.png

Links

Main page of Test Problems

Clone this wiki locally