-
Notifications
You must be signed in to change notification settings - Fork 242
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
Added coordinate systems to Gravity model function plug-in #5752
Merged
+895
−1
Merged
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 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 @@ | ||
Added: The Function expression plug-in for the Gravity model can now evaluate functions in multiple coordinate systems. The plug-in was amended to read in entries to the "Coordinate system" parameter in the Function subsection and Gravity Model section of the parameter file. There are three added tests for the Gravity model function plug-in to ensure the cartesian, spherical, and depth coordinate systems evaluate functions as expected in a 2D cylindrical annulus. | ||
<br> | ||
(Madeleine Kerr, 2024/06/02) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# This is a test based on benchmarks/onset-of-convection/convection-box-base.prm. | ||
# It makes sure that the gravity plugin 'function' works correctly | ||
# for a Cartesian coordinate system. | ||
|
||
set Dimension = 2 | ||
set Use years in output instead of seconds = true | ||
set Output directory = output | ||
set Pressure normalization = surface | ||
set Surface pressure = 0 | ||
set Use conduction timestep = true | ||
|
||
subsection Termination criteria | ||
set Termination criteria = end step | ||
set End step = 0 | ||
end | ||
|
||
subsection Formulation | ||
set Formulation = Boussinesq approximation | ||
end | ||
|
||
subsection Geometry model | ||
set Model name = spherical shell | ||
|
||
subsection Spherical shell | ||
set Outer radius = 6371000 | ||
set Inner radius = 3481000 | ||
end | ||
end | ||
|
||
subsection Initial temperature model | ||
set Model name = function | ||
|
||
subsection Function | ||
set Coordinate system = spherical | ||
set Variable names = r,phi | ||
set Function expression = 2500 + 10*sin(10*phi) | ||
end | ||
end | ||
|
||
subsection Boundary temperature model | ||
set Fixed temperature boundary indicators = bottom, top | ||
set List of model names = spherical constant | ||
|
||
subsection Spherical constant | ||
set Inner temperature = 3500 | ||
set Outer temperature = 0 | ||
end | ||
end | ||
|
||
subsection Boundary velocity model | ||
set Tangential velocity boundary indicators = bottom, top | ||
end | ||
|
||
#subsection Gravity model | ||
# set Model name = radial constant | ||
# | ||
# subsection Radial constant | ||
# set Magnitude = 10.0 | ||
# end | ||
#end | ||
|
||
subsection Gravity model | ||
set Model name = function | ||
subsection Function | ||
set Coordinate system = cartesian | ||
set Variable names = x,y | ||
set Function expression = x;y | ||
end | ||
end | ||
|
||
subsection Material model | ||
set Model name = simple | ||
|
||
subsection Simple model | ||
set Reference density = 4000 | ||
set Reference specific heat = 1250 | ||
set Reference temperature = 0 | ||
set Thermal conductivity = 4.0 | ||
set Thermal expansion coefficient = 3e-5 | ||
set Viscosity = 1e23 | ||
end | ||
end | ||
|
||
subsection Mesh refinement | ||
set Initial global refinement = 0 | ||
set Initial adaptive refinement = 0 | ||
set Time steps between mesh refinement = 0 | ||
end | ||
|
||
subsection Postprocess | ||
set List of postprocessors = velocity statistics, visualization | ||
|
||
subsection Visualization | ||
set Time steps between graphical output = 5 | ||
set List of output variables = gravity | ||
set Output format = gnuplot | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
Number of active cells: 12 (on 1 levels) | ||
Number of degrees of freedom: 240 (144+24+72) | ||
|
||
*** Timestep 0: t=0 years, dt=0 years | ||
Solving temperature system... 0 iterations. | ||
Rebuilding Stokes preconditioner... | ||
Solving Stokes system... 13+0 iterations. | ||
|
||
Postprocessing: | ||
RMS, max velocity: 98.6 m/year, 201 m/year | ||
Writing graphical output: output-gravity_model_cartesian/solution/solution-00000 | ||
|
||
Termination requested by criterion: end step | ||
|
||
|
||
|
163 changes: 163 additions & 0 deletions
163
tests/gravity_model_cartesian/solution/solution-00000.0000.gnuplot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 1: Time step number | ||
# 2: Time (years) | ||
# 3: Time step size (years) | ||
# 4: Number of mesh cells | ||
# 5: Number of Stokes degrees of freedom | ||
# 6: Number of temperature degrees of freedom | ||
# 7: Iterations for temperature solver | ||
# 8: Iterations for Stokes solver | ||
# 9: Velocity iterations in Stokes preconditioner | ||
# 10: Schur complement iterations in Stokes preconditioner | ||
# 11: RMS velocity (m/year) | ||
# 12: Max. velocity (m/year) | ||
# 13: Visualization file name | ||
0 0.000000000000e+00 0.000000000000e+00 12 168 72 0 12 14 39 9.86096651e+01 2.00683097e+02 output-gravity_model_cartesian/solution/solution-00000 |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to add
#include <aspect/utilities.h>
so that ASPECT knows what a coordinate system is. Talk to me tomorrow if you want to know why it is not a problem on your laptop, but it is for the tester.