-
Notifications
You must be signed in to change notification settings - Fork 274
Prescribed condition with particles #7022
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
lhy11009
wants to merge
1
commit into
geodynamics:main
Choose a base branch
from
lhy11009:prescribed_solution_composition_particles
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 all commits
Commits
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,3 @@ | ||
| Changed: add support for updating the InitialComposition particle property using the prescribed solution plugin. | ||
| <br> | ||
| (Haoyuan Li, 2026/07/11) |
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
65 changes: 65 additions & 0 deletions
65
tests/prescribed_solution_composition_initial_condition_particles.prm
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,65 @@ | ||
| ######################################################### | ||
| # This is modified from the composition_passive.prm | ||
| # parameter file by prescribing the compositional solution | ||
| # from initial compositional fields and using the particle | ||
| # method | ||
|
|
||
| include $ASPECT_SOURCE_DIR/cookbooks/composition_passive/composition_passive.prm | ||
|
|
||
| # Modify the original cookbook to end earlier | ||
| set Start time = 0 | ||
| set End time = 0.1 | ||
| set Use years instead of seconds = false | ||
|
|
||
| # Modify the original cookbook to have coarser meshes | ||
| subsection Mesh refinement | ||
| set Initial adaptive refinement = 0 | ||
| set Initial global refinement = 3 | ||
| set Time steps between mesh refinement = 0 | ||
| end | ||
|
|
||
| # Modify the compositional fields to use particles | ||
| subsection Compositional fields | ||
| set Number of fields = 2 | ||
| set Compositional field methods = particles, particles | ||
| set Mapped particle properties = C_1: initial C_1, C_2: initial C_2 | ||
| end | ||
|
|
||
| # Include the particles | ||
| subsection Particles | ||
| set Minimum particles per cell = 25 | ||
| set Maximum particles per cell = 100 | ||
| set Load balancing strategy = remove and add particles | ||
| set List of particle properties = initial composition, position | ||
| set Interpolation scheme = bilinear least squares | ||
| set Update ghost particles = true | ||
| set Particle generator name = reference cell | ||
| subsection Generator | ||
| subsection Reference cell | ||
| set Number of particles per cell per direction = 7 | ||
| end | ||
| end | ||
| end | ||
|
|
||
| # The next section prescribes the composition inside the domain | ||
| # using a spatially varying function. An indicator function selects | ||
| # the region where the composition is constrained. | ||
| subsection Prescribed solution | ||
| set List of model names = initial composition | ||
| subsection Initial composition | ||
| subsection Indicator function | ||
| set Variable names = x, y | ||
| set Function expression = (x<1) ? 1:0 | ||
| end | ||
| end | ||
| end | ||
|
|
||
| subsection Postprocess | ||
| set List of postprocessors = visualization | ||
|
|
||
| subsection Visualization | ||
| set Interpolate output = false | ||
| set Time between graphical output = 0.1 | ||
| set Output format = gnuplot | ||
| end | ||
| end | ||
31 changes: 31 additions & 0 deletions
31
tests/prescribed_solution_composition_initial_condition_particles/screen-output
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,31 @@ | ||
|
|
||
| Number of active cells: 64 (on 4 levels) | ||
| Number of degrees of freedom: 1,526 (578+81+289+289+289) | ||
|
|
||
| *** Timestep 0: t=0 seconds, dt=0 seconds | ||
| Solving temperature system... 0 iterations. | ||
| Advecting particles... done. | ||
| Solving Stokes system (GMG)... 11+0 iterations. | ||
|
|
||
| Postprocessing: | ||
| Writing graphical output: output-prescribed_solution_composition_initial_condition_particles/solution/solution-00000 | ||
|
|
||
| *** Timestep 1: t=0.0625 seconds, dt=0.0625 seconds | ||
| Solving temperature system... 10 iterations. | ||
| Advecting particles... done. | ||
| Solving Stokes system (GMG)... 7+0 iterations. | ||
|
|
||
| Postprocessing: | ||
|
|
||
| *** Timestep 2: t=0.1 seconds, dt=0.0375 seconds | ||
| Solving temperature system... 10 iterations. | ||
| Advecting particles... done. | ||
| Solving Stokes system (GMG)... 12+0 iterations. | ||
|
|
||
| Postprocessing: | ||
| Writing graphical output: output-prescribed_solution_composition_initial_condition_particles/solution/solution-00001 | ||
|
|
||
| Termination requested by criterion: end time | ||
|
|
||
|
|
||
|
|
Oops, something went wrong.
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.