Skip to content

[GeoMechanicsApplication] Convert the reordering of Mohr-Coulomb principal stresses to averaging#13595

Merged
WPK4FEM merged 31 commits intomasterfrom
geo/13371-convert-reordering-to-averaging-new
Jul 10, 2025
Merged

[GeoMechanicsApplication] Convert the reordering of Mohr-Coulomb principal stresses to averaging#13595
WPK4FEM merged 31 commits intomasterfrom
geo/13371-convert-reordering-to-averaging-new

Conversation

@mnabideltares
Copy link
Contributor

📝 Description
In order to make the currently implemented Mohr-Coulomb consistent to UDSM of Plaxis, we need to change the reordering of the principal stresse to averaging type.

🆕 Changelog

  • Averaging is implemented replacing ot reordering
  • The mapping directions are averaged

Copy link
Contributor

@markelov208 markelov208 left a comment

Choose a reason for hiding this comment

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

Hi Mohamed, finally your hard work can be used by others. Here are my comments. Hope some of them may be useful.

@mnabideltares mnabideltares requested a review from markelov208 July 7, 2025 11:24
Copy link
Contributor

@markelov208 markelov208 left a comment

Choose a reason for hiding this comment

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

Hi Wijtze Pieter, thank you very much for the changes, especially, enum class. They made the code is cleaner and more understandable. I have a few minor comments.

mCoulombWithTensionCutOffImpl.DoReturnMapping(r_prop, trial_sigma_tau, averaging_type);
mapped_principal_stress_vector = StressStrainUtilities::TransformSigmaTauToPrincipalStresses(
mapped_sigma_tau, averaged_principal_trial_stress_vector);
mapped_principal_stress_vector[1] = mapped_principal_stress_vector[static_cast<std::size_t>(averaging_type)];
Copy link
Contributor

Choose a reason for hiding this comment

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

I am afraid using the static_cast is error prone. I would suggest to use switch with enum. Then there is no need to assign enum values explicitly,

Copy link
Contributor

Choose a reason for hiding this comment

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

changed to a switch with enum

Comment on lines +60 to +61
auto p_coulomb_yield_surface =
std::make_unique<CoulombYieldSurface>(friction_angle, cohesion, dilatancy_angle);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am just curious, what is the reason for this change? It requires change in line 66.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was done for a previous different attempt of refactoring, I have reverted the change now.

Copy link
Contributor

@rfaasse rfaasse left a comment

Choose a reason for hiding this comment

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

Thank you for all the work on this (both the coding as well as all investigations and debugging sessions). It looks clear to me, although I don't know how to check all formulations etc.

I have some minor suggestions, but I think the main question is if we need to change the documentation

averaged_principal_trial_stress_vector);
mapped_sigma_tau =
mCoulombWithTensionCutOffImpl.DoReturnMapping(r_prop, trial_sigma_tau, averaging_type);
mapped_principal_stress_vector = StressStrainUtilities::TransformSigmaTauToPrincipalStresses(
Copy link
Contributor

Choose a reason for hiding this comment

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

When there is averaging, the TransformSigmaTauToPrincipalStresses function is called twice and the result of the first call is overwritten. We might be able to remove the redundant call in case of averaging.

Copy link
Contributor

Choose a reason for hiding this comment

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

Before the result of the first call is overwritten, the result of the first call is used to determine ( with FindAveragingType() ) whether the averaging route should be taken. There is no redundant call.

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 am not sure what you mean. We can discuss it when you are available.

Copy link
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

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

I think we are ready.

Comment on lines +57 to 63
bool IsStressAtCornerReturnZone(const Vector& rTrialSigmaTau,
const Vector& rDerivativeOfFlowFunction,
const Vector& rCornerPoint)
{
return rTrialSigmaTau[0] - rCornerPoint[0] -
(rTrialSigmaTau[1] - rCornerPoint[1]) * std::sin(DilatancyAngleInRadians) >=
return (rTrialSigmaTau[0] - rCornerPoint[0]) * rDerivativeOfFlowFunction[1] -
(rTrialSigmaTau[1] - rCornerPoint[1]) * rDerivativeOfFlowFunction[0] >=
0.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is now general, such that it can be used for all return directions.

averaged_principal_trial_stress_vector);
mapped_sigma_tau =
mCoulombWithTensionCutOffImpl.DoReturnMapping(r_prop, trial_sigma_tau, averaging_type);
mapped_principal_stress_vector = StressStrainUtilities::TransformSigmaTauToPrincipalStresses(
Copy link
Contributor

Choose a reason for hiding this comment

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

Before the result of the first call is overwritten, the result of the first call is used to determine ( with FindAveragingType() ) whether the averaging route should be taken. There is no redundant call.

Copy link
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

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

With the updated documentation, for me this is ready to go.

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in GeoMechanicsApplication (Deltares) Jul 10, 2025
@WPK4FEM WPK4FEM merged commit e99fb96 into master Jul 10, 2025
10 checks passed
@WPK4FEM WPK4FEM deleted the geo/13371-convert-reordering-to-averaging-new branch July 10, 2025 14:58
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in GeoMechanicsApplication (Deltares) Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

[GeoMechanicsApplication] Convert the reordering of Mohr-Coulomb principal stresses to averaging

4 participants