Skip to content

Commit

Permalink
Merge branch 'master' into geo/extract-set-constitutive-parameters
Browse files Browse the repository at this point in the history
# Conflicts:
#	applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_FIC_element.cpp
#	applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_element.cpp
#	applications/GeoMechanicsApplication/custom_elements/U_Pw_small_strain_interface_element.hpp
#	applications/GeoMechanicsApplication/custom_elements/U_Pw_updated_lagrangian_FIC_element.cpp
#	applications/GeoMechanicsApplication/custom_elements/U_Pw_updated_lagrangian_element.cpp
#	applications/GeoMechanicsApplication/custom_elements/small_strain_U_Pw_diff_order_element.cpp
#	applications/GeoMechanicsApplication/custom_elements/updated_lagrangian_U_Pw_diff_order_element.cpp
  • Loading branch information
Gennady Markelov committed May 16, 2024
2 parents a4cec35 + d759e7f commit 14bcb8a
Show file tree
Hide file tree
Showing 82 changed files with 8,151 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,27 +140,23 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::InitializeNonLinearIteration(con

const auto b_matrices = this->CalculateBMatrices(Variables.DN_DXContainer, Variables.NContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);
std::vector<Matrix> constitutive_matrices;
this->CalculateAnyOfMaterialResponse(deformation_gradients, ConstitutiveParameters,
Variables.NContainer, Variables.DN_DXContainer,
strain_vectors, mStressVector, constitutive_matrices);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
this->CalculateKinematics(Variables, GPoint);
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

Variables.B = b_matrices[GPoint];
Variables.F = deformation_gradients[GPoint];
Variables.ConstitutiveMatrix = constitutive_matrices[GPoint];
ConstitutiveLawUtilities::SetConstitutiveParameters(
ConstitutiveParameters, Variables.StrainVector, Variables.ConstitutiveMatrix,
Variables.Np, Variables.GradNpT, Variables.F, Variables.detF);

ConstitutiveParameters.SetStressVector(mStressVector[GPoint]);
mConstitutiveLawVector[GPoint]->CalculateMaterialResponseCauchy(ConstitutiveParameters);
this->SaveGPConstitutiveTensor(ConstitutiveTensorContainer, Variables.ConstitutiveMatrix, GPoint);

// Compute DtStress
Expand Down Expand Up @@ -202,29 +198,23 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::FinalizeNonLinearIteration(const

const auto b_matrices = this->CalculateBMatrices(Variables.DN_DXContainer, Variables.NContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);
std::vector<Matrix> constitutive_matrices;
this->CalculateAnyOfMaterialResponse(deformation_gradients, ConstitutiveParameters,
Variables.NContainer, Variables.DN_DXContainer,
strain_vectors, mStressVector, constitutive_matrices);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
this->CalculateKinematics(Variables, GPoint);
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

Variables.B = b_matrices[GPoint];
Variables.F = deformation_gradients[GPoint];
Variables.ConstitutiveMatrix = constitutive_matrices[GPoint];
ConstitutiveLawUtilities::SetConstitutiveParameters(
ConstitutiveParameters, Variables.StrainVector, Variables.ConstitutiveMatrix,
Variables.Np, Variables.GradNpT, Variables.F, Variables.detF);

// Compute ConstitutiveTensor
ConstitutiveParameters.SetStressVector(mStressVector[GPoint]);
mConstitutiveLawVector[GPoint]->CalculateMaterialResponseCauchy(ConstitutiveParameters);

// Compute DtStress
noalias(Variables.StrainVector) = prod(Variables.B, Variables.VelocityVector);
noalias(StressVector) = prod(Variables.ConstitutiveMatrix, Variables.StrainVector);
Expand Down Expand Up @@ -466,22 +456,21 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::CalculateAll(MatrixType& rLeftHa
const auto integration_coefficients =
this->CalculateIntegrationCoefficients(IntegrationPoints, Variables.detJContainer);
const auto deformation_gradients = this->CalculateDeformationGradients();
const auto determinants_of_deformation_gradients =
GeoMechanicsMathUtilities::CalculateDeterminants(deformation_gradients);
const auto strain_vectors = this->CalculateStrains(
auto strain_vectors = this->CalculateStrains(
deformation_gradients, b_matrices, Variables.DisplacementVector, Variables.UseHenckyStrain);
std::vector<Matrix> constitutive_matrices;
this->CalculateAnyOfMaterialResponse(deformation_gradients, ConstitutiveParameters,
Variables.NContainer, Variables.DN_DXContainer,
strain_vectors, mStressVector, constitutive_matrices);

// Loop over integration points
for (unsigned int GPoint = 0; GPoint < NumGPoints; ++GPoint) {
// Compute Np, GradNpT, B and StrainVector
this->CalculateKinematics(Variables, GPoint);
Variables.B = b_matrices[GPoint];

// Compute infinitessimal strain
Variables.F = deformation_gradients[GPoint];
Variables.detF = determinants_of_deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];

Variables.B = b_matrices[GPoint];
Variables.F = deformation_gradients[GPoint];
Variables.StrainVector = strain_vectors[GPoint];
Variables.ConstitutiveMatrix = constitutive_matrices[GPoint];
ConstitutiveLawUtilities::SetConstitutiveParameters(
ConstitutiveParameters, Variables.StrainVector, Variables.ConstitutiveMatrix,
Variables.Np, Variables.GradNpT, Variables.F, Variables.detF);
Expand All @@ -493,10 +482,6 @@ void UPwSmallStrainFICElement<TDim, TNumNodes>::CalculateAll(MatrixType& rLeftHa
// Compute ShapeFunctionsSecondOrderGradients
this->CalculateShapeFunctionsSecondOrderGradients(FICVariables, Variables);

// Compute constitutive tensor and stresses
ConstitutiveParameters.SetStressVector(mStressVector[GPoint]);
mConstitutiveLawVector[GPoint]->CalculateMaterialResponseCauchy(ConstitutiveParameters);

this->CalculateRetentionResponse(Variables, RetentionParameters, GPoint);

// set shear modulus from stiffness matrix
Expand Down
Loading

0 comments on commit 14bcb8a

Please sign in to comment.