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
Add Tian Parametrization to Reactive Fluid Transport #5313
Add Tian Parametrization to Reactive Fluid Transport #5313
Conversation
098d075
to
0cc3093
Compare
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.
@danieldouglas92 - Thanks for the contribution and at first glance the PR is in good shape. I made comments on the portions specific to the Tian et al. implementation. For now, a number of comments about documentation. Let's discuss how to proceed after #5245 is ready to be merged.
f1dceaa
to
fd724b7
Compare
a1c8993
to
e0ac649
Compare
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.
@danieldouglas92 - Thanks for continuing the work on this and including all of the tests! Overall, I think the structure of the code is in good shape and the PR is not far off from being after some moderate revisions.
I have some initial comments throughout, but one thing that stood out is that some of the code in your commits is not related to the Tian approximation and may have been introduced during a rebase?
@@ -137,6 +141,10 @@ namespace aspect | |||
|
|||
// Time scale for fluid release and absorption. | |||
double fluid_reaction_time_scale; | |||
double max_peridotite_water; |
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.
double max_peridotite_water; | |
// Parameters for Tian et al. 2018 (tian_approximation) reactive fluid transport scheme | |
double max_peridotite_water; |
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 wonder if we should rename these variables to something like tian_max_peridotite water to avoid confusion with other schemes that involve volatiles, or perhaps these variables are general enough to be reused for other schemes?
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 suspect that at least for now they're specific to the Tian scheme
// at any point (stored in the melt_fractions vector) is | ||
// equal to the sum of the bound fluid content and porosity. | ||
const unsigned int bound_fluid_idx = this->introspection().compositional_index_for_name("bound_fluid"); | ||
// A fluid-rock reaction model where no reactions occur. |
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.
Is this part of this PR, or was it included as part of a rebase?
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.
Ahh I must have made a mistake resolving the merge conflicts! good catch
@@ -137,6 +141,10 @@ namespace aspect | |||
|
|||
// Time scale for fluid release and absorption. | |||
double fluid_reaction_time_scale; | |||
double max_peridotite_water; | |||
double max_gabbro_water; |
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.
Look farther ahead, it looks like this and the other variables below are currently not being used to enforce upper limits? Is the plan to add them in a forthcoming commit?
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.
These are used in the function tian_equilibrium_bound_water_content()
to limit the bound water for the respective rock type.
@@ -246,12 +356,26 @@ namespace aspect | |||
"computed. If the model does not use operator splitting, this parameter is not used. " | |||
"Units: yr or s, depending on the ``Use years " | |||
"in output instead of seconds'' parameter."); | |||
prm.declare_entry ("Maximum weight percent sediment", "3", |
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.
Is the plan to automatically convert these values to a true fraction (i.e., 0.03) down the line?
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.
Yes this is already done in the function tian_equilibrium_bound_water_content
, I figured it was more intuitive to input weight % as a % instead of a fraction, but I'm not attached to it if you think a fraction is a better convention
7480212
to
90710ba
Compare
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.
@danieldouglas92 - Thanks for the updates and this is getting much closer. I added another round of comments, and after that will probably only need to look at it once more (@jdannberg - can you also take a look at some point)? Thanks!
{ | ||
AssertThrow(this->get_material_model().is_compressible() == false, | ||
ExcMessage("The Fluid-reaction scheme zero solubility must be used with an incompressible base model.")); | ||
} |
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.
Why is this removed?
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.
That was a mistake! Thanks for catching that
tests/tian_peridotite.prm
Outdated
|
||
# Post processing | ||
subsection Postprocess | ||
set List of postprocessors = visualization, composition statistics, velocity statistics |
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.
The visualization files are included in this PR, but would be great to have so the data to reproduce the figures can be quickly plotted without running the models. Also, I would output in ascii
rather than vtu
format.
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 actually didn't mean to include the visualization postprocessor, if you think it would be worth it I can output it to ASCII but I don't think it's necessary for the tests to be effective so I can just remove it
90710ba
to
d04bdca
Compare
@danieldouglas92 - To follow up on a comment from my last review, I think it would be really useful to include some figures in the discussion to show how running the tests at higher resolutions can be used to reproduce the figures in the Tian paper. You could also include the python script showing how to make the plots, and then later add it is as part of a new cookbook. |
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.
Thank you for adding this to ASPECT. I've made some suggestions, but otherwise this looks good to me!
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.
Looks good to me (other than the two typos)!
But I agree with @naliboff, it would be great to include an output of one of the tests in the discussion in this pull request, just so that we have a documentation of how it looks like in relation to the figures from the Tian model. |
Updated it in the initial PR message! |
6b75ac9
to
e4f6055
Compare
Implement a solid-fluid reaction scheme that uses parametrized phase diagrams from Tian et al., 2019 https://doi.org/10.1029/2019GC008488.
A comparison between the peridotite phase diagram defined in the study and the ASPECT reproduction are shown below. Note that the y-axis is inverted in the ASPECT models since pressure increases with depth. The low-res output shows what is implemented as a test, and the high-res output is shown for better comparison to the study.
Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable. Ask on the forum if you need help with any step.
Describe what you did in this PR and why you did it.
Before your first pull request:
For all pull requests:
For new features/models or changes of existing features: