-
Notifications
You must be signed in to change notification settings - Fork 273
[GeoMechanicsApplication] Implement hardening process for Mohr-Coulomb, based on the modified class structure #13965
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
Changes from 18 commits
18d02d5
193f999
a337918
7b2fa35
bad8482
31b63a1
9b064e0
4e72305
35f0ad1
78e86fc
c15c117
d01e531
163654c
a5bde4b
3f502fd
e5da12e
cbae902
064546b
58d7c68
5345b79
4f973a4
1b2c0fc
5439346
f0ba844
277c5a0
051834a
5c28601
9d0845c
c7a7088
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,83 +14,25 @@ | |||||||||||||||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| #include "custom_constitutive/coulomb_with_tension_cut_off_impl.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "custom_processes/set_automated_initial_variable_process.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "custom_utilities/constitutive_law_utilities.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "custom_utilities/ublas_utilities.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "geo_mechanics_application_variables.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "includes/properties.h" | ||||||||||||||||||||||||||||||||||||||||||||
| #include "includes/serializer.h" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| namespace | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| using namespace Kratos; | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector CalculateCornerPoint(double FrictionAngleInRadians, double Cohesion, double TensileStrength, double Apex) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| // Check whether the tension cut-off lies beyond the apex | ||||||||||||||||||||||||||||||||||||||||||||
| auto result = Vector{ZeroVector(2)}; | ||||||||||||||||||||||||||||||||||||||||||||
| result[0] = Apex; | ||||||||||||||||||||||||||||||||||||||||||||
| if (TensileStrength > result[0]) return result; | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| result[0] = (TensileStrength - Cohesion * std::cos(FrictionAngleInRadians)) / | ||||||||||||||||||||||||||||||||||||||||||||
| (1.0 - std::sin(FrictionAngleInRadians)); | ||||||||||||||||||||||||||||||||||||||||||||
| result[1] = (Cohesion * std::cos(FrictionAngleInRadians) - TensileStrength * std::sin(FrictionAngleInRadians)) / | ||||||||||||||||||||||||||||||||||||||||||||
| (1.0 - std::sin(FrictionAngleInRadians)); | ||||||||||||||||||||||||||||||||||||||||||||
| return result; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| bool IsStressAtTensionApexReturnZone(const Vector& rTrialSigmaTau, double TensileStrength, double Apex) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| return TensileStrength < Apex && rTrialSigmaTau[0] - rTrialSigmaTau[1] - TensileStrength > 0.0; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| bool IsStressAtTensionCutoffReturnZone(const Vector& rTrialSigmaTau, double TensileStrength, double Apex, const Vector& rCornerPoint) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| return TensileStrength < Apex && | ||||||||||||||||||||||||||||||||||||||||||||
| rCornerPoint[1] - rTrialSigmaTau[1] - rCornerPoint[0] + rTrialSigmaTau[0] > 0.0; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| bool IsStressAtCornerReturnZone(const Vector& rTrialSigmaTau, | ||||||||||||||||||||||||||||||||||||||||||||
| const Vector& rDerivativeOfFlowFunction, | ||||||||||||||||||||||||||||||||||||||||||||
| const Vector& rCornerPoint) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| return (rTrialSigmaTau[0] - rCornerPoint[0]) * rDerivativeOfFlowFunction[1] - | ||||||||||||||||||||||||||||||||||||||||||||
| (rTrialSigmaTau[1] - rCornerPoint[1]) * rDerivativeOfFlowFunction[0] >= | ||||||||||||||||||||||||||||||||||||||||||||
| 0.0; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector ReturnStressAtTensionApexReturnZone(double TensileStrength) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| auto result = Vector{ZeroVector{2}}; | ||||||||||||||||||||||||||||||||||||||||||||
| result[0] = TensileStrength; | ||||||||||||||||||||||||||||||||||||||||||||
| return result; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector ReturnStressAtTensionCutoffReturnZone(const Vector& rSigmaTau, | ||||||||||||||||||||||||||||||||||||||||||||
| const Vector& rDerivativeOfFlowFunction, | ||||||||||||||||||||||||||||||||||||||||||||
| double TensileStrength) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| const auto lambda = (TensileStrength - rSigmaTau[0] - rSigmaTau[1]) / | ||||||||||||||||||||||||||||||||||||||||||||
| (rDerivativeOfFlowFunction[0] + rDerivativeOfFlowFunction[1]); | ||||||||||||||||||||||||||||||||||||||||||||
| return rSigmaTau + lambda * rDerivativeOfFlowFunction; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector ReturnStressAtRegularFailureZone(const Vector& rSigmaTau, | ||||||||||||||||||||||||||||||||||||||||||||
| CoulombYieldSurface& rCoulombYieldSurface, | ||||||||||||||||||||||||||||||||||||||||||||
| const Vector& rDerivativeOfFlowFunction) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| const auto lambda = rCoulombYieldSurface.CalculatePlasticMultiplier(rSigmaTau, rDerivativeOfFlowFunction); | ||||||||||||||||||||||||||||||||||||||||||||
| return rSigmaTau + lambda * rDerivativeOfFlowFunction; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| } // namespace | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| namespace Kratos | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| CoulombWithTensionCutOffImpl::CoulombWithTensionCutOffImpl(const Properties& rMaterialProperties) | ||||||||||||||||||||||||||||||||||||||||||||
| : mCoulombYieldSurface{rMaterialProperties}, mTensionCutOff{rMaterialProperties[GEO_TENSILE_STRENGTH]} | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| if (rMaterialProperties.Has(GEO_ABS_YIELD_FUNCTION_TOLERANCE)) { | ||||||||||||||||||||||||||||||||||||||||||||
| mAbsoluteYieldFunctionValueTolerance = rMaterialProperties[GEO_ABS_YIELD_FUNCTION_TOLERANCE]; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if (rMaterialProperties.Has(GEO_MAX_PLASTIC_ITERATIONS)) { | ||||||||||||||||||||||||||||||||||||||||||||
| mMaxNumberOfPlasticIterations = rMaterialProperties[GEO_MAX_PLASTIC_ITERATIONS]; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| bool CoulombWithTensionCutOffImpl::IsAdmissibleSigmaTau(const Vector& rTrialSigmaTau) const | ||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -104,51 +46,106 @@ bool CoulombWithTensionCutOffImpl::IsAdmissibleSigmaTau(const Vector& rTrialSigm | |||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector CoulombWithTensionCutOffImpl::DoReturnMapping(const Vector& rTrialSigmaTau, | ||||||||||||||||||||||||||||||||||||||||||||
| CoulombYieldSurface::CoulombAveragingType AveragingType) | ||||||||||||||||||||||||||||||||||||||||||||
| CoulombYieldSurface::CoulombAveragingType AveragingType, | ||||||||||||||||||||||||||||||||||||||||||||
| double& kappa_start) | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| Vector result = ZeroVector(2); | ||||||||||||||||||||||||||||||||||||||||||||
| const auto kappa_start = mCoulombYieldSurface.GetKappa(); | ||||||||||||||||||||||||||||||||||||||||||||
| Vector result = ZeroVector(2); | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| for (unsigned int counter = 0; counter < mCoulombYieldSurface.GetMaxIterations(); ++counter) { | ||||||||||||||||||||||||||||||||||||||||||||
| const auto apex = mCoulombYieldSurface.CalculateApex(); | ||||||||||||||||||||||||||||||||||||||||||||
| if (kappa_start < 0.0) { | ||||||||||||||||||||||||||||||||||||||||||||
| kappa_start = mCoulombYieldSurface.GetKappa(); | ||||||||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||||||||
| mCoulombYieldSurface.SetKappa(kappa_start); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtTensionApexReturnZone(rTrialSigmaTau, mTensionCutOff.GetTensileStrength(), apex)) { | ||||||||||||||||||||||||||||||||||||||||||||
| return ReturnStressAtTensionApexReturnZone(mTensionCutOff.GetTensileStrength()); | ||||||||||||||||||||||||||||||||||||||||||||
| for (auto counter = std::size_t{0}; counter < mMaxNumberOfPlasticIterations; ++counter) { | ||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtTensionApexReturnZone(rTrialSigmaTau)) { | ||||||||||||||||||||||||||||||||||||||||||||
| return ReturnStressAtTensionApexReturnZone(); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| const auto corner_point = CalculateCornerPoint(mCoulombYieldSurface.GetFrictionAngleInRadians(), | ||||||||||||||||||||||||||||||||||||||||||||
| mCoulombYieldSurface.GetCohesion(), | ||||||||||||||||||||||||||||||||||||||||||||
| mTensionCutOff.GetTensileStrength(), apex); | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtTensionCutoffReturnZone(rTrialSigmaTau, mTensionCutOff.GetTensileStrength(), | ||||||||||||||||||||||||||||||||||||||||||||
| apex, corner_point)) { | ||||||||||||||||||||||||||||||||||||||||||||
| return ReturnStressAtTensionCutoffReturnZone( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, mTensionCutOff.DerivativeOfFlowFunction(rTrialSigmaTau), | ||||||||||||||||||||||||||||||||||||||||||||
| mTensionCutOff.GetTensileStrength()); | ||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtTensionCutoffReturnZone(rTrialSigmaTau)) { | ||||||||||||||||||||||||||||||||||||||||||||
| return ReturnStressAtTensionCutoffReturnZone(rTrialSigmaTau); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
mnabideltares marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtCornerReturnZone( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, mCoulombYieldSurface.DerivativeOfFlowFunction(rTrialSigmaTau, AveragingType), | ||||||||||||||||||||||||||||||||||||||||||||
| corner_point)) { | ||||||||||||||||||||||||||||||||||||||||||||
| result = corner_point; | ||||||||||||||||||||||||||||||||||||||||||||
| if (IsStressAtCornerReturnZone(rTrialSigmaTau, AveragingType)) { | ||||||||||||||||||||||||||||||||||||||||||||
| result = CalculateCornerPoint(); | ||||||||||||||||||||||||||||||||||||||||||||
| } else { // Regular failure region | ||||||||||||||||||||||||||||||||||||||||||||
| result = ReturnStressAtRegularFailureZone( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, mCoulombYieldSurface, | ||||||||||||||||||||||||||||||||||||||||||||
| mCoulombYieldSurface.DerivativeOfFlowFunction(rTrialSigmaTau, AveragingType)); | ||||||||||||||||||||||||||||||||||||||||||||
| result = ReturnStressAtRegularFailureZone(rTrialSigmaTau, AveragingType); | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| const auto lambda = mCoulombYieldSurface.CalculatePlasticMultiplier( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, mCoulombYieldSurface.DerivativeOfFlowFunction(rTrialSigmaTau, AveragingType)); | ||||||||||||||||||||||||||||||||||||||||||||
| const double kappa = kappa_start + mCoulombYieldSurface.CalculateEquivalentPlasticStrain( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, AveragingType, lambda); | ||||||||||||||||||||||||||||||||||||||||||||
| const auto kappa = kappa_start + mCoulombYieldSurface.CalculateEquivalentPlasticStrainIncrement( | ||||||||||||||||||||||||||||||||||||||||||||
| rTrialSigmaTau, AveragingType); | ||||||||||||||||||||||||||||||||||||||||||||
| mCoulombYieldSurface.SetKappa(kappa); | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| double error = std::abs(mCoulombYieldSurface.YieldFunctionValue(result)); | ||||||||||||||||||||||||||||||||||||||||||||
| if (error < mCoulombYieldSurface.GetConvergenceTolerance()) break; | ||||||||||||||||||||||||||||||||||||||||||||
| if (std::abs(mCoulombYieldSurface.YieldFunctionValue(result)) < mAbsoluteYieldFunctionValueTolerance) { | ||||||||||||||||||||||||||||||||||||||||||||
| break; | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| return result; | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the proposed |
||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Vector CoulombWithTensionCutOffImpl::CalculateCornerPoint() const | ||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||
| // Check whether the tension cut-off lies beyond the apex | ||||||||||||||||||||||||||||||||||||||||||||
| auto result = Vector{ZeroVector(2)}; | ||||||||||||||||||||||||||||||||||||||||||||
| result[0] = mCoulombYieldSurface.CalculateApex(); | ||||||||||||||||||||||||||||||||||||||||||||
| const auto tensile_strength = mTensionCutOff.GetTensileStrength(); | ||||||||||||||||||||||||||||||||||||||||||||
| if (tensile_strength > result[0]) return result; | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| const auto cohesion = mCoulombYieldSurface.GetCohesion(); | ||||||||||||||||||||||||||||||||||||||||||||
| const auto sin_phi = std::sin(mCoulombYieldSurface.GetFrictionAngleInRadians()); | ||||||||||||||||||||||||||||||||||||||||||||
| const auto cos_phi = std::cos(mCoulombYieldSurface.GetFrictionAngleInRadians()); | ||||||||||||||||||||||||||||||||||||||||||||
| result[0] = (tensile_strength - cohesion * cos_phi) / (1.0 - sin_phi); | ||||||||||||||||||||||||||||||||||||||||||||
| result[1] = (cohesion * cos_phi - tensile_strength * sin_phi) / (1.0 - sin_phi); | ||||||||||||||||||||||||||||||||||||||||||||
| return result; | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| // Check whether the tension cut-off lies beyond the apex | |
| auto result = Vector{ZeroVector(2)}; | |
| result[0] = mCoulombYieldSurface.CalculateApex(); | |
| const auto tensile_strength = mTensionCutOff.GetTensileStrength(); | |
| if (tensile_strength > result[0]) return result; | |
| const auto cohesion = mCoulombYieldSurface.GetCohesion(); | |
| const auto sin_phi = std::sin(mCoulombYieldSurface.GetFrictionAngleInRadians()); | |
| const auto cos_phi = std::cos(mCoulombYieldSurface.GetFrictionAngleInRadians()); | |
| result[0] = (tensile_strength - cohesion * cos_phi) / (1.0 - sin_phi); | |
| result[1] = (cohesion * cos_phi - tensile_strength * sin_phi) / (1.0 - sin_phi); | |
| return result; | |
| const auto tensile_strength = mTensionCutOff.GetTensileStrength(); | |
| if (const auto apex = mCoulombYieldSurface.CalculateApex(); tensile_strength > apex) | |
| return UblasUtilities::CreateVector({apex, 0.0}); | |
| const auto cohesion = mCoulombYieldSurface.GetCohesion(); | |
| const auto sin_phi = std::sin(mCoulombYieldSurface.GetFrictionAngleInRadians()); | |
| const auto cos_phi = std::cos(mCoulombYieldSurface.GetFrictionAngleInRadians()); | |
| return UblasUtilities::CreateVector({(tensile_strength - cohesion * cos_phi) / (1.0 - sin_phi), | |
| (cohesion * cos_phi - tensile_strength * sin_phi) / (1.0 - sin_phi)}); |
Note that the early exit now looks consistent with the result returned at line 129.
Uh oh!
There was an error while loading. Please reload this page.