-
Notifications
You must be signed in to change notification settings - Fork 64
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
[WIP] Sink Particle #413
Draft
Anchewei
wants to merge
103
commits into
gamer-project:main
Choose a base branch
from
Anchewei:SinkParticle_PrepareFinal
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.
Draft
[WIP] Sink Particle #413
Conversation
This file contains 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
@hsinhaoHHuang Please help review it. Since it's still draft, please focus on the key structure of this PR and ignore the details for now. |
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.
Sink Particle
A new star formation criteria.
Creation
A sink particle is created only when the following checks are all passed (Federrath et al. 2010):
SF_CREATE_SINK_MIN_GAS_DENS
.SF_CREATE_SINK_ACC_RADIUS
.Note: a check considering whether some regions inside the control volume pass the above tests simultaneously is included.
Accretion
Once a sink particle is created, it can accrete gas from its surroundings in the sphere defined by
SF_CREATE_SINK_ACC_RADIUS
.The cells in such sphere will go through the following checks (Federrath et al. 2010):
SF_CREATE_SINK_MIN_GAS_DENS
.If the above tests are all passed, then the exceeded gas mass will be accreted by the particle, and particle's velocity will be also updated to ensure momentum conservation.
TestProblem - SinkParTest
A new
TestProblem
(SinkParTest) is added to test the particle creation and accretion.New Parameters:
SF_CREATE_SINK_MIN_GAS_DENS
: The minimum gas density allowed to form sink particles (count/cm^3) [1.0e10]SF_CREATE_SINK_ACC_RADIUS
: The accretion radius in cells at the highest refinement level [0.5*PATCH_SIZE]SF_CREATE_SINK_MAX_NPAR_MPI
: The maximum number of particles per MPI rank [100]FB_ACC
: Turn on particle accretion [0]. Note thatSF_CREATE_SINK_MIN_GAS_DENS
andSF_CREATE_SINK_ACC_RADIUS
will be used.Note
FB_GHOST_SIZE
= 8 is set.CPU_EoS_Barotropic_SinkParTest.cpp
).Results