Support using the Jeans length as the star formation threshold#420
Open
hsinhaoHHuang wants to merge 34 commits intogamer-project:mainfrom
Open
Support using the Jeans length as the star formation threshold#420hsinhaoHHuang wants to merge 34 commits intogamer-project:mainfrom
hsinhaoHHuang wants to merge 34 commits intogamer-project:mainfrom
Conversation
Conflicts: src/Output/Output_DumpData_Total_HDF5.cpp
…HHuang/gamer into JeansLengthStarFormation
ChunYen-Chen
requested changes
Feb 14, 2025
Collaborator
ChunYen-Chen
left a comment
There was a problem hiding this comment.
@hsinhaoHHuang Thanks for the contribution. I have left some comments including some bugs. Also, please update your branch to solve the conflict.
example/test_problem/Hydro/StarFormationThreshold/generate_make.sh
Outdated
Show resolved
Hide resolved
example/test_problem/Hydro/StarFormationThreshold/yt_script/plot_star_formation_rate.py
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Par_Init_ByFunction_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Init_TestProb_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Init_TestProb_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
Conflicts: src/Output/Output_DumpData_Total_HDF5.cpp
hsinhaoHHuang
commented
Feb 17, 2025
Contributor
Author
hsinhaoHHuang
left a comment
There was a problem hiding this comment.
@ChunYen-Chen
Thank you so much for your review. I have modified the code accordingly.
About adding the new runtime parameter in the doc/wiki, I plan to wait for #431 and update it (or I will update that PR if this PR is merged earlier), since all the star formation runtime parameters are completed there.
example/test_problem/Hydro/StarFormationThreshold/generate_make.sh
Outdated
Show resolved
Hide resolved
example/test_problem/Hydro/StarFormationThreshold/yt_script/plot_star_formation_rate.py
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Par_Init_ByFunction_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Init_TestProb_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
example/test_problem/Hydro/StarFormationThreshold/yt_script/plot_projection.py
Show resolved
Hide resolved
src/TestProblem/Hydro/StarFormationThreshold/Init_TestProb_StarFormationThreshold.cpp
Outdated
Show resolved
Hide resolved
ChunYen-Chen
approved these changes
Feb 21, 2025
Conflicts: src/Output/Output_DumpData_Total_HDF5.cpp
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goal
Changes
Generalize the original
SF_CreateStar_AGORA()asSF_CreateStar_GeneralGalaxy()for general local star formation recipes.SF_CreateStar_Check.cppSF_CreateStar_GetStarMass.cppAdd a new star formation scheme
SF_CREATE_STAR_SCHEME = 2to use the Jeans length as the star formation threshold.Add a new runtime parameter
SF_CREATE_STAR_MAX_GAS_JEANSL, where the star will only form when the local Jeans length is less thandh*SF_CREATE_STAR_MAX_GAS_JEANSL.Add a new test problem,
Hydro/StarFormationThreshold,to test the implementation of star formation.Verifications
With the modifications, we can still reproduce the results of the original
Hydro/AGORA_IsolatedGalaxytest problem (tested withBITWISE_REPRODUCIBILITYon).In the new
Hydro/StarFormationThresholdtest problem, the star forms in the expected region with the expected star mass and star formation rate.Setups
MAX_LEVEL 0OPT__FREEZE_PAR 1OPT__FREEZE_FLUID 1OPT__RESET_FLUID 1SF_CREATE_STAR_MASS_EFF 1.0e-2SF_CREATE_STAR_MIN_STAR_MASS 1.0e3 (Msun)SF_CREATE_STAR_MAX_STAR_MFRAC 0.5Initial conditions
SF_CREATE_STAR_SCHEME = 1, which uses density =8.37e-24 g cm^-3as the thresholdSF_CREATE_STAR_SCHEME = 2, which uses Jeans length =1 dhas the thresholdTest with `OPT__RESET_FLUID = 0`, fluid was removed every step