Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions source/material_model/rheology/visco_plastic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -429,20 +429,12 @@ namespace aspect
// Compute the dilation terms if necessary.
if (this->get_parameters().enable_prescribed_dilation == true)
{
if (output_parameters.composition_yielding[j] == true)
{
output_parameters.drucker_prager_parameters[j].angle_dilation *= weakening_factors[1];
const std::pair<double,double> dilation_terms = drucker_prager_plasticity.compute_dilation_terms_for_stokes_system (output_parameters.drucker_prager_parameters[j],
non_yielding_viscosity,
effective_edot_ii);
output_parameters.dilation_lhs_terms[j] = dilation_terms.first;
output_parameters.dilation_rhs_terms[j] = dilation_terms.second;
}
else
{
output_parameters.dilation_lhs_terms[j] = 0;
output_parameters.dilation_rhs_terms[j] = 0;
}
output_parameters.drucker_prager_parameters[j].angle_dilation *= weakening_factors[1];
const std::pair<double,double> dilation_terms = drucker_prager_plasticity.compute_dilation_terms_for_stokes_system (output_parameters.drucker_prager_parameters[j],
non_yielding_viscosity,
effective_edot_ii);
output_parameters.dilation_lhs_terms[j] = dilation_terms.first;
output_parameters.dilation_rhs_terms[j] = dilation_terms.second;
}
}

Expand Down
23 changes: 15 additions & 8 deletions source/material_model/visco_plastic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,21 @@ namespace aspect
if (const std::shared_ptr<PrescribedPlasticDilation<dim>> plastic_dilation =
out.template get_additional_output_object<PrescribedPlasticDilation<dim>>())
{
plastic_dilation->dilation_lhs_term[i]
= MaterialUtilities::average_value(volume_fractions,
isostrain_viscosities.dilation_lhs_terms,
MaterialUtilities::arithmetic);
plastic_dilation->dilation_rhs_term[i]
= MaterialUtilities::average_value(volume_fractions,
isostrain_viscosities.dilation_rhs_terms,
MaterialUtilities::arithmetic);
const double dilation_lhs_term = MaterialUtilities::average_value(volume_fractions,
isostrain_viscosities.dilation_lhs_terms,
MaterialUtilities::arithmetic);
const double dilation_rhs_term = MaterialUtilities::average_value(volume_fractions,
isostrain_viscosities.dilation_rhs_terms,
MaterialUtilities::arithmetic);

// When plastic yielding occurs (RHS - LHS * p > 0$), the LHS and RHS terms are set to
// the values calculated by the Drucker Prager model; otherwise, the LHS and RHS terms
// should cancel out (RHS = LHS * p) so as to satisfy the loading-unloading conditions.
plastic_dilation->dilation_lhs_term[i] = dilation_lhs_term;
if (dilation_rhs_term - dilation_lhs_term * in.pressure[i] > 0)
plastic_dilation->dilation_rhs_term[i] = dilation_rhs_term;
Comment on lines +301 to +302
Copy link
Member

Choose a reason for hiding this comment

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

Could you leave a comment here explaining why you need this if-condition and what the individual if-else branches compute?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added comments here. Please let me know if I need to expand them in more details.

else
plastic_dilation->dilation_rhs_term[i] = dilation_lhs_term * in.pressure[i];
}
}

Expand Down
47 changes: 41 additions & 6 deletions tests/kaus_2010_with_plastic_dilation/screen-output
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,51 @@ Number of mesh deformation degrees of freedom: 594
Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 34+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 1
Relative nonlinear residual (total system) after nonlinear iteration 1: 1
Solving Stokes system (AMG)... 27+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.375107
Relative nonlinear residual (total system) after nonlinear iteration 1: 0.375107

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 0+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 9.42459e-08
Relative nonlinear residual (total system) after nonlinear iteration 2: 9.42459e-08
Solving Stokes system (AMG)... 21+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.0350776
Relative nonlinear residual (total system) after nonlinear iteration 2: 0.0350776

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 19+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.0089287
Relative nonlinear residual (total system) after nonlinear iteration 3: 0.0089287

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 16+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.00232937
Relative nonlinear residual (total system) after nonlinear iteration 4: 0.00232937

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 14+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.000636386
Relative nonlinear residual (total system) after nonlinear iteration 5: 0.000636386

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 12+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 0.000187177
Relative nonlinear residual (total system) after nonlinear iteration 6: 0.000187177

Solving temperature system... 0 iterations.
Advecting particles... done.
Rebuilding Stokes preconditioner...
Solving Stokes system (AMG)... 10+0 iterations.
Relative nonlinear residuals (temperature, compositional fields, Stokes system): 1.14953e-16, 0, 0, 0, 0, 0, 0, 0, 0, 6.02812e-05
Relative nonlinear residual (total system) after nonlinear iteration 7: 6.02812e-05


Postprocessing:
Expand Down
2 changes: 1 addition & 1 deletion tests/kaus_2010_with_plastic_dilation/statistics
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
# 38: Particle file name
# 39: RMS velocity (m/year)
# 40: Max. velocity (m/year)
0 0.000000000000e+00 0.000000000000e+00 256 2507 297 18432 2 0 34 35 73 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.11111111e-01 3.47222222e+05 10240 output-kaus_2010_with_plastic_dilation/particles/particles-00000 8.17289302e-04 1.40766238e-03
0 0.000000000000e+00 0.000000000000e+00 256 2507 297 18432 7 0 119 126 293 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.11111111e-01 3.47222222e+05 10240 output-kaus_2010_with_plastic_dilation/particles/particles-00000 8.17267895e-04 1.40762515e-03