Skip to content

Conversation

danieldouglas92
Copy link
Contributor

@danieldouglas92 danieldouglas92 commented May 30, 2024

This pull request implements the framework that will allow the user to apply more complicated viscosity prefactors to the visco-plastic material model, like accounting for the water fugacity. This is what I implement here. The compositional field 'bound_water' is queried and used to determine the water fugacity for olivine using Hirth and Kohlstaedt 2004 (10.1029/138GM06). This should be set up in such a way that it can be applied to the other rheologies, like diffusion/dislocation creep. This PR takes the place of #4965

Copy link
Member

@bobmyhill bobmyhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @danieldouglas92, thanks for doing this!

The code structure is what I had envisaged, but the content of ViscosityPrefactors<dim>::compute_viscosity(...) is unexpected to me. I think what you want is to vary your viscosity as a function of the values of the compositional fields, right? If so, the viscosity should not be an explicit function of time.

My thought was that compute_viscosity would have different / additional arguments compared to the function in constant_viscosity_prefactors.cc. For example, you could have base_viscosity and a double or vector-double of state_parameters, and then have the function calculate the new viscosity based on the values of those state parameters. I think you just need a power law, right?

To start with, maybe just code up the functional form that you will need for your scientific case; we can extend in later PRs as needed.

Copy link
Contributor

@naliboff naliboff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bobmyhill - here is a summary of my conversation with @danieldouglas92 about this PR.

  1. The long-term goal is to have a single rheology module that supports multiple cases for handling prefactor terms that are multiplied with the viscous flow laws.

  2. The way for selecting this could be through enum variable, similar to ViscosityScheme in rheology/visco_plastic

       enum ViscosityPrefactorSheme
       {
         constant,
         mantle_hydration
       } viscosity_prefactor_scheme;
    

with more schemes added on through time.

  1. As a starting point, this PR could be modified to just re-implement the constant scheme and re-use the same test? Or perhaps it would be better to add in a slightly different (but simple to implement) test case so that we are not re-implementing a constant viscosity prefactor multiplication case in visco_plastic?

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch from e904352 to 12fd230 Compare May 31, 2024 04:07
Copy link
Contributor

@naliboff naliboff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good, thanks! Mainly comments on documentation and naming schemes.

Copy link
Contributor

@naliboff naliboff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danieldouglas92 - Here are a few additional comments on the test case.

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch from ee4a742 to dbc0fad Compare May 31, 2024 19:19
@danieldouglas92
Copy link
Contributor Author

This should be ready for another round of reviews @naliboff and @bobmyhill, thanks in advance!

Copy link
Member

@bobmyhill bobmyhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I think this is almost there, just a few comments.

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch from dbc0fad to 8c3bdf9 Compare May 31, 2024 20:21
Copy link
Contributor

@naliboff naliboff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more minor renaming suggestions

@danieldouglas92
Copy link
Contributor Author

Should be ready for another run through @naliboff

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch from 0436540 to 65b032a Compare June 1, 2024 02:05
Copy link
Contributor

@naliboff naliboff left a 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 the PR is in great shape! Only a few minor cleanup requests below.

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch from 65b032a to 2728257 Compare June 1, 2024 03:55
@danieldouglas92
Copy link
Contributor Author

As long as the testers pass, I think I just need one last review from you @bobmyhill!

@naliboff
Copy link
Contributor

naliboff commented Jun 1, 2024

/rebuild

Copy link
Member

@bobmyhill bobmyhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just a few doc comments and then this is good to go.

@danieldouglas92
Copy link
Contributor Author

Ready for another (hopefully last) run through @naliboff and @bobmyhill! Thanks again for all the helpful feedback

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch 3 times, most recently from 1ef8694 to e4edbed Compare June 1, 2024 22:49
Copy link
Contributor

@naliboff naliboff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go from my side, thanks!

@danieldouglas92 danieldouglas92 force-pushed the add_viscosity_prefactor branch 3 times, most recently from 54fa1a0 to 1edef1e Compare June 2, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants