Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
423fa40
Full implementation of AGN feedback for the cool-core destruction pro…
ShuangShuang0411 Jul 15, 2024
9b11556
Remove trailing spaces
ChunYen-Chen Sep 30, 2024
00cc778
Replace tabs by spaces
ChunYen-Chen Sep 30, 2024
f2fa092
GAMER style
ChunYen-Chen Sep 30, 2024
391fdd9
Bug fix
ChunYen-Chen Sep 30, 2024
c19d69f
Style
ChunYen-Chen Sep 30, 2024
008ac34
Style
ChunYen-Chen Sep 30, 2024
10a2e32
Use malloc. Style
ChunYen-Chen Sep 30, 2024
c3d138e
Style
ChunYen-Chen Oct 1, 2024
177b857
Define distance function
ChunYen-Chen Oct 1, 2024
01758fd
Use the distance macro
ChunYen-Chen Oct 1, 2024
5e9edd1
Style
ChunYen-Chen Oct 4, 2024
b3399d2
Optimize the initialization
ChunYen-Chen Oct 5, 2024
555b602
Merge branch 'hdf5_more_record' into cool-core-chunyen
ChunYen-Chen Oct 5, 2024
e6ecf34
Add user HDF5 output
ChunYen-Chen Oct 5, 2024
efcad91
Update the HDF5 name
ChunYen-Chen Oct 8, 2024
6134c57
Style
ChunYen-Chen Oct 14, 2024
18d92fe
Bug fix and add load user HDF5 data function
ChunYen-Chen Oct 14, 2024
719ecb4
Bug fix, support new HDF5 method, and remove old method
ChunYen-Chen Oct 15, 2024
3b7d112
Remove BH_variable.bin
ChunYen-Chen Oct 15, 2024
9aa1e7d
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen Oct 15, 2024
d3e50f0
Bug fix
ChunYen-Chen Oct 15, 2024
83b8fe7
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen Oct 17, 2024
f4fd291
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen Oct 21, 2024
65fb821
Use static OpenMP schedule
ChunYen-Chen Oct 21, 2024
6560733
Bug fix of hot accretion rate
ChunYen-Chen Oct 23, 2024
47a6ad0
Merge pull request #1 from ChunYen-Chen/cool-core-chunyen
ShuangShuang0411 Nov 14, 2024
31d8a68
[Bugfix] Escape velocity
ChunYen-Chen Dec 7, 2024
bb151e4
[Bugfix] fixBH center location
ChunYen-Chen Dec 7, 2024
0eeccbb
[Bugfix] Prototype
ChunYen-Chen Dec 7, 2024
2bc6359
[Bugfix] Excluding SRHD
ChunYen-Chen Dec 7, 2024
7fd7e8c
[Bugfix] Initial BH position
ChunYen-Chen Dec 7, 2024
fae7638
[Bugfix] Missing Output_HDF5_TestProb
ChunYen-Chen Dec 7, 2024
2bc413c
[Bugfix] Remove outdated code
ChunYen-Chen Dec 7, 2024
7ff90bd
[Bugfix] Check TOOL only when enable cooling
ChunYen-Chen Dec 7, 2024
74fc76f
Review comments
ChunYen-Chen Dec 14, 2024
0309317
Merge pull request #2 from ChunYen-Chen/cool-core-public
jzuhone Jan 30, 2025
196b9f5
Apply suggestions from code review
jzuhone Jan 30, 2025
8eb1035
Apply suggestions from code review
jzuhone Jan 30, 2025
2a381b2
Merge branch 'main' into cool-core-public
jzuhone Jan 30, 2025
a8fded1
Addressing comments
jzuhone Jan 30, 2025
c6c6d25
Merge branch 'main' into cool-core-public
jzuhone Feb 7, 2025
3399e65
Compilation fixes
Feb 7, 2025
b668a04
Fix minor compilation issues in Init_GAMER.cpp and Mis_GetTimeStep.cpp
hyschive Feb 8, 2025
d8c37c6
Code review suggestions
jzuhone Feb 8, 2025
79ab80a
More responses to review
jzuhone Feb 8, 2025
b37892c
Include exact-cooling dt only when necessary
hyschive Feb 10, 2025
747e918
Abort if SRC_EXACTCOOLING is enabled before its release
hyschive Feb 10, 2025
cf0fe3d
Merge pull request #3 from hyschive/cool-core-public
jzuhone Feb 10, 2025
7d4cb84
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone Feb 10, 2025
690d373
Update src/SourceTerms/ExactCooling/CPU_Src_ExactCooling.cpp
jzuhone Feb 10, 2025
e84c87c
Apply suggestions from code review
jzuhone Feb 10, 2025
da139db
Apply suggestions from code review
jzuhone Feb 10, 2025
5df06a7
Fix spelling
jzuhone Feb 10, 2025
39dbf5d
Fix alignments
jzuhone Feb 10, 2025
4fbb28d
More cleanup and responding to comments
jzuhone Feb 10, 2025
b027f93
nits
jzuhone Feb 10, 2025
d7d0987
resolve a number of issues
jzuhone Feb 11, 2025
a885ca5
Remove unit parameters
jzuhone Feb 11, 2025
800009d
Merge branch 'main' into cool-core-public
jzuhone Feb 11, 2025
da0d0d6
Fixing more issues
jzuhone Feb 11, 2025
12df224
Apply suggestions from code review
jzuhone Feb 11, 2025
591dbf8
Fix particle types but still allow for the same functionality to dist…
jzuhone Feb 12, 2025
87fbbc7
Remove unused array
jzuhone Feb 12, 2025
95794e9
small fix
jzuhone Feb 12, 2025
47766c7
Responding to reviewer comments
jzuhone Feb 12, 2025
34ae3f6
Apply suggestions from code review
jzuhone Feb 12, 2025
45434cd
Resolving more reviewer comments
jzuhone Feb 12, 2025
aeebe4f
Responding to reviewer comments
jzuhone Feb 13, 2025
51e34c8
Responding to more reviewer comments
jzuhone Feb 13, 2025
0bc59a0
Don't reset positions
jzuhone Feb 13, 2025
6bfd78d
Responding to reviewer comments
jzuhone Feb 14, 2025
1a0409e
Creating and using Merger_Coll_NumBHs and fixing more instances of do…
jzuhone Feb 14, 2025
4318e47
Bugfix
jzuhone Feb 14, 2025
0f7d7bd
Some work on accretion
jzuhone Feb 21, 2025
c91ff26
Respond to reviewer comments
jzuhone Feb 21, 2025
8d750f5
reset to script
jzuhone Feb 21, 2025
525d597
Merge branch 'main' into cool-core-public
jzuhone Mar 4, 2025
0160aca
Fix parameter values to that of paper
jzuhone Mar 4, 2025
8f168be
Renaming variables for clarity
jzuhone Mar 4, 2025
1bae9dc
Responding to comments
jzuhone Mar 4, 2025
1a81b5d
Add EC parameters to Input__Parameter
jzuhone Mar 4, 2025
6c086a0
Make the jet direction file a runtime parameter
jzuhone Mar 4, 2025
3de3369
Don't allocate this
jzuhone Mar 9, 2025
2274ae9
Merge branch 'main' into cool-core-public
jzuhone Mar 17, 2025
0d55fb8
responding to more comments
jzuhone Mar 20, 2025
1a47f36
Respond to reviewer suggestion
jzuhone Mar 20, 2025
6e5f16a
Fix depletion
jzuhone Mar 22, 2025
bf3bbf3
[Workflow] Update all parameters wiki page
ChunYen-Chen Mar 24, 2025
10f4cdf
Remove trailing blanks
ChunYen-Chen Mar 24, 2025
529e37b
Update to the latest GAMER
ChunYen-Chen Mar 24, 2025
b52cbbf
Add function description of BH_accretion_rate
ChunYen-Chen Mar 24, 2025
fe06561
Extend the column spaces of the output table
ChunYen-Chen Mar 24, 2025
ae65de2
Bugfix
ChunYen-Chen Mar 24, 2025
a6ce49c
Record both hot and cold accretion rate
ChunYen-Chen Mar 24, 2025
3b2d182
Minor
ChunYen-Chen Mar 24, 2025
8869c64
Merge pull request #4 from ChunYen-Chen/record_hot_cool
jzuhone Mar 24, 2025
16c0166
Do not reallocate memory too frequently
jzuhone Mar 25, 2025
2901f55
vector calculations and style fixes
jzuhone Mar 26, 2025
dc90fe8
Add in exact cooling parameters to/from HDF5
jzuhone Mar 26, 2025
397d0ff
Merge branch 'main' into cool-core-public
jzuhone Mar 26, 2025
1107c0d
whitespace fixes
jzuhone Mar 26, 2025
e7dfe21
Fixing compilation issues
Mar 26, 2025
6dd8279
Bugfix
ChunYen-Chen Apr 4, 2025
c1403f6
Merge pull request #5 from ChunYen-Chen/cool_core_bugfix
jzuhone Apr 7, 2025
3d2b89a
Bugfix
Apr 9, 2025
4918384
Use raw string
ChunYen-Chen Apr 16, 2025
52bb982
Restore file
ChunYen-Chen Apr 16, 2025
8dd7611
Add `EXACT_COOLING` compilation option
ChunYen-Chen Apr 16, 2025
8e3522b
Remove useless function
ChunYen-Chen Apr 16, 2025
0ab86a4
Style
ChunYen-Chen Apr 16, 2025
66be96e
Must enable `EXACT_COOLING`
ChunYen-Chen Apr 24, 2025
a355560
Optimization
ChunYen-Chen Apr 24, 2025
0aecdf5
Merge branch 'main' into cool-core-public
jzuhone Jun 17, 2025
f64d961
Apply suggestions from code review
jzuhone Jun 17, 2025
298c807
Apply suggestions from code review
jzuhone Jun 17, 2025
18a125a
Responding to code review comments
jzuhone Jun 17, 2025
5706129
Fix frame change
jzuhone Jun 17, 2025
1133365
Merge remote-tracking branch 'shuang/cool-core-public' into cool_core…
ChunYen-Chen Jul 7, 2025
c16a889
Style
ChunYen-Chen Jul 8, 2025
8871f24
Generalize Table_R/D/P/M and Merger_NBin
ChunYen-Chen Jul 8, 2025
b5a705d
Generalize ColorFieldIdx
ChunYen-Chen Jul 8, 2025
775d502
Load `Merger_Coll_NumHalos` first
ChunYen-Chen Jul 8, 2025
d2e0e8b
Generalize Merger_Coll_IsGas
ChunYen-Chen Jul 8, 2025
c97e342
Generalize Merger_File_Prof
ChunYen-Chen Jul 8, 2025
40006bf
Generalize loading tables
ChunYen-Chen Jul 8, 2025
d375e21
Generalize Merger_File_Par and NPar_EachCluster
ChunYen-Chen Jul 8, 2025
016f07a
Bug fix
ChunYen-Chen Jul 8, 2025
70162cf
Generalize Jet_HalfHeight and Jet_Radius
ChunYen-Chen Jul 9, 2025
3b6e5fe
Generalize Merger_Coll_Pos and Merger_Coll_Vel
ChunYen-Chen Jul 9, 2025
8ad1adf
Optimize `SetGridIC` in ClusterMerger test problem
ChunYen-Chen Jul 9, 2025
45669cb
Generalize Bondi_MassBH
ChunYen-Chen Jul 9, 2025
09f6cf2
Optimize note part
ChunYen-Chen Jul 9, 2025
6d65bba
Remove BH_Mass
ChunYen-Chen Jul 9, 2025
b5a47f8
Remove ClusterCenter and CenterVel
ChunYen-Chen Jul 9, 2025
f6753a7
Generalize Mdot*
ChunYen-Chen Jul 9, 2025
ade2daf
Generalize Mdot, Pdot, and Edot of jet injection
ChunYen-Chen Jul 9, 2025
a658281
Generialize Jet_Vec
ChunYen-Chen Jul 9, 2025
36c1fdc
Generalize GasVel, SoundSpeed, GasDens, RelativeVel, ColdGasMass,
ChunYen-Chen Jul 9, 2025
3c587d7
Generalize Jet tables
ChunYen-Chen Jul 11, 2025
9618c35
Generalize Jet tables
ChunYen-Chen Jul 12, 2025
23c6d7c
Separate Aux_Record_ClusterCenter to different file
ChunYen-Chen Jul 12, 2025
9258192
Generalize ClusterCen, BH_Pos, and BH_Vel
ChunYen-Chen Jul 12, 2025
bd4ea50
Generalize num_par_sum
ChunYen-Chen Jul 12, 2025
12403a9
Bugfix for calculating cluster center
ChunYen-Chen Jul 12, 2025
b73f440
Generalize CM_Bondi_* and bug fix
ChunYen-Chen Jul 12, 2025
89d65d0
Bugfix
ChunYen-Chen Jul 12, 2025
5dfc605
Optimize allocate BH variable arrays
ChunYen-Chen Jul 12, 2025
e4c961e
Move GetClusterCenter()
ChunYen-Chen Jul 12, 2025
47b1122
Ganeralize Par_Init_ByFunction_ClusterMerger
ChunYen-Chen Jul 12, 2025
56d4ed6
Optimize Flag_ClusterMerger()
ChunYen-Chen Jul 13, 2025
5fd7fd9
Generalize Aux_Record_ClusterMerger()
ChunYen-Chen Jul 13, 2025
c0cd5c1
Separate setting jet direction into a funciton
ChunYen-Chen Jul 13, 2025
51dba83
Organize the files
ChunYen-Chen Jul 14, 2025
e147030
Generalize GetClusterCenter()
ChunYen-Chen Jul 14, 2025
a2f37c5
Generalize more parameters
ChunYen-Chen Jul 15, 2025
1d2b9f7
Optimization
ChunYen-Chen Jul 15, 2025
efcec6a
Style
ChunYen-Chen Jul 15, 2025
a0deff5
Bugfix of GetClusterCenter()
ChunYen-Chen Jul 15, 2025
981907d
Optimize
ChunYen-Chen Jul 15, 2025
ecd26a7
Wrap by EXACT_COOLING
ChunYen-Chen Jul 15, 2025
757b2bd
Bugfix
ChunYen-Chen Jul 15, 2025
02492e6
Initialize variables as zeros
ChunYen-Chen Jul 15, 2025
3930bc0
Merge pull request #6 from ChunYen-Chen/cool_core_update
jzuhone Jul 18, 2025
8478179
Merge branch 'main' into cool-core-public
jzuhone Jul 18, 2025
09dbc17
Style
ChunYen-Chen Jul 24, 2025
584bdba
Bugfix of momentum feedback
ChunYen-Chen Jul 24, 2025
d2a4d87
Merge pull request #7 from ChunYen-Chen/cool_core_update
jzuhone Jul 24, 2025
9132763
Merge branch 'main' into cool-core-public
jzuhone Jul 28, 2025
7033480
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone Sep 12, 2025
3b696a6
Fix restart jet direction and increase precision
ChunYen-Chen Sep 19, 2025
46a0c3d
Merge pull request #8 from ChunYen-Chen/cool_core_update
jzuhone Sep 19, 2025
dff3c2a
Bugfix
ChunYen-Chen Nov 24, 2025
dab724e
Merge pull request #9 from ChunYen-Chen/cool_core_update
jzuhone Nov 24, 2025
5770709
Initialize Reset variable to 0 in ClusterMerger
ChunYen-Chen Nov 25, 2025
13562e0
Fix the memory free order
ChunYen-Chen Nov 27, 2025
6400772
Merge pull request #10 from ChunYen-Chen/cool_core_update
jzuhone Dec 2, 2025
069a361
Merge branch 'main' into cool-core-public
jzuhone Dec 3, 2025
dccfd81
Update output file
ChunYen-Chen Dec 9, 2025
a7e300e
Update for CCD simulations
ChunYen-Chen Dec 15, 2025
ac077e4
Add more scripts
ChunYen-Chen Dec 15, 2025
784637c
Update for CCD simulation
ChunYen-Chen Dec 15, 2025
5aee0b3
Minor
ChunYen-Chen Dec 15, 2025
53828d7
Merge pull request #11 from ChunYen-Chen/cool_core_update
jzuhone Dec 15, 2025
c0f4a07
Merge branch 'main' into cool-core-public
jzuhone Dec 16, 2025
a422d09
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone Jan 21, 2026
a941989
Apply suggestions from code review
jzuhone Jan 21, 2026
8b86dfa
Apply suggestions from code review
jzuhone Jan 21, 2026
96f8395
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone Jan 21, 2026
a636e6b
Apply more suggestions from code review
jzuhone Jan 21, 2026
ca69828
Merge branch 'main' into cool-core-public
jzuhone Jan 21, 2026
7977231
Apply suggestions from code review
jzuhone Jan 21, 2026
b2373b4
Update src/TestProblem/Hydro/ClusterMerger/Init_TestProb_ClusterMerge…
jzuhone Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions example/test_problem/Hydro/ClusterMerger/Input__Flag_User
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Level User-defined Criteria
0 6.0
1 6.0
2 6.0
3 6.0
4 6.0
5 6.0
6 6.0
7 6.0
8 6.0
9 6.0
10 6.0
11 6.0
12 6.0
13 6.0
14 6.0
15 6.0
16 6.0
17 6.0
18 6.0
19 6.0
20 6.0
21 changes: 18 additions & 3 deletions example/test_problem/Hydro/ClusterMerger/Input__Parameter
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,20 @@ OPT__MINIMIZE_MPI_BARRIER 0 # minimize MPI barriers to improve loa
# (STORE_POT_GHOST, PAR_IMPROVE_ACC=1, OPT__TIMING_BARRIER=0 only; recommend AUTO_REDUCE_DT=0)


# source terms
SRC_DELEPTONIZATION 0 # deleptonization (for simulations of stellar core collapse) [0] ##HYDRO ONLY##
SRC_EXACTCOOLING 0 # exact cooling scheme from Gaspari (2009) [0] ##HYDRO ONLY##
SRC_EC_TEF_N 6001 # number of points for lambda(T) sampling in LOG
SRC_EC_SUBCYCLING 1 # perform subcycling when the cooling time step is small [0=off, 1=on]
SRC_EC_DTCOEF 0.5 # the coefficient of the cooling time step
SRC_USER 0 # user-defined source terms -> edit "Src_User.cpp" [0]
SRC_GPU_NPGROUP -1 # number of patch groups sent into the CPU/GPU source-term solver (<=0=auto) [-1]


# fluid solver in HYDRO (MODEL==HYDRO only)
GAMMA 1.666666666667 # ratio of specific heats (i.e., adiabatic index) [5.0/3.0]
MOLECULAR_WEIGHT 0.59242761692650336 # mean molecular weight -> currently only for post-processing [0.6]
MU_NORM 1.6737352238051868e-24 # m_H value, fully consistent with yt
MINMOD_COEFF 2.0 # coefficient of the generalized MinMod limiter (1.0~2.0) [1.5]
MINMOD_MAX_ITER 0 # maximum number of iterations to reduce MINMOD_COEFF when data reconstruction fails (0=off) [0]
OPT__LR_LIMITER 1 # slope limiter of data reconstruction in the MHM/MHM_RP/CTU schemes:
Expand All @@ -146,9 +157,12 @@ OPT__FIXUP_RESTRICT 1 # correct coarse grids by averaging th
OPT__CORR_AFTER_ALL_SYNC -1 # apply various corrections after all levels are synchronized (see "Flu_CorrAfterAllSync"):
# (-1=auto, 0=off, 1=every step, 2=before dump) [-1]
OPT__NORMALIZE_PASSIVE 1 # ensure "sum(passive_scalar_density) == gas_density" [1]
MIN_DENS 1.0e-07 # minimum mass density (must >= 0.0) [0.0] ##HYDRO, MHD, and ELBDM ONLY##
MIN_PRES 1.0e-09 # minimum pressure (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##
MIN_EINT 1.0e-09 # minimum internal energy (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##
OPT__RESET_FLUID 0 # reset fluid variables after each update -> edit "Flu_ResetByUser.cpp" [0]
OPT__RESET_FLUID_INIT 0 # reset fluid variables during initialization (<0=auto -> OPT__RESET_FLUID, 0=off, 1=on) [-1]
MIN_DENS 0.0 # minimum mass density (must >= 0.0) [0.0] ##HYDRO, MHD, and ELBDM ONLY##
MIN_PRES 0.0 # minimum pressure (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##
MIN_EINT 0.0 # minimum internal energy (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##
MIN_TEMP 1.0e4 # minimum temperature in K (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##
MIN_ENTR 0.0 # minimum entropy (must >= 0.0) [0.0] ##HYDRO and MHD ONLY##


Expand Down Expand Up @@ -230,6 +244,7 @@ OPT__MANUAL_CONTROL 1 # support manually dump data or stop r
# (by generating the file DUMP_GAMER_DUMP or STOP_GAMER_STOP) [1]
OPT__RECORD_USER 0 # record the user-specified info -> edit "Aux_Record_User.cpp" [0]
OPT__OPTIMIZE_AGGRESSIVE 0 # apply aggressive optimizations (experimental) [0]
OPT__SORT_PATCH_BY_LBIDX 1 # sort patches to improve bitwise reproducibility [SERIAL:0, LOAD_BALACNE:1]


# checks
Expand Down
40 changes: 38 additions & 2 deletions example/test_problem/Hydro/ClusterMerger/Input__TestProb
Original file line number Diff line number Diff line change
@@ -1,32 +1,68 @@
# problem-specific runtime parameters
Merger_Coll_NumHalos 2 # number of halos
AGN_feedback 0 # turn on/off (1/0) AGN feedback

# parameters for cluster 1
Merger_File_Prof1 profile1_gamer.h5 # profile table of cluster 1
Merger_File_Par1 1to3_b0.0_gamerp_1.h5 # particle file of cluster 1
Unit_R1 1.0 # the unit of length in cluster 1's IC file (in cgs)
Unit_D1 1.0 # the unit of density in cluster 1's IC file (in cgs)
Unit_P1 1.0 # the unit of pressure in cluster 1's IC file (in cgs)
Merger_Coll_PosX1 6000.0 # X-center of cluster 1 in kpc
Merger_Coll_PosY1 7500.0 # Y-center of cluster 1 in kpc
Merger_Coll_VelX1 375.0 # X-velocity of cluster 1 in km/s
Merger_Coll_VelY1 0.0 # Y-velocity of cluster 1 in km/s
Merger_Coll_IsGas1 1 # If cluster 1 should have gas and not have DM only
Bondi_MassBH1 3.4e8 # black hole mass (in Msun)
Mdot_BH1 0.0 # accretion rate of cluster 1 in Msun/yr
Jet_HalfHeight1 0.70 # jet 1: half height of the cylinder-shape jet source (in kpc)
Jet_Radius1 0.35 # jet 1: radius of the cylinder-shape jet source (in kpc)

# parameters for cluster 2
Merger_File_Prof2 profile2_gamer.h5 # profile table of cluster 2
Merger_File_Par2 1to3_b0.0_gamerp_2.h5 # particle file of cluster 2
Unit_R2 1.0 # the unit of length in cluster 2's IC file (in cgs)
Unit_D2 1.0 # the unit of density in cluster 2's IC file (in cgs)
Unit_P2 1.0 # the unit of pressure in cluster 2's IC file (in cgs)
Merger_Coll_PosX2 9000.0 # X-center of cluster 2 in kpc
Merger_Coll_PosY2 7500.0 # Y-center of cluster 2 in kpc
Merger_Coll_VelX2 -1125.0000000000002 # X-velocity of cluster 2 in km/s
Merger_Coll_VelY2 0.0 # Y-velocity of cluster 2 in km/s
Merger_Coll_IsGas2 1 # If cluster 2 should have gas and not have DM only
Bondi_MassBH2 3.4e8 # black hole mass (in Msun)
Mdot_BH2 0.0 # accretion rate of cluster 2 in Msun/yr
Jet_HalfHeight2 0.70 # jet 2: half height of the cylinder-shape jet source (in kpc)
Jet_Radius2 0.35 # jet 2: radius of the cylinder-shape jet source (in kpc)

# parameters for cluster 3 (disabled for this example)
Merger_File_Prof3 none # profile table of cluster 3
Merger_File_Par3 none # particle file of cluster 3
Unit_R3 1.0 # the unit of length in cluster 3's IC file (in cgs)
Unit_D3 1.0 # the unit of density in cluster 3's IC file (in cgs)
Unit_P3 1.0 # the unit of pressure in cluster 3's IC file (in cgs)
Merger_Coll_PosX3 0 # X-center of cluster 3 in kpc
Merger_Coll_PosY3 0.0 # Y-center of cluster 3 in kpc
Merger_Coll_VelX3 0.0 # X-velocity of cluster 3 in km/s
Merger_Coll_VelY3 0.0 # Y-velocity of cluster 3 in km/s
Merger_Coll_IsGas3 0 # If cluster 3 should have gas and not have DM only
Bondi_MassBH3 3.4e8 # black hole mass (in Msun)
Mdot_BH3 0.0 # accretion rate of cluster 3 in Msun/yr
Jet_HalfHeight3 0.70 # jet 3: half height of the cylinder-shape jet source (in kpc)
Jet_Radius3 0.35 # jet 3: radius of the cylinder-shape jet source (in kpc)

# other parameters
Merger_Coll_UseMetals 0 # look for a metal field in the profile files
# parameters of AGN jet feedback
Accretion_Mode 1 # 1: hot mode; 2: code mode; 3: combine (hot + cold)
eta 1.0 # mass loading factor in jet feedback
eps_f 0.001 # the radiative efficiency in jet feedback
eps_m 0.0 # the fraction of total energy that goes into the thermal energy in jet feedback
R_acc 4.0 # accretion radius: compute the accretion rate (in kpc)
R_dep 4.0 # radius to deplete the accreted gas (in kpc)
JetDirection_case 1 # Methods for choosing the jet direction: 1. Fixed at x-axis; 2. Import from table (generate JetDirection.txt); 3. Align with angular momentum

# other parameters
Merger_Coll_UseMetals 0 # look for a metal field in the profile files [1]
Merger_Coll_LabelCenter 1 # label the particle closest to the center of each cluster [1]
AdjustBHPos 1 # (true/false) --> Adjust the BH position
AdjustBHVel 0 # (true/false) --> Adjust the BH velocity
AdjustPeriod 10 # the time interval of adjustment (in Myr)
fixBH 0 # fix the BH at the simulation box center and set its velocity to be zero (1 cluster only)
6 changes: 6 additions & 0 deletions example/test_problem/Hydro/ClusterMerger/README
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Default setup:
2. Default resolution ~ 15 kpc (MAX_LEVEL = 3)


AGN feedback:
========================================
1. Enable OPT__RESET_FLUID in Input__Parameter and "AGN_feedback" in Input__TestProb.
2. To refine regions around the SMBHs, enable OPT__FLAG_USER and set MAX_LEVEL accordingly.


Note:
========================================
1. Mimic the merging cluster simulation setup of Flash provided by John ZuHone
Expand Down
2 changes: 2 additions & 0 deletions example/test_problem/Hydro/ClusterMerger/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ rm -f Record__Note Record__Timing Record__TimeStep Record__PatchCount Record__Du
Diag* BaseXYslice* BaseYZslice* BaseXZslice* BaseXline* BaseYline* BaseZline* BaseDiag* \
PowerSpec_* Particle_* nohup.out Record__Performance Record__TimingMPI_* \
Record__ParticleCount Record__User Patch_* Record__NCorrUnphy FailedPatchGroup* *.pyc Record__LoadBalance

rm -f Record__Center BH_variable.bin
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@


# load data
ds_gamer = yt.load( "../Data_000008" )
ds_gamer = yt.load( "../Data_000000" )
#ds_gamer = yt.load( "gamer/Data_000100" )
#ds_flash = yt.load( "flash/fiducial_1to1_b0_hdf5_plt_cnt_0100" )


# create a sphere on the max density location
sp_gamer = ds_gamer.sphere( "max", (2.5e3, "kpc") )
sp_gamer = ds_gamer.sphere( "max", (1.0e4, "kpc") )
#sp_flash = ds_flash.sphere( "max", (2.5e3, "kpc") )


Expand Down Expand Up @@ -144,4 +144,4 @@

# show/save figure
plt.savefig( FileOut, bbox_inches='tight', pad_inches=0.05 )
plt.show()
#plt.show()
21 changes: 21 additions & 0 deletions example/test_problem/Hydro/ClusterMerger/yt_script/plot_slice-z.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,30 @@
center_mode = 'c'
dpi = 150


# define the particle filters for SMBH particles
def smbh1( pfilter, data ):
filter = data[ "all", "ParType" ] == 4
return filter

def smbh2( pfilter, data ):
filter = data[ "all", "ParType" ] == 5
return filter

yt.add_particle_filter( "smbh1", function=smbh1, filtered_type="all", requires=["ParType"] )
yt.add_particle_filter( "smbh2", function=smbh2, filtered_type="all", requires=["ParType"] )


yt.enable_parallelism()
ts = yt.DatasetSeries( [ prefix+'/Data_%06d'%idx for idx in range(idx_start, idx_end+1, didx) ] )

for ds in ts.piter():

# apply the particle filters to the dataset
ds.add_particle_filter( 'smbh1' )
ds.add_particle_filter( 'smbh2' )


# density
field = 'density'
sz_dens = yt.SlicePlot( ds, 'z', field, center=center_mode )
Expand Down Expand Up @@ -74,6 +93,8 @@
cdm_mass.set_cmap( field, colormap_cdm )
cdm_mass.set_colorbar_label( field, 'Dark matter mass [$M_{\odot}$]' )
cdm_mass.annotate_timestamp( time_unit='Myr', corner='upper_right' )
cdm_mass.annotate_particles( width=(10.0*Mpc), p_size=10.0, col='b', ptype='smbh1' )
cdm_mass.annotate_particles( width=(10.0*Mpc), p_size=10.0, col='r', ptype='smbh2' )

cdm_mass.save( mpl_kwargs={"dpi":dpi} )

Loading