-
Notifications
You must be signed in to change notification settings - Fork 76
Full implementation of AGN feedback for the cool-core destruction project #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ShuangShuang0411
wants to merge
193
commits into
gamer-project:main
Choose a base branch
from
ShuangShuang0411:cool-core-public
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 9b11556
Remove trailing spaces
ChunYen-Chen 00cc778
Replace tabs by spaces
ChunYen-Chen f2fa092
GAMER style
ChunYen-Chen 391fdd9
Bug fix
ChunYen-Chen c19d69f
Style
ChunYen-Chen 008ac34
Style
ChunYen-Chen 10a2e32
Use malloc. Style
ChunYen-Chen c3d138e
Style
ChunYen-Chen 177b857
Define distance function
ChunYen-Chen 01758fd
Use the distance macro
ChunYen-Chen 5e9edd1
Style
ChunYen-Chen b3399d2
Optimize the initialization
ChunYen-Chen 555b602
Merge branch 'hdf5_more_record' into cool-core-chunyen
ChunYen-Chen e6ecf34
Add user HDF5 output
ChunYen-Chen efcad91
Update the HDF5 name
ChunYen-Chen 6134c57
Style
ChunYen-Chen 18d92fe
Bug fix and add load user HDF5 data function
ChunYen-Chen 719ecb4
Bug fix, support new HDF5 method, and remove old method
ChunYen-Chen 3b7d112
Remove BH_variable.bin
ChunYen-Chen 9aa1e7d
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen d3e50f0
Bug fix
ChunYen-Chen 83b8fe7
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen f4fd291
Merge remote-tracking branch 'origin/hdf5_more_record' into cool-core…
ChunYen-Chen 65fb821
Use static OpenMP schedule
ChunYen-Chen 6560733
Bug fix of hot accretion rate
ChunYen-Chen 47a6ad0
Merge pull request #1 from ChunYen-Chen/cool-core-chunyen
ShuangShuang0411 31d8a68
[Bugfix] Escape velocity
ChunYen-Chen bb151e4
[Bugfix] fixBH center location
ChunYen-Chen 0eeccbb
[Bugfix] Prototype
ChunYen-Chen 2bc6359
[Bugfix] Excluding SRHD
ChunYen-Chen 7fd7e8c
[Bugfix] Initial BH position
ChunYen-Chen fae7638
[Bugfix] Missing Output_HDF5_TestProb
ChunYen-Chen 2bc413c
[Bugfix] Remove outdated code
ChunYen-Chen 7ff90bd
[Bugfix] Check TOOL only when enable cooling
ChunYen-Chen 74fc76f
Review comments
ChunYen-Chen 0309317
Merge pull request #2 from ChunYen-Chen/cool-core-public
jzuhone 196b9f5
Apply suggestions from code review
jzuhone 8eb1035
Apply suggestions from code review
jzuhone 2a381b2
Merge branch 'main' into cool-core-public
jzuhone a8fded1
Addressing comments
jzuhone c6c6d25
Merge branch 'main' into cool-core-public
jzuhone 3399e65
Compilation fixes
b668a04
Fix minor compilation issues in Init_GAMER.cpp and Mis_GetTimeStep.cpp
hyschive d8c37c6
Code review suggestions
jzuhone 79ab80a
More responses to review
jzuhone b37892c
Include exact-cooling dt only when necessary
hyschive 747e918
Abort if SRC_EXACTCOOLING is enabled before its release
hyschive cf0fe3d
Merge pull request #3 from hyschive/cool-core-public
jzuhone 7d4cb84
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone 690d373
Update src/SourceTerms/ExactCooling/CPU_Src_ExactCooling.cpp
jzuhone e84c87c
Apply suggestions from code review
jzuhone da139db
Apply suggestions from code review
jzuhone 5df06a7
Fix spelling
jzuhone 39dbf5d
Fix alignments
jzuhone 4fbb28d
More cleanup and responding to comments
jzuhone b027f93
nits
jzuhone d7d0987
resolve a number of issues
jzuhone a885ca5
Remove unit parameters
jzuhone 800009d
Merge branch 'main' into cool-core-public
jzuhone da0d0d6
Fixing more issues
jzuhone 12df224
Apply suggestions from code review
jzuhone 591dbf8
Fix particle types but still allow for the same functionality to dist…
jzuhone 87fbbc7
Remove unused array
jzuhone 95794e9
small fix
jzuhone 47766c7
Responding to reviewer comments
jzuhone 34ae3f6
Apply suggestions from code review
jzuhone 45434cd
Resolving more reviewer comments
jzuhone aeebe4f
Responding to reviewer comments
jzuhone 51e34c8
Responding to more reviewer comments
jzuhone 0bc59a0
Don't reset positions
jzuhone 6bfd78d
Responding to reviewer comments
jzuhone 1a0409e
Creating and using Merger_Coll_NumBHs and fixing more instances of do…
jzuhone 4318e47
Bugfix
jzuhone 0f7d7bd
Some work on accretion
jzuhone c91ff26
Respond to reviewer comments
jzuhone 8d750f5
reset to script
jzuhone 525d597
Merge branch 'main' into cool-core-public
jzuhone 0160aca
Fix parameter values to that of paper
jzuhone 8f168be
Renaming variables for clarity
jzuhone 1bae9dc
Responding to comments
jzuhone 1a81b5d
Add EC parameters to Input__Parameter
jzuhone 6c086a0
Make the jet direction file a runtime parameter
jzuhone 3de3369
Don't allocate this
jzuhone 2274ae9
Merge branch 'main' into cool-core-public
jzuhone 0d55fb8
responding to more comments
jzuhone 1a47f36
Respond to reviewer suggestion
jzuhone 6e5f16a
Fix depletion
jzuhone bf3bbf3
[Workflow] Update all parameters wiki page
ChunYen-Chen 10f4cdf
Remove trailing blanks
ChunYen-Chen 529e37b
Update to the latest GAMER
ChunYen-Chen b52cbbf
Add function description of BH_accretion_rate
ChunYen-Chen fe06561
Extend the column spaces of the output table
ChunYen-Chen ae65de2
Bugfix
ChunYen-Chen a6ce49c
Record both hot and cold accretion rate
ChunYen-Chen 3b2d182
Minor
ChunYen-Chen 8869c64
Merge pull request #4 from ChunYen-Chen/record_hot_cool
jzuhone 16c0166
Do not reallocate memory too frequently
jzuhone 2901f55
vector calculations and style fixes
jzuhone dc90fe8
Add in exact cooling parameters to/from HDF5
jzuhone 397d0ff
Merge branch 'main' into cool-core-public
jzuhone 1107c0d
whitespace fixes
jzuhone e7dfe21
Fixing compilation issues
6dd8279
Bugfix
ChunYen-Chen c1403f6
Merge pull request #5 from ChunYen-Chen/cool_core_bugfix
jzuhone 3d2b89a
Bugfix
4918384
Use raw string
ChunYen-Chen 52bb982
Restore file
ChunYen-Chen 8dd7611
Add `EXACT_COOLING` compilation option
ChunYen-Chen 8e3522b
Remove useless function
ChunYen-Chen 0ab86a4
Style
ChunYen-Chen 66be96e
Must enable `EXACT_COOLING`
ChunYen-Chen a355560
Optimization
ChunYen-Chen 0aecdf5
Merge branch 'main' into cool-core-public
jzuhone f64d961
Apply suggestions from code review
jzuhone 298c807
Apply suggestions from code review
jzuhone 18a125a
Responding to code review comments
jzuhone 5706129
Fix frame change
jzuhone 1133365
Merge remote-tracking branch 'shuang/cool-core-public' into cool_core…
ChunYen-Chen c16a889
Style
ChunYen-Chen 8871f24
Generalize Table_R/D/P/M and Merger_NBin
ChunYen-Chen b5a705d
Generalize ColorFieldIdx
ChunYen-Chen 775d502
Load `Merger_Coll_NumHalos` first
ChunYen-Chen d2e0e8b
Generalize Merger_Coll_IsGas
ChunYen-Chen c97e342
Generalize Merger_File_Prof
ChunYen-Chen 40006bf
Generalize loading tables
ChunYen-Chen d375e21
Generalize Merger_File_Par and NPar_EachCluster
ChunYen-Chen 016f07a
Bug fix
ChunYen-Chen 70162cf
Generalize Jet_HalfHeight and Jet_Radius
ChunYen-Chen 3b6e5fe
Generalize Merger_Coll_Pos and Merger_Coll_Vel
ChunYen-Chen 8ad1adf
Optimize `SetGridIC` in ClusterMerger test problem
ChunYen-Chen 45669cb
Generalize Bondi_MassBH
ChunYen-Chen 09f6cf2
Optimize note part
ChunYen-Chen 6d65bba
Remove BH_Mass
ChunYen-Chen b5a47f8
Remove ClusterCenter and CenterVel
ChunYen-Chen f6753a7
Generalize Mdot*
ChunYen-Chen ade2daf
Generalize Mdot, Pdot, and Edot of jet injection
ChunYen-Chen a658281
Generialize Jet_Vec
ChunYen-Chen 36c1fdc
Generalize GasVel, SoundSpeed, GasDens, RelativeVel, ColdGasMass,
ChunYen-Chen 3c587d7
Generalize Jet tables
ChunYen-Chen 9618c35
Generalize Jet tables
ChunYen-Chen 23c6d7c
Separate Aux_Record_ClusterCenter to different file
ChunYen-Chen 9258192
Generalize ClusterCen, BH_Pos, and BH_Vel
ChunYen-Chen bd4ea50
Generalize num_par_sum
ChunYen-Chen 12403a9
Bugfix for calculating cluster center
ChunYen-Chen b73f440
Generalize CM_Bondi_* and bug fix
ChunYen-Chen 89d65d0
Bugfix
ChunYen-Chen 5dfc605
Optimize allocate BH variable arrays
ChunYen-Chen e4c961e
Move GetClusterCenter()
ChunYen-Chen 47b1122
Ganeralize Par_Init_ByFunction_ClusterMerger
ChunYen-Chen 56d4ed6
Optimize Flag_ClusterMerger()
ChunYen-Chen 5fd7fd9
Generalize Aux_Record_ClusterMerger()
ChunYen-Chen c0cd5c1
Separate setting jet direction into a funciton
ChunYen-Chen 51dba83
Organize the files
ChunYen-Chen e147030
Generalize GetClusterCenter()
ChunYen-Chen a2f37c5
Generalize more parameters
ChunYen-Chen 1d2b9f7
Optimization
ChunYen-Chen efcec6a
Style
ChunYen-Chen a0deff5
Bugfix of GetClusterCenter()
ChunYen-Chen 981907d
Optimize
ChunYen-Chen ecd26a7
Wrap by EXACT_COOLING
ChunYen-Chen 757b2bd
Bugfix
ChunYen-Chen 02492e6
Initialize variables as zeros
ChunYen-Chen 3930bc0
Merge pull request #6 from ChunYen-Chen/cool_core_update
jzuhone 8478179
Merge branch 'main' into cool-core-public
jzuhone 09dbc17
Style
ChunYen-Chen 584bdba
Bugfix of momentum feedback
ChunYen-Chen d2a4d87
Merge pull request #7 from ChunYen-Chen/cool_core_update
jzuhone 9132763
Merge branch 'main' into cool-core-public
jzuhone 7033480
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone 3b696a6
Fix restart jet direction and increase precision
ChunYen-Chen 46a0c3d
Merge pull request #8 from ChunYen-Chen/cool_core_update
jzuhone dff3c2a
Bugfix
ChunYen-Chen dab724e
Merge pull request #9 from ChunYen-Chen/cool_core_update
jzuhone 5770709
Initialize Reset variable to 0 in ClusterMerger
ChunYen-Chen 13562e0
Fix the memory free order
ChunYen-Chen 6400772
Merge pull request #10 from ChunYen-Chen/cool_core_update
jzuhone 069a361
Merge branch 'main' into cool-core-public
jzuhone dccfd81
Update output file
ChunYen-Chen a7e300e
Update for CCD simulations
ChunYen-Chen ac077e4
Add more scripts
ChunYen-Chen 784637c
Update for CCD simulation
ChunYen-Chen 5aee0b3
Minor
ChunYen-Chen 53828d7
Merge pull request #11 from ChunYen-Chen/cool_core_update
jzuhone c0f4a07
Merge branch 'main' into cool-core-public
jzuhone a422d09
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone a941989
Apply suggestions from code review
jzuhone 8b86dfa
Apply suggestions from code review
jzuhone 96f8395
Merge branch 'cool-core-public' of ssh://github.com/ShuangShuang0411/…
jzuhone a636e6b
Apply more suggestions from code review
jzuhone ca69828
Merge branch 'main' into cool-core-public
jzuhone 7977231
Apply suggestions from code review
jzuhone b2373b4
Update src/TestProblem/Hydro/ClusterMerger/Init_TestProb_ClusterMerge…
jzuhone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
jzuhone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 | ||
jzuhone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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) | ||
jzuhone marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jzuhone marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.