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 strain weakening option to the visco_plastic material model #1192
Conversation
/run-tests |
// Strain weakening | ||
double strain_ii = 0; | ||
if (use_strain_weakening == true) | ||
|
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 are missing some curly braces here.
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.
Ah, it might work like this as well, but I would prefer if you would do everything up to line 220 only if use_strain_weakening
is set to true. This way it is clearer that all of that only matters for strain weakening. And the declaration of strain_ii
might go into that if-loop as well if you do not need it later on.
@gassmoeller - thanks for the thorough review, going through point by point now. |
@gassmoeller - I think this is good to go. I am holding off on changing how the finite strain fields are handles in the cell averaging, as the whole material model is going to be reworked in the not too distant future. |
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.
Thanks, this is much better. There are two minor issues left, and the question about the default value for use_strain_weakening
. Usually we try to make sure parameter files run with a newer ASPECT version give the same (or very similar) results to the original version, therefore I would prefer the default to be 'false'. What is you opinion?
phi = phi + ( phi - phi * friction_strain_weakening_factors[j] ) * strain_fraction; | ||
|
||
// | ||
if ( (this->get_timestep_number() == 6) && (strain_ii > 0.01) && (j==4)) |
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 this might be debug output? Please remove that.
"If only one value is given, then all use the same value. Units: $1 / K$"); | ||
|
||
// Strain weakening parameters | ||
prm.declare_entry ("Use strain weakening", "true", |
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.
Do you prefer "true" to be the new default value? This will change user models that were done with this material model retroactively, usually we try to avoid such changes, unless they seem to be better in any case (but in this case it will change results unpredictably). I would prefer to have a "false" default. This would also remove the changes to the visco_plastic test output below. What do you think?
"The user has the option to linearly reduce the cohesion and " | ||
"internal friction angle as a function of accumulated finite strain. " | ||
"Finite strain may be calculated through tracers (implemented by Rene Gassmoeller) " | ||
"or the compositional field finite strain plugin (implemented Juliane Dannberg). " |
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.
implemented by
After making the changes you will also have to replace the test output by the official output from Timo's tester. |
Thanks Rene. I will update once the tester has finished. |
Hmm, the tester is still failing on one of the visco_plastic_yield tests. However, looking at the diff file it is not clear to me what exactly the tester is having a problem with. I'll try re-running the test and see if the tester gives the same errors. |
Ok, the tester seems to be working except for the gccpetsc tests on 8.4.1.b. It is failing on the boundary_composition/ascii_data test. Is there anything else I can do on my end or this is a separate tester issue? |
I can't seem to match anything in this patch with the error in question. Can you rebase to current master and force push your branch again? That should restart the tester on the current state. |
d4b5c0a
to
eeb6e0d
Compare
@bangerth - I just rebased with the current master and forced pushed to my branch. The tester appears to have restarted and hopefully this fixes and clarifies the issue. |
There is still a problem with that test, though I can't say what exactly is going wrong there :-( |
Odd, it was a different test failing last time. I'll re run the test on my end, update the output and see if the tester at least gives a diff file. |
The last test failing was almost certainly due to not having a new parameter for updating ghost particles this is required with active tracers. I should have rerun the test to make sure everything was working after the rebase. |
All tests are passing now. |
I'll let @gassmoeller see whether he was happy with this. In the meantime, can you squash all of your commits into one or a smaller number? |
057ac71
to
b2ad54a
Compare
@bangerth - the pull request is now squashed into 3 commits. |
@gassmoeller - tests are passing, but it seems with the rebase/squash I accidentally picked up an additional commit? Is this ok to merge or do I need to remove commit e882953 from my history? |
b2ad54a
to
52eac73
Compare
I am happy with the changes. Thanks for staying with us through the revisions! |
@gassmoeller - Of course and thanks for all the improvements with the review! I will indeed add something to changes.h. For the two tests you mention, exactly what part of the screen-output files needs to be changed? If it is the timing section starting with the wall clock speed, should I be replacing with the timing output from the tester? |
For the two tests I mentioned, only the timing output at the end of the screen output was changed by your commit (I suppose you have run the tests on your machine and updated the output files although nothing had changed). But these timings are irrelevant for the tester. You can see the changes here: https://github.com/geodynamics/aspect/pull/1192/files#diff-da161af4088a5c66c7d20f9ae6594b18 The two things you could do:
|
Test output updated and added text to |
You'll need to rebase by hand, unfortunately, to resolve the merge conflict. |
a90fd08
to
0a20531
Compare
Fixed, should be good to go 👍 |
Implementation of a strain weakening option to the visco_plastic material model. Strain weakening is calculated via finite strain, which may be calculated through particles or compositional fields through the finite_strain plugin.
For either of these options, the material model assumes (and states in the documentation) that the fields tracking each finite strain component must be listed prior to any additional fields. This allows removing the contribution of the finite strain fields from the volume fraction of each element. Is there a better way to do this? I can think of a few other methods, but am interested to hear new ideas on this point.