-
Notifications
You must be signed in to change notification settings - Fork 235
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
Make Newton iterations in the CompositeViscoPlastic rheology more efficient #5946
Conversation
/rebuild |
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 very promising and I am curious how it performs in practice. I left a bunch of comments, but mostly small renaming and documentation requests.
1800 1.28447e+17 568948 1e-11 0.749975 0.250025 2.2682e-17 0 1.28447e-11 | ||
1900 1.09563e+17 191256 1e-11 0.962698 0.0373021 2.59166e-19 0 1.09563e-11 | ||
2000 1.02964e+17 59280.1 1e-11 0.99654 0.00345962 2.26225e-21 0 1.02964e-11 | ||
1000 3.45602e+19 6.89205e+08 1e-11 1.29846e-06 0.00363514 0.0654305 0.930933 3.45602e-09 |
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.
So at low temperatures the changes lead to higher viscosities and stresses. Is that because of the power law of the drucker prager rheology? Do you approach the old values as your stress exponent goes to infinity? I just want to make sure the difference we see is caused by the functional change in the drucker prager rheology, and not by the change to the Newton iteration.
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 and yes.
- As the temperature goes down, the purely viscous stress at a given strain rate increases.
- The "yield stress" in the new Drucker Prager flow law is associated with a constant reference strain rate
- At a fixed strain rate, the ratio of plastic strain to viscous strain will increase as temperature decreases.
At even lower temperatures, plastic strain increasingly will dominate, and so the stress will tend towards a constant value. That value will depend on the "yield stress", reference strain rate and actual strain rate.
Hi @gassmoeller , thanks for the detailed review! |
Today @anne-glerum pointed me at the stress limiter in the viscoplastic rheology: aspect/source/material_model/rheology/visco_plastic.cc Lines 334 to 342 in e7ff10c
This is exactly the same as aspect/source/material_model/rheology/drucker_prager_power.cc Lines 101 to 112 in 61bc576
What do you think about renaming The only thing that bothers me is that in visco_plastic, the parameter "Reference strain rate" is used both to initialise the strain rate in the first time step, and also to set the reference strain rate in the stress limiter. I don't know what the best solution is:
Any thoughts? |
Yes, reusing code is always good.
That seems like an earlier oversight, in particular because the use in the stress limiter is not even documented in the input parameter comment (it only mentions that the strain rate is used during the first time step). I would say let's introduce the new parameter and use that one. For a future PR: In order to use the DruckerPragerPower as stress limiter in ViscoPlastic do you need a different limiting stress for different compositional fields? (I just noticed that the stress limiter seems to allow different values for different fields, while DruckerPragerPower seems to use a single yield stress).
Yes, let's focus on one thing at a time. As far as I can see there are three things mixed up in this PR:
It would be ideal to separate this in 3 PRs, but you know better what can be cleanly separated and what not. I will leave that decision up to you, but please do not add anything else in this PR (like using DruckerPragerPower in visco_plastic). |
Thanks @gassmoeller , that all seems sensible. |
I do not disagree, but I would like to check with @anne-glerum and @naliboff if those different exponents were implemented on purpose and if they have use cases for them. Removing unnecessary functionality is good, but removing functionality that is needed and/or already in production use would be bad.
That wasnt what I meant, but it seems reasonable and more useful than the different exponents. Something for a follow-up PR though. |
Addressed by #5978. |
This PR does a few small things that facilitate efficient calculation of
CompositeViscoPlastic
viscosities:compute_approximate_log_strain_rate_and_derivative
, mirroringcompute_exact_log_strain_rate_and_derivative
already in the code.CompositeViscoPlastic
is modified to use the approximate Peierls creep rheology and the power law Drucker-Prager rheology.CompositeViscoPlastic
is modified to iterate over the log stress to get the correct total log strain rate. The change from iterating on stress and strain to log stress and strain, and the use of pure power law rheologies (at fixed state) leads to much improved performance, typically requiring 1--6 relatively inexpensive iterations rather than 1--20+ more expensive iterations with the old code.Further improvements in efficiency can be made in future PRs, particularly in the approximate Peierls creep rheology (see #5945).
I'm happy to split this PR up if necessary. All brought together here because I developed the features in tandem, and to demonstrate the eventual goal.