aspect icon indicating copy to clipboard operation
aspect copied to clipboard

Simplify fill_plastic_outputs that fills PlasticAdditionalOutputs

Open anne-glerum opened this issue 2 years ago • 1 comments

fill_plastic_outputs in MM/R/visco_plastic.cc outputs the current friction angle and cohesion and whether yielding occurs or not. The function is called in MM/visco_plastic.cc after calculate_isostrain_viscosities has been called. calculate_isostrain_viscosities returns whether the material is yielding and the current friction angle per volume_fraction. Whether or not yielding occurs is averaged over the volume_fractions and passed as an argument to fill_plastic_outputs.

In fill_plastic_outputs, calculate_isostrain_viscosities is called again to get the current friction angle. As it doesn't return the current cohesion, the cohesion is computed again (it is also done in calculate_isostrain_viscosities) including strain weakening. Current friction angle and cohesion are then averaged over the volume fractions.

I propose to have calculate_isostrain_viscosities also return the current cohesion per volume fraction, and to pass on yielding, friction and cohesion per volume fraction to fill_plastic_outputs. fill_plastic_outputs can then do the averaging only.

@naliboff , @bobmyhill Do you agree? If so, I'll make a PR.

anne-glerum avatar Aug 03 '22 10:08 anne-glerum

@anne-glerum - Yes, this seems like a good idea!

naliboff avatar Aug 05 '22 21:08 naliboff

Addressed by #4941

anne-glerum avatar Jul 13 '23 04:07 anne-glerum