Skip to content

[GeoMechanicsApplication] Extend class GeoIncrementalLinearElasticInterfaceLaw to include planar interface behavior#13586

Merged
markelov208 merged 38 commits intomasterfrom
geo/13333-extend-GeoIncrementalLinearInterfaceLaw
Jul 14, 2025
Merged

[GeoMechanicsApplication] Extend class GeoIncrementalLinearElasticInterfaceLaw to include planar interface behavior#13586
markelov208 merged 38 commits intomasterfrom
geo/13333-extend-GeoIncrementalLinearInterfaceLaw

Conversation

@markelov208
Copy link
Contributor

@markelov208 markelov208 commented Jul 2, 2025

📝 Description
A brief description of the PR.

Please mark the PR with appropriate tags:

  • modified input for CalculateElasticMatrix in ConstitutiveLawDimension
  • added interface_plane_strain and interface_three_dimensional_surface for 2D and 3D cases, respectively
  • removed underscore in Geo_IncrementalLinearElasticInterfaceLaw
  • registered GeoIncrementalLinearElasticInterface3DSurfaceLaw for future
  • added 11 unit tests
  • updated documentation for Incremental linear elastic interface law

@markelov208 markelov208 self-assigned this Jul 2, 2025
@markelov208 markelov208 requested a review from a team as a code owner July 2, 2025 18:29
@markelov208 markelov208 removed the request for review from a team July 2, 2025 18:29
This reverts commit 475f8fb.

# Conflicts:
#	applications/GeoMechanicsApplication/custom_constitutive/incremental_linear_elastic_interface_law.cpp
#	applications/GeoMechanicsApplication/geo_mechanics_application.h
#	applications/GeoMechanicsApplication/tests/cpp_tests/custom_constitutive/test_incremental_linear_elastic_interface_law.cpp
#	applications/GeoMechanicsApplication/tests/cpp_tests/custom_elements/test_line_interface_element.cpp
…faceLaw

# Conflicts:
#	applications/GeoMechanicsApplication/tests/cpp_tests/custom_constitutive/test_incremental_linear_elastic_interface_law.cpp
@markelov208 markelov208 requested review from WPK4FEM, avdg81 and rfaasse July 4, 2025 08:03
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.

Hi Gennady,
When you and Anne dragged me into talking about this PR, I had started reading. I hardly have anything to add to the discussion we already had. The implementation and testing of it are clear to me.
Wijtze Pieter

{
auto result = ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix(
NormalStiffness, ShearStiffness, TractionSize);
result(2, 2) = result(1, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we modify MakeInterfaceConstitutiveMatrix such that it fills the (2, 2) position correctly or is it more natural to have a local implementation of it?

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 don't have a solid view right now. Perhaps, Anne and Richard will tell their opinion. Initially, MakeGeneralInterfaceConstitutiveMatrix was created but after our conversation I removed it because many such methods may follow.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @WPK4FEM, and I think we can do it as follows. First, we need to add a function parameter of type std::size_t to ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix, which represents the number of normal components. Subsequently, when we call this function from either InterfaceThreeDimensionalSurface::CalculateElasticMatrix or InterfacePlaneStrain::CalculateElasticMatrix, we can use the return value of member GetNumberOfNormalComponents to supply the value for this new argument. And then we can remove the assignment here at line 27 (i.e. delete result(2, 2) = result(1, 1);).

The implementation of ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix needs to be modified as well. For instance:

Matrix ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix(double      NormalStiffness,
                                                                 double      ShearStiffness,
                                                                 std::size_t TractionSize,
                                                                 std::size_t NumberOfNormalComponents)
{
    auto result = Matrix{ZeroMatrix{TractionSize, TractionSize}};
    for (auto i = std::size_t{0}; i < NumberOfNormalComponents; ++i) result(i, i) = NormalStiffness;
    for (auto i = NumberOfNormalComponents; i < TractionSize; ++i) result(i, i) = ShearStiffness;
    return result;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used this version. Now I see why there is GetNumberOfNormalComponents function

Comment on lines +368 to +369
KRATOS_REGISTER_CONSTITUTIVE_LAW("Geo_IncrementalLinearElasticInterface3DSurfaceLaw",
mIncrementalLinearElasticInterface3DSurfaceLaw)
Copy link
Contributor

Choose a reason for hiding this comment

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

We (Gennady, Anne, Wijtze Pieter, Richard) discussed to drop the _ from here and also from line 367. That implies that some tests should be changed accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The underscore is removed

@markelov208 markelov208 requested a review from WPK4FEM July 8, 2025 10:56
…faceLaw

# Conflicts:
#	applications/GeoMechanicsApplication/custom_constitutive/mohr_coulomb_with_tension_cutoff.cpp
#	applications/GeoMechanicsApplication/custom_constitutive/mohr_coulomb_with_tension_cutoff.h
Copy link
Contributor

@avdg81 avdg81 left a comment

Choose a reason for hiding this comment

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

Hi Gennady,

Thank you very much for creating this clear and well-tested extension of the incremental linear elastic law for interface elements. I have several suggestions, but none of them is blocking. Hope this helps.

One more thing: can you please add an issue on the backlog about updating the dike model with a sheet pile wall, to account for the renaming of the incremental linear elastic law for interfaces? Thanks.

#pragma once

#include "containers/flags.h"
#include "includes/properties.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Since Properties are passed by reference-to-const, I would prefer to use a forward declaration in the header (i.e. here), and move this #include to the implementation files. In this way, when includes/properties.h is changed, we (hopefully) have to recompile fewer files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

{
auto result = ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix(
NormalStiffness, ShearStiffness, TractionSize);
result(2, 2) = result(1, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @WPK4FEM, and I think we can do it as follows. First, we need to add a function parameter of type std::size_t to ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix, which represents the number of normal components. Subsequently, when we call this function from either InterfaceThreeDimensionalSurface::CalculateElasticMatrix or InterfacePlaneStrain::CalculateElasticMatrix, we can use the return value of member GetNumberOfNormalComponents to supply the value for this new argument. And then we can remove the assignment here at line 27 (i.e. delete result(2, 2) = result(1, 1);).

The implementation of ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix needs to be modified as well. For instance:

Matrix ConstitutiveLawUtilities::MakeInterfaceConstitutiveMatrix(double      NormalStiffness,
                                                                 double      ShearStiffness,
                                                                 std::size_t TractionSize,
                                                                 std::size_t NumberOfNormalComponents)
{
    auto result = Matrix{ZeroMatrix{TractionSize, TractionSize}};
    for (auto i = std::size_t{0}; i < NumberOfNormalComponents; ++i) result(i, i) = NormalStiffness;
    for (auto i = NumberOfNormalComponents; i < TractionSize; ++i) result(i, i) = ShearStiffness;
    return result;
}

@markelov208 markelov208 requested a review from avdg81 July 14, 2025 12:16
Copy link
Contributor

@avdg81 avdg81 left a comment

Choose a reason for hiding this comment

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

Hi Gennady,

Thanks a lot for processing the review suggestions. It looks really good to me. I have two more very minor suggestions. So I think we're almost ready to merge this work.

Comment on lines +62 to +63
const Vector& rInitialRelativeDisplacement,
const Vector& rInitialTraction)
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we can add "Expected" to the function parameter names to make clearer what it means:

Suggested change
const Vector& rInitialRelativeDisplacement,
const Vector& rInitialTraction)
const Vector& rExpectedInitialRelativeDisplacement,
const Vector& rExpectedInitialTraction)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Comment on lines +88 to +91
EXPECT_FALSE(std::is_copy_constructible_v<GeoIncrementalLinearElasticInterfaceLaw>);
EXPECT_FALSE(std::is_copy_assignable_v<GeoIncrementalLinearElasticInterfaceLaw>);
EXPECT_TRUE(std::is_move_constructible_v<GeoIncrementalLinearElasticInterfaceLaw>);
EXPECT_TRUE(std::is_move_assignable_v<GeoIncrementalLinearElasticInterfaceLaw>);
Copy link
Contributor

Choose a reason for hiding this comment

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

I really like these checks. But since they are verified at compile time, I'd suggest to move them to the implementation file of the incremental linear elastic constitutive law for interfaces. See for an example the lines near the bottom of file applications/GeoMechanicsApplication/custom_constitutive/small_strain_udsm_2D_interface_law.cpp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for pointing. Done

@markelov208 markelov208 requested a review from avdg81 July 14, 2025 15:05
Copy link
Contributor

@avdg81 avdg81 left a comment

Choose a reason for hiding this comment

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

This PR looks ready to go. Thanks for all the work Gennady.

@markelov208 markelov208 merged commit e448adc into master Jul 14, 2025
10 checks passed
@markelov208 markelov208 deleted the geo/13333-extend-GeoIncrementalLinearInterfaceLaw branch July 14, 2025 17:37
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.

[GeoMechanicsApplication] Extend class GeoIncrementalLinearElasticInterfaceLaw to include planar interface behavior

3 participants