Skip to content
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

[GeoMechanicsApplication] Refactor Linear Elastic law to extract a policy for plane strain behavior #12396

Open
rfaasse opened this issue May 22, 2024 · 0 comments

Comments

@rfaasse
Copy link
Contributor

rfaasse commented May 22, 2024

As a developer, I would like to move the GeoLinearElasticPlaneStrain2DLaw to a more suitable place in the inheritance structure and extract the 2D specific behavior, such that I can conveniently add 3D functionality to this class.

Required for 3D soil-structure interaction

Successor: #12336

Proposed steps:

  1. Make sure the GeoLinearElasticPlaneStrain2DLaw does not derive from a K0 law anymore
  2. Identify the behavior that's dimension specific (should that be part of the refinement?)
  3. Create a policy we can inject into the GeoLinearElasticPlaneStrain2DLaw (which should then be renamed to something more generic)
  4. Capture the 2D plane strain behavior in the policy, later on easily extendible to 3D and maybe axisymmetric. This behavior is only filling the constitutive matrix (meaning the policy will have a single public function in the interface)
  5. Register the laws with an abstract pointer to the policy.

Acceptance Criteria

  • The GeoLinearElasticPlaneStrain2DLaw does not derive from LinearPlaneStrainK0Law anymore
  • The GeoLinearElasticPlaneStrain2DLaw class is renamed to something more generic
  • The 2D-specific behavior can be injected into the more generic class
  • Decision on naming ('incremental'?) is made

Background information
Functions the GeoLinearElasticPlaneStrain2DLaw overrides:

public:
ConstitutiveLaw::Pointer Clone() const override;
bool RequiresInitializeMaterialResponse() override;
void InitializeMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
bool RequiresFinalizeMaterialResponse() override;
void FinalizeMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
void FinalizeMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
void GetLawFeatures(Features& rFeatures) override;
SizeType WorkingSpaceDimension() override;
SizeType GetStrainSize() const override;
bool IsIncremental() override;
bool& GetValue(const Variable<bool>& rThisVariable, bool& rValue) override;

protected:
void CalculateElasticMatrix(Matrix& C, ConstitutiveLaw::Parameters& rValues) override;
void CalculatePK2Stress(const Vector&                rStrainVector,
                        Vector&                      rStressVector,
                        ConstitutiveLaw::Parameters& rValues) override;

Functions its base LinearPlaneStrainK0Law overrides:

public:
ConstitutiveLaw::Pointer Clone() const override;
void GetLawFeatures(Features& rFeatures) override;
SizeType WorkingSpaceDimension() override { return Dimension; };
SizeType GetStrainSize() const override { return VoigtSize; }
bool& GetValue(const Variable<bool>& rThisVariable, bool& rValue) override;

protected:    
void CalculateElasticMatrix(Matrix& C, ConstitutiveLaw::Parameters& rValues) override;
void CalculatePK2Stress(const Vector&                rStrainVector,
                        Vector&                      rStressVector,
                        ConstitutiveLaw::Parameters& rValues) override;
void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters& rValues, Vector& rStrainVector) override;

The only one the K0 version has, that the 2D version doesn't have is the CalculateCauchyGreenStrain function. If it would have that function, we could move it in the inheritance structure to derive from GeoLinearElasticLaw directly. This should be relatively small effort, so we could look at the possibility of extending this class to have 3D functionality.

@rfaasse rfaasse changed the title [GeoMechanicsApplication] Refactor Linear Elastic law to extract a policy for 2D behavior [GeoMechanicsApplication] Refactor Linear Elastic law to extract a policy for plane strain behavior Sep 25, 2024
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

No branches or pull requests

1 participant