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.
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
Fixup newton solver and elastic rheology #5580
Fixup newton solver and elastic rheology #5580
Changes from 5 commits
8fa9034
e767c30
638630b
852b9a0
24fe57b
ff6aa4f
4f30907
f49375b
4c8a936
19d0e36
e265b12
ff98dd6
cac47c4
0d5edfe
bd3dc15
8aaa42f
70a53d6
2d797c5
b78e839
21e5eb4
fa2be51
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
@naliboff Thanks very much for reviewing my codes!
I have tried the benchmark and the modified Newton solver performs poorly :-(. I think the problem is caused by the following two facts:
to
which looks identical. However, the viscoelastic strain rate is calculated by
$$\dot{\boldsymbol{\varepsilon}}_{ve} = \text{dev}(\dot{\boldsymbol{\varepsilon}}) + \frac{\boldsymbol{\tau}^{\text{old}}}{2G\Delta t},$$
where deviator() is applied to the current strain rate (this is necessary, since the viscosity is calculated with the deviatoric strain rate). Consequently, the RHS is not precisely equal to the system residual. This problem has been fixed by restoring the original RHS, and the covergence rate is much better (see the log files below), but still not as fast as expected.
The following log files are the results of the main branch, this PR (after fixing problem 1), and without cell averaging. The convergence rate without cell averaging is much faster than the previous two.
log_main.txt
log_pr5580.txt
log_no_avg.txt
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.
Will this condition also capture the case for the full Newton solver?
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. In fact, after restoring the RHS only the full Newton solver needs the viscoelastic strain rate now.
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 does this condition need to be updated to only reflect the full Newton solver?