-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GeoMechanicsApplication] A 3D elastic constitutive law is lacking in…
… GeoMechanicsApplication (#12816) * renamed GeoLinearElasticPlaneStrain2DLaw to GeoIncrementalLinerLaw * added elastic_3D law and unit tests * clang-format * used GeoLinearElastic3DLaw * fixed comments * used GeoIncrementalLinearElastic3DLaw * response to reviews * formatted * fixed an * removed two lines with ///
- Loading branch information
1 parent
3a22e36
commit 8cdabbc
Showing
30 changed files
with
349 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
applications/GeoMechanicsApplication/custom_constitutive/three_dimensional.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// KRATOS___ | ||
// // ) ) | ||
// // ___ ___ | ||
// // ____ //___) ) // ) ) | ||
// // / / // // / / | ||
// ((____/ / ((____ ((___/ / MECHANICS | ||
// | ||
// License: geo_mechanics_application/license.txt | ||
// | ||
// Main authors: Richard Faasse | ||
// Gennady Markelov | ||
// | ||
|
||
#include "three_dimensional.h" | ||
|
||
#include "geo_mechanics_application_constants.h" | ||
#include "includes/constitutive_law.h" | ||
|
||
namespace Kratos | ||
{ | ||
|
||
Matrix ThreeDimensional::FillConstitutiveMatrix(double c1, double c2, double c3) const | ||
{ | ||
Matrix result = ZeroMatrix(GetStrainSize(), GetStrainSize()); | ||
|
||
result(INDEX_3D_XX, INDEX_3D_XX) = c1; | ||
result(INDEX_3D_XX, INDEX_3D_YY) = c2; | ||
result(INDEX_3D_XX, INDEX_3D_ZZ) = c2; | ||
|
||
result(INDEX_3D_YY, INDEX_3D_XX) = c2; | ||
result(INDEX_3D_YY, INDEX_3D_YY) = c1; | ||
result(INDEX_3D_YY, INDEX_3D_ZZ) = c2; | ||
|
||
result(INDEX_3D_ZZ, INDEX_3D_XX) = c2; | ||
result(INDEX_3D_ZZ, INDEX_3D_YY) = c2; | ||
result(INDEX_3D_ZZ, INDEX_3D_ZZ) = c1; | ||
|
||
result(INDEX_3D_XY, INDEX_3D_XY) = c3; | ||
result(INDEX_3D_YZ, INDEX_3D_YZ) = c3; | ||
result(INDEX_3D_XZ, INDEX_3D_XZ) = c3; | ||
|
||
return result; | ||
} | ||
|
||
std::unique_ptr<ConstitutiveLawDimension> ThreeDimensional::Clone() const | ||
{ | ||
return std::make_unique<ThreeDimensional>(); | ||
} | ||
|
||
std::size_t ThreeDimensional::GetStrainSize() const { return VOIGT_SIZE_3D; } | ||
|
||
std::size_t ThreeDimensional::GetDimension() const { return N_DIM_3D; } | ||
|
||
Flags ThreeDimensional::GetSpatialType() const { return ConstitutiveLaw::THREE_DIMENSIONAL_LAW; } | ||
|
||
} // namespace Kratos |
32 changes: 32 additions & 0 deletions
32
applications/GeoMechanicsApplication/custom_constitutive/three_dimensional.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// KRATOS___ | ||
// // ) ) | ||
// // ___ ___ | ||
// // ____ //___) ) // ) ) | ||
// // / / // // / / | ||
// ((____/ / ((____ ((___/ / MECHANICS | ||
// | ||
// License: geo_mechanics_application/license.txt | ||
// | ||
// Main authors: Richard Faasse | ||
// Gennady Markelov | ||
// | ||
|
||
#pragma once | ||
|
||
#include "constitutive_law_dimension.h" | ||
#include "includes/kratos_export_api.h" | ||
|
||
namespace Kratos | ||
{ | ||
|
||
class KRATOS_API(GEO_MECHANICS_APPLICATION) ThreeDimensional : public ConstitutiveLawDimension | ||
{ | ||
public: | ||
[[nodiscard]] Matrix FillConstitutiveMatrix(double c1, double c2, double c3) const override; | ||
[[nodiscard]] std::unique_ptr<ConstitutiveLawDimension> Clone() const override; | ||
[[nodiscard]] std::size_t GetStrainSize() const override; | ||
[[nodiscard]] std::size_t GetDimension() const override; | ||
[[nodiscard]] Flags GetSpatialType() const override; | ||
}; | ||
|
||
} // namespace Kratos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.