Skip to content
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

Merged
merged 4 commits into from Nov 16, 2016

Conversation

naliboff
Copy link
Contributor

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.

@gassmoeller
Copy link
Member

/run-tests

// Strain weakening
double strain_ii = 0;
if (use_strain_weakening == true)

Copy link
Member

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.

Copy link
Member

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.

@naliboff
Copy link
Contributor Author

naliboff commented Sep 6, 2016

@gassmoeller - thanks for the thorough review, going through point by point now.

@naliboff
Copy link
Contributor Author

@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.

Copy link
Member

@gassmoeller gassmoeller left a 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))
Copy link
Member

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",
Copy link
Member

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). "
Copy link
Member

Choose a reason for hiding this comment

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

implemented by

@gassmoeller
Copy link
Member

After making the changes you will also have to replace the test output by the official output from Timo's tester.

@naliboff
Copy link
Contributor Author

Thanks Rene. I will update once the tester has finished.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 1, 2016

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.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 2, 2016

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?

@bangerth
Copy link
Contributor

bangerth commented Nov 4, 2016

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.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 9, 2016

@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.

@bangerth
Copy link
Contributor

bangerth commented Nov 9, 2016

There is still a problem with that test, though I can't say what exactly is going wrong there :-(

@naliboff
Copy link
Contributor Author

naliboff commented Nov 9, 2016

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.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 9, 2016

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.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 9, 2016

All tests are passing now.

@bangerth
Copy link
Contributor

bangerth commented Nov 9, 2016

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?

@naliboff
Copy link
Contributor Author

naliboff commented Nov 9, 2016

@bangerth - the pull request is now squashed into 3 commits.

@naliboff
Copy link
Contributor Author

naliboff commented Nov 10, 2016

@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?
Edit - I went ahead and just removed it, apologies if this causes any issues.

@gassmoeller
Copy link
Member

I am happy with the changes. Thanks for staying with us through the revisions!
Do you want to add an entry to doc/changes.h? This will give you credit for the work in the next release letter. If so: Could you also remove the accidental changes in the output of the visco_plastic and visco_plastic_yield test results? They have not changed in any significant way, but you overwrote the timing result with one of your machine (that will not be checked by the tester anyway). Ready to merge once you have decided about the entry to changes.h.

@naliboff
Copy link
Contributor Author

@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?

@gassmoeller
Copy link
Member

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:

  1. Remove the lines containing the numbers (take a look at other test output how that might look like). You can also achieve this by running the test with ctest and copy the resulting screen-output.notime file over the existing one.
  2. Revert the files to their state on master. There are git command to achieve this, but the simplest thing to do might be to switch to master, copy the two files to backup locations. Switch back to your branch and move the backup files over the existing ones (effectively replacing the file version on your branch with the ones from master).

@naliboff
Copy link
Contributor Author

Test output updated and added text to changes.h. There is a conflict with changes.h, though. Should I update this a rebase on my end, or can github resolve the merge conflict?

@bangerth
Copy link
Contributor

You'll need to rebase by hand, unfortunately, to resolve the merge conflict.

@naliboff
Copy link
Contributor Author

Fixed, should be good to go 👍

@gassmoeller gassmoeller merged commit c7f291d into geodynamics:master Nov 16, 2016
@naliboff naliboff deleted the strain_weakening branch January 27, 2017 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants