diff --git a/applications/ConstitutiveLawsApplication/constitutive_laws_application.cpp b/applications/ConstitutiveLawsApplication/constitutive_laws_application.cpp index 4d06bc1bf008..a35b0331dc0b 100644 --- a/applications/ConstitutiveLawsApplication/constitutive_laws_application.cpp +++ b/applications/ConstitutiveLawsApplication/constitutive_laws_application.cpp @@ -430,6 +430,7 @@ void KratosConstitutiveLawsApplication::Register() KRATOS_REGISTER_CONSTITUTIVE_LAW("SmallStrainThermalIsotropicDamagePlaneStressSimoJu", mSmallStrainThermalIsotropicDamagePlaneStressSimoJu); KRATOS_REGISTER_CONSTITUTIVE_LAW("ThicknessIntegratedIsotropicConstitutiveLaw", mThicknessIntegratedIsotropicConstitutiveLaw); + KRATOS_REGISTER_CONSTITUTIVE_LAW("ThicknessIntegratedCompositeConstitutiveLaw", mThicknessIntegratedCompositeConstitutiveLaw); //Fatigue variables KRATOS_REGISTER_VARIABLE(HIGH_CYCLE_FATIGUE_COEFFICIENTS) diff --git a/applications/ConstitutiveLawsApplication/constitutive_laws_application.h b/applications/ConstitutiveLawsApplication/constitutive_laws_application.h index 32d32ff0956a..a2299b48daaa 100644 --- a/applications/ConstitutiveLawsApplication/constitutive_laws_application.h +++ b/applications/ConstitutiveLawsApplication/constitutive_laws_application.h @@ -131,6 +131,7 @@ // structural elements CL #include "custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h" +#include "custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.h" namespace Kratos { @@ -680,9 +681,9 @@ class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) KratosConstitutiveLawsApplicatio const GenericSmallStrainThermalIsotropicDamagePlaneStress >>> mSmallStrainThermalIsotropicDamagePlaneStressSimoJu; const GenericSmallStrainThermalIsotropicDamagePlaneStress >>> mSmallStrainThermalIsotropicDamagePlaneStressMohrCoulomb; - // Structural elements CLs const ThicknessIntegratedIsotropicConstitutiveLaw mThicknessIntegratedIsotropicConstitutiveLaw; + const ThicknessIntegratedCompositeConstitutiveLaw mThicknessIntegratedCompositeConstitutiveLaw; ///@} ///@name Private Operators diff --git a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.cpp b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.cpp new file mode 100644 index 000000000000..519fccabf5d7 --- /dev/null +++ b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.cpp @@ -0,0 +1,971 @@ +// KRATOS ___ _ _ _ _ _ __ _ +// / __\___ _ __ ___| |_(_) |_ _ _| |_(_)_ _____ / / __ ___ _____ /_\ _ __ _ __ +// / / / _ \| '_ \/ __| __| | __| | | | __| \ \ / / _ \/ / / _` \ \ /\ / / __| //_\\| '_ \| '_ | +// / /__| (_) | | | \__ \ |_| | |_| |_| | |_| |\ V / __/ /__| (_| |\ V V /\__ \/ _ \ |_) | |_) | +// \____/\___/|_| |_|___/\__|_|\__|\__,_|\__|_| \_/ \___\____/\__,_| \_/\_/ |___/\_/ \_/ .__/| .__/ +// |_| |_| +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Alejandro Cornejo +// +// System includes +#include +#include + +// External includes + +// Project includes +#include "thickness_integrated_composite_constitutive_law.h" +#include "structural_mechanics_application_variables.h" +#include "constitutive_laws_application_variables.h" +#include "includes/mat_variables.h" + +namespace Kratos +{ +/******************************CONSTRUCTOR******************************************/ +/***********************************************************************************/ + +ThicknessIntegratedCompositeConstitutiveLaw::ThicknessIntegratedCompositeConstitutiveLaw() + : ConstitutiveLaw() +{ +} + +/******************************CONSTRUCTOR******************************************/ +/***********************************************************************************/ + +ThicknessIntegratedCompositeConstitutiveLaw::ThicknessIntegratedCompositeConstitutiveLaw( + const std::vector& rZCoordinates, + const std::vector& rEulerAngles, + const std::vector& rThicknesses + ) : ConstitutiveLaw() +{ + KRATOS_TRY + const SizeType num_layers = rZCoordinates.size(); + + mZCoordinates.resize(num_layers); + mThicknesses.resize(num_layers); + mEulerAngles.resize(num_layers); + + // We fill the stored vectors + for (IndexType i_layer = 0; i_layer < num_layers; ++i_layer) { + mZCoordinates[i_layer] = rZCoordinates[i_layer]; + mThicknesses[i_layer] = rThicknesses[i_layer]; + mEulerAngles[i_layer] = rEulerAngles[i_layer]; + } + KRATOS_CATCH("ThicknessIntegratedCompositeConstitutiveLaw") +} + +/******************************COPY CONSTRUCTOR*************************************/ +/***********************************************************************************/ + +ThicknessIntegratedCompositeConstitutiveLaw::ThicknessIntegratedCompositeConstitutiveLaw( + const ThicknessIntegratedCompositeConstitutiveLaw &rOther) + : ConstitutiveLaw(rOther), + mConstitutiveLaws(rOther.mConstitutiveLaws), + mZCoordinates(rOther.mZCoordinates), + mEulerAngles(rOther.mEulerAngles), + mThicknesses(rOther.mThicknesses) +{ +} + +/********************************CLONE**********************************************/ +/***********************************************************************************/ + +ConstitutiveLaw::Pointer ThicknessIntegratedCompositeConstitutiveLaw::Clone() const +{ + return Kratos::make_shared(*this); +} + +/*******************************CONSTRUCTOR*****************************************/ +/***********************************************************************************/ + +ConstitutiveLaw::Pointer ThicknessIntegratedCompositeConstitutiveLaw::Create( + Kratos::Parameters NewParameters +) const +{ + // We do some checks + KRATOS_ERROR_IF_NOT(NewParameters.Has("z_layer_coordinate_vector")) << "ThicknessIntegratedCompositeConstitutiveLaw: Please define z_layer_coordinates in the StructuralMaterials.json" << std::endl; + KRATOS_ERROR_IF_NOT(NewParameters.Has("Euler_angle_layer_vector")) << "ThicknessIntegratedCompositeConstitutiveLaw: Please define Euler_angle_layer_vector in the StructuralMaterials.json" << std::endl; + KRATOS_ERROR_IF_NOT(NewParameters.Has("thickness_layer_vector")) << "ThicknessIntegratedCompositeConstitutiveLaw: Please define thickness_layer_vector in the StructuralMaterials.json" << std::endl; + + const SizeType number_of_layers = NewParameters["thickness_layer_vector"].size(); + + KRATOS_ERROR_IF_NOT(NewParameters["z_layer_coordinate_vector"].size() == number_of_layers) << "ThicknessIntegratedCompositeConstitutiveLaw: The size of z_layer_coordinate_vector and thickness_layer_vector should be the same" << std::endl; + KRATOS_ERROR_IF_NOT(NewParameters["Euler_angle_layer_vector"].size() == number_of_layers) << "ThicknessIntegratedCompositeConstitutiveLaw: The size of Euler_angle_layer_vector and thickness_layer_vector should be the same" << std::endl; + + std::vector z_layer_coordinate_vector(number_of_layers); + std::vector Euler_angle_layer_vector(number_of_layers); + std::vector thickness_layer_vector(number_of_layers); + + for (IndexType i_layer = 0; i_layer < number_of_layers; ++i_layer) { + z_layer_coordinate_vector[i_layer] = NewParameters["z_layer_coordinate_vector"][i_layer].GetDouble(); + Euler_angle_layer_vector[i_layer] = NewParameters["Euler_angle_layer_vector"][i_layer].GetDouble(); + thickness_layer_vector[i_layer] = NewParameters["thickness_layer_vector"][i_layer].GetDouble(); + } + + return Kratos::make_shared( + z_layer_coordinate_vector, + Euler_angle_layer_vector, + thickness_layer_vector); +} + +//*******************************DESTRUCTOR******************************************* +/***********************************************************************************/ + +ThicknessIntegratedCompositeConstitutiveLaw::~ThicknessIntegratedCompositeConstitutiveLaw() +{} + +/***********************************************************************************/ +/***********************************************************************************/ + +std::size_t ThicknessIntegratedCompositeConstitutiveLaw::WorkingSpaceDimension() +{ + return Dimension; // 3 +} + +/***********************************************************************************/ +/***********************************************************************************/ + +std::size_t ThicknessIntegratedCompositeConstitutiveLaw::GetStrainSize() const +{ + return VoigtSize; // 8 +} + +/***********************************************************************************/ +/***********************************************************************************/ + +bool ThicknessIntegratedCompositeConstitutiveLaw::Has(const Variable& rThisVariable) +{ + return THas(rThisVariable); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +bool ThicknessIntegratedCompositeConstitutiveLaw::Has(const Variable& rThisVariable) +{ + return THas(rThisVariable); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +bool ThicknessIntegratedCompositeConstitutiveLaw::Has(const Variable& rThisVariable) +{ + return THas(rThisVariable); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +int& ThicknessIntegratedCompositeConstitutiveLaw::GetValue( + const Variable& rThisVariable, + int& rValue + ) +{ + return TGetValue(rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +double& ThicknessIntegratedCompositeConstitutiveLaw::GetValue( + const Variable& rThisVariable, + double& rValue + ) +{ + return TGetValue(rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +Vector& ThicknessIntegratedCompositeConstitutiveLaw::GetValue( + const Variable& rThisVariable, + Vector& rValue + ) +{ + return TGetValue(rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::SetValue( + const Variable& rThisVariable, + const int& rValue, + const ProcessInfo& rCurrentProcessInfo + ) +{ + TSetValue(rThisVariable, rValue, rCurrentProcessInfo); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::SetValue( + const Variable& rThisVariable, + const double& rValue, + const ProcessInfo& rCurrentProcessInfo + ) +{ + TSetValue(rThisVariable, rValue, rCurrentProcessInfo); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::SetValue( + const Variable& rThisVariable, + const Vector& rValue, + const ProcessInfo& rCurrentProcessInfo + ) +{ + TSetValue(rThisVariable, rValue, rCurrentProcessInfo); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +double& ThicknessIntegratedCompositeConstitutiveLaw::CalculateValue( + ConstitutiveLaw::Parameters& rValues, + const Variable& rThisVariable, + double& rValue + ) +{ + return TCalculateValue(rValues, rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +Vector& ThicknessIntegratedCompositeConstitutiveLaw::CalculateValue( + ConstitutiveLaw::Parameters& rParameterValues, + const Variable& rThisVariable, + Vector& rValue + ) +{ + return TCalculateValue(rParameterValues, rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +Matrix& ThicknessIntegratedCompositeConstitutiveLaw::CalculateValue( + ConstitutiveLaw::Parameters& rParameterValues, + const Variable& rThisVariable, + Matrix& rValue + ) +{ + return TCalculateValue(rParameterValues, rThisVariable, rValue); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterial( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const Vector& rShapeFunctionsValues + ) +{ + KRATOS_TRY + + // Resizing first + mConstitutiveLaws.resize(mZCoordinates.size()); + + // We create the inner constitutive laws + const auto it_cl_begin = rMaterialProperties.GetSubProperties().begin(); + + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + auto& r_sub_prop = *(it_cl_begin + i_layer); + KRATOS_ERROR_IF_NOT(r_sub_prop.Has(CONSTITUTIVE_LAW)) << "No constitutive law set in layer: " << i_layer << std::endl; + mConstitutiveLaws[i_layer] = r_sub_prop[CONSTITUTIVE_LAW]->Clone(); + mConstitutiveLaws[i_layer]->InitializeMaterial(r_sub_prop, rElementGeometry, rShapeFunctionsValues); + } + + KRATOS_DEBUG_ERROR_IF(mConstitutiveLaws.size() == 0) << "ThicknessIntegratedCompositeConstitutiveLaw: the vector of constitutive laws is empty..." << std::endl; + + InitializeShearReductionFactors(rMaterialProperties); + + KRATOS_CATCH("ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterial") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeShearReductionFactors( + const Properties &rMaterialProperties) +{ + + const IndexType number_of_laws = mConstitutiveLaws.size(); + const auto subprop_strain_size = mConstitutiveLaws[0]->GetStrainSize(); // 3 + const auto subprop_dimension = mConstitutiveLaws[0]->WorkingSpaceDimension(); // 2 + + Vector Dp1(number_of_laws, 0.0); + Vector Dp2(number_of_laws, 0.0); + + ConstitutiveLaw::Parameters parameters; + parameters.SetMaterialProperties(rMaterialProperties); + + Vector null_strain_vector(subprop_strain_size); + null_strain_vector.clear(); + parameters.SetStrainVector(null_strain_vector); + + Vector null_stress_vector(subprop_strain_size); + null_stress_vector.clear(); + parameters.SetStressVector(null_stress_vector); + + Matrix constitutive_matrix(subprop_strain_size, subprop_strain_size); + constitutive_matrix.clear(); + parameters.SetConstitutiveMatrix(constitutive_matrix); + + Matrix generalized_constitutive_matrix(VoigtSize, VoigtSize); + generalized_constitutive_matrix.clear(); + + Flags& r_flags = parameters.GetOptions(); + r_flags.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, true); + r_flags.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + + Matrix F(subprop_dimension, subprop_dimension); // 2x2 + double weight, z_coord, aux_weight, detF, Euler_angle; + + double Gyz = 0.0; + double Gxz = 0.0; + + // Rotation and strain-rotation matrices + BoundedMatrix T; + BoundedMatrix Tvoigt; + + double thickness_integral_11 = 0.0; + double thickness_integral_22 = 0.0; + + std::vector gauss_w({5.0 / 9.0, 8.0 / 9.0, 5.0 / 9.0}); + std::vector gauss_xi({-std::sqrt(3.0 / 5.0), 0.0, std::sqrt(3.0 / 5.0)}); + + const auto it_prop_begin = rMaterialProperties.GetSubProperties().begin(); + + // We perform the integration through the thickness + for (IndexType i_layer = 0; i_layer < number_of_laws; ++i_layer) { + + double Q_bottom_1 = 0.0; + double Q_bottom_2 = 0.0; + + const double half_thickness = 0.5 * mThicknesses[i_layer]; + + const double z_inf_layer = mZCoordinates[i_layer] - half_thickness; + const double z_sup_layer = mZCoordinates[i_layer] + half_thickness; + + // Assign subprops of the layer + Properties &r_subprop = *(it_prop_begin + i_layer); + parameters.SetMaterialProperties(r_subprop); + + CalculateShearModulus(Gyz, Gxz, parameters); + + // We retrieve the layer info + weight = mThicknesses[i_layer]; + z_coord = mZCoordinates[i_layer]; + Euler_angle = mEulerAngles[i_layer]; + aux_weight = weight * z_coord; + + // We rotate the strain to layer local axes + AdvancedConstitutiveLawUtilities<3>::CalculateRotationOperatorEuler1(Euler_angle, T); + ConstitutiveLawUtilities<3>::CalculateRotationOperatorVoigt(T, Tvoigt); + null_strain_vector = prod(Tvoigt, null_strain_vector); + + // In case the 2D Cls work in finite strain + noalias(F) = AdvancedConstitutiveLawUtilities<3>::ComputeEquivalentSmallDeformationDeformationGradient(null_strain_vector); + detF = MathUtils::Det2(F); + parameters.SetDeterminantF(detF); + parameters.SetDeformationGradientF(F); + + // This fills stress and D in local axes of the layer + mConstitutiveLaws[i_layer]->CalculateMaterialResponseCauchy(parameters); + + // We rotate the constitutive matrix to the local axes of the shell + constitutive_matrix = prod(trans(Tvoigt), Matrix(prod(constitutive_matrix, Tvoigt))); + + // membrane part + noalias(project(generalized_constitutive_matrix, range(0, 3), range(0, 3))) += weight * constitutive_matrix; + + // bending part + noalias(project(generalized_constitutive_matrix, range(3, 6), range(3, 6))) += (std::pow(z_sup_layer, 3) - std::pow(z_inf_layer, 3)) / 3.0 * constitutive_matrix; + + // membrane-bending part + noalias(project(generalized_constitutive_matrix, range(0, 3), range(3, 6))) += aux_weight * constitutive_matrix; + + // bending-membrane part (transposed) + generalized_constitutive_matrix(3, 0) = generalized_constitutive_matrix(0, 3); + generalized_constitutive_matrix(4, 0) = generalized_constitutive_matrix(0, 4); + generalized_constitutive_matrix(5, 0) = generalized_constitutive_matrix(0, 5); + generalized_constitutive_matrix(3, 1) = generalized_constitutive_matrix(1, 3); + generalized_constitutive_matrix(4, 1) = generalized_constitutive_matrix(1, 4); + generalized_constitutive_matrix(5, 1) = generalized_constitutive_matrix(1, 5); + generalized_constitutive_matrix(3, 2) = generalized_constitutive_matrix(2, 3); + generalized_constitutive_matrix(4, 2) = generalized_constitutive_matrix(2, 4); + generalized_constitutive_matrix(5, 2) = generalized_constitutive_matrix(2, 5); + + generalized_constitutive_matrix(6, 6) += weight * Gyz; + generalized_constitutive_matrix(7, 7) += weight * Gxz; + + // Let's compute the shear reduction factor required integrals + Dp1[i_layer] = constitutive_matrix(0, 0); + Dp2[i_layer] = constitutive_matrix(1, 1); + + for (IndexType i = 0; i < i_layer; ++i) { // We integrate the contribution of the layers below the current one + const double z_inf_i = mZCoordinates[i] - 0.5 * mThicknesses[i]; + const double z_sup_i = mZCoordinates[i] + 0.5 * mThicknesses[i]; + const double factor = 0.5 * (std::pow(z_sup_i, 2) - std::pow(z_inf_i, 2)); + Q_bottom_1 += factor * Dp1[i]; // x + Q_bottom_2 += factor * Dp2[i]; // y + } + + double layer_int_11 = 0.0; + double layer_int_22 = 0.0; + + for (IndexType gauss_ip = 0; gauss_ip < gauss_w.size(); ++gauss_ip) { + const double z_gauss = mZCoordinates[i_layer] + half_thickness * gauss_xi[gauss_ip]; + const double aux_inner_factor = 0.5 * (z_gauss * z_gauss - z_inf_layer * z_inf_layer); + const double Qz1 = Q_bottom_1 + constitutive_matrix(0, 0) * aux_inner_factor; + const double Qz2 = Q_bottom_2 + constitutive_matrix(1, 1) * aux_inner_factor; + + layer_int_11 += (Qz1 * Qz1 / Gxz) * gauss_w[gauss_ip]; + layer_int_22 += (Qz2 * Qz2 / Gyz) * gauss_w[gauss_ip]; + } + + thickness_integral_11 += layer_int_11 * half_thickness; + thickness_integral_22 += layer_int_22 * half_thickness; + + } // for each layer + + // We calculate the shear reduction factors + mShearReductionFactors[0] = std::pow(generalized_constitutive_matrix(4, 4), 2) / (thickness_integral_22 * generalized_constitutive_matrix(6, 6)); // YZ shear + mShearReductionFactors[1] = std::pow(generalized_constitutive_matrix(3, 3), 2) / (thickness_integral_11 * generalized_constitutive_matrix(7, 7)); // XZ shear +} +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::CalculateShearModulus( + double &Gyz, + double &Gxz, + Parameters &rValues) +{ + KRATOS_TRY + const auto& r_material_properties = rValues.GetMaterialProperties(); + + if (r_material_properties.Has(ORTHOTROPIC_ELASTIC_CONSTANTS)) { + const Vector& r_ortho_elastic_constants = r_material_properties[ORTHOTROPIC_ELASTIC_CONSTANTS]; + const double Ex = r_ortho_elastic_constants[0]; + const double Ey = r_ortho_elastic_constants[1]; + const double Ez = r_ortho_elastic_constants[2]; + const double vxy = r_ortho_elastic_constants[3]; + const double vyz = r_ortho_elastic_constants[4]; + const double vxz = r_ortho_elastic_constants[5]; + + const double vyx = vxy * Ey / Ex; + const double vzx = vxz * Ez / Ex; + const double vzy = vyz * Ez / Ey; + + KRATOS_ERROR_IF(vyx > 0.5) << "The Poisson_yx is greater than 0.5." << std::endl; + KRATOS_ERROR_IF(vzx > 0.5) << "The Poisson_zx is greater than 0.5." << std::endl; + KRATOS_ERROR_IF(vzy > 0.5) << "The Poisson_zy is greater than 0.5." << std::endl; + + Gyz = (r_material_properties.Has(SHEAR_MODULUS_YZ)) ? r_material_properties[SHEAR_MODULUS_YZ] : 1.0 / ((1.0 + vzy) / Ey + (1.0 + vyz) / Ez); + Gxz = (r_material_properties.Has(SHEAR_MODULUS_XZ)) ? r_material_properties[SHEAR_MODULUS_XZ] : 1.0 / ((1.0 + vzx) / Ex + (1.0 + vxz) / Ez); + } else { + const double E = r_material_properties[YOUNG_MODULUS]; + const double v = r_material_properties[POISSON_RATIO]; + Gyz = (r_material_properties.Has(SHEAR_MODULUS)) ? r_material_properties[SHEAR_MODULUS] : E / (2.0 * (1.0 + v)); + Gxz = Gyz; + } + KRATOS_CATCH("CalculateShearModulus") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::CalculateMaterialResponsePK1( + ConstitutiveLaw::Parameters& rValues) +{ + CalculateMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::CalculateMaterialResponsePK2( + ConstitutiveLaw::Parameters& rValues) +{ + CalculateMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::CalculateMaterialResponseKirchhoff( + ConstitutiveLaw::Parameters& rValues) +{ + CalculateMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::CalculateMaterialResponseCauchy( + ConstitutiveLaw::Parameters& rValues) +{ + KRATOS_TRY + + // Get Values to compute the constitutive law: + Flags& r_flags = rValues.GetOptions(); + const auto& r_material_properties = rValues.GetMaterialProperties(); + const IndexType number_of_laws = mConstitutiveLaws.size(); + const auto subprop_strain_size = mConstitutiveLaws[0]->GetStrainSize(); // 3 + const auto subprop_dimension = mConstitutiveLaws[0]->WorkingSpaceDimension(); // 2 + + // Previous flags saved + const bool flag_compute_constitutive_tensor = r_flags.Is(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR); + const bool flag_compute_stress = r_flags.Is(ConstitutiveLaw::COMPUTE_STRESS); + + // The generalized strain vector, constant + const Vector generalized_strain_vector = rValues.GetStrainVector(); // size 8 + Vector generalized_stress_vector(VoigtSize); // size 8 + Matrix generalized_constitutive_matrix(VoigtSize, VoigtSize); // 8x8 + generalized_constitutive_matrix.clear(); + generalized_stress_vector.clear(); + + if (flag_compute_stress || flag_compute_constitutive_tensor) { + + // Auxiliary stress vector + Vector& r_stress_vector = rValues.GetStressVector(); // size 3 + Vector& r_strain_vector = rValues.GetStrainVector(); // size 3 + Matrix& r_constitutive_matrix = rValues.GetConstitutiveMatrix(); // size 3x3 + r_strain_vector.resize(subprop_strain_size, false); + r_stress_vector.resize(subprop_strain_size, false); + r_constitutive_matrix.resize(subprop_strain_size, subprop_strain_size, false); + r_strain_vector.clear(); + r_stress_vector.clear(); + r_constitutive_matrix.clear(); + + Matrix F(subprop_dimension, subprop_dimension); // 2x2 + double weight, z_coord, aux_weight, detF, Euler_angle; + + const double h_max = GetMaxReferenceEdgeLength(rValues.GetElementGeometry()); + const double alpha = 0.1; + const double thickness = r_material_properties[THICKNESS]; + const double t_square = thickness * thickness; + const double stenberg_stabilization = t_square / (t_square + alpha * h_max * h_max); + + double Gyz = 0.0; + double Gxz = 0.0; + + const auto it_prop_begin = r_material_properties.GetSubProperties().begin(); + + // Rotation and strain-rotation matrices + BoundedMatrix T; + BoundedMatrix Tvoigt; + + // We perform the integration through the thickness + for (IndexType i_layer = 0; i_layer < number_of_laws; ++i_layer) { + + const double z_inf_layer = mZCoordinates[i_layer] - 0.5 * mThicknesses[i_layer]; + const double z_sup_layer = mZCoordinates[i_layer] + 0.5 * mThicknesses[i_layer]; + + // Assign subprops of the layer + Properties &r_subprop = *(it_prop_begin + i_layer); + rValues.SetMaterialProperties(r_subprop); + + CalculateShearModulus(Gyz, Gxz, rValues); + + // We retrieve the layer info + weight = mThicknesses[i_layer]; + z_coord = mZCoordinates[i_layer]; + Euler_angle = mEulerAngles[i_layer]; + + aux_weight = weight * z_coord; + + r_strain_vector[0] = generalized_strain_vector[0] + z_coord * generalized_strain_vector[3]; // xx + r_strain_vector[1] = generalized_strain_vector[1] + z_coord * generalized_strain_vector[4]; // yy + r_strain_vector[2] = generalized_strain_vector[2] + z_coord * generalized_strain_vector[5]; // xy + + // We rotate the strain to layer local axes + AdvancedConstitutiveLawUtilities<3>::CalculateRotationOperatorEuler1(Euler_angle, T); + ConstitutiveLawUtilities<3>::CalculateRotationOperatorVoigt(T, Tvoigt); + r_strain_vector = prod(Tvoigt, r_strain_vector); + + // In case the 2D Cls work in finite strain + noalias(F) = AdvancedConstitutiveLawUtilities<3>::ComputeEquivalentSmallDeformationDeformationGradient(r_strain_vector); + detF = MathUtils::Det2(F); + rValues.SetDeterminantF(detF); + rValues.SetDeformationGradientF(F); + + // This fills stress and D in local axes of the layer + mConstitutiveLaws[i_layer]->CalculateMaterialResponseCauchy(rValues); + + if (flag_compute_stress) { + // We rotate the stress to the local axes of the shell + r_stress_vector = prod(trans(Tvoigt), r_stress_vector); + + generalized_stress_vector[0] += r_stress_vector[0] * weight; // membrane xx + generalized_stress_vector[1] += r_stress_vector[1] * weight; // membrane yy + generalized_stress_vector[2] += r_stress_vector[2] * weight; // membrane xy + + generalized_stress_vector[3] += r_stress_vector[0] * aux_weight; // bending xx + generalized_stress_vector[4] += r_stress_vector[1] * aux_weight; // bending yy + generalized_stress_vector[5] += r_stress_vector[2] * aux_weight; // bending xy + + // Elastic behaviour in shear + generalized_stress_vector[6] += Gyz * (generalized_strain_vector[6]) * weight * stenberg_stabilization * mShearReductionFactors[0]; // shear YZ + generalized_stress_vector[7] += Gxz * (generalized_strain_vector[7]) * weight * stenberg_stabilization * mShearReductionFactors[1]; // shear XZ + } + + if (flag_compute_constitutive_tensor) { + // We rotate the constitutive matrix to the local axes of the shell + r_constitutive_matrix = prod(trans(Tvoigt), Matrix(prod(r_constitutive_matrix, Tvoigt))); + + // membrane part + noalias(project(generalized_constitutive_matrix, range(0, 3), range(0, 3))) += weight * r_constitutive_matrix; + + // bending part + noalias(project(generalized_constitutive_matrix, range(3, 6), range(3, 6))) += (std::pow(z_sup_layer, 3) - std::pow(z_inf_layer, 3)) / 3.0 * r_constitutive_matrix; + + // membrane-bending part + noalias(project(generalized_constitutive_matrix, range(0, 3), range(3, 6))) += aux_weight * r_constitutive_matrix; + + // bending-membrane part (transposed) + generalized_constitutive_matrix(3, 0) = generalized_constitutive_matrix(0, 3); + generalized_constitutive_matrix(4, 0) = generalized_constitutive_matrix(0, 4); + generalized_constitutive_matrix(5, 0) = generalized_constitutive_matrix(0, 5); + generalized_constitutive_matrix(3, 1) = generalized_constitutive_matrix(1, 3); + generalized_constitutive_matrix(4, 1) = generalized_constitutive_matrix(1, 4); + generalized_constitutive_matrix(5, 1) = generalized_constitutive_matrix(1, 5); + generalized_constitutive_matrix(3, 2) = generalized_constitutive_matrix(2, 3); + generalized_constitutive_matrix(4, 2) = generalized_constitutive_matrix(2, 4); + generalized_constitutive_matrix(5, 2) = generalized_constitutive_matrix(2, 5); + + generalized_constitutive_matrix(6, 6) += weight * Gyz * stenberg_stabilization * mShearReductionFactors[0]; + generalized_constitutive_matrix(7, 7) += weight * Gxz * stenberg_stabilization * mShearReductionFactors[1]; + } + } // layer loop + + // Reset some values + rValues.SetMaterialProperties(r_material_properties); + r_strain_vector.resize(VoigtSize, false); + noalias(r_strain_vector) = generalized_strain_vector; + + if (flag_compute_stress) { + r_stress_vector.resize(VoigtSize, false); + noalias(r_stress_vector) = generalized_stress_vector; + } + + if (flag_compute_constitutive_tensor) { + r_constitutive_matrix.resize(VoigtSize, VoigtSize, false); + noalias(r_constitutive_matrix) = generalized_constitutive_matrix; + } + } + KRATOS_CATCH("CalculateMaterialResponseCauchy") +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterialResponsePK1( + Parameters& rValues) +{ + InitializeMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterialResponsePK2( + Parameters& rValues) +{ + InitializeMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterialResponseKirchhoff( + Parameters& rValues) +{ + InitializeMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::InitializeMaterialResponseCauchy( + Parameters& rValues) +{ + KRATOS_TRY + + if (RequiresInitializeMaterialResponse()) { + + // Get Values to compute the constitutive law: + const auto& r_material_properties = rValues.GetMaterialProperties(); + const IndexType number_of_laws = mConstitutiveLaws.size(); + const auto subprop_strain_size = mConstitutiveLaws[0]->GetStrainSize(); // 3 + const auto subprop_dimension = mConstitutiveLaws[0]->WorkingSpaceDimension(); // 2 + + // The generalized strain vector, constant + const Vector generalized_strain_vector = rValues.GetStrainVector(); // size 8 + Vector generalized_stress_vector(VoigtSize); // size 8 + Matrix generalized_constitutive_matrix(VoigtSize, VoigtSize); // 8x8 + generalized_constitutive_matrix.clear(); + generalized_stress_vector.clear(); + + // Auxiliary stress vector + Vector& r_stress_vector = rValues.GetStressVector(); // size 3 + Vector& r_strain_vector = rValues.GetStrainVector(); // size 3 + Matrix& r_constitutive_matrix = rValues.GetConstitutiveMatrix(); // size 3x3 + r_strain_vector.resize(subprop_strain_size, false); + r_stress_vector.resize(subprop_strain_size, false); + r_constitutive_matrix.resize(subprop_strain_size, subprop_strain_size, false); + r_strain_vector.clear(); + r_stress_vector.clear(); + r_constitutive_matrix.clear(); + + Matrix F(subprop_dimension, subprop_dimension); // 2x2 + double z_coord, detF, Euler_angle; + + const auto it_prop_begin = r_material_properties.GetSubProperties().begin(); + + // Rotation and strain-rotation matrices + BoundedMatrix T; + BoundedMatrix Tvoigt; + + // We perform the integration through the thickness + for (IndexType i_layer = 0; i_layer < number_of_laws; ++i_layer) { + + // Assign subprops of the layer + Properties &r_subprop = *(it_prop_begin + i_layer); + rValues.SetMaterialProperties(r_subprop); + + // We retrieve the layer info + z_coord = mZCoordinates[i_layer]; + Euler_angle = mEulerAngles[i_layer]; + + r_strain_vector[0] = generalized_strain_vector[0] + z_coord * generalized_strain_vector[3]; // xx + r_strain_vector[1] = generalized_strain_vector[1] + z_coord * generalized_strain_vector[4]; // yy + r_strain_vector[2] = generalized_strain_vector[2] + z_coord * generalized_strain_vector[5]; // xy + + // We rotate the strain to layer local axes + AdvancedConstitutiveLawUtilities<3>::CalculateRotationOperatorEuler1(Euler_angle, T); + ConstitutiveLawUtilities<3>::CalculateRotationOperatorVoigt(T, Tvoigt); + r_strain_vector = prod(Tvoigt, r_strain_vector); + + // In case the 2D Cls work in finite strain + noalias(F) = AdvancedConstitutiveLawUtilities<3>::ComputeEquivalentSmallDeformationDeformationGradient(r_strain_vector); + detF = MathUtils::Det2(F); + rValues.SetDeterminantF(detF); + rValues.SetDeformationGradientF(F); + + mConstitutiveLaws[i_layer]->InitializeMaterialResponseCauchy(rValues); + + } // layer loop + + // Reset some values + rValues.SetMaterialProperties(r_material_properties); + r_strain_vector.resize(VoigtSize, false); + noalias(r_strain_vector) = generalized_strain_vector; + + } // if requires + + KRATOS_CATCH("InitializeMaterialResponseCauchy") +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::FinalizeMaterialResponsePK1( + Parameters& rValues) +{ + FinalizeMaterialResponseCauchy(rValues); +} + + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::FinalizeMaterialResponsePK2( + Parameters& rValues) +{ + FinalizeMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::FinalizeMaterialResponseKirchhoff( + Parameters& rValues) +{ + FinalizeMaterialResponseCauchy(rValues); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +void ThicknessIntegratedCompositeConstitutiveLaw::FinalizeMaterialResponseCauchy( + Parameters& rValues) +{ + KRATOS_TRY + + if (RequiresFinalizeMaterialResponse()) { + + // Get Values to compute the constitutive law: + const auto& r_material_properties = rValues.GetMaterialProperties(); + const IndexType number_of_laws = mConstitutiveLaws.size(); + const auto subprop_strain_size = mConstitutiveLaws[0]->GetStrainSize(); // 3 + const auto subprop_dimension = mConstitutiveLaws[0]->WorkingSpaceDimension(); // 2 + + // The generalized strain vector, constant + const Vector generalized_strain_vector = rValues.GetStrainVector(); // size 8 + Vector generalized_stress_vector(VoigtSize); // size 8 + Matrix generalized_constitutive_matrix(VoigtSize, VoigtSize); // 8x8 + generalized_constitutive_matrix.clear(); + generalized_stress_vector.clear(); + + // Auxiliary stress vector + Vector& r_stress_vector = rValues.GetStressVector(); // size 3 + Vector& r_strain_vector = rValues.GetStrainVector(); // size 3 + Matrix& r_constitutive_matrix = rValues.GetConstitutiveMatrix(); // size 3x3 + r_strain_vector.resize(subprop_strain_size, false); + r_stress_vector.resize(subprop_strain_size, false); + r_constitutive_matrix.resize(subprop_strain_size, subprop_strain_size, false); + r_strain_vector.clear(); + r_stress_vector.clear(); + r_constitutive_matrix.clear(); + + Matrix F(subprop_dimension, subprop_dimension); // 2x2 + double z_coord, detF, Euler_angle; + + const auto it_prop_begin = r_material_properties.GetSubProperties().begin(); + + // Rotation and strain-rotation matrices + BoundedMatrix T; + BoundedMatrix Tvoigt; + + // We perform the integration through the thickness + for (IndexType i_layer = 0; i_layer < number_of_laws; ++i_layer) { + + // Assign subprops of the layer + Properties &r_subprop = *(it_prop_begin + i_layer); + rValues.SetMaterialProperties(r_subprop); + + // We retrieve the layer info + z_coord = mZCoordinates[i_layer]; + Euler_angle = mEulerAngles[i_layer]; + + r_strain_vector[0] = generalized_strain_vector[0] + z_coord * generalized_strain_vector[3]; // xx + r_strain_vector[1] = generalized_strain_vector[1] + z_coord * generalized_strain_vector[4]; // yy + r_strain_vector[2] = generalized_strain_vector[2] + z_coord * generalized_strain_vector[5]; // xy + + // We rotate the strain to layer local axes + AdvancedConstitutiveLawUtilities<3>::CalculateRotationOperatorEuler1(Euler_angle, T); + ConstitutiveLawUtilities<3>::CalculateRotationOperatorVoigt(T, Tvoigt); + r_strain_vector = prod(Tvoigt, r_strain_vector); + + // In case the 2D Cls work in finite strain + noalias(F) = AdvancedConstitutiveLawUtilities<3>::ComputeEquivalentSmallDeformationDeformationGradient(r_strain_vector); + detF = MathUtils::Det2(F); + rValues.SetDeterminantF(detF); + rValues.SetDeformationGradientF(F); + + mConstitutiveLaws[i_layer]->FinalizeMaterialResponseCauchy(rValues); + + } // layer loop + + // Reset some values + rValues.SetMaterialProperties(r_material_properties); + r_strain_vector.resize(VoigtSize, false); + noalias(r_strain_vector) = generalized_strain_vector; + } + + KRATOS_CATCH("FinalizeMaterialResponseCauchy") +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::ResetMaterial( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const Vector& rShapeFunctionsValues + ) +{ + KRATOS_TRY + + // We perform the reset in each layer + const auto it_cl_begin = rMaterialProperties.GetSubProperties().begin(); + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + auto& r_subprop = *(it_cl_begin + i_layer); + mConstitutiveLaws[i_layer]->ResetMaterial(r_subprop, rElementGeometry, rShapeFunctionsValues); + } + + KRATOS_CATCH("ResetMaterial") +} + +/**************************CONSTITUTIVE LAW GENERAL FEATURES ***********************/ +/***********************************************************************************/ + + +void ThicknessIntegratedCompositeConstitutiveLaw::GetLawFeatures(Features& rFeatures) +{ + //Set the strain size + rFeatures.mStrainSize = 8; // 3 membrane, 3 bending, 2 shear + + //Set the spacedimension + rFeatures.mSpaceDimension = 3; +} + +/***********************************************************************************/ +/***********************************************************************************/ + + +int ThicknessIntegratedCompositeConstitutiveLaw::Check( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const ProcessInfo& rCurrentProcessInfo + ) const +{ + // The auxiliary output + int aux_out = 0; + + KRATOS_ERROR_IF(mConstitutiveLaws.size() == 0) << "ThicknessIntegratedCompositeConstitutiveLaw: No constitutive laws defined" << std::endl; + KRATOS_ERROR_IF_NOT(rMaterialProperties.Has(THICKNESS)) << "The THICKNESS is not defined in the Material Properties..." << std::endl; + + const auto it_cl_begin = rMaterialProperties.GetSubProperties().begin(); + double thickness_sum = 0.0; + // We perform the check in each layer + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + thickness_sum += mThicknesses[i_layer]; + auto& r_subprop = *(it_cl_begin + i_layer); + aux_out += mConstitutiveLaws[i_layer]->Check(r_subprop, rElementGeometry, rCurrentProcessInfo); + + KRATOS_ERROR_IF(mConstitutiveLaws[i_layer]->GetStrainSize() != 3) << "The constitutive laws must have a strain size of 3..." << std::endl; + KRATOS_ERROR_IF(mConstitutiveLaws[i_layer]->WorkingSpaceDimension() != 2) << "The constitutive laws must have a Dimension of 2.." << std::endl; + } + KRATOS_ERROR_IF(std::abs(thickness_sum - rMaterialProperties[THICKNESS]) > 1.0e-8) << "The sum of the layer thicknesses must be equal to the total thickness defined in the material properties..." << std::endl; + + return aux_out; +} + +/***********************************************************************************/ +/***********************************************************************************/ + +} // Namespace Kratos diff --git a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.h b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.h new file mode 100644 index 000000000000..29263bba0610 --- /dev/null +++ b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.h @@ -0,0 +1,674 @@ +// KRATOS ___ _ _ _ _ _ __ _ +// / __\___ _ __ ___| |_(_) |_ _ _| |_(_)_ _____ / / __ ___ _____ /_\ _ __ _ __ +// / / / _ \| '_ \/ __| __| | __| | | | __| \ \ / / _ \/ / / _` \ \ /\ / / __| //_\\| '_ \| '_ | +// / /__| (_) | | | \__ \ |_| | |_| |_| | |_| |\ V / __/ /__| (_| |\ V V /\__ \/ _ \ |_) | |_) | +// \____/\___/|_| |_|___/\__|_|\__|\__,_|\__|_| \_/ \___\____/\__,_| \_/\_/ |___/\_/ \_/ .__/| .__/ +// |_| |_| +// +// License: BSD License +// license: structural_mechanics_application/license.txt +// +// Main authors: Alejandro Cornejo +// + +#pragma once + +// System includes + +// External includes + +// Project includes +#include "includes/constitutive_law.h" + +#include "custom_utilities/advanced_constitutive_law_utilities.h" +#include "custom_utilities/constitutive_law_utilities.h" + +namespace Kratos +{ +///@name Kratos Globals +///@{ + +///@} +///@name Type Definitions +///@{ + +///@} +///@name Enum's +///@{ + +///@} +///@name Functions +///@{ + +///@} +///@name Kratos Classes +///@{ +/** + * @class ThicknessIntegratedCompositeConstitutiveLaw + * @ingroup StructuralMechanicsApplication + * @brief This constitutive law is implemented to be used together with the CSDSG3ThickShellElement3D3N or MITCThickShellElement3D4N element + * It computes the constitutive matrix and stress vector by integrating over the thickness using a set of + * sub-properties, each one with its own subproperty and constitutive model (isotropic plane stress). + * For each layer, the user needs to provide: thickness, z coordinate of the layer w.r.t the bending axis and the Euler angle of rotation + * w.r.t the local axes of the shell. + * Input: the Generalized strain vector of 8 components (3 membrane + 3 bending + 2 shear) + * Output: the Generalized stress vector of 8 components (3 membrane + 3 bending + 2 shear) and 8x8 generalized + * constitutive matrix. + * The number of integration points can be defined by the user, by default 5 points are used. + * @author Alejandro Cornejo + */ +class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) ThicknessIntegratedCompositeConstitutiveLaw + : public ConstitutiveLaw +{ +public: + + ///@name Type Definitions + ///@{ + + /// The definition of the process info + using ProcessInfoType = ProcessInfo; + + /// The definition of the CL base class + using BaseType = ConstitutiveLaw; + + /// Unhide the base class SetValue overloads + using BaseType::SetValue; + + /// Unhide the base class GetValue overloads + using BaseType::GetValue; + + /// The definition of the size type + using SizeType = std::size_t; + + /// The definition of the index type + using IndexType = std::size_t; + + /// The define the working dimension size, generalized strains/stresses size + static constexpr SizeType VoigtSize = 8; + + /// The Dimension of the CL + static constexpr SizeType Dimension = 3; + + /// Definition of the machine precision tolerance + static constexpr double machine_tolerance = std::numeric_limits::epsilon(); + + /// Pointer definition of ThicknessIntegratedCompositeConstitutiveLaw + KRATOS_CLASS_POINTER_DEFINITION(ThicknessIntegratedCompositeConstitutiveLaw); + + ///@name Lyfe Cycle + ///@{ + + /** + * @brief Default constructor. + */ + ThicknessIntegratedCompositeConstitutiveLaw(); + + /** + * @brief Constructor with values + * @param rThicknessIntegrationPoints The amount of thickness integration points + */ + ThicknessIntegratedCompositeConstitutiveLaw( + const std::vector& rZCoordinates, + const std::vector& rEulerAngles, + const std::vector& rThicknesses); + + /** + * @brief Copy constructor. + */ + ThicknessIntegratedCompositeConstitutiveLaw(const ThicknessIntegratedCompositeConstitutiveLaw &rOther); + + /** + * @brief Destructor. + */ + ~ThicknessIntegratedCompositeConstitutiveLaw() override; + + ///@} + ///@name Operators + ///@{ + + ///@} + ///@name Operations + ///@{ + + /** + * @brief Clone operation + */ + ConstitutiveLaw::Pointer Clone() const override; + + /** + * @brief Creates a new constitutive law pointer + * @param NewParameters The configuration parameters of the new constitutive law + * @return a Pointer to the new constitutive law + */ + ConstitutiveLaw::Pointer Create(Kratos::Parameters NewParameters) const override; + + /** + * @brief Dimension of the law + * @details This is not used, so 0 is returned + */ + SizeType WorkingSpaceDimension() override; + + /** + * @brief Voigt tensor size + * @details This is not used, so 0 is returned + */ + SizeType GetStrainSize() const override; + + /** + * @brief If the CL requires to initialize the material response, called by the element in InitializeSolutionStep. + */ + bool RequiresInitializeMaterialResponse() override + { + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + if (mConstitutiveLaws[i_layer]->RequiresInitializeMaterialResponse()) + return true; + } + return false; + } + + /** + * @brief If the CL requires to initialize the material response, called by the element in InitializeSolutionStep. + */ + bool RequiresFinalizeMaterialResponse() override + { + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + if (mConstitutiveLaws[i_layer]->RequiresFinalizeMaterialResponse()) + return true; + } + return false; + } + + /** + * @brief Returns whether this constitutive Law has specified variable (generic) + * @param rThisVariable the variable to be checked for + * @return true if the variable is defined in the constitutive law + */ + template + bool THas(const Variable& rThisVariable) + { + for (IndexType i_layer = 0; i_layer < mConstitutiveLaws.size(); ++i_layer) { + if (mConstitutiveLaws[i_layer]->Has(rThisVariable)) + return true; + } + return false; + } + + /** + * @brief Returns whether this constitutive Law has specified variable (generic) + * @param rThisVariable the variable to be checked for + * @return true if the variable is defined in the constitutive law + */ + template + TDataType& TGetValue( + const Variable& rThisVariable, + TDataType& rValue + ) + { + KRATOS_TRY + + TDataType ip_value; + + for (IndexType i = 1; i < mConstitutiveLaws.size(); ++i) { + if (mConstitutiveLaws[i]->Has(rThisVariable)) { + mConstitutiveLaws[i]->GetValue(rThisVariable, ip_value); + rValue += ip_value * mThicknesses[i]; // We integrate the value through the thickness, multiplying by the layer thickness + } + } + + return rValue; + + KRATOS_CATCH("Generic GetValue") + } + + /** + * @brief Sets the value of a specified variable (generic) + * @param rThisVariable the variable to be checked for + */ + template + void TSetValue( + const Variable& rThisVariable, + const TDataType& rValue, + const ProcessInfo& rCurrentProcessInfo + ) + { + KRATOS_TRY + + for (IndexType i = 0; i < mConstitutiveLaws.size(); ++i) { + if (mConstitutiveLaws[0]->Has(rThisVariable)) + mConstitutiveLaws[i]->SetValue(rThisVariable, rValue, rCurrentProcessInfo); + } + + KRATOS_CATCH("Generic SetValue") + } + + /** + * @brief CalculateValue of a specified variable (generic) + * @param rThisVariable the variable to be checked for + */ + template + TDataType& TCalculateValue( + Parameters& rValues, + const Variable& rThisVariable, + TDataType& rValue) + { + KRATOS_TRY + + const IndexType number_of_laws = mConstitutiveLaws.size(); + const auto subprop_strain_size = mConstitutiveLaws[0]->GetStrainSize(); // 3 + const auto subprop_dimension = mConstitutiveLaws[0]->WorkingSpaceDimension(); // 2 + const auto& r_material_properties = rValues.GetMaterialProperties(); + + const Vector generalized_strain_vector = rValues.GetStrainVector(); // size 8 + + Vector& r_stress_vector = rValues.GetStressVector(); // size 3 + Vector& r_strain_vector = rValues.GetStrainVector(); // size 3 + Matrix& r_constitutive_matrix = rValues.GetConstitutiveMatrix(); // size 3x3 + r_strain_vector.resize(subprop_strain_size, false); + r_stress_vector.resize(subprop_strain_size, false); + r_constitutive_matrix.resize(subprop_strain_size, subprop_strain_size, false); + r_strain_vector.clear(); + r_stress_vector.clear(); + r_constitutive_matrix.clear(); + + Matrix F(subprop_dimension, subprop_dimension); // 2x2 + double z_coord, detF, Euler_angle; + + double Gyz = 0.0; + double Gxz = 0.0; + + const auto it_prop_begin = r_material_properties.GetSubProperties().begin(); + // Rotation and strain-rotation matrices + BoundedMatrix T; + BoundedMatrix Tvoigt; + + TDataType ip_value; + + // We perform the integration through the thickness + for (IndexType i_layer = 0; i_layer < number_of_laws; ++i_layer) { + // Assign subprops of the layer + Properties &r_subprop = *(it_prop_begin + i_layer); + rValues.SetMaterialProperties(r_subprop); + + CalculateShearModulus(Gyz, Gxz, rValues); + + // We retrieve the layer information + z_coord = mZCoordinates[i_layer]; + Euler_angle = mEulerAngles[i_layer]; + + r_strain_vector[0] = generalized_strain_vector[0] + z_coord * generalized_strain_vector[3]; // xx + r_strain_vector[1] = generalized_strain_vector[1] + z_coord * generalized_strain_vector[4]; // yy + r_strain_vector[2] = generalized_strain_vector[2] + z_coord * generalized_strain_vector[5]; // xy + + // We rotate the strain to layer local axes + AdvancedConstitutiveLawUtilities<3>::CalculateRotationOperatorEuler1(Euler_angle, T); + ConstitutiveLawUtilities<3>::CalculateRotationOperatorVoigt(T, Tvoigt); + r_strain_vector = prod(Tvoigt, r_strain_vector); + + // In case the 2D Cls work in finite strain + noalias(F) = AdvancedConstitutiveLawUtilities<3>::ComputeEquivalentSmallDeformationDeformationGradient(r_strain_vector); + detF = MathUtils::Det2(F); + rValues.SetDeterminantF(detF); + rValues.SetDeformationGradientF(F); + + mConstitutiveLaws[i_layer]->CalculateValue(rValues, rThisVariable, ip_value); + rValue += ip_value * mThicknesses[i_layer]; // We integrate the value through the thickness, multiplying by the layer thickness + } + + r_strain_vector.resize(VoigtSize, false); + noalias(r_strain_vector) = generalized_strain_vector; + + return rValue; + + KRATOS_CATCH("Generic CalculateValue") + } + + /** + * @brief Returns whether this constitutive Law has specified variable (integer) + * @param rThisVariable the variable to be checked for + * @return true if the variable is defined in the constitutive law + */ + bool Has(const Variable& rThisVariable) override; + + /** + * @brief Returns whether this constitutive Law has specified variable (double) + * @param rThisVariable the variable to be checked for + * @return true if the variable is defined in the constitutive law + */ + bool Has(const Variable& rThisVariable) override; + + /** + * @brief Returns whether this constitutive Law has specified variable (Vector) + * @param rThisVariable the variable to be checked for + * @return true if the variable is defined in the constitutive law + */ + bool Has(const Variable& rThisVariable) override; + + /** + * @briefReturns the value of a specified variable (integer) + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @return rValue output: the value of the specified variable + */ + int& GetValue( + const Variable& rThisVariable, + int& rValue + ) override; + + /** + * @brief Returns the value of a specified variable (double) + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @return rValue output: the value of the specified variable + */ + double& GetValue( + const Variable& rThisVariable, + double& rValue + ) override; + + /** + * @brief Returns the value of a specified variable (Vector) + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @return rValue output: the value of the specified variable + */ + Vector& GetValue( + const Variable& rThisVariable, + Vector& rValue + ) override; + + /** + * @brief Sets the value of a specified variable (integer) + * @param rThisVariable the variable to be returned + * @param rValue new value of the specified variable + * @param rCurrentProcessInfo the process info + */ + void SetValue( + const Variable& rThisVariable, + const int& rValue, + const ProcessInfo& rCurrentProcessInfo + ) override; + + /** + * @brief Sets the value of a specified variable (double) + * @param rThisVariable the variable to be returned + * @param rValue new value of the specified variable + * @param rCurrentProcessInfo the process info + */ + void SetValue( + const Variable& rThisVariable, + const double& rValue, + const ProcessInfo& rCurrentProcessInfo + ) override; + + /** + * @brief Sets the value of a specified variable (Vector) + * @param rThisVariable the variable to be returned + * @param rValue new value of the specified variable + * @param rCurrentProcessInfo the process info + */ + void SetValue( + const Variable& rThisVariable, + const Vector& rValue, + const ProcessInfo& rCurrentProcessInfo + ) override; + + /** + * @brief Calculates the value of a specified variable (double) + * @param rParameterValues the needed parameters for the CL calculation + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @param rValue output: the value of the specified variable + */ + double& CalculateValue( + Parameters& rParameterValues, + const Variable& rThisVariable, + double& rValue + ) override; + + /** + * @brief Calculates the value of a specified variable (Vector) + * @param rParameterValues the needed parameters for the CL calculation + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @param rValue output: the value of the specified variable + */ + Vector& CalculateValue( + Parameters& rParameterValues, + const Variable& rThisVariable, + Vector& rValue + ) override; + + /** + * @brief Calculates the value of a specified variable (Matrix) + * @param rParameterValues the needed parameters for the CL calculation + * @param rThisVariable the variable to be returned + * @param rValue a reference to the returned value + * @param rValue output: the value of the specified variable + */ + Matrix& CalculateValue( + Parameters& rParameterValues, + const Variable& rThisVariable, + Matrix& rValue + ) override; + + /** + * @brief This is to be called at the very beginning of the calculation + * @details (e.g. from InitializeElement) in order to initialize all relevant attributes of the constitutive law + * @param rMaterialProperties the Properties instance of the current element + * @param rElementGeometry the geometry of the current element + * @param rShapeFunctionsValues the shape functions values in the current integration point + */ + void InitializeMaterial( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const Vector& rShapeFunctionsValues + ) override; + + /** + * @brief This is to calculate and initialize the mShearReductionFactors at the very beginning of the calculation + * @param rMaterialProperties the Properties instance of the current element + * This implementation is based on E. OƱate Vol 2: Beams plates and shells. Page 399 of the document + * Eq. (7.48a) from section 7.3 "computation of transverse shear correction parameters". + */ + void InitializeShearReductionFactors( + const Properties &rMaterialProperties); + + std::vector& GetConstitutiveLaws() + { + return mConstitutiveLaws; + } + + /** + * @brief Computes the material maximum edge length for the given geometry, used to compute the integration points in thickness + */ + double GetMaxReferenceEdgeLength(const GeometryType& rGeometry) const + { + return AdvancedConstitutiveLawUtilities<3>::GetMaxReferenceEdgeLengthForShell(rGeometry); + } + + /** + * @brief Computes the shear modulus of the shell + */ + void CalculateShearModulus(double &Gyz, double &Gxz, Parameters &rValues); + + /** + * @brief Computes the material response in terms of 1st Piola-Kirchhoff stresses and constitutive tensor + * @see Parameters + */ + void CalculateMaterialResponsePK1(Parameters& rValues) override; + + /** + * @brief Computes the material response in terms of 2nd Piola-Kirchhoff stresses and constitutive tensor + * @see Parameters + */ + void CalculateMaterialResponsePK2(Parameters& rValues) override; + + /** + * @brief Computes the material response in terms of Kirchhoff stresses and constitutive tensor + * @see Parameters + */ + void CalculateMaterialResponseKirchhoff(Parameters& rValues) override; + + /** + * @brief Computes the material response in terms of Cauchy stresses and constitutive tensor + * @see Parameters + */ + void CalculateMaterialResponseCauchy(Parameters& rValues) override; + + /** + * @brief Initialize the material response in terms of 1st Piola-Kirchhoff stresses + * @see Parameters + */ + void InitializeMaterialResponsePK1(Parameters& rValues) override; + + /** + * @brief Initialize the material response in terms of 2nd Piola-Kirchhoff stresses + * @see Parameters + */ + void InitializeMaterialResponsePK2(Parameters& rValues) override; + + /** + * @brief Initialize the material response in terms of Kirchhoff stresses + * @see Parameters + */ + void InitializeMaterialResponseKirchhoff(Parameters& rValues) override; + + /** + * @brief Initialize the material response in terms of Cauchy stresses + * @see Parameters + */ + void InitializeMaterialResponseCauchy(Parameters& rValues) override; + + /** + * @brief Finalize the material response in terms of 1st Piola-Kirchhoff stresses + * @see Parameters + */ + void FinalizeMaterialResponsePK1(Parameters& rValues) override; + + /** + * @brief Finalize the material response in terms of 2nd Piola-Kirchhoff stresses + * @see Parameters + */ + void FinalizeMaterialResponsePK2(Parameters& rValues) override; + + /** + * @brief Finalize the material response in terms of Kirchhoff stresses + * @see Parameters + */ + void FinalizeMaterialResponseKirchhoff(Parameters& rValues) override; + + /** + * @brief Finalize the material response in terms of Cauchy stresses + * @see Parameters + */ + void FinalizeMaterialResponseCauchy(Parameters& rValues) override; + + /** + * @brief This can be used in order to reset all internal variables of the + * constitutive law (e.g. if a model should be reset to its reference state) + * @param rMaterialProperties the Properties instance of the current element + * @param rElementGeometry the geometry of the current element + * @param rShapeFunctionsValues the shape functions values in the current integration point + */ + void ResetMaterial( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const Vector& rShapeFunctionsValues + ) override; + + /** + * @brief This function is designed to be called once to check compatibility with element + * @param rFeatures + */ + void GetLawFeatures(Features& rFeatures) override; + + /** + * @brief This function is designed to be called once to perform all the checks needed + * on the input provided. Checks can be "expensive" as the function is designed to catch user's errors. + * @param rMaterialProperties + * @param rElementGeometry + * @param rCurrentProcessInfo + * @return 0 if OK, 1 otherwise + */ + int Check( + const Properties& rMaterialProperties, + const GeometryType& rElementGeometry, + const ProcessInfo& rCurrentProcessInfo + ) const override; + +protected: + + ///@name Protected static Member Variables + ///@{ + + ///@} + ///@name Protected member Variables + ///@{ + + ///@} + ///@name Protected Operators + ///@{ + + ///@} + ///@name Protected Operations + ///@{ + + ///@} + +private: + + ///@name Static Member Variables + ///@{ + + ///@} + ///@name Member Variables + ///@{ + + std::vector mConstitutiveLaws; /// The vector containing the constitutive laws (must be cloned, the ones contained on the properties can conflict between them) + std::vector mZCoordinates; /// The vector containing the z-coordinate of the centroid of each layer in the thickness of the shell + std::vector mEulerAngles; /// The Euler angle of rotation of each layer w.r.t the local axes of the shell + std::vector mThicknesses; /// The thickness of each layer + std::vector mShearReductionFactors = std::vector(2, 1.0); /// The shear reduction factors for the shear components of the constitutive matrix, initialized to 1.0 (no reduction) + + ///@} + ///@name Private Operators + ///@{ + + ///@} + ///@name Private Operations + ///@{ + ///@} + + ///@} + ///@name Private Access + ///@{ + ///@} + + ///@} + ///@name Serialization + ///@{ + friend class Serializer; + + void save(Serializer& rSerializer) const override + { + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, ConstitutiveLaw) + rSerializer.save("ConstitutiveLaws", mConstitutiveLaws); + rSerializer.save("ZCoordinates", mZCoordinates); + rSerializer.save("EulerAngles", mEulerAngles); + rSerializer.save("Thicknesses", mThicknesses); + rSerializer.save("ShearReductionFactors", mShearReductionFactors); + } + + void load(Serializer& rSerializer) override + { + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, ConstitutiveLaw) + rSerializer.load("ConstitutiveLaws", mConstitutiveLaws); + rSerializer.load("ThicknessIntegrationPoints", mZCoordinates); + rSerializer.load("EulerAngles", mEulerAngles); + rSerializer.load("Thicknesses", mThicknesses); + rSerializer.load("ShearReductionFactors", mShearReductionFactors); + } + + +}; // Class ThicknessIntegratedCompositeConstitutiveLaw +} // namespace Kratos. diff --git a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.cpp b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.cpp index b0cd6bb20b5c..46c62e375cd6 100644 --- a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.cpp +++ b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.cpp @@ -18,7 +18,6 @@ // Project includes #include "thickness_integrated_isotropic_constitutive_law.h" -#include "custom_utilities/advanced_constitutive_law_utilities.h" #include "custom_utilities/constitutive_law_utilities.h" #include "structural_mechanics_application_variables.h" #include "constitutive_laws_application_variables.h" @@ -533,7 +532,7 @@ void ThicknessIntegratedIsotropicConstitutiveLaw::CalculateMaterialResponseCauch if (flag_compute_constitutive_tensor) { // membrane part - noalias(project(generalized_constitutive_matrix, range(0,3), range(0,3))) += weight * r_constitutive_matrix; + noalias(project(generalized_constitutive_matrix, range(0, 3), range(0, 3))) += weight * r_constitutive_matrix; // bending part noalias(project(generalized_constitutive_matrix, range(3, 6), range(3, 6))) += aux_weight2 * r_constitutive_matrix; diff --git a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h index 365d8b1062ac..dd71817a04b7 100644 --- a/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h +++ b/applications/ConstitutiveLawsApplication/custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h @@ -20,6 +20,7 @@ // Project includes #include "includes/constitutive_law.h" +#include "custom_utilities/advanced_constitutive_law_utilities.h" namespace Kratos { @@ -44,9 +45,9 @@ namespace Kratos /** * @class ThicknessIntegratedIsotropicConstitutiveLaw * @ingroup StructuralMechanicsApplication - * @brief This constitutive law is implemented to be used together with the CSDSG3ThickShellElement3D3N element - * It computes the constitutive matrix and stress vector by integrating over the thickness using a set of - * sub-properties, each one with its own subproperty, constitutive model (isotropic plane stress). + * @brief This constitutive law is implemented to be used together with the CSDSG3ThickShellElement3D3N and MITCThickShellElement3D4N element + * It computes the constitutive matrix and stress vector by integrating over the thickness using a + * sub-property, and constitutive model (MUST be isotropic and plane stress). * Input: the Generalized strain vector of 8 components (3 membrane + 3 bending + 2 shear) * Output: the Generalized stress vector of 8 components (3 membrane + 3 bending + 2 shear) and 8x8 generalized * constitutive matrix. @@ -417,24 +418,18 @@ class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) ThicknessIntegratedIsotropicCons mThicknessIntegrationPoints = NumberOfPoints; } + /** + * @brief This method computes the maximum edge length of + * a shell of 3 and 4 nodes + */ double GetMaxReferenceEdgeLength(const GeometryType& rGeometry) const { - double max_length = 0.0; - - const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); - const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); - const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); - - const double length_12 = norm_2(r_coord_2 - r_coord_1); - const double length_23 = norm_2(r_coord_3 - r_coord_2); - const double length_31 = norm_2(r_coord_1 - r_coord_3); - - max_length = std::max(length_12, length_23); - max_length = std::max(max_length, length_31); - - return max_length; + return AdvancedConstitutiveLawUtilities<3>::GetMaxReferenceEdgeLengthForShell(rGeometry); } + /** + * @brief Computes a lists of z-coordinates and weigths to perform the integration through the thickness + */ void CalculateCoordinatesAndWeights( std::vector &rCoordinates, std::vector &rWeights, diff --git a/applications/ConstitutiveLawsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp b/applications/ConstitutiveLawsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp index 3d54db985a6f..375aa63f3264 100644 --- a/applications/ConstitutiveLawsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp +++ b/applications/ConstitutiveLawsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp @@ -125,6 +125,7 @@ // Structural elements CL #include "custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law.h" +#include "custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law.h" namespace Kratos::Python { @@ -1521,6 +1522,10 @@ void AddCustomConstitutiveLawsToPython(pybind11::module& m) (m,"ThicknessIntegratedIsotropicConstitutiveLaw").def(py::init<>()) ; + py::class_< ThicknessIntegratedCompositeConstitutiveLaw, typename ThicknessIntegratedCompositeConstitutiveLaw::Pointer, ConstitutiveLaw > + (m,"ThicknessIntegratedCompositeConstitutiveLaw").def(py::init<>()) + ; + } diff --git a/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.cpp b/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.cpp index 88cba1acdf46..3b442da914ec 100644 --- a/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.cpp +++ b/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.cpp @@ -1034,6 +1034,48 @@ BoundedMatrix AdvancedConstitutiveLawUtilities::Calcul return P / 3.0; } +/***********************************************************************************/ +/***********************************************************************************/ + +template +double AdvancedConstitutiveLawUtilities::GetMaxReferenceEdgeLengthForShell( + const GeometryType& rGeometry + ) +{ + double max_length = 0.0; + + if (rGeometry.PointsNumber() == 3) { + const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); + const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); + const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); + + const double length_12 = norm_2(r_coord_2 - r_coord_1); + const double length_23 = norm_2(r_coord_3 - r_coord_2); + const double length_31 = norm_2(r_coord_1 - r_coord_3); + + max_length = std::max({length_12, length_23, length_31}); + + } else if (rGeometry.PointsNumber() == 4) { + const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); + const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); + const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); + const auto& r_coord_4 = rGeometry[3].GetInitialPosition(); + + const double length_12 = norm_2(r_coord_2 - r_coord_1); + const double length_23 = norm_2(r_coord_3 - r_coord_2); + const double length_34 = norm_2(r_coord_4 - r_coord_3); + const double length_41 = norm_2(r_coord_1 - r_coord_4); + + max_length = std::max({length_12, length_23, length_34, length_41}); + } else { + KRATOS_ERROR << "This shell constitutive law is compatible with elements of 3 and 4 nodes only..." << std::endl; + } + + return max_length; +} + +/***********************************************************************************/ +/***********************************************************************************/ template class AdvancedConstitutiveLawUtilities<3>; template class AdvancedConstitutiveLawUtilities<6>; diff --git a/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.h b/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.h index 621e2ccaf709..027ea534026b 100644 --- a/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.h +++ b/applications/ConstitutiveLawsApplication/custom_utilities/advanced_constitutive_law_utilities.h @@ -548,5 +548,12 @@ class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) AdvancedConstitutiveLawUtilities */ static BoundedMatrix CalculatePOperator(); + /** + * @brief This method computes the maximum edge length of + * a shell of 3 and 4 nodes + */ + static double GetMaxReferenceEdgeLengthForShell( + const GeometryType &rGeometry); + }; // class AdvancedConstitutiveLawUtilities } // namespace Kratos \ No newline at end of file diff --git a/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test.mdpa b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test.mdpa new file mode 100644 index 000000000000..13e457707778 --- /dev/null +++ b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test.mdpa @@ -0,0 +1,2896 @@ +Begin ModelPartData +// VARIABLE_NAME value +End ModelPartData + +Begin Properties 0 +End Properties +Begin Nodes + 1 0.5000000000 0.5000000000 0.0000000000 + 2 0.5000000000 0.4666666667 0.0000000000 + 3 0.4666666667 0.5000000000 0.0000000000 + 4 0.4666666667 0.4666666667 0.0000000000 + 5 0.4333333333 0.5000000000 0.0000000000 + 6 0.5000000000 0.4333333333 0.0000000000 + 7 0.4333333333 0.4666666667 0.0000000000 + 8 0.4666666667 0.4333333333 0.0000000000 + 9 0.4333333333 0.4333333333 0.0000000000 + 10 0.4000000000 0.5000000000 0.0000000000 + 11 0.5000000000 0.4000000000 0.0000000000 + 12 0.4666666667 0.4000000000 0.0000000000 + 13 0.4000000000 0.4666666667 0.0000000000 + 14 0.4000000000 0.4333333333 0.0000000000 + 15 0.4333333333 0.4000000000 0.0000000000 + 16 0.3666666667 0.5000000000 0.0000000000 + 17 0.5000000000 0.3666666667 0.0000000000 + 18 0.4666666667 0.3666666667 0.0000000000 + 19 0.3666666667 0.4666666667 0.0000000000 + 20 0.4000000000 0.4000000000 0.0000000000 + 21 0.4333333333 0.3666666667 0.0000000000 + 22 0.3666666667 0.4333333333 0.0000000000 + 23 0.4000000000 0.3666666667 0.0000000000 + 24 0.5000000000 0.3333333333 0.0000000000 + 25 0.3333333333 0.5000000000 0.0000000000 + 26 0.3666666667 0.4000000000 0.0000000000 + 27 0.3333333333 0.4666666667 0.0000000000 + 28 0.4666666667 0.3333333333 0.0000000000 + 29 0.3333333333 0.4333333333 0.0000000000 + 30 0.4333333333 0.3333333333 0.0000000000 + 31 0.3666666667 0.3666666667 0.0000000000 + 32 0.4000000000 0.3333333333 0.0000000000 + 33 0.3333333333 0.4000000000 0.0000000000 + 34 0.3000000000 0.5000000000 0.0000000000 + 35 0.5000000000 0.3000000000 0.0000000000 + 36 0.4666666667 0.3000000000 0.0000000000 + 37 0.3000000000 0.4666666667 0.0000000000 + 38 0.4333333333 0.3000000000 0.0000000000 + 39 0.3000000000 0.4333333333 0.0000000000 + 40 0.3333333333 0.3666666667 0.0000000000 + 41 0.3666666667 0.3333333333 0.0000000000 + 42 0.4000000000 0.3000000000 0.0000000000 + 43 0.3000000000 0.4000000000 0.0000000000 + 44 0.5000000000 0.2666666667 0.0000000000 + 45 0.2666666667 0.5000000000 0.0000000000 + 46 0.2666666667 0.4666666667 0.0000000000 + 47 0.3333333333 0.3333333333 0.0000000000 + 48 0.4666666667 0.2666666667 0.0000000000 + 49 0.3666666667 0.3000000000 0.0000000000 + 50 0.3000000000 0.3666666667 0.0000000000 + 51 0.4333333333 0.2666666667 0.0000000000 + 52 0.2666666667 0.4333333333 0.0000000000 + 53 0.2666666667 0.4000000000 0.0000000000 + 54 0.4000000000 0.2666666667 0.0000000000 + 55 0.3333333333 0.3000000000 0.0000000000 + 56 0.3000000000 0.3333333333 0.0000000000 + 57 0.5000000000 0.2333333333 0.0000000000 + 58 0.2333333333 0.5000000000 0.0000000000 + 59 0.2666666667 0.3666666667 0.0000000000 + 60 0.4666666667 0.2333333333 0.0000000000 + 61 0.2333333333 0.4666666667 0.0000000000 + 62 0.3666666667 0.2666666667 0.0000000000 + 63 0.2333333333 0.4333333333 0.0000000000 + 64 0.4333333333 0.2333333333 0.0000000000 + 65 0.3000000000 0.3000000000 0.0000000000 + 66 0.4000000000 0.2333333333 0.0000000000 + 67 0.2333333333 0.4000000000 0.0000000000 + 68 0.2666666667 0.3333333333 0.0000000000 + 69 0.3333333333 0.2666666667 0.0000000000 + 70 0.2333333333 0.3666666667 0.0000000000 + 71 0.3666666667 0.2333333333 0.0000000000 + 72 0.2000000000 0.5000000000 0.0000000000 + 73 0.5000000000 0.2000000000 0.0000000000 + 74 0.2000000000 0.4666666667 0.0000000000 + 75 0.4666666667 0.2000000000 0.0000000000 + 76 0.2666666667 0.3000000000 0.0000000000 + 77 0.4333333333 0.2000000000 0.0000000000 + 78 0.2000000000 0.4333333333 0.0000000000 + 79 0.3000000000 0.2666666667 0.0000000000 + 80 0.3333333333 0.2333333333 0.0000000000 + 81 0.2333333333 0.3333333333 0.0000000000 + 82 0.2000000000 0.4000000000 0.0000000000 + 83 0.4000000000 0.2000000000 0.0000000000 + 84 0.2000000000 0.3666666667 0.0000000000 + 85 0.3666666667 0.2000000000 0.0000000000 + 86 0.2666666667 0.2666666667 0.0000000000 + 87 0.2333333333 0.3000000000 0.0000000000 + 88 0.1666666667 0.5000000000 0.0000000000 + 89 0.3000000000 0.2333333333 0.0000000000 + 90 0.5000000000 0.1666666667 0.0000000000 + 91 0.4666666667 0.1666666667 0.0000000000 + 92 0.1666666667 0.4666666667 0.0000000000 + 93 0.4333333333 0.1666666667 0.0000000000 + 94 0.1666666667 0.4333333333 0.0000000000 + 95 0.3333333333 0.2000000000 0.0000000000 + 96 0.2000000000 0.3333333333 0.0000000000 + 97 0.1666666667 0.4000000000 0.0000000000 + 98 0.4000000000 0.1666666667 0.0000000000 + 99 0.2333333333 0.2666666667 0.0000000000 + 100 0.2666666667 0.2333333333 0.0000000000 + 101 0.1666666667 0.3666666667 0.0000000000 + 102 0.3666666667 0.1666666667 0.0000000000 + 103 0.2000000000 0.3000000000 0.0000000000 + 104 0.3000000000 0.2000000000 0.0000000000 + 105 0.1333333333 0.5000000000 0.0000000000 + 106 0.5000000000 0.1333333333 0.0000000000 + 107 0.1333333333 0.4666666667 0.0000000000 + 108 0.4666666667 0.1333333333 0.0000000000 + 109 0.3333333333 0.1666666667 0.0000000000 + 110 0.1333333333 0.4333333333 0.0000000000 + 111 0.4333333333 0.1333333333 0.0000000000 + 112 0.1666666667 0.3333333333 0.0000000000 + 113 0.2333333333 0.2333333333 0.0000000000 + 114 0.2666666667 0.2000000000 0.0000000000 + 115 0.2000000000 0.2666666667 0.0000000000 + 116 0.4000000000 0.1333333333 0.0000000000 + 117 0.1333333333 0.4000000000 0.0000000000 + 118 0.3000000000 0.1666666667 0.0000000000 + 119 0.1666666667 0.3000000000 0.0000000000 + 120 0.1333333333 0.3666666667 0.0000000000 + 121 0.3666666667 0.1333333333 0.0000000000 + 122 0.1000000000 0.5000000000 0.0000000000 + 123 0.5000000000 0.1000000000 0.0000000000 + 124 0.2333333333 0.2000000000 0.0000000000 + 125 0.1000000000 0.4666666667 0.0000000000 + 126 0.2000000000 0.2333333333 0.0000000000 + 127 0.4666666667 0.1000000000 0.0000000000 + 128 0.3333333333 0.1333333333 0.0000000000 + 129 0.1333333333 0.3333333333 0.0000000000 + 130 0.1000000000 0.4333333333 0.0000000000 + 131 0.4333333333 0.1000000000 0.0000000000 + 132 0.2666666667 0.1666666667 0.0000000000 + 133 0.1666666667 0.2666666667 0.0000000000 + 134 0.4000000000 0.1000000000 0.0000000000 + 135 0.1000000000 0.4000000000 0.0000000000 + 136 0.1333333333 0.3000000000 0.0000000000 + 137 0.3000000000 0.1333333333 0.0000000000 + 138 0.1000000000 0.3666666667 0.0000000000 + 139 0.3666666667 0.1000000000 0.0000000000 + 140 0.2000000000 0.2000000000 0.0000000000 + 141 0.1666666667 0.2333333333 0.0000000000 + 142 0.2333333333 0.1666666667 0.0000000000 + 143 0.5000000000 0.0666666667 0.0000000000 + 144 0.1000000000 0.3333333333 0.0000000000 + 145 0.3333333333 0.1000000000 0.0000000000 + 146 0.0666666667 0.5000000000 0.0000000000 + 147 0.2666666667 0.1333333333 0.0000000000 + 148 0.0666666667 0.4666666667 0.0000000000 + 149 0.4666666667 0.0666666667 0.0000000000 + 150 0.1333333333 0.2666666667 0.0000000000 + 151 0.0666666667 0.4333333333 0.0000000000 + 152 0.4333333333 0.0666666667 0.0000000000 + 153 0.4000000000 0.0666666667 0.0000000000 + 154 0.0666666667 0.4000000000 0.0000000000 + 155 0.1000000000 0.3000000000 0.0000000000 + 156 0.3000000000 0.1000000000 0.0000000000 + 157 0.2000000000 0.1666666667 0.0000000000 + 158 0.1666666667 0.2000000000 0.0000000000 + 159 0.2333333333 0.1333333333 0.0000000000 + 160 0.0666666667 0.3666666667 0.0000000000 + 161 0.1333333333 0.2333333333 0.0000000000 + 162 0.3666666667 0.0666666667 0.0000000000 + 163 0.1000000000 0.2666666667 0.0000000000 + 164 0.2666666667 0.1000000000 0.0000000000 + 165 0.3333333333 0.0666666667 0.0000000000 + 166 0.0666666667 0.3333333333 0.0000000000 + 167 0.0333333333 0.5000000000 0.0000000000 + 168 0.5000000000 0.0333333333 0.0000000000 + 169 0.4666666667 0.0333333333 0.0000000000 + 170 0.0333333333 0.4666666667 0.0000000000 + 171 0.1666666667 0.1666666667 0.0000000000 + 172 0.4333333333 0.0333333333 0.0000000000 + 173 0.0333333333 0.4333333333 0.0000000000 + 174 0.2000000000 0.1333333333 0.0000000000 + 175 0.1333333333 0.2000000000 0.0000000000 + 176 0.4000000000 0.0333333333 0.0000000000 + 177 0.0666666667 0.3000000000 0.0000000000 + 178 0.0333333333 0.4000000000 0.0000000000 + 179 0.3000000000 0.0666666667 0.0000000000 + 180 0.1000000000 0.2333333333 0.0000000000 + 181 0.2333333333 0.1000000000 0.0000000000 + 182 0.0333333333 0.3666666667 0.0000000000 + 183 0.3666666667 0.0333333333 0.0000000000 + 184 0.2666666667 0.0666666667 0.0000000000 + 185 0.0666666667 0.2666666667 0.0000000000 + 186 0.3333333333 0.0333333333 0.0000000000 + 187 0.0333333333 0.3333333333 0.0000000000 + 188 0.1666666667 0.1333333333 0.0000000000 + 189 0.1333333333 0.1666666667 0.0000000000 + 190 0.0000000000 0.5000000000 0.0000000000 + 191 0.2000000000 0.1000000000 0.0000000000 + 192 0.5000000000 0.0000000000 0.0000000000 + 193 0.1000000000 0.2000000000 0.0000000000 + 194 0.0000000000 0.4666666667 0.0000000000 + 195 0.4666666667 0.0000000000 0.0000000000 + 196 0.0000000000 0.4333333333 0.0000000000 + 197 0.4333333333 0.0000000000 0.0000000000 + 198 0.0333333333 0.3000000000 0.0000000000 + 199 0.3000000000 0.0333333333 0.0000000000 + 200 0.2333333333 0.0666666667 0.0000000000 + 201 0.0666666667 0.2333333333 0.0000000000 + 202 0.0000000000 0.4000000000 0.0000000000 + 203 0.4000000000 0.0000000000 0.0000000000 + 204 0.3666666667 0.0000000000 0.0000000000 + 205 0.0000000000 0.3666666667 0.0000000000 + 206 0.1333333333 0.1333333333 0.0000000000 + 207 0.1000000000 0.1666666667 0.0000000000 + 208 0.1666666667 0.1000000000 0.0000000000 + 209 0.2666666667 0.0333333333 0.0000000000 + 210 0.0333333333 0.2666666667 0.0000000000 + 211 0.0000000000 0.3333333333 0.0000000000 + 212 0.3333333333 0.0000000000 0.0000000000 + 213 0.0666666667 0.2000000000 0.0000000000 + 214 0.2000000000 0.0666666667 0.0000000000 + 215 0.2333333333 0.0333333333 0.0000000000 + 216 0.0333333333 0.2333333333 0.0000000000 + 217 0.3000000000 0.0000000000 0.0000000000 + 218 0.0000000000 0.3000000000 0.0000000000 + 219 0.1000000000 0.1333333333 0.0000000000 + 220 0.1333333333 0.1000000000 0.0000000000 + 221 0.0666666667 0.1666666667 0.0000000000 + 222 0.1666666667 0.0666666667 0.0000000000 + 223 0.2666666667 0.0000000000 0.0000000000 + 224 0.0000000000 0.2666666667 0.0000000000 + 225 0.2000000000 0.0333333333 0.0000000000 + 226 0.0333333333 0.2000000000 0.0000000000 + 227 0.1000000000 0.1000000000 0.0000000000 + 228 0.2333333333 0.0000000000 0.0000000000 + 229 0.0000000000 0.2333333333 0.0000000000 + 230 0.0666666667 0.1333333333 0.0000000000 + 231 0.1333333333 0.0666666667 0.0000000000 + 232 0.0333333333 0.1666666667 0.0000000000 + 233 0.1666666667 0.0333333333 0.0000000000 + 234 0.0000000000 0.2000000000 0.0000000000 + 235 0.2000000000 0.0000000000 0.0000000000 + 236 0.0666666667 0.1000000000 0.0000000000 + 237 0.1000000000 0.0666666667 0.0000000000 + 238 0.1333333333 0.0333333333 0.0000000000 + 239 0.0333333333 0.1333333333 0.0000000000 + 240 0.0000000000 0.1666666667 0.0000000000 + 241 0.1666666667 0.0000000000 0.0000000000 + 242 0.0666666667 0.0666666667 0.0000000000 + 243 0.1000000000 0.0333333333 0.0000000000 + 244 0.0333333333 0.1000000000 0.0000000000 + 245 0.1333333333 0.0000000000 0.0000000000 + 246 0.0000000000 0.1333333333 0.0000000000 + 247 0.0666666667 0.0333333333 0.0000000000 + 248 0.0333333333 0.0666666667 0.0000000000 + 249 0.0000000000 0.1000000000 0.0000000000 + 250 0.1000000000 0.0000000000 0.0000000000 + 251 0.0333333333 0.0333333333 0.0000000000 + 252 0.0000000000 0.0666666667 0.0000000000 + 253 0.0666666667 0.0000000000 0.0000000000 + 254 0.0000000000 0.0333333333 0.0000000000 + 255 0.0333333333 0.0000000000 0.0000000000 + 256 0.0000000000 0.0000000000 0.0000000000 +End Nodes + + +Begin Geometries Triangle3D3 // GUI group identifier: shell + 1 255 251 256 + 2 251 254 256 + 3 253 247 255 + 4 247 251 255 + 5 250 243 253 + 6 243 247 253 + 7 245 238 250 + 8 238 243 250 + 9 241 233 245 + 10 233 238 245 + 11 235 225 241 + 12 225 233 241 + 13 228 215 235 + 14 215 225 235 + 15 223 209 228 + 16 209 215 228 + 17 217 199 223 + 18 199 209 223 + 19 212 186 217 + 20 186 199 217 + 21 204 183 212 + 22 183 186 212 + 23 203 176 204 + 24 176 183 204 + 25 197 172 203 + 26 172 176 203 + 27 195 169 197 + 28 169 172 197 + 29 192 168 195 + 30 168 169 195 + 31 251 248 254 + 32 248 252 254 + 33 247 242 251 + 34 242 248 251 + 35 243 237 247 + 36 237 242 247 + 37 238 231 243 + 38 231 237 243 + 39 233 222 238 + 40 222 231 238 + 41 225 214 233 + 42 214 222 233 + 43 215 200 225 + 44 200 214 225 + 45 209 184 215 + 46 184 200 215 + 47 199 179 209 + 48 179 184 209 + 49 186 165 199 + 50 165 179 199 + 51 183 162 186 + 52 162 165 186 + 53 176 153 183 + 54 153 162 183 + 55 172 152 176 + 56 152 153 176 + 57 169 149 172 + 58 149 152 172 + 59 168 143 169 + 60 143 149 169 + 61 248 244 252 + 62 244 249 252 + 63 242 236 248 + 64 236 244 248 + 65 237 227 242 + 66 227 236 242 + 67 231 220 237 + 68 220 227 237 + 69 222 208 231 + 70 208 220 231 + 71 214 191 222 + 72 191 208 222 + 73 200 181 214 + 74 181 191 214 + 75 184 164 200 + 76 164 181 200 + 77 179 156 184 + 78 156 164 184 + 79 165 145 179 + 80 145 156 179 + 81 162 139 165 + 82 139 145 165 + 83 153 134 162 + 84 134 139 162 + 85 152 131 153 + 86 131 134 153 + 87 149 127 152 + 88 127 131 152 + 89 143 123 149 + 90 123 127 149 + 91 244 239 249 + 92 239 246 249 + 93 236 230 244 + 94 230 239 244 + 95 227 219 236 + 96 219 230 236 + 97 220 206 227 + 98 206 219 227 + 99 208 188 220 + 100 188 206 220 + 101 191 174 208 + 102 174 188 208 + 103 181 159 191 + 104 159 174 191 + 105 164 147 181 + 106 147 159 181 + 107 156 137 164 + 108 137 147 164 + 109 145 128 156 + 110 128 137 156 + 111 139 121 145 + 112 121 128 145 + 113 134 116 139 + 114 116 121 139 + 115 131 111 134 + 116 111 116 134 + 117 127 108 131 + 118 108 111 131 + 119 123 106 127 + 120 106 108 127 + 121 239 232 246 + 122 232 240 246 + 123 230 221 239 + 124 221 232 239 + 125 219 207 230 + 126 207 221 230 + 127 206 189 219 + 128 189 207 219 + 129 188 171 206 + 130 171 189 206 + 131 174 157 188 + 132 157 171 188 + 133 159 142 174 + 134 142 157 174 + 135 147 132 159 + 136 132 142 159 + 137 137 118 147 + 138 118 132 147 + 139 128 109 137 + 140 109 118 137 + 141 121 102 128 + 142 102 109 128 + 143 116 98 121 + 144 98 102 121 + 145 111 93 116 + 146 93 98 116 + 147 108 91 111 + 148 91 93 111 + 149 106 90 108 + 150 90 91 108 + 151 232 226 240 + 152 226 234 240 + 153 221 213 232 + 154 213 226 232 + 155 207 193 221 + 156 193 213 221 + 157 189 175 207 + 158 175 193 207 + 159 171 158 189 + 160 158 175 189 + 161 157 140 171 + 162 140 158 171 + 163 142 124 157 + 164 124 140 157 + 165 132 114 142 + 166 114 124 142 + 167 118 104 132 + 168 104 114 132 + 169 109 95 118 + 170 95 104 118 + 171 102 85 109 + 172 85 95 109 + 173 98 83 102 + 174 83 85 102 + 175 93 77 98 + 176 77 83 98 + 177 91 75 93 + 178 75 77 93 + 179 90 73 91 + 180 73 75 91 + 181 226 216 234 + 182 216 229 234 + 183 213 201 226 + 184 201 216 226 + 185 193 180 213 + 186 180 201 213 + 187 175 161 193 + 188 161 180 193 + 189 158 141 175 + 190 141 161 175 + 191 140 126 158 + 192 126 141 158 + 193 124 113 140 + 194 113 126 140 + 195 114 100 124 + 196 100 113 124 + 197 104 89 114 + 198 89 100 114 + 199 95 80 104 + 200 80 89 104 + 201 85 71 95 + 202 71 80 95 + 203 83 66 85 + 204 66 71 85 + 205 77 64 83 + 206 64 66 83 + 207 75 60 77 + 208 60 64 77 + 209 73 57 75 + 210 57 60 75 + 211 216 210 229 + 212 210 224 229 + 213 201 185 216 + 214 185 210 216 + 215 180 163 201 + 216 163 185 201 + 217 161 150 180 + 218 150 163 180 + 219 141 133 161 + 220 133 150 161 + 221 126 115 141 + 222 115 133 141 + 223 113 99 126 + 224 99 115 126 + 225 100 86 113 + 226 86 99 113 + 227 89 79 100 + 228 79 86 100 + 229 80 69 89 + 230 69 79 89 + 231 71 62 80 + 232 62 69 80 + 233 66 54 71 + 234 54 62 71 + 235 64 51 66 + 236 51 54 66 + 237 60 48 64 + 238 48 51 64 + 239 57 44 60 + 240 44 48 60 + 241 210 198 224 + 242 198 218 224 + 243 185 177 210 + 244 177 198 210 + 245 163 155 185 + 246 155 177 185 + 247 150 136 163 + 248 136 155 163 + 249 133 119 150 + 250 119 136 150 + 251 115 103 133 + 252 103 119 133 + 253 99 87 115 + 254 87 103 115 + 255 86 76 99 + 256 76 87 99 + 257 79 65 86 + 258 65 76 86 + 259 69 55 79 + 260 55 65 79 + 261 62 49 69 + 262 49 55 69 + 263 54 42 62 + 264 42 49 62 + 265 51 38 54 + 266 38 42 54 + 267 48 36 51 + 268 36 38 51 + 269 44 35 48 + 270 35 36 48 + 271 198 187 218 + 272 187 211 218 + 273 177 166 198 + 274 166 187 198 + 275 155 144 177 + 276 144 166 177 + 277 136 129 155 + 278 129 144 155 + 279 119 112 136 + 280 112 129 136 + 281 103 96 119 + 282 96 112 119 + 283 87 81 103 + 284 81 96 103 + 285 76 68 87 + 286 68 81 87 + 287 65 56 76 + 288 56 68 76 + 289 55 47 65 + 290 47 56 65 + 291 49 41 55 + 292 41 47 55 + 293 42 32 49 + 294 32 41 49 + 295 38 30 42 + 296 30 32 42 + 297 36 28 38 + 298 28 30 38 + 299 35 24 36 + 300 24 28 36 + 301 187 182 211 + 302 182 205 211 + 303 166 160 187 + 304 160 182 187 + 305 144 138 166 + 306 138 160 166 + 307 129 120 144 + 308 120 138 144 + 309 112 101 129 + 310 101 120 129 + 311 96 84 112 + 312 84 101 112 + 313 81 70 96 + 314 70 84 96 + 315 68 59 81 + 316 59 70 81 + 317 56 50 68 + 318 50 59 68 + 319 47 40 56 + 320 40 50 56 + 321 41 31 47 + 322 31 40 47 + 323 32 23 41 + 324 23 31 41 + 325 30 21 32 + 326 21 23 32 + 327 28 18 30 + 328 18 21 30 + 329 24 17 28 + 330 17 18 28 + 331 182 178 205 + 332 178 202 205 + 333 160 154 182 + 334 154 178 182 + 335 138 135 160 + 336 135 154 160 + 337 120 117 138 + 338 117 135 138 + 339 101 97 120 + 340 97 117 120 + 341 84 82 101 + 342 82 97 101 + 343 70 67 84 + 344 67 82 84 + 345 59 53 70 + 346 53 67 70 + 347 50 43 59 + 348 43 53 59 + 349 40 33 50 + 350 33 43 50 + 351 31 26 40 + 352 26 33 40 + 353 23 20 31 + 354 20 26 31 + 355 21 15 23 + 356 15 20 23 + 357 18 12 21 + 358 12 15 21 + 359 17 11 18 + 360 11 12 18 + 361 178 173 202 + 362 173 196 202 + 363 154 151 178 + 364 151 173 178 + 365 135 130 154 + 366 130 151 154 + 367 117 110 135 + 368 110 130 135 + 369 97 94 117 + 370 94 110 117 + 371 82 78 97 + 372 78 94 97 + 373 67 63 82 + 374 63 78 82 + 375 53 52 67 + 376 52 63 67 + 377 43 39 53 + 378 39 52 53 + 379 33 29 43 + 380 29 39 43 + 381 26 22 33 + 382 22 29 33 + 383 20 14 26 + 384 14 22 26 + 385 15 9 20 + 386 9 14 20 + 387 12 8 15 + 388 8 9 15 + 389 11 6 12 + 390 6 8 12 + 391 173 170 196 + 392 170 194 196 + 393 151 148 173 + 394 148 170 173 + 395 130 125 151 + 396 125 148 151 + 397 110 107 130 + 398 107 125 130 + 399 94 92 110 + 400 92 107 110 + 401 78 74 94 + 402 74 92 94 + 403 63 61 78 + 404 61 74 78 + 405 52 46 63 + 406 46 61 63 + 407 39 37 52 + 408 37 46 52 + 409 29 27 39 + 410 27 37 39 + 411 22 19 29 + 412 19 27 29 + 413 14 13 22 + 414 13 19 22 + 415 9 7 14 + 416 7 13 14 + 417 8 4 9 + 418 4 7 9 + 419 6 2 8 + 420 2 4 8 + 421 170 167 194 + 422 167 190 194 + 423 148 146 170 + 424 146 167 170 + 425 125 122 148 + 426 122 146 148 + 427 107 105 125 + 428 105 122 125 + 429 92 88 107 + 430 88 105 107 + 431 74 72 92 + 432 72 88 92 + 433 61 58 74 + 434 58 72 74 + 435 46 45 61 + 436 45 58 61 + 437 37 34 46 + 438 34 45 46 + 439 27 25 37 + 440 25 34 37 + 441 19 16 27 + 442 16 25 27 + 443 13 10 19 + 444 10 16 19 + 445 7 5 13 + 446 5 10 13 + 447 4 3 7 + 448 3 5 7 + 449 2 1 4 + 450 1 3 4 +End Geometries + +Begin Geometries Line3D2 // GUI group identifier: fix_displ + 451 256 255 + 452 255 253 + 453 253 250 + 454 250 245 + 455 245 241 + 456 241 235 + 457 235 228 + 458 228 223 + 459 223 217 + 460 217 212 + 461 212 204 + 462 204 203 + 463 203 197 + 464 197 195 + 465 195 192 + 496 256 254 + 497 254 252 + 498 252 249 + 499 249 246 + 500 246 240 + 501 240 234 + 502 234 229 + 503 229 224 + 504 224 218 + 505 218 211 + 506 211 205 + 507 205 202 + 508 202 196 + 509 196 194 + 510 194 190 +End Geometries + +Begin Geometries Line3D2 // GUI group identifier: rot_x_fix + 481 190 167 + 482 167 146 + 483 146 122 + 484 122 105 + 485 105 88 + 486 88 72 + 487 72 58 + 488 58 45 + 489 45 34 + 490 34 25 + 491 25 16 + 492 16 10 + 493 10 5 + 494 5 3 + 495 3 1 + 496 256 254 + 497 254 252 + 498 252 249 + 499 249 246 + 500 246 240 + 501 240 234 + 502 234 229 + 503 229 224 + 504 224 218 + 505 218 211 + 506 211 205 + 507 205 202 + 508 202 196 + 509 196 194 + 510 194 190 +End Geometries + +Begin Geometries Line3D2 // GUI group identifier: rot_y_fix + 451 256 255 + 452 255 253 + 453 253 250 + 454 250 245 + 455 245 241 + 456 241 235 + 457 235 228 + 458 228 223 + 459 223 217 + 460 217 212 + 461 212 204 + 462 204 203 + 463 203 197 + 464 197 195 + 465 195 192 + 466 192 168 + 467 168 143 + 468 143 123 + 469 123 106 + 470 106 90 + 471 90 73 + 472 73 57 + 473 57 44 + 474 44 35 + 475 35 24 + 476 24 17 + 477 17 11 + 478 11 6 + 479 6 2 + 480 2 1 +End Geometries + +Begin Geometries Triangle3D3 // GUI group identifier: load + 1 255 251 256 + 2 251 254 256 + 3 253 247 255 + 4 247 251 255 + 5 250 243 253 + 6 243 247 253 + 7 245 238 250 + 8 238 243 250 + 9 241 233 245 + 10 233 238 245 + 11 235 225 241 + 12 225 233 241 + 13 228 215 235 + 14 215 225 235 + 15 223 209 228 + 16 209 215 228 + 17 217 199 223 + 18 199 209 223 + 19 212 186 217 + 20 186 199 217 + 21 204 183 212 + 22 183 186 212 + 23 203 176 204 + 24 176 183 204 + 25 197 172 203 + 26 172 176 203 + 27 195 169 197 + 28 169 172 197 + 29 192 168 195 + 30 168 169 195 + 31 251 248 254 + 32 248 252 254 + 33 247 242 251 + 34 242 248 251 + 35 243 237 247 + 36 237 242 247 + 37 238 231 243 + 38 231 237 243 + 39 233 222 238 + 40 222 231 238 + 41 225 214 233 + 42 214 222 233 + 43 215 200 225 + 44 200 214 225 + 45 209 184 215 + 46 184 200 215 + 47 199 179 209 + 48 179 184 209 + 49 186 165 199 + 50 165 179 199 + 51 183 162 186 + 52 162 165 186 + 53 176 153 183 + 54 153 162 183 + 55 172 152 176 + 56 152 153 176 + 57 169 149 172 + 58 149 152 172 + 59 168 143 169 + 60 143 149 169 + 61 248 244 252 + 62 244 249 252 + 63 242 236 248 + 64 236 244 248 + 65 237 227 242 + 66 227 236 242 + 67 231 220 237 + 68 220 227 237 + 69 222 208 231 + 70 208 220 231 + 71 214 191 222 + 72 191 208 222 + 73 200 181 214 + 74 181 191 214 + 75 184 164 200 + 76 164 181 200 + 77 179 156 184 + 78 156 164 184 + 79 165 145 179 + 80 145 156 179 + 81 162 139 165 + 82 139 145 165 + 83 153 134 162 + 84 134 139 162 + 85 152 131 153 + 86 131 134 153 + 87 149 127 152 + 88 127 131 152 + 89 143 123 149 + 90 123 127 149 + 91 244 239 249 + 92 239 246 249 + 93 236 230 244 + 94 230 239 244 + 95 227 219 236 + 96 219 230 236 + 97 220 206 227 + 98 206 219 227 + 99 208 188 220 + 100 188 206 220 + 101 191 174 208 + 102 174 188 208 + 103 181 159 191 + 104 159 174 191 + 105 164 147 181 + 106 147 159 181 + 107 156 137 164 + 108 137 147 164 + 109 145 128 156 + 110 128 137 156 + 111 139 121 145 + 112 121 128 145 + 113 134 116 139 + 114 116 121 139 + 115 131 111 134 + 116 111 116 134 + 117 127 108 131 + 118 108 111 131 + 119 123 106 127 + 120 106 108 127 + 121 239 232 246 + 122 232 240 246 + 123 230 221 239 + 124 221 232 239 + 125 219 207 230 + 126 207 221 230 + 127 206 189 219 + 128 189 207 219 + 129 188 171 206 + 130 171 189 206 + 131 174 157 188 + 132 157 171 188 + 133 159 142 174 + 134 142 157 174 + 135 147 132 159 + 136 132 142 159 + 137 137 118 147 + 138 118 132 147 + 139 128 109 137 + 140 109 118 137 + 141 121 102 128 + 142 102 109 128 + 143 116 98 121 + 144 98 102 121 + 145 111 93 116 + 146 93 98 116 + 147 108 91 111 + 148 91 93 111 + 149 106 90 108 + 150 90 91 108 + 151 232 226 240 + 152 226 234 240 + 153 221 213 232 + 154 213 226 232 + 155 207 193 221 + 156 193 213 221 + 157 189 175 207 + 158 175 193 207 + 159 171 158 189 + 160 158 175 189 + 161 157 140 171 + 162 140 158 171 + 163 142 124 157 + 164 124 140 157 + 165 132 114 142 + 166 114 124 142 + 167 118 104 132 + 168 104 114 132 + 169 109 95 118 + 170 95 104 118 + 171 102 85 109 + 172 85 95 109 + 173 98 83 102 + 174 83 85 102 + 175 93 77 98 + 176 77 83 98 + 177 91 75 93 + 178 75 77 93 + 179 90 73 91 + 180 73 75 91 + 181 226 216 234 + 182 216 229 234 + 183 213 201 226 + 184 201 216 226 + 185 193 180 213 + 186 180 201 213 + 187 175 161 193 + 188 161 180 193 + 189 158 141 175 + 190 141 161 175 + 191 140 126 158 + 192 126 141 158 + 193 124 113 140 + 194 113 126 140 + 195 114 100 124 + 196 100 113 124 + 197 104 89 114 + 198 89 100 114 + 199 95 80 104 + 200 80 89 104 + 201 85 71 95 + 202 71 80 95 + 203 83 66 85 + 204 66 71 85 + 205 77 64 83 + 206 64 66 83 + 207 75 60 77 + 208 60 64 77 + 209 73 57 75 + 210 57 60 75 + 211 216 210 229 + 212 210 224 229 + 213 201 185 216 + 214 185 210 216 + 215 180 163 201 + 216 163 185 201 + 217 161 150 180 + 218 150 163 180 + 219 141 133 161 + 220 133 150 161 + 221 126 115 141 + 222 115 133 141 + 223 113 99 126 + 224 99 115 126 + 225 100 86 113 + 226 86 99 113 + 227 89 79 100 + 228 79 86 100 + 229 80 69 89 + 230 69 79 89 + 231 71 62 80 + 232 62 69 80 + 233 66 54 71 + 234 54 62 71 + 235 64 51 66 + 236 51 54 66 + 237 60 48 64 + 238 48 51 64 + 239 57 44 60 + 240 44 48 60 + 241 210 198 224 + 242 198 218 224 + 243 185 177 210 + 244 177 198 210 + 245 163 155 185 + 246 155 177 185 + 247 150 136 163 + 248 136 155 163 + 249 133 119 150 + 250 119 136 150 + 251 115 103 133 + 252 103 119 133 + 253 99 87 115 + 254 87 103 115 + 255 86 76 99 + 256 76 87 99 + 257 79 65 86 + 258 65 76 86 + 259 69 55 79 + 260 55 65 79 + 261 62 49 69 + 262 49 55 69 + 263 54 42 62 + 264 42 49 62 + 265 51 38 54 + 266 38 42 54 + 267 48 36 51 + 268 36 38 51 + 269 44 35 48 + 270 35 36 48 + 271 198 187 218 + 272 187 211 218 + 273 177 166 198 + 274 166 187 198 + 275 155 144 177 + 276 144 166 177 + 277 136 129 155 + 278 129 144 155 + 279 119 112 136 + 280 112 129 136 + 281 103 96 119 + 282 96 112 119 + 283 87 81 103 + 284 81 96 103 + 285 76 68 87 + 286 68 81 87 + 287 65 56 76 + 288 56 68 76 + 289 55 47 65 + 290 47 56 65 + 291 49 41 55 + 292 41 47 55 + 293 42 32 49 + 294 32 41 49 + 295 38 30 42 + 296 30 32 42 + 297 36 28 38 + 298 28 30 38 + 299 35 24 36 + 300 24 28 36 + 301 187 182 211 + 302 182 205 211 + 303 166 160 187 + 304 160 182 187 + 305 144 138 166 + 306 138 160 166 + 307 129 120 144 + 308 120 138 144 + 309 112 101 129 + 310 101 120 129 + 311 96 84 112 + 312 84 101 112 + 313 81 70 96 + 314 70 84 96 + 315 68 59 81 + 316 59 70 81 + 317 56 50 68 + 318 50 59 68 + 319 47 40 56 + 320 40 50 56 + 321 41 31 47 + 322 31 40 47 + 323 32 23 41 + 324 23 31 41 + 325 30 21 32 + 326 21 23 32 + 327 28 18 30 + 328 18 21 30 + 329 24 17 28 + 330 17 18 28 + 331 182 178 205 + 332 178 202 205 + 333 160 154 182 + 334 154 178 182 + 335 138 135 160 + 336 135 154 160 + 337 120 117 138 + 338 117 135 138 + 339 101 97 120 + 340 97 117 120 + 341 84 82 101 + 342 82 97 101 + 343 70 67 84 + 344 67 82 84 + 345 59 53 70 + 346 53 67 70 + 347 50 43 59 + 348 43 53 59 + 349 40 33 50 + 350 33 43 50 + 351 31 26 40 + 352 26 33 40 + 353 23 20 31 + 354 20 26 31 + 355 21 15 23 + 356 15 20 23 + 357 18 12 21 + 358 12 15 21 + 359 17 11 18 + 360 11 12 18 + 361 178 173 202 + 362 173 196 202 + 363 154 151 178 + 364 151 173 178 + 365 135 130 154 + 366 130 151 154 + 367 117 110 135 + 368 110 130 135 + 369 97 94 117 + 370 94 110 117 + 371 82 78 97 + 372 78 94 97 + 373 67 63 82 + 374 63 78 82 + 375 53 52 67 + 376 52 63 67 + 377 43 39 53 + 378 39 52 53 + 379 33 29 43 + 380 29 39 43 + 381 26 22 33 + 382 22 29 33 + 383 20 14 26 + 384 14 22 26 + 385 15 9 20 + 386 9 14 20 + 387 12 8 15 + 388 8 9 15 + 389 11 6 12 + 390 6 8 12 + 391 173 170 196 + 392 170 194 196 + 393 151 148 173 + 394 148 170 173 + 395 130 125 151 + 396 125 148 151 + 397 110 107 130 + 398 107 125 130 + 399 94 92 110 + 400 92 107 110 + 401 78 74 94 + 402 74 92 94 + 403 63 61 78 + 404 61 74 78 + 405 52 46 63 + 406 46 61 63 + 407 39 37 52 + 408 37 46 52 + 409 29 27 39 + 410 27 37 39 + 411 22 19 29 + 412 19 27 29 + 413 14 13 22 + 414 13 19 22 + 415 9 7 14 + 416 7 13 14 + 417 8 4 9 + 418 4 7 9 + 419 6 2 8 + 420 2 4 8 + 421 170 167 194 + 422 167 190 194 + 423 148 146 170 + 424 146 167 170 + 425 125 122 148 + 426 122 146 148 + 427 107 105 125 + 428 105 122 125 + 429 92 88 107 + 430 88 105 107 + 431 74 72 92 + 432 72 88 92 + 433 61 58 74 + 434 58 72 74 + 435 46 45 61 + 436 45 58 61 + 437 37 34 46 + 438 34 45 46 + 439 27 25 37 + 440 25 34 37 + 441 19 16 27 + 442 16 25 27 + 443 13 10 19 + 444 10 16 19 + 445 7 5 13 + 446 5 10 13 + 447 4 3 7 + 448 3 5 7 + 449 2 1 4 + 450 1 3 4 +End Geometries + +Begin SubModelPart shell // Group shell + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + End SubModelPartNodes + Begin SubModelPartGeometries + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + End SubModelPartGeometries +End SubModelPart +Begin SubModelPart fix_displ // Group fix_displ + Begin SubModelPartNodes + 190 + 192 + 194 + 195 + 196 + 197 + 202 + 203 + 204 + 205 + 211 + 212 + 217 + 218 + 223 + 224 + 228 + 229 + 234 + 235 + 240 + 241 + 245 + 246 + 249 + 250 + 252 + 253 + 254 + 255 + 256 + End SubModelPartNodes + Begin SubModelPartGeometries + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + End SubModelPartGeometries +End SubModelPart +Begin SubModelPart rot_x_fix // Group rot_x_fix + Begin SubModelPartNodes + 1 + 3 + 5 + 10 + 16 + 25 + 34 + 45 + 58 + 72 + 88 + 105 + 122 + 146 + 167 + 190 + 194 + 196 + 202 + 205 + 211 + 218 + 224 + 229 + 234 + 240 + 246 + 249 + 252 + 254 + 256 + End SubModelPartNodes + Begin SubModelPartGeometries + 481 + 482 + 483 + 484 + 485 + 486 + 487 + 488 + 489 + 490 + 491 + 492 + 493 + 494 + 495 + 496 + 497 + 498 + 499 + 500 + 501 + 502 + 503 + 504 + 505 + 506 + 507 + 508 + 509 + 510 + End SubModelPartGeometries +End SubModelPart +Begin SubModelPart rot_y_fix // Group rot_y_fix + Begin SubModelPartNodes + 1 + 2 + 6 + 11 + 17 + 24 + 35 + 44 + 57 + 73 + 90 + 106 + 123 + 143 + 168 + 192 + 195 + 197 + 203 + 204 + 212 + 217 + 223 + 228 + 235 + 241 + 245 + 250 + 253 + 255 + 256 + End SubModelPartNodes + Begin SubModelPartGeometries + 451 + 452 + 453 + 454 + 455 + 456 + 457 + 458 + 459 + 460 + 461 + 462 + 463 + 464 + 465 + 466 + 467 + 468 + 469 + 470 + 471 + 472 + 473 + 474 + 475 + 476 + 477 + 478 + 479 + 480 + End SubModelPartGeometries +End SubModelPart +Begin SubModelPart load // Group load + Begin SubModelPartNodes + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + End SubModelPartNodes + Begin SubModelPartGeometries + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 203 + 204 + 205 + 206 + 207 + 208 + 209 + 210 + 211 + 212 + 213 + 214 + 215 + 216 + 217 + 218 + 219 + 220 + 221 + 222 + 223 + 224 + 225 + 226 + 227 + 228 + 229 + 230 + 231 + 232 + 233 + 234 + 235 + 236 + 237 + 238 + 239 + 240 + 241 + 242 + 243 + 244 + 245 + 246 + 247 + 248 + 249 + 250 + 251 + 252 + 253 + 254 + 255 + 256 + 257 + 258 + 259 + 260 + 261 + 262 + 263 + 264 + 265 + 266 + 267 + 268 + 269 + 270 + 271 + 272 + 273 + 274 + 275 + 276 + 277 + 278 + 279 + 280 + 281 + 282 + 283 + 284 + 285 + 286 + 287 + 288 + 289 + 290 + 291 + 292 + 293 + 294 + 295 + 296 + 297 + 298 + 299 + 300 + 301 + 302 + 303 + 304 + 305 + 306 + 307 + 308 + 309 + 310 + 311 + 312 + 313 + 314 + 315 + 316 + 317 + 318 + 319 + 320 + 321 + 322 + 323 + 324 + 325 + 326 + 327 + 328 + 329 + 330 + 331 + 332 + 333 + 334 + 335 + 336 + 337 + 338 + 339 + 340 + 341 + 342 + 343 + 344 + 345 + 346 + 347 + 348 + 349 + 350 + 351 + 352 + 353 + 354 + 355 + 356 + 357 + 358 + 359 + 360 + 361 + 362 + 363 + 364 + 365 + 366 + 367 + 368 + 369 + 370 + 371 + 372 + 373 + 374 + 375 + 376 + 377 + 378 + 379 + 380 + 381 + 382 + 383 + 384 + 385 + 386 + 387 + 388 + 389 + 390 + 391 + 392 + 393 + 394 + 395 + 396 + 397 + 398 + 399 + 400 + 401 + 402 + 403 + 404 + 405 + 406 + 407 + 408 + 409 + 410 + 411 + 412 + 413 + 414 + 415 + 416 + 417 + 418 + 419 + 420 + 421 + 422 + 423 + 424 + 425 + 426 + 427 + 428 + 429 + 430 + 431 + 432 + 433 + 434 + 435 + 436 + 437 + 438 + 439 + 440 + 441 + 442 + 443 + 444 + 445 + 446 + 447 + 448 + 449 + 450 + End SubModelPartGeometries +End SubModelPart diff --git a/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_materials.json b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_materials.json new file mode 100644 index 000000000000..ecf756763a3b --- /dev/null +++ b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_materials.json @@ -0,0 +1,116 @@ + + { + "properties" : [{ + "model_part_name" : "Structure.shell", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "ThicknessIntegratedCompositeConstitutiveLaw", + "z_layer_coordinate_vector" : [-0.045, 0.0, 0.045], // in m + "Euler_angle_layer_vector" : [0.0, 0.0, 0.0], + "thickness_layer_vector" : [0.01, 0.08, 0.01] // in m + }, + "Variables" : { + "THICKNESS" : 0.1, // m + "DENSITY" : 7850.0, + "POISSON_RATIO" : 0.2 // Avoid warning + } + }, + "sub_properties" : [ // subprop start + { + // 1 + "properties_id" : 11, + "Material" : { + "constitutive_law" : { + "name" : "GenericAnisotropicPlaneStress2DLaw" + }, + "Variables" : { + "ORTHOTROPIC_ELASTIC_CONSTANTS" : [3.4156e9, 1.7931e9, 3.4156e9, 0.44, 0.0, 0.0], + "SHEAR_MODULUS_XY" : 1.0e9, + "SHEAR_MODULUS_YZ" : 1.015e9, + "SHEAR_MODULUS_XZ" : 0.608e9, + "EULER_ANGLES" : [0.0,0.0,0.0], + "ISOTROPIC_ANISOTROPIC_YIELD_RATIO" : [1,1,1,1,1,1] + }, + "Tables" : {} + }, + "sub_properties" : [{ + "properties_id" : 111, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 2400.0, + "YOUNG_MODULUS" : 1e6, + "POISSON_RATIO" : 0.3 + } + } + }] + } // + , + { + // 2 + "properties_id" : 12, + "Material" : { + "constitutive_law" : { + "name" : "GenericAnisotropicPlaneStress2DLaw" + }, + "Variables" : { + "ORTHOTROPIC_ELASTIC_CONSTANTS" : [3.4156e8, 1.7931e8, 3.4156e8, 0.44, 0.0, 0.0], + "SHEAR_MODULUS_XY" : 1.0e8, + "SHEAR_MODULUS_YZ" : 1.015e8, + "SHEAR_MODULUS_XZ" : 0.608e8, + "EULER_ANGLES" : [0.0,0.0,0.0], + "ISOTROPIC_ANISOTROPIC_YIELD_RATIO" : [1,1,1,1,1,1] + } + }, + "sub_properties" : [{ + "properties_id" : 121, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 2400.0, + "YOUNG_MODULUS" : 1e6, + "POISSON_RATIO" : 0.0 + } + } + }] + } // + , + { + // 3 + "properties_id" : 13, + "Material" : { + "constitutive_law" : { + "name" : "GenericAnisotropicPlaneStress2DLaw" + }, + "Variables" : { + "ORTHOTROPIC_ELASTIC_CONSTANTS" : [3.4156e9, 1.7931e9, 3.4156e9, 0.44, 0.0, 0.0], + "SHEAR_MODULUS_XY" : 1.0e9, + "SHEAR_MODULUS_YZ" : 1.015e9, + "SHEAR_MODULUS_XZ" : 0.608e9, + "EULER_ANGLES" : [0.0,0.0,0.0], + "ISOTROPIC_ANISOTROPIC_YIELD_RATIO" : [1,1,1,1,1,1] + } + }, + "sub_properties" : [{ + "properties_id" : 131, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 2400.0, + "YOUNG_MODULUS" : 1e6, + "POISSON_RATIO" : 0.3 + } + } + }] + } // + + ] // end subprops + }] + } \ No newline at end of file diff --git a/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_parameters.json b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_parameters.json new file mode 100644 index 000000000000..d8e335678256 --- /dev/null +++ b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_parameters.json @@ -0,0 +1,139 @@ +{ + "problem_data" : { + "problem_name" : "thickness_integrated_composite_cl_test", + "parallel_type" : "OpenMP", + "echo_level" : 1, + "start_time" : 0.0, + "end_time" : 1.0 + }, + "solver_settings" : { + "time_stepping" : { + "time_step" : 1.1 + }, + "solver_type" : "Static", + "model_part_name" : "Structure", + "domain_size" : 3, + "echo_level" : 1, + "analysis_type" : "non_linear", + "material_import_settings" : { + "materials_filename" : "ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_materials.json" + }, + "line_search" : false, + "convergence_criterion" : "residual_criterion", + "displacement_relative_tolerance" : 0.0001, + "displacement_absolute_tolerance" : 1e-9, + "residual_relative_tolerance" : 0.0001, + "residual_absolute_tolerance" : 1e-9, + "max_iteration" : 10, + "use_old_stiffness_in_first_iteration" : false, + "model_import_settings" : { + "input_type" : "use_input_model_part" + }, + "rotation_dofs" : true, + "strain_dofs" : false, + "volumetric_strain_dofs" : false + }, + "processes" : { + "constraints_process_list" : [{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "model_part_name" : "Structure.fix_displ", + "variable_name" : "DISPLACEMENT", + "interval" : [0.0,"End"], + "constrained" : [true,true,true], + "value" : [0.0,0.0,0.0] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "model_part_name" : "Structure.rot_x_fix", + "variable_name" : "ROTATION", + "interval" : [0.0,"End"], + "constrained" : [true,false,false], + "value" : [0.0,null,null] + } + },{ + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "model_part_name" : "Structure.rot_y_fix", + "variable_name" : "ROTATION", + "interval" : [0.0,"End"], + "constrained" : [false,true,false], + "value" : [null,0.0,null] + } + }], + "loads_process_list" : [{ + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignVectorByDirectionToConditionProcess", + "Parameters" : { + "model_part_name" : "Structure.load", + "variable_name" : "SURFACE_LOAD", + "interval" : [0.0,"End"], + "modulus" : 1.0, + "direction" : [0.0,0.0,-1.0] + } + }], + "list_other_processes" : [], + + //"_json_output_process" : [ + //{ + // "python_module" : "json_output_process", + // "kratos_module" : "KratosMultiphysics", + // "help" : "", + // "process_name" : "JsonOutputProcess", + // "Parameters" : { + // "output_variables" : ["REACTION"], + // "output_file_name" : "ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_results.json", + // "model_part_name" : "Structure.fix_displ", + // "time_frequency" : 0.05 + // } + //}] + + "json_check_process" : [ + { + "python_module" : "from_json_check_result_process", + "kratos_module" : "KratosMultiphysics", + "help" : "", + "process_name" : "FromJsonCheckResultProcess", + "Parameters" : { + "check_variables" : ["REACTION"], + "input_file_name" : "ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_results.json", + "model_part_name" : "Structure.fix_displ", + "time_frequency" : 0.05 + } + }] + + }, + "output_processes" : { + "gid_output" : [], + "vtk_output" : [] + }, + "modelers" : [{ + "name" : "Modelers.KratosMultiphysics.ImportMDPAModeler", + "parameters" : { + "input_filename" : "ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test", + "model_part_name" : "Structure" + } + },{ + "name" : "Modelers.KratosMultiphysics.CreateEntitiesFromGeometriesModeler", + "parameters" : { + "elements_list" : [{ + "model_part_name" : "Structure.shell", + "element_name" : "CSDSG3ThickShellLinearElement3D3N" + }], + "conditions_list" : [{ + "model_part_name" : "Structure.load", + "condition_name" : "SurfaceLoadCondition3D3N" + }] + } + }], + "analysis_stage" : "KratosMultiphysics.StructuralMechanicsApplication.structural_mechanics_analysis" +} diff --git a/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_results.json b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_results.json new file mode 100644 index 000000000000..a8ac13c20b0e --- /dev/null +++ b/applications/ConstitutiveLawsApplication/tests/ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test_results.json @@ -0,0 +1,346 @@ +{ + "TIME": [ + 1.1 + ], + "NODE_190": { + "REACTION_X": [ + -1.7788289920470355e-12 + ], + "REACTION_Y": [ + 1.2793120138403107e-13 + ], + "REACTION_Z": [ + 0.006726765105884565 + ] + }, + "NODE_192": { + "REACTION_X": [ + 1.2793120138403104e-13 + ], + "REACTION_Y": [ + -1.7788289920470355e-12 + ], + "REACTION_Z": [ + 0.00672676510588448 + ] + }, + "NODE_194": { + "REACTION_X": [ + -8.597481819041399e-12 + ], + "REACTION_Y": [ + 9.439055554827634e-12 + ], + "REACTION_Z": [ + 0.011060239532542454 + ] + }, + "NODE_195": { + "REACTION_X": [ + 9.439055525915574e-12 + ], + "REACTION_Y": [ + -8.59748193468963e-12 + ], + "REACTION_Z": [ + 0.011060239532542326 + ] + }, + "NODE_196": { + "REACTION_X": [ + -2.3078724692996523e-11 + ], + "REACTION_Y": [ + 2.1240265941927188e-11 + ], + "REACTION_Z": [ + 0.01100197225445319 + ] + }, + "NODE_197": { + "REACTION_X": [ + 2.124026591301513e-11 + ], + "REACTION_Y": [ + -2.3078724692996523e-11 + ], + "REACTION_Z": [ + 0.011001972254453044 + ] + }, + "NODE_202": { + "REACTION_X": [ + -4.695077019228208e-11 + ], + "REACTION_Y": [ + 3.250719250712164e-11 + ], + "REACTION_Z": [ + 0.010866085123492034 + ] + }, + "NODE_203": { + "REACTION_X": [ + 3.25071925360337e-11 + ], + "REACTION_Y": [ + -4.6950770423578533e-11 + ], + "REACTION_Z": [ + 0.010866085123491881 + ] + }, + "NODE_204": { + "REACTION_X": [ + 4.315268679172914e-11 + ], + "REACTION_Y": [ + -7.99059436056046e-11 + ], + "REACTION_Z": [ + 0.010656639036320945 + ] + }, + "NODE_205": { + "REACTION_X": [ + -7.990594337430813e-11 + ], + "REACTION_Y": [ + 4.315268684955325e-11 + ], + "REACTION_Z": [ + 0.010656639036321067 + ] + }, + "NODE_211": { + "REACTION_X": [ + -1.214416105091562e-10 + ], + "REACTION_Y": [ + 5.29603484671138e-11 + ], + "REACTION_Z": [ + 0.010372921501625408 + ] + }, + "NODE_212": { + "REACTION_X": [ + 5.29603484671138e-11 + ], + "REACTION_Y": [ + -1.2144161039350795e-10 + ], + "REACTION_Z": [ + 0.010372921501625283 + ] + }, + "NODE_217": { + "REACTION_X": [ + 6.1664841313849e-11 + ], + "REACTION_Y": [ + -1.7085628300155213e-10 + ], + "REACTION_Z": [ + 0.010011507389728124 + ] + }, + "NODE_218": { + "REACTION_X": [ + -1.7085628323284857e-10 + ], + "REACTION_Y": [ + 6.1664841313849e-11 + ], + "REACTION_Z": [ + 0.010011507389728254 + ] + }, + "NODE_223": { + "REACTION_X": [ + 6.895998832979022e-11 + ], + "REACTION_Y": [ + -2.2720706308163182e-10 + ], + "REACTION_Z": [ + 0.009566694610625998 + ] + }, + "NODE_224": { + "REACTION_X": [ + -2.2720706319728e-10 + ], + "REACTION_Y": [ + 6.89599887634711e-11 + ], + "REACTION_Z": [ + 0.009566694610626114 + ] + }, + "NODE_228": { + "REACTION_X": [ + 7.449310683001212e-11 + ], + "REACTION_Y": [ + -2.892588923018271e-10 + ], + "REACTION_Z": [ + 0.009030320490281704 + ] + }, + "NODE_229": { + "REACTION_X": [ + -2.89258892244003e-10 + ], + "REACTION_Y": [ + 7.449310683001212e-11 + ], + "REACTION_Z": [ + 0.0090303204902818 + ] + }, + "NODE_234": { + "REACTION_X": [ + -3.5542209070856173e-10 + ], + "REACTION_Y": [ + 7.785434826647809e-11 + ], + "REACTION_Z": [ + 0.008391128253093058 + ] + }, + "NODE_235": { + "REACTION_X": [ + 7.785434826647807e-11 + ], + "REACTION_Y": [ + -3.5542209076638584e-10 + ], + "REACTION_Z": [ + 0.008391128253093046 + ] + }, + "NODE_240": { + "REACTION_X": [ + -4.236733457808392e-10 + ], + "REACTION_Y": [ + 7.856078832289559e-11 + ], + "REACTION_Z": [ + 0.007633540447861229 + ] + }, + "NODE_241": { + "REACTION_X": [ + 7.856078786030265e-11 + ], + "REACTION_Y": [ + -4.2367334572301506e-10 + ], + "REACTION_Z": [ + 0.007633540447861231 + ] + }, + "NODE_245": { + "REACTION_X": [ + 7.603003449066108e-11 + ], + "REACTION_Y": [ + -4.914504427120207e-10 + ], + "REACTION_Z": [ + 0.006735363512467301 + ] + }, + "NODE_246": { + "REACTION_X": [ + -4.914504427698449e-10 + ], + "REACTION_Y": [ + 7.603003450511707e-11 + ], + "REACTION_Z": [ + 0.0067353635124673015 + ] + }, + "NODE_249": { + "REACTION_X": [ + -5.554964452195016e-10 + ], + "REACTION_Y": [ + 6.952783021180184e-11 + ], + "REACTION_Z": [ + 0.005663231423370205 + ] + }, + "NODE_250": { + "REACTION_X": [ + 6.952783021180179e-11 + ], + "REACTION_Y": [ + -5.554964442364916e-10 + ], + "REACTION_Z": [ + 0.0056632314233702056 + ] + }, + "NODE_252": { + "REACTION_X": [ + -6.115818943748227e-10 + ], + "REACTION_Y": [ + 5.804222109843547e-11 + ], + "REACTION_Z": [ + 0.004362643089185221 + ] + }, + "NODE_253": { + "REACTION_X": [ + 5.8042221112891526e-11 + ], + "REACTION_Y": [ + -6.115818952710966e-10 + ], + "REACTION_Z": [ + 0.004362643089185212 + ] + }, + "NODE_254": { + "REACTION_X": [ + -6.538412245747309e-10 + ], + "REACTION_Y": [ + 3.989773426086969e-11 + ], + "REACTION_Z": [ + 0.0027334360685561574 + ] + }, + "NODE_255": { + "REACTION_X": [ + 3.989773426086968e-11 + ], + "REACTION_Y": [ + -6.53841224574731e-10 + ], + "REACTION_Z": [ + 0.0027334360685561557 + ] + }, + "NODE_256": { + "REACTION_X": [ + -3.3063319830300326e-10 + ], + "REACTION_Y": [ + -3.3063319830300326e-10 + ], + "REACTION_Z": [ + 0.00037502432103366786 + ] + } +} \ No newline at end of file diff --git a/applications/ConstitutiveLawsApplication/tests/test_ConstitutiveLawsApplication.py b/applications/ConstitutiveLawsApplication/tests/test_ConstitutiveLawsApplication.py index 07278a177cf6..f19836b26177 100644 --- a/applications/ConstitutiveLawsApplication/tests/test_ConstitutiveLawsApplication.py +++ b/applications/ConstitutiveLawsApplication/tests/test_ConstitutiveLawsApplication.py @@ -29,6 +29,7 @@ from test_factory import TractionSeparationLawTest from test_factory import CurveByPointsPlasticityTest from test_factory import ThicknessIntegratedShellConstitutiveLawTest +from test_factory import ThicknessIntegratedShellCompositeConstitutiveLawTest from test_factory import PlaneStressJ2Plasticity @@ -68,6 +69,7 @@ def AssembleTestSuites(): smallSuite.addTest(TractionSeparationLawTest('test_execution')) smallSuite.addTest(CurveByPointsPlasticityTest('test_execution')) smallSuite.addTest(ThicknessIntegratedShellConstitutiveLawTest('test_execution')) + smallSuite.addTest(ThicknessIntegratedShellCompositeConstitutiveLawTest('test_execution')) smallSuite.addTest(PlaneStressJ2Plasticity('test_execution')) diff --git a/applications/ConstitutiveLawsApplication/tests/test_factory.py b/applications/ConstitutiveLawsApplication/tests/test_factory.py index 150985ebfc31..b94621444b00 100644 --- a/applications/ConstitutiveLawsApplication/tests/test_factory.py +++ b/applications/ConstitutiveLawsApplication/tests/test_factory.py @@ -149,5 +149,8 @@ class CurveByPointsPlasticityTest(TestFactory): class ThicknessIntegratedShellConstitutiveLawTest(TestFactory): file_name = "ThicknessIntegratedShellConstitutiveLaw/thickness_integrated_cl_test" +class ThicknessIntegratedShellCompositeConstitutiveLawTest(TestFactory): + file_name = "ThicknessIntegratedCompositeQ4ShellCL/thickness_integrated_composite_cl_test" + if __name__ == '__main__': KratosUnittest.main() diff --git a/applications/OptimizationApplication/tests/control/shape/shell.mdpa b/applications/OptimizationApplication/tests/control/shape/shell.mdpa index 9dc95257dcea..d68d01983587 100644 --- a/applications/OptimizationApplication/tests/control/shape/shell.mdpa +++ b/applications/OptimizationApplication/tests/control/shape/shell.mdpa @@ -482,7 +482,7 @@ Begin Nodes 440 0.2305777591 0.9723683416 0.0365199293 End Nodes -Begin Elements ShellThickElement3D4N +Begin Elements MITCThickShellElement3D4N 1 0 1 5 41 23 2 0 23 41 42 24 3 0 24 42 43 25 @@ -883,7 +883,7 @@ Begin Elements ShellThickElement3D4N 398 0 438 29 30 439 399 0 439 30 31 440 400 0 440 31 3 359 -End Elements // ShellThickElement3D4N +End Elements // MITCThickShellElement3D4N Begin Conditions SurfaceLoadCondition3D4N 1 0 1 5 41 23 diff --git a/applications/OptimizationApplication/tests/responses_tests/test_mass_response_function.py b/applications/OptimizationApplication/tests/responses_tests/test_mass_response_function.py index c246732168e1..a527241c43a4 100644 --- a/applications/OptimizationApplication/tests/responses_tests/test_mass_response_function.py +++ b/applications/OptimizationApplication/tests/responses_tests/test_mass_response_function.py @@ -301,7 +301,7 @@ def CreateElements(cls): properties = cls.model_part.CreateNewProperties(1) properties[Kratos.DENSITY] = 2.0 properties[Kratos.THICKNESS] = 0.01 - cls.model_part.CreateNewElement("ShellThickElement3D4N", 1, [1, 2, 3, 4], properties) + cls.model_part.CreateNewElement("MITCThickShellElement3D4N", 1, [1, 2, 3, 4], properties) def test_CalculateValue(self): v = 0.0 diff --git a/applications/OptimizationApplication/tests/shell-thickness-opt-test/materials_2D.json b/applications/OptimizationApplication/tests/shell-thickness-opt-test/materials_2D.json index c03115897f86..3737e125d451 100644 --- a/applications/OptimizationApplication/tests/shell-thickness-opt-test/materials_2D.json +++ b/applications/OptimizationApplication/tests/shell-thickness-opt-test/materials_2D.json @@ -5,7 +5,7 @@ "Material": { "name": "Shell_Material", "constitutive_law": { - "name": "LinearElasticPlaneStress2DLaw" + "name": "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables": { "DENSITY": 7.85000E+03, diff --git a/applications/OptimizationApplication/tests/shell-thickness-opt-test/shell.mdpa b/applications/OptimizationApplication/tests/shell-thickness-opt-test/shell.mdpa index 9dc95257dcea..d68d01983587 100644 --- a/applications/OptimizationApplication/tests/shell-thickness-opt-test/shell.mdpa +++ b/applications/OptimizationApplication/tests/shell-thickness-opt-test/shell.mdpa @@ -482,7 +482,7 @@ Begin Nodes 440 0.2305777591 0.9723683416 0.0365199293 End Nodes -Begin Elements ShellThickElement3D4N +Begin Elements MITCThickShellElement3D4N 1 0 1 5 41 23 2 0 23 41 42 24 3 0 24 42 43 25 @@ -883,7 +883,7 @@ Begin Elements ShellThickElement3D4N 398 0 438 29 30 439 399 0 439 30 31 440 400 0 440 31 3 359 -End Elements // ShellThickElement3D4N +End Elements // MITCThickShellElement3D4N Begin Conditions SurfaceLoadCondition3D4N 1 0 1 5 41 23 diff --git a/applications/StructuralMechanicsApplication/custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h b/applications/StructuralMechanicsApplication/custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h index 2197c303bed0..397d768a683e 100644 --- a/applications/StructuralMechanicsApplication/custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h +++ b/applications/StructuralMechanicsApplication/custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h @@ -149,17 +149,35 @@ class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ReissnerMindlinShellElasticCo { double max_length = 0.0; - const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); - const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); - const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); - - const double length_12 = norm_2(r_coord_2 - r_coord_1); - const double length_23 = norm_2(r_coord_3 - r_coord_2); - const double length_31 = norm_2(r_coord_1 - r_coord_3); - - max_length = std::max(length_12, length_23); - max_length = std::max(max_length, length_31); - + if (rGeometry.PointsNumber() == 3) { + const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); + const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); + const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); + + const double length_12 = norm_2(r_coord_2 - r_coord_1); + const double length_23 = norm_2(r_coord_3 - r_coord_2); + const double length_31 = norm_2(r_coord_1 - r_coord_3); + + max_length = std::max(length_12, length_23); + max_length = std::max(max_length, length_31); + + } else if (rGeometry.PointsNumber() == 4) { + const auto& r_coord_1 = rGeometry[0].GetInitialPosition(); + const auto& r_coord_2 = rGeometry[1].GetInitialPosition(); + const auto& r_coord_3 = rGeometry[2].GetInitialPosition(); + const auto& r_coord_4 = rGeometry[3].GetInitialPosition(); + + const double length_12 = norm_2(r_coord_2 - r_coord_1); + const double length_23 = norm_2(r_coord_3 - r_coord_2); + const double length_34 = norm_2(r_coord_4 - r_coord_3); + const double length_41 = norm_2(r_coord_1 - r_coord_4); + + max_length = std::max(length_12, length_23); + max_length = std::max(max_length, length_34); + max_length = std::max(max_length, length_41); + } else { + KRATOS_ERROR << "GetMaxReferenceEdgeLength not implemented for geometries with " << rGeometry.PointsNumber() << " nodes." << std::endl; + } return max_length; } diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.cpp index 83387d9c5d72..90f51db20768 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.cpp +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.cpp @@ -108,6 +108,40 @@ void CSDSG3ThickShellElement3D3N::CalculateOnIntegrationPoints( /***********************************************************************************/ /***********************************************************************************/ +template +void CSDSG3ThickShellElement3D3N::CalculateOnIntegrationPoints( + const Variable>& rVariable, + std::vector>& rOutput, + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + + const auto& r_integration_points = CustomTriangleAreaCoordinatesQuadrature(GetGeometry().Area()); + const SizeType number_of_integration_points = r_integration_points.size(); + + // Provide a default empty implementation: resize and set zeros + rOutput.assign(number_of_integration_points, ZeroVector(3)); // plane stress components + + if (rVariable == LOCAL_AXIS_1 || rVariable == LOCAL_AXIS_2 || rVariable == LOCAL_AXIS_3) { + bounded_3_matrix rotation_matrix; + CalculateRotationMatrixGlobalToLocal(rotation_matrix, true); + IndexType axis_index = 0; + if (rVariable == LOCAL_AXIS_2) { + axis_index = 1; + } else if (rVariable == LOCAL_AXIS_3) { + axis_index = 2; + } + for (IndexType i = 0; i < number_of_integration_points; ++i) { + noalias(rOutput[i]) = row(rotation_matrix, axis_index); + } + } + + KRATOS_CATCH("CSDSG3ThickShellElement3D3N::CalculateOnIntegrationPoints") +} + +/***********************************************************************************/ +/***********************************************************************************/ + template void CSDSG3ThickShellElement3D3N::InitializeMaterial() { @@ -265,15 +299,18 @@ void CSDSG3ThickShellElement3D3N::CalculateRotationMatrixGlobal } if (this->Has(LOCAL_AXIS_1)) { + array_3 edge_12 = aux_1 - aux_0; + array_3 edge_13 = aux_2 - aux_0; + array_3 normal = MathUtils::CrossProduct(edge_12, edge_13); + const double norm_normal = norm_2(normal); + + KRATOS_DEBUG_ERROR_IF_NOT(norm_normal > 0.0) << "Zero area for CSDSG3ThickShellElement3D3N " << this->Id() << std::endl; + normal /= norm_normal; noalias(v1) = this->GetValue(LOCAL_AXIS_1); // We assume that the user has set a unit vector - noalias(v2) = aux_2 - aux_0; - v2 -= inner_prod(v1, v2) * v1; // v2 orthogonal to v1 + noalias(v2) = MathUtils::CrossProduct(normal, v1); const double norm_v2 = norm_2(v2); - if (norm_v2 <= 1.0e-8) { // colineal - noalias(v2) = aux_1 - aux_0; - v2 -= inner_prod(v1, v2) * v1; // v2 orthogonal to v1 - } - v2 /= norm_2(v2); + KRATOS_DEBUG_ERROR_IF_NOT(norm_v2 > 0.0) << "Zero length local axis 2 for CSDSG3ThickShellElement3D3N " << this->Id() << std::endl; + v2 /= norm_v2; } else { noalias(v1) = aux_1 - aux_0; const double norm_v1 = norm_2(v1); diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.h b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.h index f15664b5d4bc..ace430dbfa82 100644 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.h +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.h @@ -226,6 +226,13 @@ class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) CSDSG3ThickShellElement3D3N std::vector& rOutput, const ProcessInfo& rCurrentProcessInfo) override; + /** + * @brief Calculate values of type array_1d on integration points (stub) + */ + void CalculateOnIntegrationPoints(const Variable>& rVariable, + std::vector>& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + /** * @brief Calculate values of type double on integration points (stub) */ diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.cpp new file mode 100644 index 000000000000..28e7e31aee61 --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.cpp @@ -0,0 +1,1266 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: StructuralMechanicsApplication/license.txt +// +// Main authors: Massimo Petracca +// Alejandro Cornejo +// + +#include "mitc_thick_shell_element_3D4N.hpp" +#include "custom_utilities/structural_mechanics_element_utilities.h" + +#include +#include + +namespace Kratos +{ + +/***********************************************************************************/ +/***********************************************************************************/ + +template +MITCThickShellElement3D4N::MITC4Params::MITC4Params(const ShellQ4_LocalCoordinateSystem& LCS) + : Transformation(2, 2) + , ShearStrains(4, 24, 0.0) +{ + + const double x21 = LCS.X2() - LCS.X1(); + const double y21 = LCS.Y2() - LCS.Y1(); + const double x34 = LCS.X3() - LCS.X4(); + const double y34 = LCS.Y3() - LCS.Y4(); + const double x41 = LCS.X4() - LCS.X1(); + const double y41 = LCS.Y4() - LCS.Y1(); + const double x32 = LCS.X3() - LCS.X2(); + const double y32 = LCS.Y3() - LCS.Y2(); + + Ax = - LCS.X1() + LCS.X2() + LCS.X3() - LCS.X4(); + Bx = LCS.X1() - LCS.X2() + LCS.X3() - LCS.X4(); + Cx = - LCS.X1() - LCS.X2() + LCS.X3() + LCS.X4(); + Ay = - LCS.Y1() + LCS.Y2() + LCS.Y3() - LCS.Y4(); + By = LCS.Y1() - LCS.Y2() + LCS.Y3() - LCS.Y4(); + Cy = - LCS.Y1() - LCS.Y2() + LCS.Y3() + LCS.Y4(); + + double Alpha = std::atan(Ay / Ax); + double Beta = Globals::Pi * 0.5 - std::atan(Cx / Cy); + + Transformation(0, 0) = std::sin(Beta); + Transformation(0, 1) = - std::sin(Alpha); + Transformation(1, 0) = - std::cos(Beta); + Transformation(1, 1) = std::cos(Alpha); + + ShearStrains(0, 2) = -0.5; + ShearStrains(0, 3) = -y41 * 0.25; + ShearStrains(0, 4) = x41 * 0.25; + + ShearStrains(0, 20) = 0.5; + ShearStrains(0, 21) = ShearStrains(0, 3); + ShearStrains(0, 22) = ShearStrains(0, 4); + + ShearStrains(1, 2) = -0.5; + ShearStrains(1, 3) = -y21 * 0.25; + ShearStrains(1, 4) = x21 * 0.25; + + ShearStrains(1, 8) = 0.5; + ShearStrains(1, 9) = ShearStrains(1, 3); + ShearStrains(1, 10) = ShearStrains(1, 4); + + ShearStrains(2, 8) = -0.5; + ShearStrains(2, 9) = -y32 * 0.25; + ShearStrains(2, 10) = x32 * 0.25; + + ShearStrains(2, 14) = 0.5; + ShearStrains(2, 15) = ShearStrains(2, 9); + ShearStrains(2, 16) = ShearStrains(2, 10); + + ShearStrains(3, 14) = 0.5; + ShearStrains(3, 15) = -y34 * 0.25; + ShearStrains(3, 16) = x34 * 0.25; + + ShearStrains(3, 20) = -0.5; + ShearStrains(3, 21) = ShearStrains(3, 15); + ShearStrains(3, 22) = ShearStrains(3, 16); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +MITCThickShellElement3D4N::EASOperatorStorage::EASOperatorStorage() + : mInitialized(false) +{ +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::Initialize(const GeometryType& geom) +{ + if (!mInitialized) { + noalias(alpha) = ZeroVector(5); + noalias(alpha_converged) = ZeroVector(5); + + array_1d initial_displacement, initial_rotation; + + for (SizeType i = 0; i < 4; i++) { + SizeType ii = i * 6; + noalias(initial_displacement) = geom[i].FastGetSolutionStepValue(DISPLACEMENT); + noalias(initial_rotation) = geom[i].FastGetSolutionStepValue(ROTATION); + + displ(ii) = initial_displacement[0]; + displ(ii + 1) = initial_displacement[1]; + displ(ii + 2) = initial_displacement[2]; + displ_converged(ii) = initial_displacement[0]; + displ_converged(ii + 1) = initial_displacement[1]; + displ_converged(ii + 2) = initial_displacement[2]; + displ(ii + 3) = initial_rotation[0]; + displ(ii + 4) = initial_rotation[1]; + displ(ii + 5) = initial_rotation[2]; + displ_converged(ii + 3) = initial_rotation[0]; + displ_converged(ii + 4) = initial_rotation[1]; + displ_converged(ii + 5) = initial_rotation[2]; + } + + mInitialized = true; + } +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::InitializeSolutionStep() +{ + noalias(displ) = displ_converged; + noalias(alpha) = alpha_converged; +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::FinalizeSolutionStep() +{ + noalias(displ_converged) = displ; + noalias(alpha_converged) = alpha; +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::FinalizeNonLinearIteration(const Vector& displacementVector) +{ + array_1d incrementalDispl; + noalias(incrementalDispl) = displacementVector - displ; + noalias(displ) = displacementVector; + + array_1d temp; + noalias(temp) = prod(L, incrementalDispl); + noalias(temp) -= residual; + noalias(alpha) -= prod(Hinv, temp); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::save(Serializer& rSerializer) const +{ + rSerializer.save("A0", alpha); + rSerializer.save("A1", alpha_converged); + rSerializer.save("U0", displ); + rSerializer.save("U1", displ_converged); + rSerializer.save("res", residual); + rSerializer.save("Hinv", Hinv); + rSerializer.save("mL", L); + rSerializer.save("init", mInitialized); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperatorStorage::load(Serializer& rSerializer) +{ + rSerializer.load("A0", alpha); + rSerializer.load("A1", alpha_converged); + rSerializer.load("U0", displ); + rSerializer.load("U1", displ_converged); + rSerializer.load("res", residual); + rSerializer.load("Hinv", Hinv); + rSerializer.load("mL", L); + rSerializer.load("init", mInitialized); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +MITCThickShellElement3D4N::EASOperator::EASOperator(const ShellQ4_LocalCoordinateSystem& LCS, EASOperatorStorage& storage) + : mF0inv(3, 3) + , mEnhancedStrains(3) + , mG(3, 5) +{ + + // compute the jacobian at the element center + + double xi(0.0); + double eta(0.0); + + Matrix dN(4, 2); + ShellUtilities::ShapeFunc_NaturalDerivatives(xi, eta, dN); + + Matrix Jac0(2, 2); + Jac0(0, 0) = dN(0, 0) * LCS.X1() + dN(1, 0) * LCS.X2() + dN(2, 0) * LCS.X3() + dN(3, 0) * LCS.X4(); + Jac0(0, 1) = dN(0, 0) * LCS.Y1() + dN(1, 0) * LCS.Y2() + dN(2, 0) * LCS.Y3() + dN(3, 0) * LCS.Y4(); + Jac0(1, 0) = dN(0, 1) * LCS.X1() + dN(1, 1) * LCS.X2() + dN(2, 1) * LCS.X3() + dN(3, 1) * LCS.X4(); + Jac0(1, 1) = dN(0, 1) * LCS.Y1() + dN(1, 1) * LCS.Y2() + dN(2, 1) * LCS.Y3() + dN(3, 1) * LCS.Y4(); + + // save the jacobian determinant at center + mJ0 = Jac0(0, 0) * Jac0(1, 1) - Jac0(1, 0) * Jac0(0, 1); + + // compute the transformation matrix used in the implementation of the EAS method + // which operates in the natural coordinate system + const double j11 = Jac0(0, 0); + const double j22 = Jac0(1, 1); + const double j12 = Jac0(0, 1); + const double j21 = Jac0(1, 0); + + Matrix F0(3, 3); + F0(0, 0) = j11 * j11; + F0(0, 1) = j21 * j12; + F0(0, 2) = 2.0 * j11 * j12; + F0(1, 0) = j12 * j21; + F0(1, 1) = j22 * j22; + F0(1, 2) = 2.0 * j21 * j22; + F0(2, 0) = j11 * j21; + F0(2, 1) = j12 * j22; + F0(2, 2) = j11 * j22 + j12 * j21; + + double dummyDet; + MathUtils::InvertMatrix3(F0, mF0inv, dummyDet); + + // Initialize these data to zero because they will + // be integrated during the gauss loop + storage.L.clear(); + storage.Hinv.clear(); + storage.residual.clear(); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperator::GaussPointComputation_Step1( + double xi, + double eta, + const ShellUtilities::JacobianOperator& jac, + Vector& generalizedStrains, + EASOperatorStorage& storage) +{ + // construct the interpolation matrix in natural coordinate system + Matrix E(3, 5, 0.0); + E(0, 0) = xi; + E(1, 1) = eta; + E(2, 2) = xi; + E(2, 3) = eta; + E(0, 4) = xi * eta; + E(1, 4) = -xi * eta; + E(2, 4) = xi * xi - eta * eta; + + // construct the interpolation matrix in local coordinate system + noalias(mG) = mJ0 / jac.Determinant() * prod(mF0inv, E); + + // Assuming that the input generalized strains has been already calculated on this + // integration point, we just need to add the contribution of the enhanced strains + noalias(mEnhancedStrains) = prod(mG, storage.alpha); + + generalizedStrains[0] += mEnhancedStrains[0]; // e.xx + generalizedStrains[1] += mEnhancedStrains[1]; // e.yy + generalizedStrains[2] += mEnhancedStrains[2]; // e.xy +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperator::GaussPointComputation_Step2( + const Matrix& D, + const Matrix& B, + const Vector& S, + EASOperatorStorage& storage) +{ + Matrix GTC(5, 3); + noalias(GTC) = prod(trans(mG), project(D, range(0, 3), range(0, 3))); + noalias(storage.Hinv) += prod(GTC, mG); + noalias(storage.residual) -= prod(trans(mG), project(S, range(0, 3))); + + // compute L: [G'*Dmm, G'*Dmb, G'*Dms]*[Bm; Bm; Bs] + int num_stress = D.size2(); // it can be 6 for thin shells or 8 for thick shells + Matrix GTD(5, num_stress, 0.0); + noalias(project(GTD, range::all(), range(0, 3))) = GTC; + noalias(project(GTD, range::all(), range(3, 6))) = prod(trans(mG), project(D, range(0, 3), range(3, 6))); + if (num_stress == 8) + { + noalias(project(GTD, range::all(), range(6, 8))) = prod(trans(mG), project(D, range(0, 3), range(6, 8))); + } + noalias(storage.L) += prod(GTD, B); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::EASOperator::ComputeModfiedTangentAndResidual(Matrix& rLeftHandSideMatrix, + Vector& rRightHandSideVector, + EASOperatorStorage& storage) +{ + // invert H + Matrix Hcopy(storage.Hinv); + permutation_matrix pm(5); + lu_factorize(Hcopy, pm); + noalias(storage.Hinv) = IdentityMatrix(5); + lu_substitute(Hcopy, pm, storage.Hinv); + + // compute L' * H^-1 + Matrix LTHinv(24, 5); + noalias(LTHinv) = prod(trans(storage.L), storage.Hinv); + + // modify the stiffness matrix and the residual vector + // for the static condensation of the enhanced strain parameters + noalias(rRightHandSideVector) -= prod(LTHinv, storage.residual); // R_mod = R - L' * H^-1 * residual + noalias(rLeftHandSideMatrix) -= prod(LTHinv, storage.L); // K_mod = K - L' * H^-1 * L +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +MITCThickShellElement3D4N::MITCThickShellElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry) + : BaseType(NewId, pGeometry) +{ +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +MITCThickShellElement3D4N::MITCThickShellElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties) + : BaseType(NewId, pGeometry, pProperties) +{ +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +Element::Pointer MITCThickShellElement3D4N::Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const +{ + GeometryType::Pointer newGeom(GetGeometry().Create(ThisNodes)); + return Kratos::make_intrusive< MITCThickShellElement3D4N >(NewId, newGeom, pProperties); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +Element::Pointer MITCThickShellElement3D4N::Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const +{ + return Kratos::make_intrusive< MITCThickShellElement3D4N >(NewId, pGeom, pProperties); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::Initialize(const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + + BaseType::Initialize(rCurrentProcessInfo); + + // Initialization should not be done again in a restart! + if (!rCurrentProcessInfo[IS_RESTARTED]) { + const auto& r_geometry = GetGeometry(); + mEASStorage.Initialize(r_geometry); + const auto& r_integration_points = r_geometry.IntegrationPoints(); + + if (mConstitutiveLawVector.size() != r_integration_points.size()) + mConstitutiveLawVector.resize(r_integration_points.size()); + + const auto& r_properties = GetProperties(); + if (r_properties[CONSTITUTIVE_LAW] != nullptr) { + auto N_values = Vector(); + for (IndexType point_number = 0; point_number < mConstitutiveLawVector.size(); ++point_number) { + mConstitutiveLawVector[point_number] = r_properties[CONSTITUTIVE_LAW]->Clone(); + mConstitutiveLawVector[point_number]->InitializeMaterial(r_properties, r_geometry, N_values); + } + } else { + KRATOS_ERROR << "A constitutive law needs to be specified for the CS-DSG3 shell element with ID " << this->Id() << std::endl; + } + } + + KRATOS_CATCH("Initialize") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rIntegrationPointNumber, + const bool CalculateStress, + const bool CalculateConstitutive, + const ProcessInfo& rProcessInfo) +{ + KRATOS_TRY + const auto& r_geometry = GetGeometry(); + const auto& r_props = GetProperties(); + + ConstitutiveLaw::Parameters cl_values(r_geometry, r_props, rProcessInfo); + auto &r_cl_options = cl_values.GetOptions(); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_STRESS, CalculateStress); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, CalculateConstitutive); + r_cl_options.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN, true); + + cl_values.SetStrainVector(rSectionParameters.GetGeneralizedStrainVector()); + cl_values.SetStressVector(rSectionParameters.GetGeneralizedStressVector()); + cl_values.SetConstitutiveMatrix(rSectionParameters.GetConstitutiveMatrix()); + + mConstitutiveLawVector[rIntegrationPointNumber]->CalculateMaterialResponseCauchy(cl_values); + + KRATOS_CATCH("CalculateMaterialResponse") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::FinalizeMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rIntegrationPointNumber, + const ProcessInfo& rProcessInfo) +{ + KRATOS_TRY + const auto& r_geometry = GetGeometry(); + const auto& r_props = GetProperties(); + + ConstitutiveLaw::Parameters cl_values(r_geometry, r_props, rProcessInfo); + auto &r_cl_options = cl_values.GetOptions(); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); + r_cl_options.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN, true); + + cl_values.SetStrainVector(rSectionParameters.GetGeneralizedStrainVector()); + cl_values.SetStressVector(rSectionParameters.GetGeneralizedStressVector()); + cl_values.SetConstitutiveMatrix(rSectionParameters.GetConstitutiveMatrix()); + + mConstitutiveLawVector[rIntegrationPointNumber]->FinalizeMaterialResponseCauchy(cl_values); + KRATOS_CATCH("FinalizeMaterialResponse") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::InitializeMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rIntegrationPointNumber, + const ProcessInfo& rProcessInfo) +{ + KRATOS_TRY + const auto& r_geometry = GetGeometry(); + const auto& r_props = GetProperties(); + + ConstitutiveLaw::Parameters cl_values(r_geometry, r_props, rProcessInfo); + auto &r_cl_options = cl_values.GetOptions(); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + r_cl_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); + r_cl_options.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN, true); + + cl_values.SetStrainVector(rSectionParameters.GetGeneralizedStrainVector()); + cl_values.SetStressVector(rSectionParameters.GetGeneralizedStressVector()); + cl_values.SetConstitutiveMatrix(rSectionParameters.GetConstitutiveMatrix()); + + mConstitutiveLawVector[rIntegrationPointNumber]->InitializeMaterialResponseCauchy(cl_values); + KRATOS_CATCH("FinalizeMaterialResponse") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::FinalizeNonLinearIteration( + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + BaseType::FinalizeNonLinearIteration(rCurrentProcessInfo); + + ShellQ4_LocalCoordinateSystem LCS(this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); + Vector globalDisplacementVector(24); + this->GetValuesVector(globalDisplacementVector); + Vector localDisplacementVector(this->mpCoordinateTransformation->CalculateLocalDisplacements(LCS, globalDisplacementVector)); + + mEASStorage.FinalizeNonLinearIteration(localDisplacementVector); + KRATOS_CATCH("FinalizeNonLinearIteration") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::InitializeSolutionStep( + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + bool required = false; + for (IndexType point_number = 0; point_number < mConstitutiveLawVector.size(); ++point_number) { + if (mConstitutiveLawVector[point_number]->RequiresInitializeMaterialResponse()) { + required = true; + break; + } + } + // Finalize material response if required + if (required) { + + // Get some references. + const auto& r_props = GetProperties(); + const auto& r_geom = GetGeometry(); + const Matrix& shapeFunctions = r_geom.ShapeFunctionsValues(); + Vector iN(shapeFunctions.size2()); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Prepare all the parameters needed for the MITC formulation. + // This is to be done here outside the Gauss Loop. + MITC4Params shearParameters(referenceCoordinateSystem); + + ShellUtilities::JacobianOperator jacOp; + array_1d dArea; + + // Instantiate all strain-displacement matrices. + Matrix B(8, 24, 0.0); + Vector Bdrilling(24, 0.0); + + // // Instantiate all section tangent matrices. + Matrix D(8, 8, 0.0); + + // Instantiate strain and stress-resultant vectors + Vector generalizedStrains(8); + Vector generalizedStresses(8); + + // Get the current displacements in global coordinate system + + Vector globalDisplacements(24); + this->GetValuesVector(globalDisplacements, 0); + + // Get the current displacements in local coordinate system + Vector localDisplacements(this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); + + // Instantiate the EAS Operator. + // This will apply the Enhanced Assumed Strain Method for the calculation + // of the membrane contribution. + EASOperator EASOp(referenceCoordinateSystem, mEASStorage); + + ShellCrossSection::SectionParameters parameters(r_geom, r_props, rCurrentProcessInfo); + parameters.SetGeneralizedStrainVector(generalizedStrains); + parameters.SetGeneralizedStressVector(generalizedStresses); + parameters.SetConstitutiveMatrix(D); + Flags& r_options = parameters.GetOptions(); + r_options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + r_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); + + // Gauss Loop. + for (SizeType integration_point = 0; integration_point < 4; integration_point++) { + + // Get a reference of the current integration point and shape functions + const GeometryType::IntegrationPointType& ip = r_geom.IntegrationPoints()[integration_point]; + noalias(iN) = row(shapeFunctions, integration_point); + + // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian + // and Shape functions derivatives in the local coordinate system + jacOp.Calculate(referenceCoordinateSystem, r_geom.ShapeFunctionLocalGradient(integration_point)); + + // Compute all strain-displacement matrices + CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); + + // Calculate strain vectors in local coordinate system + + noalias(generalizedStrains) = prod(B, localDisplacements); + + // Apply the EAS method to modify the membrane part of the strains computed above. + EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); + + // Calculate the response of the Cross Section + parameters.SetShapeFunctionsValues(iN); + parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); + InitializeMaterialResponse(parameters, integration_point, rCurrentProcessInfo); + } + } + BaseType::InitializeSolutionStep(rCurrentProcessInfo); // TODO remove in the future and move mpCoordinateTransformation->FinalizeSolutionStep(); + mEASStorage.InitializeSolutionStep(); + + KRATOS_CATCH("InitializeSolutionStep") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::FinalizeSolutionStep( + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + bool required = false; + for (IndexType point_number = 0; point_number < mConstitutiveLawVector.size(); ++point_number) { + if (mConstitutiveLawVector[point_number]->RequiresFinalizeMaterialResponse()) { + required = true; + break; + } + } + + // Finalize material response if required + if (required) { + + // Get some references. + const auto& r_props = GetProperties(); + const auto& r_geom = GetGeometry(); + const Matrix& shapeFunctions = r_geom.ShapeFunctionsValues(); + Vector iN(shapeFunctions.size2()); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Prepare all the parameters needed for the MITC formulation. + // This is to be done here outside the Gauss Loop. + MITC4Params shearParameters(referenceCoordinateSystem); + + // Instantiate the Jacobian Operator. + // This will store: + // the jacobian matrix, its inverse, its determinant + // and the derivatives of the shape functions in the local + // coordinate system + ShellUtilities::JacobianOperator jacOp; + array_1d dArea; + + + // Instantiate all strain-displacement matrices. + Matrix B(8, 24, 0.0); + Vector Bdrilling(24, 0.0); + + // // Instantiate all section tangent matrices. + Matrix D(8, 8, 0.0); + + // Instantiate strain and stress-resultant vectors + Vector generalizedStrains(8); + Vector generalizedStresses(8); + + // Get the current displacements in global coordinate system + + Vector globalDisplacements(24); + this->GetValuesVector(globalDisplacements, 0); + + // Get the current displacements in local coordinate system + Vector localDisplacements(this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); + + // Instantiate the EAS Operator. + // This will apply the Enhanced Assumed Strain Method for the calculation + // of the membrane contribution. + EASOperator EASOp(referenceCoordinateSystem, mEASStorage); + + ShellCrossSection::SectionParameters parameters(r_geom, r_props, rCurrentProcessInfo); + parameters.SetGeneralizedStrainVector(generalizedStrains); + parameters.SetGeneralizedStressVector(generalizedStresses); + parameters.SetConstitutiveMatrix(D); + Flags& r_options = parameters.GetOptions(); + r_options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + r_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); + + // Gauss Loop. + for (SizeType integration_point = 0; integration_point < 4; integration_point++) { + + // Get a reference of the current integration point and shape functions + const GeometryType::IntegrationPointType& ip = r_geom.IntegrationPoints()[integration_point]; + noalias(iN) = row(shapeFunctions, integration_point); + + // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian + // and Shape functions derivatives in the local coordinate system + jacOp.Calculate(referenceCoordinateSystem, r_geom.ShapeFunctionLocalGradient(integration_point)); + + // Compute all strain-displacement matrices + CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); + + // Calculate strain vectors in local coordinate system + noalias(generalizedStrains) = prod(B, localDisplacements); + + // Apply the EAS method to modify the membrane part of the strains computed above. + EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); + + // Calculate the response of the Cross Section + parameters.SetShapeFunctionsValues(iN); + parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); + FinalizeMaterialResponse(parameters, integration_point, rCurrentProcessInfo); + } + } + + BaseType::FinalizeSolutionStep(rCurrentProcessInfo); // TODO remove in the future and move mpCoordinateTransformation->FinalizeSolutionStep(); + mEASStorage.FinalizeSolutionStep(); + + KRATOS_CATCH("FinalizeSolutionStep") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + + const auto& r_integration_points = GetGeometry().IntegrationPoints(); + const SizeType number_of_integration_points = r_integration_points.size(); + + // Provide a default empty implementation: resize and set zeros + rOutput.assign(number_of_integration_points, 0.0); + + if (mConstitutiveLawVector[0]->Has(rVariable)) { + GetValueOnConstitutiveLaw(rVariable, rOutput); + } else { + CalculateOnConstitutiveLaw(rVariable, rOutput, rCurrentProcessInfo); + } + + KRATOS_CATCH("MITCThickShellElement3D4N::CalculateOnIntegrationPoints") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) +{ + KRATOS_TRY + + const auto& r_integration_points = GetGeometry().IntegrationPoints(); + const SizeType number_of_integration_points = r_integration_points.size(); + + // Provide a default empty implementation: resize and set zeros + rOutput.assign(number_of_integration_points, ZeroVector(3)); // plane stress components + + if (mConstitutiveLawVector[0]->Has(rVariable)) { + GetValueOnConstitutiveLaw(rVariable, rOutput); + } else { + CalculateOnConstitutiveLaw(rVariable, rOutput, rCurrentProcessInfo); + } + + KRATOS_CATCH("MITCThickShellElement3D4N::CalculateOnIntegrationPoints") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +int MITCThickShellElement3D4N::Check( + const ProcessInfo& rCurrentProcessInfo) const +{ + KRATOS_TRY; + + const auto& r_geom = GetGeometry(); + mConstitutiveLawVector[0]->Check(GetProperties(), r_geom, rCurrentProcessInfo); + + KRATOS_ERROR_IF_NOT((r_geom.IntegrationPoints(this->GetIntegrationMethod())).size() == 4) << "MITCThickShellElement3D4N - needs a full integration scheme" << std::endl; + + const int points_number = r_geom.PointsNumber(); + KRATOS_ERROR_IF_NOT(points_number == 4) << "MITCThickShellElement3D4N - Wrong number of nodes" << points_number << std::endl; + + KRATOS_ERROR_IF_NOT(mConstitutiveLawVector[0]->GetStrainSize() == 8) + << "MITCThickShellElement3D4N - Wrong size of the strain vector in constitutive law (got " + << mConstitutiveLawVector[0]->GetStrainSize() << ", expected 8)." << std::endl + << "The thick shell quadrilateral element requires a shell constitutive law." << std::endl + << "If you used LinearElasticPlaneStress2DLaw, swap it for ReissnerMindlinShellElasticConstitutiveLaw." << std::endl + << "For composite/nonlinear problems (plasticity, damage, etc.), use ConstitutiveLawsApplication laws:" << std::endl + << " - custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_composite_constitutive_law" << std::endl + << " - custom_constitutive/structural_elements_constitutive_laws/thickness_integrated_isotropic_constitutive_law" << std::endl; + + return 0; + + KRATOS_CATCH("Check") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateBMatrix( + double xi, + double eta, + const ShellUtilities::JacobianOperator& Jac, + const MITC4Params& mitc_params, + const Vector& N, + Matrix& B, + Vector& Bdrill) +{ + KRATOS_TRY + + const Matrix& dNxy = Jac.XYDerivatives(); + + // Membrane + B(0, 0) = dNxy(0, 0); + B(0, 6) = dNxy(1, 0); + B(0, 12) = dNxy(2, 0); + B(0, 18) = dNxy(3, 0); + B(1, 1) = dNxy(0, 1); + B(1, 7) = dNxy(1, 1); + B(1, 13) = dNxy(2, 1); + B(1, 19) = dNxy(3, 1); + B(2, 0) = dNxy(0, 1); + B(2, 6) = dNxy(1, 1); + B(2, 12) = dNxy(2, 1); + B(2, 18) = dNxy(3, 1); + B(2, 1) = dNxy(0, 0); + B(2, 7) = dNxy(1, 0); + B(2, 13) = dNxy(2, 0); + B(2, 19) = dNxy(3, 0); + + // Bending + B(3, 4) = dNxy(0, 0); + B(3, 10) = dNxy(1, 0); + B(3, 16) = dNxy(2, 0); + B(3, 22) = dNxy(3, 0); + B(4, 3) = -dNxy(0, 1); + B(4, 9) = -dNxy(1, 1); + B(4, 15) = -dNxy(2, 1); + B(4, 21) = -dNxy(3, 1); + B(5, 3) = -dNxy(0, 0); + B(5, 9) = -dNxy(1, 0); + B(5, 15) = -dNxy(2, 0); + B(5, 21) = -dNxy(3, 0); + B(5, 4) = dNxy(0, 1); + B(5, 10) = dNxy(1, 1); + B(5, 16) = dNxy(2, 1); + B(5, 22) = dNxy(3, 1); + + // Drilling + Bdrill[0] = -0.5 * dNxy(0, 1); + Bdrill[1] = 0.5 * dNxy(0, 0); + Bdrill[5] = -N[0]; + Bdrill[6] = -0.5 * dNxy(1, 1); + Bdrill[7] = 0.5 * dNxy(1, 0); + Bdrill[11] = -N[1]; + Bdrill[12] = -0.5 * dNxy(2, 1); + Bdrill[13] = 0.5 * dNxy(2, 0); + Bdrill[17] = -N[2]; + Bdrill[18] = -0.5 * dNxy(3, 1); + Bdrill[19] = 0.5 * dNxy(3, 0); + Bdrill[23] = -N[3]; + + // Shear + // MITC modified shape functions + Matrix MITCShapeFunctions(2, 4, 0.0); + MITCShapeFunctions(1, 0) = 1.0 - xi; + MITCShapeFunctions(0, 1) = 1.0 - eta; + MITCShapeFunctions(1, 2) = 1.0 + xi; + MITCShapeFunctions(0, 3) = 1.0 + eta; + + // Strain displacement matrix in natural coordinate system. + // Interpolate the shear strains given in MITC4Params + // Using the modified shape function + Matrix BN = prod(MITCShapeFunctions, mitc_params.ShearStrains); + + // Modify the shear strain intensity in the tying points + // to match the values that would be obtained using standard + // interpolations + double Temp1, Temp2, Temp3; + Temp1 = mitc_params.Cx + xi * mitc_params.Bx; + Temp3 = mitc_params.Cy + xi * mitc_params.By; + Temp1 = Temp1 * Temp1 + Temp3 * Temp3; + Temp1 = std::sqrt(Temp1) / (8.0 * Jac.Determinant()); + Temp2 = mitc_params.Ax + eta * mitc_params.Bx; + Temp3 = mitc_params.Ay + eta * mitc_params.By; + Temp2 = Temp2 * Temp2 + Temp3 * Temp3; + Temp2 = std::sqrt(Temp2) / (8.0 * Jac.Determinant()); + + row(BN, 0) *= Temp1; + row(BN, 1) *= Temp2; + + // Transform the strain-displacement matrix from natural + // to local coordinate system taking into account the element distortion + project(B, slice(7, -1, 2), slice::all()) = prod(mitc_params.Transformation, BN); + // Explanation of the 'slice': + // The MITC4Params class and the first part of this method were coded + // assuming the following notations for strain vector : [e.xx, e.yy, e.zz, 2 e.xy, 2 e.XZ, 2 e.YZ]. + // Since in Kratos the strain vector is assumed to be : [e.xx, e.yy, e.zz, 2 e.xy, 2 e.YZ, 2 e.XZ], + // I had to "virtually" swap the 2 rows of the matrix B before the assignment from the product on the Right-Hand-Side. + // In this way the matrix B is consistent with the notation used in Kratos without recoding all the MITC stuff. + + KRATOS_CATCH("CalculateBMatrix") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateAll( + MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + const ProcessInfo& rCurrentProcessInfo, + const bool CalculateStiffnessMatrixFlag, + const bool CalculateResidualVectorFlag) +{ + KRATOS_TRY + + if ((rLeftHandSideMatrix.size1() != 24) || (rLeftHandSideMatrix.size2() != 24)) { + rLeftHandSideMatrix.resize(24, 24, false); + } + rLeftHandSideMatrix.clear(); + + if (rRightHandSideVector.size() != 24) { + rRightHandSideVector.resize(24, false); + } + rRightHandSideVector.clear(); + + // Get some references. + const auto& r_props = GetProperties(); + const auto& r_geom = GetGeometry(); + const Matrix& shapeFunctions = r_geom.ShapeFunctionsValues(); + Vector iN(shapeFunctions.size2()); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Prepare all the parameters needed for the MITC formulation. + // This is to be done here outside the Gauss Loop. + MITC4Params shearParameters(referenceCoordinateSystem); + + // Instantiate the Jacobian Operator. + // This will store: + // the jacobian matrix, its inverse, its determinant + // and the derivatives of the shape functions in the local + // coordinate system + ShellUtilities::JacobianOperator jacOp; + array_1d dArea; + + // Instantiate all strain-displacement matrices. + + Matrix B(8, 24, 0.0); + Vector Bdrilling(24, 0.0); + + // Instantiate all section tangent matrices. + Matrix D(8, 8, 0.0); + + // Instantiate strain and stress-resultant vectors + Vector generalizedStrains(8); + Vector generalizedStresses(8); + + // Get the current displacements in global coordinate system + + Vector globalDisplacements(24); + this->GetValuesVector(globalDisplacements, 0); + + // Get the current displacements in local coordinate system + Vector localDisplacements(this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); + + // Instantiate the EAS Operator. + // This will apply the Enhanced Assumed Strain Method for the calculation + // of the membrane contribution. + EASOperator EASOp(referenceCoordinateSystem, mEASStorage); + + // auxiliary data + + Matrix BTD(24, 8); // auxiliary matrix to store the product B'*D + // Initialize parameters for the cross section calculation + + ShellCrossSection::SectionParameters parameters(r_geom, r_props, rCurrentProcessInfo); + parameters.SetGeneralizedStrainVector(generalizedStrains); + parameters.SetGeneralizedStressVector(generalizedStresses); + parameters.SetConstitutiveMatrix(D); + Flags& r_options = parameters.GetOptions(); + r_options.Set(ConstitutiveLaw::COMPUTE_STRESS, CalculateResidualVectorFlag); + r_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, CalculateStiffnessMatrixFlag); + + // Gauss Loop. + for (SizeType integration_point = 0; integration_point < 4; integration_point++) { + + // get a reference of the current integration point and shape functions + const GeometryType::IntegrationPointType& ip = r_geom.IntegrationPoints()[integration_point]; + noalias(iN) = row(shapeFunctions, integration_point); + + // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian + // and Shape functions derivatives in the local coordinate system + jacOp.Calculate(referenceCoordinateSystem, r_geom.ShapeFunctionLocalGradient(integration_point)); + + // compute the 'area' of the current integration point + const double dA = ip.Weight() * jacOp.Determinant(); + dArea[integration_point] = dA; + + // Compute all strain-displacement matrices + + CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); + + // Calculate strain vectors in local coordinate system + noalias(generalizedStrains) = prod(B, localDisplacements); + const double drillingStrain = inner_prod(Bdrilling, localDisplacements); + + // Apply the EAS method to modify the membrane part of the strains computed above. + EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); + + // Calculate the response of the Cross Section + parameters.SetShapeFunctionsValues(iN); + parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); + CalculateMaterialResponse(parameters, integration_point, CalculateResidualVectorFlag, CalculateStiffnessMatrixFlag, rCurrentProcessInfo); + + // multiply the section tangent matrices and stress resultants by 'dA' + D *= dA; + double Ddrilling = CalculateEquivalentShearModulus(D) * (r_props.Has(STABILIZATION_FACTOR) ? r_props[STABILIZATION_FACTOR] : drilling_factor); // drilling stiffness + generalizedStresses *= dA; + const double drillingStress = Ddrilling * drillingStrain; // already multiplied by 'dA' + + // Add all contributions to the Stiffness Matrix + noalias(BTD) = prod(trans(B), D); + noalias(rLeftHandSideMatrix) += prod(BTD, B); + noalias(rLeftHandSideMatrix) += outer_prod(Ddrilling * Bdrilling, Bdrilling); + + // Add all contributions to the residual vector + noalias(rRightHandSideVector) -= prod(trans(B), generalizedStresses); + noalias(rRightHandSideVector) -= Bdrilling * drillingStress; + + // Continue the calculation of the EAS method now that the contitutive response + // has been computed + EASOp.GaussPointComputation_Step2(D, B, generalizedStresses, mEASStorage); + } + + // Now that the gauss integration is over, let the EAS operator modify + // the local stiffness matrix and residual vector. + // It will perform a static condensation to remove the enhanced strain parameters + // at the element level + EASOp.ComputeModfiedTangentAndResidual(rLeftHandSideMatrix, rRightHandSideVector, mEASStorage); + + // Let the CoordinateTransformation finalize the calculation. + // This will handle the transformation of the local matrices/vectors to + // the global coordinate system. + this->mpCoordinateTransformation->FinalizeCalculations( + localCoordinateSystem, + globalDisplacements, + localDisplacements, + rLeftHandSideMatrix, + rRightHandSideVector, + CalculateResidualVectorFlag, + CalculateStiffnessMatrixFlag); + // Add body forces contributions. This doesn't depend on the coordinate system + AddBodyForces(dArea, rRightHandSideVector); + + KRATOS_CATCH("CalculateAll") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::AddBodyForces(const array_1d& dA, VectorType& rRightHandSideVector) +{ + KRATOS_TRY + const auto& r_geometry = GetGeometry(); + const auto& r_props = GetProperties(); + + // Get shape functions + const Matrix& N = r_geometry.ShapeFunctionsValues(); + + // auxiliary + array_1d bf; + + double density = 0.0; + if (r_props.Has(DENSITY)) { + density = r_props[DENSITY]; + } else { + // In composite shells the density is to be retrieved from the CL + mConstitutiveLawVector[0]->GetValue(DENSITY, density); + KRATOS_ERROR_IF(density <= 0.0) << "DENSITY is null as far as the shell CL is concerned... Please implement the GetValue(DENSITY) " << std::endl; + } + const double mass_per_unit_area = density * r_props[THICKNESS]; + + // gauss loop to integrate the external force vector + for (SizeType igauss = 0; igauss < 4; igauss++) { + + // interpolate nodal volume accelerations to this gauss point + // and obtain the body force vector + bf.clear(); + for (SizeType inode = 0; inode < 4; inode++) { + if (r_geometry[inode].SolutionStepsDataHas(VOLUME_ACCELERATION)) { //temporary, will be checked once at the beginning only + bf += N(igauss,inode) * r_geometry[inode].FastGetSolutionStepValue(VOLUME_ACCELERATION); + } + } + bf *= (mass_per_unit_area * dA[igauss]); + + // add it to the RHS vector + for (SizeType inode = 0; inode < 4; inode++) { + SizeType index = inode*6; + double iN = N(igauss,inode); + rRightHandSideVector[index + 0] += iN * bf[0]; + rRightHandSideVector[index + 1] += iN * bf[1]; + rRightHandSideVector[index + 2] += iN * bf[2]; + } + } + KRATOS_CATCH("MITCThickShellElement3D4N::AddBodyForces") +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +ShellCrossSection::SectionBehaviorType MITCThickShellElement3D4N::GetSectionBehavior() const +{ + return ShellCrossSection::Thick; +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +double MITCThickShellElement3D4N::CalculateEquivalentShearModulus( + const Matrix& rConstitutiveMatrix // Original 8x8 constitutive matrix +) +{ + return 0.2 * (rConstitutiveMatrix(0, 0) - 2.0 * rConstitutiveMatrix(0, 1) + rConstitutiveMatrix(1, 1) + rConstitutiveMatrix(2, 2)); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::CalculateMassMatrix( + MatrixType& rMassMatrix, + const ProcessInfo& rCurrentProcessInfo) +{ + const auto& r_geometry = GetGeometry(); + const IndexType number_of_nodes = r_geometry.PointsNumber(); + const IndexType system_size = number_of_nodes * 6; + + if (rMassMatrix.size1() != system_size || rMassMatrix.size2() != system_size) + rMassMatrix.resize(system_size, system_size, false); + rMassMatrix.clear(); + + const auto& r_props = GetProperties(); + const bool compute_lumped_mass_matrix = StructuralMechanicsElementUtilities::ComputeLumpedMassMatrix(GetProperties(), rCurrentProcessInfo); + + auto ref_coord_sys(this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + const double ref_area = ref_coord_sys.Area(); + + double density = 0.0; + if (r_props.Has(DENSITY)) { + density = r_props[DENSITY]; + } else { + // In composite shells the density is to be retrieved from the CL + mConstitutiveLawVector[0]->GetValue(DENSITY, density); + KRATOS_ERROR_IF(density <= 0.0) << "DENSITY is null as far as the shell CL is concerned... Please implement the GetValue(DENSITY) " << std::endl; + } + const double thickness = r_props[THICKNESS]; + + if (compute_lumped_mass_matrix) { // Lumped + const double nodal_mass = density * thickness * ref_area / 4.0; + + for (SizeType i=0; i < number_of_nodes; i++) { + SizeType index = i * 6; + rMassMatrix(index, index) = nodal_mass; + rMassMatrix(index + 1, index + 1) = nodal_mass; + rMassMatrix(index + 2, index + 2) = nodal_mass; + } + } else { // Consistent + // Get shape function values and setup jacobian + const GeometryType& r_geometry = GetGeometry(); + const Matrix& shapeFunctions = r_geometry.ShapeFunctionsValues(); + ShellUtilities::JacobianOperator jac_operator; + + // Get integration points + const GeometryType::IntegrationPointsArrayType& r_integration_points = r_geometry.IntegrationPoints(this->mIntegrationMethod); + + // Setup matrix of shape functions + Matrix N = Matrix(6, 24, 0.0); + + // Gauss loop + for (SizeType gauss_point = 0; gauss_point < 4; gauss_point++) { + // Calculate average mass per unit area and thickness at the + // current GP + const double av_mass_per_unit_area = density * thickness; + + // Calc jacobian and weighted dA at current GP + jac_operator.Calculate(ref_coord_sys, r_geometry.ShapeFunctionLocalGradient(gauss_point)); + const double dA = r_integration_points[gauss_point].Weight() * jac_operator.Determinant(); + + // Assemble shape function matrix over nodes + for (SizeType node = 0; node < 4; node++) { + // Translational entries - dofs 1-3 + for (SizeType dof = 0; dof < 3; dof++) { + N(dof, 6 * node + dof) = shapeFunctions(gauss_point, node); + } + + // Rotational inertia entries - dofs 4-6 + for (SizeType dof = 0; dof < 3; dof++) { + N(dof + 3, 6 * node + dof + 3) = thickness / std::sqrt(12.0) * shapeFunctions(gauss_point, node); + } + } // IP loop + + // Add contribution to total mass matrix + noalias(rMassMatrix) += prod(trans(N), N) * dA * av_mass_per_unit_area; + } // consistent + } +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::save(Serializer& rSerializer) const +{ + KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, BaseType); + rSerializer.save("EAS", mEASStorage); + rSerializer.save("ConstitutiveLawVector", mConstitutiveLawVector); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template +void MITCThickShellElement3D4N::load(Serializer& rSerializer) +{ + KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, BaseType); + rSerializer.load("EAS", mEASStorage); + rSerializer.load("ConstitutiveLawVector", mConstitutiveLawVector); +} + +/***********************************************************************************/ +/***********************************************************************************/ + +template class MITCThickShellElement3D4N; +template class MITCThickShellElement3D4N; + +/***********************************************************************************/ +/***********************************************************************************/ + +} diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.hpp b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.hpp new file mode 100644 index 000000000000..8e6e388992eb --- /dev/null +++ b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/mitc_thick_shell_element_3D4N.hpp @@ -0,0 +1,605 @@ +// KRATOS ___| | | | +// \___ \ __| __| | | __| __| | | __| _` | | +// | | | | | ( | | | | ( | | +// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS +// +// License: BSD License +// license: StructuralMechanicsApplication/license.txt +// +// Main authors: Massimo Petracca +// Alejandro Cornejo +// + +#pragma once + + +// System includes +#include + +// External includes + +// Project includes +#include "base_shell_element.h" +#include "custom_utilities/shell_utilities.h" +#include "custom_utilities/shellq4_corotational_coordinate_transformation.hpp" +#include "custom_utilities/shellq4_local_coordinate_system.hpp" + +namespace Kratos +{ + +///@name Kratos Globals +///@{ +///@} + +///@name Type Definitions +///@{ +///@} + +///@name Enum's +///@{ +///@} + +///@name Functions +///@{ +///@} + +///@name Kratos Classes +///@{ + +/** \brief MITCThickShellElement3D4N + * + * This element represents a 4-node bilinear Shell element + * based on the Enhanced Assumed Strain Method (E.A.S.) for the membrane part + * and on the Mixed Interpolation of Tensorial Components (M.I.T.C.) + * for the transverse shear part. + * This element is formulated for small strains, + * but can be used in Geometrically nonlinear problems + * involving large displacements and rotations + * using a Corotational Coordinate Transformation. + * Material nonlinearity is handled by means of the plane stress constitutive laws. + */ +template +class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) MITCThickShellElement3D4N : + public BaseShellElement::type> +{ +public: + + ///@name Type Definitions + ///@{ + + KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MITCThickShellElement3D4N); + + using BaseType = BaseShellElement::type>; + + using QuaternionType = Quaternion; + using GeometryType = Element::GeometryType; + using PropertiesType = Element::PropertiesType; + using NodesArrayType = Element::NodesArrayType; + using MatrixType = Element::MatrixType; + using VectorType = Element::VectorType; + using SizeType = Element::SizeType; + using Element::GetGeometry; + using Element::GetProperties; + using Vector3Type = typename BaseType::Vector3Type; + static constexpr double drilling_factor = 1.0e-1; + + ///@} + + ///@name Classes + ///@{ + + /** \brief MITC4Params + * + * This class performs some operations and stores some data to compute + * the transverse shear contribution of the stiffness matrix using the + * M.I.T.C. formulation. + * + * References: + * - Dvorkin,Bathe, "A continuum mechanics based four node shell + * element for general nonlinear analysis", + * Eng.Comput.,vol. 1, 77-88, 1984 + * - Bathe, Dvorkin, "Short communication A four-node plate bending element + * based on Mindlin/Reissner plate theory and a Mixed Interpolation", + * International Journal for Numerical Methods in Eng., + * vol. 21, 367-383, 1985 + */ + struct MITC4Params { + + double Ax; + double Ay; + double Bx; + double By; + double Cx; + double Cy; + Matrix Transformation; + Matrix ShearStrains; + + MITC4Params(const ShellQ4_LocalCoordinateSystem& LCS); + }; + + class EASOperator; // forward declaration + + /** \brief EASOperatorStorage + * + * This class is meant to store persistent data for the EAS calculations. + * This class is stored in the element and used by the EASOperator. + */ + class EASOperatorStorage + { + + public: + + friend class EASOperator; + + typedef Element::GeometryType GeometryType; + + public: + + EASOperatorStorage(); + + inline void Initialize(const GeometryType& geom); + + inline void InitializeSolutionStep(); + + inline void FinalizeSolutionStep(); + + inline void FinalizeNonLinearIteration(const Vector& displacementVector); + + private: + array_1d alpha; // (trial) vector containing the 5 enhanced strain parameters + array_1d alpha_converged; // (converged) vector containing the 5 enhanced strain parameters + + array_1d displ; // (trial) vector containing the displacement vector + array_1d displ_converged; // (converged) vector containing the displacement vector + + array_1d residual; // vector containing the 5 residuals for the 5 enhanced strain parameters + BoundedMatrix Hinv; // 5x5 matrix that stores H^-1 + BoundedMatrix L; // 5x24 coupling matrix + + bool mInitialized; // Initialization flag + + private: + + friend class Serializer; + + virtual void save(Serializer& rSerializer) const; + + virtual void load(Serializer& rSerializer); + + }; + + /** \brief EASOperator + * + * This class performs some operations and stores some data to compute + * the membrane contribution of the stiffness matrix using the + * Enhanced Assumed Strain formulation. + * + * References: + * - J.C.Simo,M.S.Rifai, "A class of mixed assumed strain methods + * and the method of incompatible modes", + * International Journal for Numerical Methods in Eng., + * vol. 29, 1595-1638, 1990 + */ + class EASOperator + { + + public: + + /** + * Constructor + */ + EASOperator(const ShellQ4_LocalCoordinateSystem& LCS, EASOperatorStorage& storage); + + public: + + /** + * this method should be called in the Gauss Loop + * after the standard strain-displacement matrix has been computed, as well as the standard + * generalized strains, but before the computation of the constitutive laws. + */ + inline void GaussPointComputation_Step1(double xi, double eta, const ShellUtilities::JacobianOperator& jac, + Vector& generalizedStrains, + EASOperatorStorage& storage); + + /** + * this method should be called in the Gauss Loop + * after the standard computation of the constitutive laws. + * note: + * the input algorithmic tangent and generalized stress vector are assumed to be already multiplied + * by the integration weight, and their size is assumed to be those of a standard shell element + * (i.e. algorithmicTangent(8x8), generalizedStresses(8x1)) + */ + inline void GaussPointComputation_Step2(const Matrix& D, + const Matrix& B, + const Vector& S, + EASOperatorStorage& storage); + + /** + * this method should be called at the end of the Gauss Loop, + * when the integration is terminated, but before transforming everything + * to the global system: Here we are still operating in the element local + * coordinate system. + */ + inline void ComputeModfiedTangentAndResidual(Matrix& rLeftHandSideMatrix, + Vector& rRightHandSideVector, + EASOperatorStorage& storage); + + private: + + Matrix mF0inv; // 3x3 inverse deformation matrix at the element center + double mJ0; // determinant of the jacobian at the element center + Vector mEnhancedStrains; // vector of 3 enhanced strains [e.xx, e.yy, 2e.xy] + Matrix mG; // 3x5 interpolation matrix in cartesian coordinates + }; + + ///@} + + ///@name Life Cycle + ///@{ + + MITCThickShellElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry); + + MITCThickShellElement3D4N(IndexType NewId, + GeometryType::Pointer pGeometry, + PropertiesType::Pointer pProperties); + + // ~MITCThickShellElement3D4N() override = default; + + ///@} + + ///@name Operations + ///@{ + + // Basic + + /** + * @brief Creates a new element + * @param NewId The Id of the new created element + * @param pGeom The pointer to the geometry of the element + * @param pProperties The pointer to property + * @return The pointer to the created element + */ + Element::Pointer Create( + IndexType NewId, + GeometryType::Pointer pGeom, + PropertiesType::Pointer pProperties + ) const override; + + /** + * @brief Creates a new element + * @param NewId The Id of the new created element + * @param ThisNodes The array containing nodes + * @param pProperties The pointer to property + * @return The pointer to the created element + */ + Element::Pointer Create( + IndexType NewId, + NodesArrayType const& ThisNodes, + PropertiesType::Pointer pProperties + ) const override; + + + /** + * @brief Called to initialize the element. + * @warning Must be called before any calculation is done + */ + void Initialize(const ProcessInfo& rCurrentProcessInfo) override; + + /** + * @brief this is called for non-linear analysis at the end of the iteration process + * @param rCurrentProcessInfo the current process info instance + */ + void FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override; + + /** + * @brief Called at the end of each solution step + * @param rCurrentProcessInfo the current process info instance + */ + void InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override; + + /** + * @brief Called at the end of each solution step + * @param rCurrentProcessInfo the current process info instance + */ + void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override; + + // More results calculation on integration points to interface with python + + using BaseType::CalculateOnIntegrationPoints; + + /** + * @brief Calculate values of type double on integration points (stub) + */ + void CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + /** + * @brief Calculate values of type Vector on integration points (stub) + */ + void CalculateOnIntegrationPoints( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo) override; + + /** + * This method provides the place to perform checks on the completeness of the input + * and the compatibility with the problem options as well as the contitutive laws selected + * It is designed to be called only once (or anyway, not often) typically at the beginning + * of the calculations, so to verify that nothing is missing from the input + * or that no common error is found. + * @param rCurrentProcessInfo + * this method is: MANDATORY + */ + int Check(const ProcessInfo& rCurrentProcessInfo) const override; + + + /** + * @brief This method gets a value directly in the CL + * @details Avoids code repetition + * @param rVariable The variable we want to get + * @param rOutput The values obtained in the integration points + * @tparam TType The type considered + */ + template + void GetValueOnConstitutiveLaw( + const Variable &rVariable, + std::vector &rOutput) + { + const auto& r_integration_points = GetGeometry().IntegrationPoints(); + + for (IndexType point_number = 0; point_number < r_integration_points.size(); ++point_number) { + mConstitutiveLawVector[point_number]->GetValue(rVariable, rOutput[point_number]); + } + } + + /** + * @brief This method computes directly in the CL + * @details Avoids code repetition + * @param rVariable The variable we want to get + * @param rOutput The values obtained in the integration points + * @param rProcessInfo the current process info instance + * @tparam TType The type considered + */ + template + void CalculateOnConstitutiveLaw( + const Variable& rVariable, + std::vector& rOutput, + const ProcessInfo& rCurrentProcessInfo + ) + { + const auto& r_props = GetProperties(); + const auto& r_geom = GetGeometry(); + const Matrix& shapeFunctions = r_geom.ShapeFunctionsValues(); + Vector iN(shapeFunctions.size2()); + + // Compute the local coordinate system. + ShellQ4_LocalCoordinateSystem localCoordinateSystem( + this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); + + ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( + this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); + + // Prepare all the parameters needed for the MITC formulation. + // This is to be done here outside the Gauss Loop. + MITC4Params shearParameters(referenceCoordinateSystem); + + // Instantiate the Jacobian Operator. + // This will store: + // the jacobian matrix, its inverse, its determinant + // and the derivatives of the shape functions in the local + // coordinate system + ShellUtilities::JacobianOperator jacOp; + array_1d dArea; + + // Instantiate all strain-displacement matrices. + + Matrix B(8, 24, 0.0); + Vector Bdrilling(24, 0.0); + + // Instantiate all section tangent matrices. + Matrix D(8, 8, 0.0); + + // Instantiate strain and stress-resultant vectors + Vector generalizedStrains(8); + Vector generalizedStresses(8); + + // Get the current displacements in global coordinate system + + Vector globalDisplacements(24); + this->GetValuesVector(globalDisplacements, 0); + + // Get the current displacements in local coordinate system + Vector localDisplacements(this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); + + // Instantiate the EAS Operator. + // This will apply the Enhanced Assumed Strain Method for the calculation + // of the membrane contribution. + EASOperator EASOp(referenceCoordinateSystem, mEASStorage); + + // Initialize parameters for the cross section calculation + ShellCrossSection::SectionParameters parameters(r_geom, r_props, rCurrentProcessInfo); + parameters.SetGeneralizedStrainVector(generalizedStrains); + parameters.SetGeneralizedStressVector(generalizedStresses); + parameters.SetConstitutiveMatrix(D); + Flags& r_options = parameters.GetOptions(); + r_options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); + r_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); + + // Gauss Loop. + for (SizeType integration_point = 0; integration_point < 4; integration_point++) { + + // get a reference of the current integration point and shape functions + const GeometryType::IntegrationPointType& ip = r_geom.IntegrationPoints()[integration_point]; + noalias(iN) = row(shapeFunctions, integration_point); + + // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian + // and Shape functions derivatives in the local coordinate system + jacOp.Calculate(referenceCoordinateSystem, r_geom.ShapeFunctionLocalGradient(integration_point)); + + // Compute all strain-displacement matrices + CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); + + // Calculate strain vectors in local coordinate system + noalias(generalizedStrains) = prod(B, localDisplacements); + + // Apply the EAS method to modify the membrane part of the strains computed above. + EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); + + // Calculate the response of the Cross Section + parameters.SetShapeFunctionsValues(iN); + parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); + + ConstitutiveLaw::Parameters cl_values(r_geom, r_props, rCurrentProcessInfo); + cl_values.SetStrainVector(generalizedStrains); + cl_values.SetStressVector(generalizedStresses); + cl_values.SetConstitutiveMatrix(D); + + mConstitutiveLawVector[integration_point]->CalculateValue(cl_values, rVariable, rOutput[integration_point]); + } + } + + /** + * @brief This method calculates the shear modulus to be used. + * In elasticity the shear modulus is G = E / (2*(1+nu)). + * However, in some cases, such as in plasticity, the constitutive matrix may not have this form. + * In nonlinear cases, we compute an equivalent isotropic D and retrieve its shear modulus. + */ + double CalculateEquivalentShearModulus(const Matrix& rConstitutiveMatrix); + + + /** + * @brief This method computes the mass matrix + */ + void CalculateMassMatrix( + MatrixType &rMassMatrix, + const ProcessInfo &rCurrentProcessInfo) override; + + ///@} + + ///@name Public specialized Access - Temporary + ///@{ + + ///@} + +protected: + + ///@name Protected Lyfe Cycle + ///@{ + + /** + * Protected empty constructor + */ + MITCThickShellElement3D4N() : BaseType() + { + } + + ///@} + +private: + + ///@name Private Operations + ///@{ + + /** + * @brief This method calculates the B matrix for the bending, shear and membrane behavior of the element + */ + void CalculateBMatrix(double xi, double eta, + const ShellUtilities::JacobianOperator& Jac, const MITC4Params& params, + const Vector& N, + Matrix& B, Vector& Bdrill); + + /** + * @brief This method computes the element stiffness matrix and residual vector + */ + void CalculateAll(MatrixType& rLeftHandSideMatrix, + VectorType& rRightHandSideVector, + const ProcessInfo& rCurrentProcessInfo, + const bool CalculateStiffnessMatrixFlag, + const bool CalculateResidualVectorFlag) override; + + /** + * @brief This method computes the body forces contribution to the right hand side vector + */ + void AddBodyForces(const array_1d& dA, VectorType& rRightHandSideVector); + + + /** + * Returns the behavior of this shell (thin/thick) + * @return the shell behavior + */ + ShellCrossSection::SectionBehaviorType GetSectionBehavior() const override; + + + /** + * @brief This method gets a calculates the material response directly in the CL + */ + void CalculateMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rPointNumber, + const bool CalculateStress, + const bool CalculateConstitutive, + const ProcessInfo& rProcessInfo); + + /** + * @brief This method gets a Finalizes the material response directly in the CL + */ + void FinalizeMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rPointNumber, + const ProcessInfo& rProcessInfo); + + /** + * @brief This method gets a Initializes the material response directly in the CL + */ + void InitializeMaterialResponse( + ShellCrossSection::SectionParameters& rSectionParameters, + const SizeType& rPointNumber, + const ProcessInfo& rProcessInfo); + + ///@} + + ///@name Static Member Variables + ///@{ + ///@} + + ///@name Member Variables + ///@{ + + EASOperatorStorage mEASStorage; /// The storage instance for the EAS Operator + std::vector mConstitutiveLawVector; /// The vector containing the constitutive laws + + ///@} + + ///@name Serialization + ///@{ + + friend class Serializer; + + void save(Serializer& rSerializer) const override; + + void load(Serializer& rSerializer) override; + + ///@} + + ///@name Private Access + ///@{ + ///@} + + ///@name Private Inquiry + ///@{ + ///@} + + ///@name Un accessible methods + ///@{ + ///@} + +}; + +} diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.cpp b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.cpp deleted file mode 100644 index 4d1c6e92fdd9..000000000000 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.cpp +++ /dev/null @@ -1,1667 +0,0 @@ -// KRATOS ___| | | | -// \___ \ __| __| | | __| __| | | __| _` | | -// | | | | | ( | | | | ( | | -// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS -// -// License: BSD License -// license: StructuralMechanicsApplication/license.txt -// -// Main authors: Massimo Petracca -// - -#include "shell_thick_element_3D4N.hpp" - -#include -#include - -namespace Kratos -{ -// ===================================================================================== -// -// Class MITC4Params -// -// ===================================================================================== - -template -ShellThickElement3D4N::MITC4Params::MITC4Params(const ShellQ4_LocalCoordinateSystem& LCS) - : Transformation(2, 2) - , ShearStrains(4, 24, 0.0) -{ - - double x21 = LCS.X2() - LCS.X1(); - double y21 = LCS.Y2() - LCS.Y1(); - double x34 = LCS.X3() - LCS.X4(); - double y34 = LCS.Y3() - LCS.Y4(); - double x41 = LCS.X4() - LCS.X1(); - double y41 = LCS.Y4() - LCS.Y1(); - double x32 = LCS.X3() - LCS.X2(); - double y32 = LCS.Y3() - LCS.Y2(); - - Ax = - LCS.X1() + LCS.X2() + LCS.X3() - LCS.X4(); - Bx = LCS.X1() - LCS.X2() + LCS.X3() - LCS.X4(); - Cx = - LCS.X1() - LCS.X2() + LCS.X3() + LCS.X4(); - Ay = - LCS.Y1() + LCS.Y2() + LCS.Y3() - LCS.Y4(); - By = LCS.Y1() - LCS.Y2() + LCS.Y3() - LCS.Y4(); - Cy = - LCS.Y1() - LCS.Y2() + LCS.Y3() + LCS.Y4(); - - double Alpha = std::atan(Ay / Ax); - double Beta = Globals::Pi * 0.5 - std::atan(Cx / Cy); - - Transformation(0, 0) = std::sin(Beta); - Transformation(0, 1) = - std::sin(Alpha); - Transformation(1, 0) = - std::cos(Beta); - Transformation(1, 1) = std::cos(Alpha); - - ShearStrains(0, 2) = - 0.5; - ShearStrains(0, 3) = - y41 * 0.25; - ShearStrains(0, 4) = x41 * 0.25; - - ShearStrains(0, 20) = 0.5; - ShearStrains(0, 21) = - y41 * 0.25; - ShearStrains(0, 22) = x41 * 0.25; - - ShearStrains(1, 2) = - 0.5; - ShearStrains(1, 3) = - y21 * 0.25; - ShearStrains(1, 4) = x21 * 0.25; - - ShearStrains(1, 8) = 0.5; - ShearStrains(1, 9) = - y21 * 0.25; - ShearStrains(1, 10) = x21 * 0.25; - - ShearStrains(2, 8) = - 0.5; - ShearStrains(2, 9) = - y32 * 0.25; - ShearStrains(2, 10) = x32 * 0.25; - - ShearStrains(2, 14) = 0.5; - ShearStrains(2, 15) = - y32 * 0.25; - ShearStrains(2, 16) = x32 * 0.25; - - ShearStrains(3, 14) = 0.5; - ShearStrains(3, 15) = - y34 * 0.25; - ShearStrains(3, 16) = x34 * 0.25; - - ShearStrains(3, 20) = - 0.5; - ShearStrains(3, 21) = - y34 * 0.25; - ShearStrains(3, 22) = x34 * 0.25; -} - -// ===================================================================================== -// -// Class EASOperatorStorage -// -// ===================================================================================== - -template -ShellThickElement3D4N::EASOperatorStorage::EASOperatorStorage() - : mInitialized(false) -{ -} - -template -void ShellThickElement3D4N::EASOperatorStorage::Initialize(const GeometryType& geom) -{ - if (!mInitialized) { - noalias(alpha) = ZeroVector(5); - noalias(alpha_converged) = ZeroVector(5); - - for (SizeType i = 0; i < 4; i++) { - SizeType ii = i * 6; - const array_1d& initialDispl = geom[i].FastGetSolutionStepValue(DISPLACEMENT); - const array_1d& initialRot = geom[i].FastGetSolutionStepValue(ROTATION); - - displ(ii) = initialDispl(0); - displ(ii + 1) = initialDispl(1); - displ(ii + 2) = initialDispl(2); - displ_converged(ii) = initialDispl(0); - displ_converged(ii + 1) = initialDispl(1); - displ_converged(ii + 2) = initialDispl(2); - - displ(ii + 3) = initialRot(0); - displ(ii + 4) = initialRot(1); - displ(ii + 5) = initialRot(2); - displ_converged(ii + 3) = initialRot(0); - displ_converged(ii + 4) = initialRot(1); - displ_converged(ii + 5) = initialRot(2); - } - - mInitialized = true; - } -} - -template -void ShellThickElement3D4N::EASOperatorStorage::InitializeSolutionStep() -{ - displ = displ_converged; - alpha = alpha_converged; -} - -template -void ShellThickElement3D4N::EASOperatorStorage::FinalizeSolutionStep() -{ - displ_converged = displ; - alpha_converged = alpha; -} - -template -void ShellThickElement3D4N::EASOperatorStorage::FinalizeNonLinearIteration(const Vector& displacementVector) -{ - Vector incrementalDispl(24); - noalias(incrementalDispl) = displacementVector - displ; - noalias(displ) = displacementVector; - - array_1d temp; - noalias(temp) = prod(L, incrementalDispl); - noalias(temp) -= residual; - noalias(alpha) -= prod(Hinv, temp); -} - -template -void ShellThickElement3D4N::EASOperatorStorage::save(Serializer& rSerializer) const -{ - rSerializer.save("A0", alpha); - rSerializer.save("A1", alpha_converged); - rSerializer.save("U0", displ); - rSerializer.save("U1", displ_converged); - rSerializer.save("res", residual); - rSerializer.save("Hinv", Hinv); - rSerializer.save("mL", L); - rSerializer.save("init", mInitialized); -} - -template -void ShellThickElement3D4N::EASOperatorStorage::load(Serializer& rSerializer) -{ - rSerializer.load("A0", alpha); - rSerializer.load("A1", alpha_converged); - rSerializer.load("U0", displ); - rSerializer.load("U1", displ_converged); - rSerializer.load("res", residual); - rSerializer.load("Hinv", Hinv); - rSerializer.load("mL", L); - rSerializer.load("init", mInitialized); -} - -// ===================================================================================== -// -// Class EASOperator -// -// ===================================================================================== - -template -ShellThickElement3D4N::EASOperator::EASOperator(const ShellQ4_LocalCoordinateSystem& LCS, EASOperatorStorage& storage) - : mF0inv(3, 3) - , mEnhancedStrains(3) - , mG(3, 5) -{ - - // compute the jacobian at the element center - - double xi(0.0); - double eta(0.0); - - Matrix dN(4, 2); - ShellUtilities::ShapeFunc_NaturalDerivatives(xi, eta, dN); - - Matrix Jac0(2, 2); - Jac0(0, 0) = dN(0, 0) * LCS.X1() + dN(1, 0) * LCS.X2() + dN(2, 0) * LCS.X3() + dN(3, 0) * LCS.X4(); - Jac0(0, 1) = dN(0, 0) * LCS.Y1() + dN(1, 0) * LCS.Y2() + dN(2, 0) * LCS.Y3() + dN(3, 0) * LCS.Y4(); - Jac0(1, 0) = dN(0, 1) * LCS.X1() + dN(1, 1) * LCS.X2() + dN(2, 1) * LCS.X3() + dN(3, 1) * LCS.X4(); - Jac0(1, 1) = dN(0, 1) * LCS.Y1() + dN(1, 1) * LCS.Y2() + dN(2, 1) * LCS.Y3() + dN(3, 1) * LCS.Y4(); - - // save the jacobian determinant at center - - mJ0 = Jac0(0, 0) * Jac0(1, 1) - Jac0(1, 0) * Jac0(0, 1); - - // compute the transformation matrix used in the implementation of the EAS method - // which operates in the natural coordinate system - - double j11 = Jac0(0,0); - double j22 = Jac0(1,1); - double j12 = Jac0(0,1); - double j21 = Jac0(1,0); - - Matrix F0(3,3); - F0(0,0) = j11*j11; - F0(0,1) = j21*j12; - F0(0,2) = 2.0*j11*j12; - F0(1,0) = j12*j21; - F0(1,1) = j22*j22; - F0(1,2) = 2.0*j21*j22; - F0(2,0) = j11*j21; - F0(2,1) = j12*j22; - F0(2,2) = j11*j22 + j12*j21; - - double dummyDet; - MathUtils::InvertMatrix3(F0, mF0inv, dummyDet); - - // initialize these data to zero because they will - // be integrated during the gauss loop - storage.L.clear(); - storage.Hinv.clear(); - storage.residual.clear(); -} - -template -void ShellThickElement3D4N::EASOperator::GaussPointComputation_Step1(double xi, double eta, const ShellUtilities::JacobianOperator& jac, - Vector& generalizedStrains, - EASOperatorStorage& storage) -{ - // construct the interpolation matrix in natural coordinate system - Matrix E(3, 5, 0.0); - E(0,0) = xi; - E(1,1) = eta; - E(2,2) = xi; - E(2,3) = eta; - E(0,4) = xi*eta; - E(1,4) = -xi*eta; - E(2,4) = xi*xi - eta*eta; - - // construct the interpolation matrix in local coordinate system - noalias(mG) = mJ0 / jac.Determinant() * prod(mF0inv, E); - - // assuming that the input generalized strains has been already calculated on this - // integration point, we just need to add the contribution of the enhanced strains - noalias(mEnhancedStrains) = prod(mG, storage.alpha); - - generalizedStrains(0) += mEnhancedStrains(0); // e.xx - generalizedStrains(1) += mEnhancedStrains(1); // e.yy - generalizedStrains(2) += mEnhancedStrains(2); // e.xy -} - -template -void ShellThickElement3D4N::EASOperator::GaussPointComputation_Step2(const Matrix& D, - const Matrix& B, - const Vector& S, - EASOperatorStorage& storage) -{ - Matrix GTC(5, 3); - noalias(GTC) = prod(trans(mG), project(D, range(0,3), range(0,3))); - noalias(storage.Hinv) += prod(GTC, mG); - noalias(storage.residual) -= prod(trans(mG), project(S, range(0,3))); - - // compute L: [G'*Dmm, G'*Dmb, G'*Dms]*[Bm; Bm; Bs] - int num_stress = D.size2(); // it can be 6 for thin shells or 8 for thick shells - Matrix GTD(5, num_stress, 0.0); - noalias(project(GTD, range::all(), range(0,3))) = GTC; - noalias(project(GTD, range::all(), range(3,6))) = prod(trans(mG), project(D, range(0,3), range(3,6))); - if (num_stress == 8) { - noalias(project(GTD, range::all(), range(6,8))) = prod(trans(mG), project(D, range(0,3), range(6,8))); - } - noalias(storage.L) += prod(GTD, B); -} - -template -void ShellThickElement3D4N::EASOperator::ComputeModfiedTangentAndResidual(Matrix& rLeftHandSideMatrix, - Vector& rRightHandSideVector, - EASOperatorStorage& storage) -{ - // invert H - Matrix Hcopy(storage.Hinv); - permutation_matrix pm(5); - lu_factorize(Hcopy, pm); - noalias(storage.Hinv) = IdentityMatrix(5); - lu_substitute(Hcopy, pm, storage.Hinv); - - // compute L' * H^-1 - Matrix LTHinv(24, 5); - noalias(LTHinv) = prod(trans(storage.L), storage.Hinv); - - // modify the stiffness matrix and the residual vector - // for the static condensation of the enhanced strain parameters - noalias(rRightHandSideVector) -= prod(LTHinv, storage.residual); // R_mod = R - L' * H^-1 * residual - noalias(rLeftHandSideMatrix) -= prod(LTHinv, storage.L); // K_mod = K - L' * H^-1 * L -} - -// ===================================================================================== -// -// Class ShellThickElement3D4N -// -// ===================================================================================== - -template -ShellThickElement3D4N::ShellThickElement3D4N(IndexType NewId, - GeometryType::Pointer pGeometry) - : BaseType(NewId, pGeometry) -{ -} - -template -ShellThickElement3D4N::ShellThickElement3D4N(IndexType NewId, - GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties) - : BaseType(NewId, pGeometry, pProperties) -{ -} - -// TODO are the GetIntegrationMethod methods needed (implemented in the other 3 shells) - -template -Element::Pointer ShellThickElement3D4N::Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const -{ - GeometryType::Pointer newGeom(GetGeometry().Create(ThisNodes)); - return Kratos::make_intrusive< ShellThickElement3D4N >(NewId, newGeom, pProperties); -} - -template -Element::Pointer ShellThickElement3D4N::Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const -{ - return Kratos::make_intrusive< ShellThickElement3D4N >(NewId, pGeom, pProperties); -} - -template -void ShellThickElement3D4N::Initialize(const ProcessInfo& rCurrentProcessInfo) -{ - KRATOS_TRY - - BaseType::Initialize(rCurrentProcessInfo); - - // Initialization should not be done again in a restart! - if (!rCurrentProcessInfo[IS_RESTARTED]) { - mEASStorage.Initialize(GetGeometry()); - } - - KRATOS_CATCH("") -} - -template -void ShellThickElement3D4N::FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) -{ - BaseType::FinalizeNonLinearIteration(rCurrentProcessInfo); - - ShellQ4_LocalCoordinateSystem LCS(this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); - Vector globalDisplacementVector(24); - this->GetValuesVector(globalDisplacementVector); - Vector localDisplacementVector(this->mpCoordinateTransformation->CalculateLocalDisplacements(LCS, globalDisplacementVector)); - - mEASStorage.FinalizeNonLinearIteration(localDisplacementVector); -} - -template -void ShellThickElement3D4N::InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) -{ - BaseType::InitializeSolutionStep(rCurrentProcessInfo); - - mEASStorage.InitializeSolutionStep(); -} - -template -void ShellThickElement3D4N::FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) -{ - BaseType::FinalizeSolutionStep(rCurrentProcessInfo); - - mEASStorage.FinalizeSolutionStep(); -} - - -// ===================================================================================== -// -// Class ShellThickElement3D4N - Results on Gauss Points -// -// ===================================================================================== - -template -void ShellThickElement3D4N::CalculateOnIntegrationPoints(const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) -{ - SizeType size = GetGeometry().size(); - if (rValues.size() != size) { - rValues.resize(size); - } - - // The membrane formulation needs to iterate to find the correct - // mid-surface strain values. - // Check if we are doing a non-linear analysis type. If not, print warning - - if (!rCurrentProcessInfo.Has(NL_ITERATION_NUMBER)) { - KRATOS_WARNING_ONCE("ShellThickElement3D4N") << "Warning: Gauss point results have " - << "been requested for a linear analysis.\nThe membrane formulation used " - << "requires iteration to accurately determine recovered " - << "quantities (strain, stress, etc...)." << std::endl; - } - - if (rVariable == VON_MISES_STRESS || - rVariable == VON_MISES_STRESS_TOP_SURFACE || - rVariable == VON_MISES_STRESS_MIDDLE_SURFACE || - rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) { - // Von mises calcs - - // Get some references. - const PropertiesType& props = GetProperties(); - const GeometryType& geom = GetGeometry(); - const Matrix& shapeFunctions = geom.ShapeFunctionsValues(); - Vector iN(shapeFunctions.size2()); - - // Compute the local coordinate system. - ShellQ4_LocalCoordinateSystem localCoordinateSystem( - this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); - - ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( - this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); - - // Prepare all the parameters needed for the MITC formulation. - // This is to be done here outside the Gauss Loop. - MITC4Params shearParameters(referenceCoordinateSystem); - - // Instantiate the Jacobian Operator. - // This will store: - // the jacobian matrix, its inverse, its determinant - // and the derivatives of the shape functions in the local - // coordinate system - ShellUtilities::JacobianOperator jacOp; - - // Instantiate all strain-displacement matrices. - Matrix B(8, 24, 0.0); - Vector Bdrilling(24, 0.0); - - // Instantiate all section tangent matrices. - Matrix D(8, 8, 0.0); - - // Instantiate strain and stress-resultant vectors - Vector generalizedStrains(8); - Vector generalizedStresses(8); - - // Get the current displacements in global coordinate system - Vector globalDisplacements(24); - this->GetValuesVector(globalDisplacements, 0); - - // Get the current displacements in local coordinate system - Vector localDisplacements( - this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); - - // Instantiate the EAS Operator. - // This will apply the Enhanced Assumed Strain Method for the calculation - // of the membrane contribution. - EASOperator EASOp(referenceCoordinateSystem, mEASStorage); - - // Just to store the rotation matrix for visualization purposes - Matrix R(8, 8); - Matrix aux33(3, 3); - - // Initialize parameters for the cross section calculation - ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); - parameters.SetGeneralizedStrainVector(generalizedStrains); - parameters.SetGeneralizedStressVector(generalizedStresses); - parameters.SetConstitutiveMatrix(D); - Flags& options = parameters.GetOptions(); - options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); - options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, true); - - // Gauss Loop - for (unsigned int i = 0; i < size; i++) { - // get a reference of the current integration point and shape functions - const GeometryType::IntegrationPointType& ip = geom.IntegrationPoints()[i]; - - noalias(iN) = row(shapeFunctions, i); - - // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian - // and Shape functions derivatives in the local coordinate system - jacOp.Calculate(referenceCoordinateSystem, geom.ShapeFunctionLocalGradient(i)); - - // Compute all strain-displacement matrices - CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); - - // Calculate strain vectors in local coordinate system - noalias(generalizedStrains) = prod(B, localDisplacements); - - // Apply the EAS method to modify the membrane part of the strains computed above. - EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); - - // Calculate the response of the Cross Section - ShellCrossSection::Pointer& section = this->mSections[i]; - - //add in shear stabilization - double shearStabilisation = CalculateStenbergShearStabilization(referenceCoordinateSystem, section->GetThickness(GetProperties())); - parameters.SetStenbergShearStabilization(shearStabilisation); - //double shearStabilisation = (hMean*hMean) / (hMean*hMean + 0.1*h_e*h_e); - - // calculate force resultants - parameters.SetShapeFunctionsValues(iN); - parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); - section->CalculateSectionResponse(parameters, ConstitutiveLaw::StressMeasure_PK2); - - // Compute stresses - CalculateStressesFromForceResultants(generalizedStresses, - section->GetThickness(GetProperties())); - - // Calculate von mises results - CalculateVonMisesStress(generalizedStresses, rVariable, rValues[i]); - - } // end gauss loop - } else if (rVariable == TSAI_WU_RESERVE_FACTOR) { - // resize output - SizeType size = 4; - if (rValues.size() != size) { - rValues.resize(size); - } - - // Get some references. - const PropertiesType& props = GetProperties(); - const GeometryType& geom = GetGeometry(); - const Matrix& shapeFunctions = geom.ShapeFunctionsValues(); - Vector iN(shapeFunctions.size2()); - - // Compute the local coordinate system. - ShellQ4_LocalCoordinateSystem localCoordinateSystem( - this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); - ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( - this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); - - // Prepare all the parameters needed for the MITC formulation. - // This is to be done here outside the Gauss Loop. - MITC4Params shearParameters(referenceCoordinateSystem); - - // Instantiate the Jacobian Operator. - ShellUtilities::JacobianOperator jacOp; - - // Instantiate all strain-displacement matrices. - Matrix B(8, 24, 0.0); - Vector Bdrilling(24, 0.0); - - // Instantiate all section tangent matrices. - Matrix D(8, 8, 0.0); - - // Instantiate strain and stress-resultant vectors - Vector generalizedStrains(8); - Vector generalizedStresses(8); - std::vector rlaminateStrains; - std::vector rlaminateStresses; - - // Get the current displacements in global coordinate system - Vector globalDisplacements(24); - this->GetValuesVector(globalDisplacements, 0); - - // Get the current displacements in local coordinate system - Vector localDisplacements( - this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); - - // Instantiate the EAS Operator. - EASOperator EASOp(referenceCoordinateSystem, mEASStorage); - - // Initialize parameters for the cross section calculation - ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); - parameters.SetGeneralizedStrainVector(generalizedStrains); - parameters.SetGeneralizedStressVector(generalizedStresses); - parameters.SetConstitutiveMatrix(D); - Flags& options = parameters.GetOptions(); - options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); - options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, true); - - // Get all laminae strengths - ShellCrossSection::Pointer& section = this->mSections[0]; - std::vector Laminae_Strengths = - std::vector(section->NumberOfPlies()); - for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) { - Laminae_Strengths[ply].resize(3, 3, 0.0); - Laminae_Strengths[ply].clear(); - } - section->GetLaminaeStrengths(Laminae_Strengths, props); - - // Define variables - Matrix R(8, 8); - double total_rotation = 0.0; - - // Gauss Loop - for (unsigned int i = 0; i < size; i++) { - // get a reference of the current integration point and shape functions - const GeometryType::IntegrationPointType& ip = geom.IntegrationPoints()[i]; - noalias(iN) = row(shapeFunctions, i); - - // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian - // and Shape functions derivatives in the local coordinate system - jacOp.Calculate(referenceCoordinateSystem, geom.ShapeFunctionLocalGradient(i)); - - // Compute all strain-displacement matrices - CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); - - // Calculate strain vectors in local coordinate system - noalias(generalizedStrains) = prod(B, localDisplacements); - - // Apply the EAS method to modify the membrane part of the strains computed above. - EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); - - // Calculate the response of the Cross Section - ShellCrossSection::Pointer& section = this->mSections[i]; - - //Calculate lamina stresses - CalculateLaminaStrains(section, generalizedStrains, rlaminateStrains); - CalculateLaminaStresses(section, parameters, rlaminateStrains, rlaminateStresses); - - // Retrieve ply orientations - section = this->mSections[i]; - Vector ply_orientation(section->NumberOfPlies()); - section->GetLaminaeOrientation(GetProperties(), ply_orientation); - - // Rotate lamina stress from element CS to section CS, and then - // to lamina angle to lamina material principal directions - for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) { - total_rotation = -ply_orientation[ply] - (section->GetOrientationAngle()); - section->GetRotationMatrixForGeneralizedStresses(total_rotation, R); - //top surface of current ply - rlaminateStresses[2 * ply] = prod(R, rlaminateStresses[2 * ply]); - //bottom surface of current ply - rlaminateStresses[2 * ply + 1] = prod(R, rlaminateStresses[2 * ply + 1]); - } - - // Calculate Tsai-Wu criterion for each ply, take min of all plies - double min_tsai_wu = 0.0; - double temp_tsai_wu = 0.0; - for (unsigned int ply = 0; ply < section->NumberOfPlies(); ply++) { - temp_tsai_wu = CalculateTsaiWuPlaneStress(rlaminateStresses, Laminae_Strengths[ply], ply); - if (ply == 0) { - min_tsai_wu = temp_tsai_wu; - } else if (temp_tsai_wu < min_tsai_wu) { - min_tsai_wu = temp_tsai_wu; - } - } - - // Output min Tsai-Wu result - rValues[i] = min_tsai_wu; - - }//Gauss loop - } else { - std::vector temp(size); - - for (SizeType i = 0; i < size; i++) { - this->mSections[i]->GetValue(rVariable, GetProperties(), temp[i]); - } - - const Matrix& shapeFunctions = GetGeometry().ShapeFunctionsValues(); - Vector N(size); - - for (SizeType i = 0; i < size; i++) { - noalias(N) = row(shapeFunctions, i); - double& ival = rValues[i]; - ival = 0.0; - for (SizeType j = 0; j < size; j++) { - ival += N(j) * temp[j]; - } - } - } -} - -template -void ShellThickElement3D4N::CalculateOnIntegrationPoints(const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) -{ - // The membrane formulation needs to iterate to find the correct - // mid-surface strain values. - // Check if we are doing a non-linear analysis type. If not, print warning - - if (!rCurrentProcessInfo.Has(NL_ITERATION_NUMBER)) { - KRATOS_WARNING_ONCE("ShellThickElement3D4N") << "Warning: Gauss point results have " - << "been requested for a linear analysis.\nThe membrane formulation used " - << "requires iteration to accurately determine recovered " - << "quantities (strain, stress, etc...)." << std::endl; - } - - - if (TryCalculateOnIntegrationPoints_GeneralizedStrainsOrStresses(rVariable, rValues, rCurrentProcessInfo)) { - return; - } -} - -template -int ShellThickElement3D4N::Check(const ProcessInfo& rCurrentProcessInfo) const -{ - KRATOS_TRY; - - BaseType::Check(rCurrentProcessInfo); - - const auto& r_geom = GetGeometry(); - - KRATOS_ERROR_IF_NOT((r_geom.IntegrationPoints(this->GetIntegrationMethod())).size() == 4) << "ShellThickElement3D4N - needs a full integration scheme" << std::endl; - - const int points_number = r_geom.PointsNumber(); - KRATOS_ERROR_IF_NOT(points_number == 4) << "ShellThickElement3D4N - Wrong number of nodes" << points_number << std::endl; - - return 0; - - KRATOS_CATCH("") -} - -// ===================================================================================== -// -// Class ShellThickElement3D4N - Private methods -// -// ===================================================================================== - -template -void ShellThickElement3D4N::CalculateStressesFromForceResultants(VectorType& rstresses, const double& rthickness) -{ - // Refer http://www.colorado.edu/engineering/CAS/courses.d/AFEM.d/AFEM.Ch20.d/AFEM.Ch20.pdf - - // membrane forces -> in-plane stresses (av. across whole thickness) - rstresses[0] /= rthickness; - rstresses[1] /= rthickness; - rstresses[2] /= rthickness; - - // bending moments -> peak in-plane stresses (@ top and bottom surface) - rstresses[3] *= 6.0 / (rthickness*rthickness); - rstresses[4] *= 6.0 / (rthickness*rthickness); - rstresses[5] *= 6.0 / (rthickness*rthickness); - - // shear forces -> peak shear stresses (@ midsurface) - rstresses[6] *= 1.5 / rthickness; - rstresses[7] *= 1.5 / rthickness; -} - -template -void ShellThickElement3D4N::CalculateLaminaStrains(ShellCrossSection::Pointer& section, const Vector& generalizedStrains, std::vector& rlaminateStrains) -{ - // Get laminate properties - double thickness = section->GetThickness(GetProperties()); - double z_current = thickness / -2.0; // start from the top of the 1st layer - - // Establish current strains at the midplane - // (element coordinate system) - double e_x = generalizedStrains[0]; - double e_y = generalizedStrains[1]; - double e_xy = generalizedStrains[2]; //this is still engineering - //strain (2xtensorial shear) - double kap_x = generalizedStrains[3]; - double kap_y = generalizedStrains[4]; - double kap_xy = generalizedStrains[5]; //this is still engineering - - // Get ply thicknesses - Vector ply_thicknesses = Vector(section->NumberOfPlies(), 0.0); - section->GetPlyThicknesses(GetProperties(), ply_thicknesses); - - // Resize output vector. 2 Surfaces for each ply - rlaminateStrains.resize(2 * section->NumberOfPlies()); - for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) { - rlaminateStrains[i].resize(8, false); - rlaminateStrains[i].clear(); - } - - // Loop over all plies - start from bottom ply, bottom surface - for (unsigned int plyNumber = 0; - plyNumber < section->NumberOfPlies(); ++plyNumber) { - // Calculate strains at top surface, arranged in columns. - // (element coordinate system) - rlaminateStrains[2 * plyNumber][0] = e_x + z_current*kap_x; - rlaminateStrains[2 * plyNumber][1] = e_y + z_current*kap_y; - rlaminateStrains[2 * plyNumber][2] = e_xy + z_current*kap_xy; - - // constant transverse shear strain dist - rlaminateStrains[2 * plyNumber][6] = generalizedStrains[6]; - rlaminateStrains[2 * plyNumber][7] = generalizedStrains[7]; - - // Move to bottom surface of current layer - z_current += ply_thicknesses[plyNumber]; - - // Calculate strains at bottom surface, arranged in columns - // (element coordinate system) - rlaminateStrains[2 * plyNumber + 1][0] = e_x + z_current*kap_x; - rlaminateStrains[2 * plyNumber + 1][1] = e_y + z_current*kap_y; - rlaminateStrains[2 * plyNumber + 1][2] = e_xy + z_current*kap_xy; - - // constant transverse shear strain dist - rlaminateStrains[2 * plyNumber + 1][6] = generalizedStrains[6]; - rlaminateStrains[2 * plyNumber + 1][7] = generalizedStrains[7]; - } -} - -template -void ShellThickElement3D4N::CalculateLaminaStresses(ShellCrossSection::Pointer& section, ShellCrossSection::SectionParameters parameters, const std::vector& rlaminateStrains, std::vector& rlaminateStresses) -{ - // Setup flag to compute ply constitutive matrices - // (units [Pa] and rotated to element orientation) - section->SetupGetPlyConstitutiveMatrices(); - Flags& options = parameters.GetOptions(); - options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR,true); - section->CalculateSectionResponse(parameters, - ConstitutiveLaw::StressMeasure_PK2); - - // Resize output vector. 2 Surfaces for each ply - rlaminateStresses.resize(2 * section->NumberOfPlies()); - for (unsigned int i = 0; i < 2 * section->NumberOfPlies(); i++) { - rlaminateStresses[i].resize(8, false); - rlaminateStresses[i].clear(); - } - - // Loop over all plies - start from top ply, top surface - for (unsigned int plyNumber = 0; - plyNumber < section->NumberOfPlies(); ++plyNumber) { - // determine stresses at currrent ply, top surface - // (element coordinate system) - rlaminateStresses[2 * plyNumber] = prod( - section->GetPlyConstitutiveMatrix(plyNumber), - rlaminateStrains[2 * plyNumber]); - - // determine stresses at currrent ply, bottom surface - // (element coordinate system) - rlaminateStresses[2 * plyNumber + 1] = prod( - section->GetPlyConstitutiveMatrix(plyNumber), - rlaminateStrains[2 * plyNumber + 1]); - } -} - -template -double ShellThickElement3D4N::CalculateTsaiWuPlaneStress(const std::vector& rlaminateStresses, const Matrix& rLamina_Strengths, const unsigned int& rPly) -{ - // Incoming lamina strengths are organized as follows: - // Refer to 'shell_cross_section.cpp' for details. - // - // | T1, C1, T2 | - // | C2, S12, S13 | - // | S23 0 0 | - - // Convert raw lamina strengths into tsai strengths F_i and F_ij. - // Refer Reddy (2003) Section 10.9.4 (re-ordered for kratos DOFs). - // All F_i3 components ignored - thin shell theory. - // - - // Controls F_12 - // Should be FALSE unless testing against other programs that ignore it. - bool disable_in_plane_interaction = false; - - // First, F_i - Vector F_i = Vector(3, 0.0); - F_i[0] = 1.0 / rLamina_Strengths(0, 0) - 1.0 / rLamina_Strengths(0, 1); - F_i[1] = 1.0 / rLamina_Strengths(0, 2) - 1.0 / rLamina_Strengths(1, 0); - F_i[2] = 0.0; - - // Second, F_ij - Matrix F_ij = Matrix(5, 5, 0.0); - F_ij.clear(); - F_ij(0, 0) = 1.0 / rLamina_Strengths(0, 0) / rLamina_Strengths(0, 1); // 11 - F_ij(1, 1) = 1.0 / rLamina_Strengths(0, 2) / rLamina_Strengths(1, 0); // 22 - F_ij(2, 2) = 1.0 / rLamina_Strengths(1, 1) / rLamina_Strengths(1, 1); // 12 - F_ij(0, 1) = F_ij(1, 0) = -0.5 / std::sqrt(rLamina_Strengths(0, 0)*rLamina_Strengths(0, 1)*rLamina_Strengths(0, 2)*rLamina_Strengths(1, 0)); - - if (disable_in_plane_interaction) { - F_ij(0, 1) = F_ij(1, 0) = 0.0; - } - - // Third, addditional transverse shear terms - F_ij(3, 3) = 1.0 / rLamina_Strengths(1, 2) / rLamina_Strengths(1, 2); // 13 - F_ij(4, 4) = 1.0 / rLamina_Strengths(2, 0) / rLamina_Strengths(2, 0); // 23 - - // Evaluate Tsai-Wu @ top surface of current layer - double var_a = 0.0; - double var_b = 0.0; - for (SizeType i = 0; i < 3; i++) { - var_b += F_i[i] * rlaminateStresses[2 * rPly][i]; - for (SizeType j = 0; j < 3; j++) { - var_a += F_ij(i, j)*rlaminateStresses[2 * rPly][i] * rlaminateStresses[2 * rPly][j]; - } - } - var_a += F_ij(3, 3)*rlaminateStresses[2 * rPly][6] * rlaminateStresses[2 * rPly][6]; // Transverse shear 13 - var_a += F_ij(4, 4)*rlaminateStresses[2 * rPly][7] * rlaminateStresses[2 * rPly][7]; // Transverse shear 23 - - double tsai_reserve_factor_top = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; - - // Evaluate Tsai-Wu @ bottom surface of current layer - var_a = 0.0; - var_b = 0.0; - for (SizeType i = 0; i < 3; i++) { - var_b += F_i[i] * rlaminateStresses[2 * rPly + 1][i]; - for (SizeType j = 0; j < 3; j++) { - var_a += F_ij(i, j)*rlaminateStresses[2 * rPly + 1][i] * rlaminateStresses[2 * rPly + 1][j]; - } - } - var_a += F_ij(3, 3)*rlaminateStresses[2 * rPly + 1][6] * rlaminateStresses[2 * rPly + 1][6]; // Transverse shear 13 - var_a += F_ij(4, 4)*rlaminateStresses[2 * rPly + 1][7] * rlaminateStresses[2 * rPly + 1][7]; // Transverse shear 23 - - double tsai_reserve_factor_bottom = (-1.0*var_b + std::sqrt(var_b*var_b + 4.0 * var_a)) / 2.0 / var_a; - - // Return min of both surfaces as the result for the whole ply - return std::min(tsai_reserve_factor_bottom, tsai_reserve_factor_top); -} - -template -void ShellThickElement3D4N::CalculateVonMisesStress(const Vector& generalizedStresses, const Variable& rVariable, double& rVon_Mises_Result) -{ - // calc von mises stresses at top, mid and bottom surfaces for - // thick shell - double sxx, syy, sxy, sxz, syz; - double von_mises_top, von_mises_mid, von_mises_bottom; - // top surface: membrane and +bending contributions - // (no transverse shear) - sxx = generalizedStresses[0] + generalizedStresses[3]; - syy = generalizedStresses[1] + generalizedStresses[4]; - sxy = generalizedStresses[2] + generalizedStresses[5]; - von_mises_top = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; - - // mid surface: membrane and transverse shear contributions - // (no bending) - sxx = generalizedStresses[0]; - syy = generalizedStresses[1]; - sxy = generalizedStresses[2]; - sxz = generalizedStresses[6]; - syz = generalizedStresses[7]; - von_mises_mid = sxx*sxx - sxx*syy + syy*syy + - 3.0*(sxy*sxy + sxz*sxz + syz*syz); - - // bottom surface: membrane and -bending contributions - // (no transverse shear) - sxx = generalizedStresses[0] - generalizedStresses[3]; - syy = generalizedStresses[1] - generalizedStresses[4]; - sxy = generalizedStresses[2] - generalizedStresses[5]; - von_mises_bottom = sxx*sxx - sxx*syy + syy*syy + 3.0*sxy*sxy; - - // Output requested quantity - if (rVariable == VON_MISES_STRESS_TOP_SURFACE) { - rVon_Mises_Result = std::sqrt(von_mises_top); - } else if (rVariable == VON_MISES_STRESS_MIDDLE_SURFACE) { - rVon_Mises_Result = std::sqrt(von_mises_mid); - } else if (rVariable == VON_MISES_STRESS_BOTTOM_SURFACE) { - rVon_Mises_Result = std::sqrt(von_mises_bottom); - } else if (rVariable == VON_MISES_STRESS) { - // take the greatest value and output - rVon_Mises_Result = - std::sqrt(std::max(von_mises_top, - std::max(von_mises_mid, von_mises_bottom))); - } -} - -template -void ShellThickElement3D4N::CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, int& ijob, bool& bGlobal) -{ - if (rVariable == SHELL_STRAIN) { - ijob = 1; - } else if (rVariable == SHELL_STRAIN_GLOBAL) { - ijob = 1; - bGlobal = true; - } else if (rVariable == SHELL_CURVATURE) { - ijob = 2; - } else if (rVariable == SHELL_CURVATURE_GLOBAL) { - ijob = 2; - bGlobal = true; - } else if (rVariable == SHELL_FORCE) { - ijob = 3; - } else if (rVariable == SHELL_FORCE_GLOBAL) { - ijob = 3; - bGlobal = true; - } else if (rVariable == SHELL_MOMENT) { - ijob = 4; - } else if (rVariable == SHELL_MOMENT_GLOBAL) { - ijob = 4; - bGlobal = true; - } else if (rVariable == SHELL_STRESS_TOP_SURFACE) { - ijob = 5; - } else if (rVariable == SHELL_STRESS_TOP_SURFACE_GLOBAL) { - ijob = 5; - bGlobal = true; - } else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE) { - ijob = 6; - } else if (rVariable == SHELL_STRESS_MIDDLE_SURFACE_GLOBAL) { - ijob = 6; - bGlobal = true; - } else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE) { - ijob = 7; - } else if (rVariable == SHELL_STRESS_BOTTOM_SURFACE_GLOBAL) { - ijob = 7; - bGlobal = true; - } else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE) { - ijob = 8; - } else if (rVariable == SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE_GLOBAL) { - ijob = 8; - bGlobal = true; - } else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE) { - ijob = 9; - } else if (rVariable == SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE_GLOBAL) { - ijob = 9; - bGlobal = true; - } -} - -template -double ShellThickElement3D4N::CalculateStenbergShearStabilization(const ShellQ4_LocalCoordinateSystem& referenceCoordinateSystem, const double& hMean) -{ - // Calculate Stenberg shear stabilisation as per - // https://doi.org/10.1016/j.cma.2003.12.036 section 3.1 - - // Determine longest element edge - Vector edge_1 = Vector(referenceCoordinateSystem.P1() - referenceCoordinateSystem.P2()); - Vector edge_2 = Vector(referenceCoordinateSystem.P2() - referenceCoordinateSystem.P3()); - Vector edge_3 = Vector(referenceCoordinateSystem.P3() - referenceCoordinateSystem.P4()); - Vector edge_4 = Vector(referenceCoordinateSystem.P4() - referenceCoordinateSystem.P1()); - double h_e = inner_prod(edge_1, edge_1); - if (inner_prod(edge_2, edge_2) > h_e) { - h_e = inner_prod(edge_2, edge_2); - } - if (inner_prod(edge_3, edge_3) > h_e) { - h_e = inner_prod(edge_3, edge_3); - } - if (inner_prod(edge_4, edge_4) > h_e) { - h_e = inner_prod(edge_4, edge_4); - } - h_e = std::sqrt(h_e); - - return ((hMean*hMean) / (hMean*hMean + 0.1*h_e*h_e)); -} - -template -void ShellThickElement3D4N::CalculateBMatrix(double xi, double eta, - const ShellUtilities::JacobianOperator& Jac, const MITC4Params& mitc_params, - const Vector& N, - Matrix& B, Vector& Bdrill) -{ - // some data - - const Matrix& dNxy = Jac.XYDerivatives(); - - // membrane ************************************************************************************************ - - B(0, 0) = dNxy(0, 0); - B(0, 6) = dNxy(1, 0); - B(0, 12) = dNxy(2, 0); - B(0, 18) = dNxy(3, 0); - B(1, 1) = dNxy(0, 1); - B(1, 7) = dNxy(1, 1); - B(1, 13) = dNxy(2, 1); - B(1, 19) = dNxy(3, 1); - B(2, 0) = dNxy(0, 1); - B(2, 6) = dNxy(1, 1); - B(2, 12) = dNxy(2, 1); - B(2, 18) = dNxy(3, 1); - B(2, 1) = dNxy(0, 0); - B(2, 7) = dNxy(1, 0); - B(2, 13) = dNxy(2, 0); - B(2, 19) = dNxy(3, 0); - - // bending ************************************************************************************************* - - B(3, 4) = dNxy(0, 0); - B(3, 10) = dNxy(1, 0); - B(3, 16) = dNxy(2, 0); - B(3, 22) = dNxy(3, 0); - B(4, 3) = -dNxy(0, 1); - B(4, 9) = -dNxy(1, 1); - B(4, 15) = -dNxy(2, 1); - B(4, 21) = -dNxy(3, 1); - B(5, 3) = -dNxy(0, 0); - B(5, 9) = -dNxy(1, 0); - B(5, 15) = -dNxy(2, 0); - B(5, 21) = -dNxy(3, 0); - B(5, 4) = dNxy(0, 1); - B(5, 10) = dNxy(1, 1); - B(5, 16) = dNxy(2, 1); - B(5, 22) = dNxy(3, 1); - - // drilling ************************************************************************************************ - - Bdrill(0) = -0.5 * dNxy(0, 1); - Bdrill(1) = 0.5 * dNxy(0, 0); - Bdrill(5) = -N(0); - Bdrill(6) = -0.5 * dNxy(1, 1); - Bdrill(7) = 0.5 * dNxy(1, 0); - Bdrill(11) = -N(1); - Bdrill(12) = -0.5 * dNxy(2, 1); - Bdrill(13) = 0.5 * dNxy(2, 0); - Bdrill(17) = -N(2); - Bdrill(18) = -0.5 * dNxy(3, 1); - Bdrill(19) = 0.5 * dNxy(3, 0); - Bdrill(23) = -N(3); - - // shear *************************************************************************************************** - - // MITC modified shape functions - Matrix MITCShapeFunctions(2, 4, 0.0); - MITCShapeFunctions(1, 0) = 1.0 - xi; - MITCShapeFunctions(0, 1) = 1.0 - eta; - MITCShapeFunctions(1, 2) = 1.0 + xi; - MITCShapeFunctions(0, 3) = 1.0 + eta; - - // strain displacement matrix in natural coordinate system. - // interpolate the shear strains given in MITC4Params - // using the modified shape function - Matrix BN = prod(MITCShapeFunctions, mitc_params.ShearStrains); - - // modify the shear strain intensity in the tying points - // to match the values that would be obtained using standard - // interpolations - double Temp1, Temp2, Temp3; - Temp1 = mitc_params.Cx + xi * mitc_params.Bx; - Temp3 = mitc_params.Cy + xi * mitc_params.By; - Temp1 = Temp1 * Temp1 + Temp3 * Temp3; - Temp1 = std::sqrt(Temp1) / (8.0 * Jac.Determinant()); - Temp2 = mitc_params.Ax + eta * mitc_params.Bx; - Temp3 = mitc_params.Ay + eta * mitc_params.By; - Temp2 = Temp2 * Temp2 + Temp3 * Temp3; - Temp2 = std::sqrt(Temp2) / (8.0 * Jac.Determinant()); - - row(BN, 0) *= Temp1; - row(BN, 1) *= Temp2; - - // transform the strain-displacement matrix from natural - // to local coordinate system taking into account the element distortion - - project(B, slice(7, -1, 2), slice::all()) = prod(mitc_params.Transformation, BN); - - // Explanation of the 'slice': - // The MITC4Params class and the first part of this method were coded - // assuming the following notations for strain vector : [e.xx, e.yy, e.zz, 2 e.xy, 2 e.XZ, 2 e.YZ]. - // Since in Kratos the strain vector is assumed to be : [e.xx, e.yy, e.zz, 2 e.xy, 2 e.YZ, 2 e.XZ], - // I had to "virtually" swap the 2 rows of the matrix B before the assignment from the product on the Right-Hand-Side. - // In this way the matrix B is consistent with the notation used in Kratos without recoding all the MITC stuff. -} - -template -void ShellThickElement3D4N::CalculateAll(MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - const ProcessInfo& rCurrentProcessInfo, - const bool CalculateStiffnessMatrixFlag, - const bool CalculateResidualVectorFlag) -{ - // Resize the Left Hand Side if necessary, - // and initialize it to Zero - - if ((rLeftHandSideMatrix.size1() != 24) || (rLeftHandSideMatrix.size2() != 24)) { - rLeftHandSideMatrix.resize(24, 24, false); - } - noalias(rLeftHandSideMatrix) = ZeroMatrix(24, 24); - - // Resize the Right Hand Side if necessary, - // and initialize it to Zero - - if (rRightHandSideVector.size() != 24) { - rRightHandSideVector.resize(24, false); - } - noalias(rRightHandSideVector) = ZeroVector(24); - - // Get some references. - - const PropertiesType& props = GetProperties(); - const GeometryType& geom = GetGeometry(); - const Matrix& shapeFunctions = geom.ShapeFunctionsValues(); - Vector iN(shapeFunctions.size2()); - - // Compute the local coordinate system. - - ShellQ4_LocalCoordinateSystem localCoordinateSystem( - this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); - - ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( - this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); - - // Prepare all the parameters needed for the MITC formulation. - // This is to be done here outside the Gauss Loop. - - MITC4Params shearParameters(referenceCoordinateSystem); - - // Instantiate the Jacobian Operator. - // This will store: - // the jacobian matrix, its inverse, its determinant - // and the derivatives of the shape functions in the local - // coordinate system - - ShellUtilities::JacobianOperator jacOp; - array_1d dArea; - - // Instantiate all strain-displacement matrices. - - Matrix B(8, 24, 0.0); - Vector Bdrilling(24, 0.0); - - // Instantiate all section tangent matrices. - - Matrix D(8, 8, 0.0); - double Ddrilling(0.0); - - // Instantiate strain and stress-resultant vectors - - Vector generalizedStrains(8); - Vector generalizedStresses(8); - - // Get the current displacements in global coordinate system - - Vector globalDisplacements(24); - this->GetValuesVector(globalDisplacements, 0); - - // Get the current displacements in local coordinate system - - Vector localDisplacements( - this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); - - // Instantiate the EAS Operator. - // This will apply the Enhanced Assumed Strain Method for the calculation - // of the membrane contribution. - - EASOperator EASOp(referenceCoordinateSystem, mEASStorage); - - // auxiliary data - - Matrix BTD(24, 8); // auxiliary matrix to store the product B'*D - - // Initialize parameters for the cross section calculation - - ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); - parameters.SetGeneralizedStrainVector(generalizedStrains); - parameters.SetGeneralizedStressVector(generalizedStresses); - parameters.SetConstitutiveMatrix(D); - Flags& options = parameters.GetOptions(); - options.Set(ConstitutiveLaw::COMPUTE_STRESS, CalculateResidualVectorFlag); - options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, CalculateStiffnessMatrixFlag); - - // Gauss Loop. - for (int i = 0; i < 4; i++) { - - // get a reference of the current integration point and shape functions - - const GeometryType::IntegrationPointType& ip = geom.IntegrationPoints()[i]; - - noalias(iN) = row(shapeFunctions, i); - - // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian - // and Shape functions derivatives in the local coordinate system - - jacOp.Calculate(referenceCoordinateSystem, geom.ShapeFunctionLocalGradient(i)); - - // compute the 'area' of the current integration point - - double dA = ip.Weight() * jacOp.Determinant(); - dArea[i] = dA; - - // Compute all strain-displacement matrices - - CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); - - // Calculate strain vectors in local coordinate system - - noalias(generalizedStrains) = prod(B, localDisplacements); - double drillingStrain = inner_prod(Bdrilling, localDisplacements); - - // Apply the EAS method to modify the membrane part of the strains computed above. - - EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); - - // Calculate the response of the Cross Section - - ShellCrossSection::Pointer& section = this->mSections[i]; - - parameters.SetShapeFunctionsValues(iN); - parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); - //add in shear stabilization - double shearStabilisation = CalculateStenbergShearStabilization(referenceCoordinateSystem, section->GetThickness(GetProperties())); - parameters.SetStenbergShearStabilization(shearStabilisation); - section->CalculateSectionResponse(parameters, ConstitutiveLaw::StressMeasure_PK2); - Ddrilling = section->GetDrillingStiffness(); - - // multiply the section tangent matrices and stress resultants by 'dA' - - D *= dA; - Ddrilling *= dA; - generalizedStresses *= dA; - double drillingStress = Ddrilling * drillingStrain; // already multiplied by 'dA' - - // Add all contributions to the Stiffness Matrix - - noalias(BTD) = prod(trans(B), D); - noalias(rLeftHandSideMatrix) += prod(BTD, B); - noalias(rLeftHandSideMatrix) += outer_prod(Ddrilling * Bdrilling, Bdrilling); - - // Add all contributions to the residual vector - - noalias(rRightHandSideVector) -= prod(trans(B), generalizedStresses); - noalias(rRightHandSideVector) -= Bdrilling * drillingStress; - - // Continue the calculation of the EAS method now that the contitutive response - // has been computed - - EASOp.GaussPointComputation_Step2(D, B, generalizedStresses, mEASStorage); - } - - // Now that the gauss integration is over, let the EAS operator modify - // the local stiffness matrix and residual vector. - // It will perform a static condensation to remove the enhanced strain parameters - // at the element level - - EASOp.ComputeModfiedTangentAndResidual(rLeftHandSideMatrix, rRightHandSideVector, mEASStorage); - - // Let the CoordinateTransformation finalize the calculation. - // This will handle the transformation of the local matrices/vectors to - // the global coordinate system. - - this->mpCoordinateTransformation->FinalizeCalculations(localCoordinateSystem, - globalDisplacements, - localDisplacements, - rLeftHandSideMatrix, - rRightHandSideVector, - CalculateResidualVectorFlag, - CalculateStiffnessMatrixFlag); - - // Add body forces contributions. This doesn't depend on the coordinate system - AddBodyForces(dArea, rRightHandSideVector); -} - -template -void ShellThickElement3D4N::AddBodyForces(const array_1d& dA, VectorType& rRightHandSideVector) -{ - const GeometryType& geom = GetGeometry(); - - // Get shape functions - const Matrix& N = geom.ShapeFunctionsValues(); - - // auxiliary - array_1d bf; - - // gauss loop to integrate the external force vector - for (unsigned int igauss = 0; igauss < 4; igauss++) { - // get mass per unit area - double mass_per_unit_area = this->mSections[igauss]->CalculateMassPerUnitArea(GetProperties()); - - // interpolate nodal volume accelerations to this gauss point - // and obtain the body force vector - bf.clear(); - for (unsigned int inode = 0; inode < 4; inode++) { - if (geom[inode].SolutionStepsDataHas(VOLUME_ACCELERATION)) { //temporary, will be checked once at the beginning only - bf += N(igauss,inode) * geom[inode].FastGetSolutionStepValue(VOLUME_ACCELERATION); - } - } - bf *= (mass_per_unit_area * dA[igauss]); - - // add it to the RHS vector - for (unsigned int inode = 0; inode < 4; inode++) { - unsigned int index = inode*6; - double iN = N(igauss,inode); - rRightHandSideVector[index + 0] += iN * bf[0]; - rRightHandSideVector[index + 1] += iN * bf[1]; - rRightHandSideVector[index + 2] += iN * bf[2]; - } - } -} - -template -bool ShellThickElement3D4N::TryCalculateOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo) -{ - // Check the required output - - int ijob = 0; - bool bGlobal = false; - CheckGeneralizedStressOrStrainOutput(rVariable, ijob, bGlobal); - - // quick return - - if (ijob == 0) { - return false; - } - - // resize output - - SizeType size = 4; - if (rValues.size() != size) { - rValues.resize(size); - } - - // Get some references. - - const PropertiesType& props = GetProperties(); - const GeometryType& geom = GetGeometry(); - const Matrix& shapeFunctions = geom.ShapeFunctionsValues(); - Vector iN(shapeFunctions.size2()); - - // Compute the local coordinate system. - - ShellQ4_LocalCoordinateSystem localCoordinateSystem( - this->mpCoordinateTransformation->CreateLocalCoordinateSystem()); - - ShellQ4_LocalCoordinateSystem referenceCoordinateSystem( - this->mpCoordinateTransformation->CreateReferenceCoordinateSystem()); - - // Prepare all the parameters needed for the MITC formulation. - // This is to be done here outside the Gauss Loop. - - MITC4Params shearParameters(referenceCoordinateSystem); - - // Instantiate the Jacobian Operator. - // This will store: - // the jacobian matrix, its inverse, its determinant - // and the derivatives of the shape functions in the local - // coordinate system - - ShellUtilities::JacobianOperator jacOp; - - // Instantiate all strain-displacement matrices. - - Matrix B(8, 24, 0.0); - Vector Bdrilling(24, 0.0); - - // Instantiate all section tangent matrices. - - Matrix D(8, 8, 0.0); - - // Instantiate strain and stress-resultant vectors - - Vector generalizedStrains(8); - Vector generalizedStresses(8); - std::vector rlaminateStrains; - std::vector rlaminateStresses; - - // Get the current displacements in global coordinate system - - Vector globalDisplacements(24); - this->GetValuesVector(globalDisplacements, 0); - - // Get the current displacements in local coordinate system - - Vector localDisplacements( - this->mpCoordinateTransformation->CalculateLocalDisplacements(localCoordinateSystem, globalDisplacements)); - - // Instantiate the EAS Operator. - // This will apply the Enhanced Assumed Strain Method for the calculation - // of the membrane contribution. - - EASOperator EASOp(referenceCoordinateSystem, mEASStorage); - - // Just to store the rotation matrix for visualization purposes - Matrix R(8, 8); - Matrix aux33(3, 3); - - // Initialize parameters for the cross section calculation - - ShellCrossSection::SectionParameters parameters(geom, props, rCurrentProcessInfo); - parameters.SetGeneralizedStrainVector(generalizedStrains); - parameters.SetGeneralizedStressVector(generalizedStresses); - parameters.SetConstitutiveMatrix(D); - Flags& options = parameters.GetOptions(); - options.Set(ConstitutiveLaw::COMPUTE_STRESS, true); - options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR, false); - - // Gauss Loop - - for (unsigned int i = 0; i < size; i++) { - - // get a reference of the current integration point and shape functions - - const GeometryType::IntegrationPointType& ip = geom.IntegrationPoints()[i]; - - noalias(iN) = row(shapeFunctions, i); - - // Compute Jacobian, Inverse of Jacobian, Determinant of Jacobian - // and Shape functions derivatives in the local coordinate system - - jacOp.Calculate(referenceCoordinateSystem, geom.ShapeFunctionLocalGradient(i)); - - // Compute all strain-displacement matrices - - CalculateBMatrix(ip.X(), ip.Y(), jacOp, shearParameters, iN, B, Bdrilling); - - // Calculate strain vectors in local coordinate system - - noalias(generalizedStrains) = prod(B, localDisplacements); - - // Apply the EAS method to modify the membrane part of the strains computed above. - - EASOp.GaussPointComputation_Step1(ip.X(), ip.Y(), jacOp, generalizedStrains, mEASStorage); - - // Calculate the response of the Cross Section - ShellCrossSection::Pointer& section = this->mSections[i]; - - //Add in shear stabilization - double shearStabilisation = CalculateStenbergShearStabilization(referenceCoordinateSystem, section->GetThickness(GetProperties())); - parameters.SetStenbergShearStabilization(shearStabilisation); - - if (ijob > 2) { - if (ijob > 7) { - //Calculate lamina stresses - CalculateLaminaStrains(section,generalizedStrains,rlaminateStrains); - CalculateLaminaStresses(section,parameters,rlaminateStrains,rlaminateStresses); - } else { - // calculate force resultants - parameters.SetShapeFunctionsValues(iN); - parameters.SetShapeFunctionsDerivatives(jacOp.XYDerivatives()); - section->CalculateSectionResponse(parameters, ConstitutiveLaw::StressMeasure_PK2); - - if (ijob > 4) { - // Compute stresses - CalculateStressesFromForceResultants(generalizedStresses, - section->GetThickness(GetProperties())); - } - } - } - - // save the results - - this->DecimalCorrection(generalizedStrains); - this->DecimalCorrection(generalizedStresses); - - // now the results are in the element coordinate system - // if necessary, rotate the results in the section (local) coordinate system - if (section->GetOrientationAngle() != 0.0 && !bGlobal) { - if (ijob > 7) { - section->GetRotationMatrixForGeneralizedStresses(-(section->GetOrientationAngle()), R); - for (unsigned int i = 0; i < rlaminateStresses.size(); i++) { - rlaminateStresses[i] = prod(R, rlaminateStresses[i]); - } - - section->GetRotationMatrixForGeneralizedStrains(-(section->GetOrientationAngle()), R); - for (unsigned int i = 0; i < rlaminateStrains.size(); i++) { - rlaminateStrains[i] = prod(R, rlaminateStrains[i]); - } - } else if (ijob > 2) { - section->GetRotationMatrixForGeneralizedStresses(-(section->GetOrientationAngle()), R); - generalizedStresses = prod(R, generalizedStresses); - } else { - section->GetRotationMatrixForGeneralizedStrains(-(section->GetOrientationAngle()), R); - generalizedStrains = prod(R, generalizedStrains); - } - } - - Matrix& iValue = rValues[i]; - if (iValue.size1() != 3 || iValue.size2() != 3) { - iValue.resize(3, 3, false); - } - - if (ijob == 1) { // strains - iValue(0, 0) = generalizedStrains(0); - iValue(1, 1) = generalizedStrains(1); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = 0.5 * generalizedStrains(2); - iValue(0, 2) = iValue(2, 0) = 0.5 * generalizedStrains(7); - iValue(1, 2) = iValue(2, 1) = 0.5 * generalizedStrains(6); - } else if (ijob == 2) { // curvatures - iValue(0, 0) = generalizedStrains(3); - iValue(1, 1) = generalizedStrains(4); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = 0.5 * generalizedStrains(5); - iValue(0, 2) = iValue(2, 0) = 0.0; - iValue(1, 2) = iValue(2, 1) = 0.0; - } else if (ijob == 3) { // forces - iValue(0, 0) = generalizedStresses(0); - iValue(1, 1) = generalizedStresses(1); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = generalizedStresses(2); - iValue(0, 2) = iValue(2, 0) = generalizedStresses(7); - iValue(1, 2) = iValue(2, 1) = generalizedStresses(6); - } else if (ijob == 4) { // moments - iValue(0, 0) = generalizedStresses(3); - iValue(1, 1) = generalizedStresses(4); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = generalizedStresses(5); - iValue(0, 2) = iValue(2, 0) = 0.0; - iValue(1, 2) = iValue(2, 1) = 0.0; - } else if (ijob == 5) { // SHELL_STRESS_TOP_SURFACE - iValue(0, 0) = generalizedStresses(0) + - generalizedStresses(3); - iValue(1, 1) = generalizedStresses(1) + - generalizedStresses(4); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = generalizedStresses[2] + - generalizedStresses[5]; - iValue(0, 2) = iValue(2, 0) = 0.0; - iValue(1, 2) = iValue(2, 1) = 0.0; - } else if (ijob == 6) { // SHELL_STRESS_MIDDLE_SURFACE - iValue(0, 0) = generalizedStresses(0); - iValue(1, 1) = generalizedStresses(1); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = generalizedStresses[2]; - iValue(0, 2) = iValue(2, 0) = generalizedStresses[6]; - iValue(1, 2) = iValue(2, 1) = generalizedStresses[7]; - } else if (ijob == 7) { // SHELL_STRESS_BOTTOM_SURFACE - iValue(0, 0) = generalizedStresses(0) - - generalizedStresses(3); - iValue(1, 1) = generalizedStresses(1) - - generalizedStresses(4); - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = generalizedStresses[2] - - generalizedStresses[5]; - iValue(0, 2) = iValue(2, 0) = 0.0; - iValue(1, 2) = iValue(2, 1) = 0.0; - } else if (ijob == 8) { // SHELL_ORTHOTROPIC_STRESS_BOTTOM_SURFACE - iValue(0, 0) = - rlaminateStresses[rlaminateStresses.size() - 1][0]; - iValue(1, 1) = - rlaminateStresses[rlaminateStresses.size() - 1][1]; - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = - rlaminateStresses[rlaminateStresses.size() - 1][2]; - iValue(0, 2) = iValue(2, 0) = rlaminateStresses[rlaminateStresses.size() - 1][6]; - iValue(1, 2) = iValue(2, 1) = rlaminateStresses[rlaminateStresses.size() - 1][7]; - } else if (ijob == 9) { // SHELL_ORTHOTROPIC_STRESS_TOP_SURFACE - iValue(0, 0) = rlaminateStresses[0][0]; - iValue(1, 1) = rlaminateStresses[0][1]; - iValue(2, 2) = 0.0; - iValue(0, 1) = iValue(1, 0) = rlaminateStresses[0][2]; - iValue(0, 2) = iValue(2, 0) = rlaminateStresses[0][6]; - iValue(1, 2) = iValue(2, 1) = rlaminateStresses[0][7]; - } - - // if requested, rotate the results in the global coordinate system - if (bGlobal) { - const Matrix& RG = localCoordinateSystem.Orientation(); - noalias(aux33) = prod(trans(RG), iValue); - noalias(iValue) = prod(aux33, RG); - } - - } // Gauss Loop - - return true; -} - -template -ShellCrossSection::SectionBehaviorType ShellThickElement3D4N::GetSectionBehavior() const -{ - return ShellCrossSection::Thick; -} - - -// ===================================================================================== -// -// Class ShellThickElement3D4N - Serialization -// -// ===================================================================================== - -template -void ShellThickElement3D4N::save(Serializer& rSerializer) const -{ - KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, BaseType); - rSerializer.save("EAS", mEASStorage); -} - -template -void ShellThickElement3D4N::load(Serializer& rSerializer) -{ - KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, BaseType); - rSerializer.load("EAS", mEASStorage); -} - -template class ShellThickElement3D4N; -template class ShellThickElement3D4N; - -} diff --git a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.hpp b/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.hpp deleted file mode 100644 index d1d195b239db..000000000000 --- a/applications/StructuralMechanicsApplication/custom_elements/shell_elements/shell_thick_element_3D4N.hpp +++ /dev/null @@ -1,430 +0,0 @@ -// KRATOS ___| | | | -// \___ \ __| __| | | __| __| | | __| _` | | -// | | | | | ( | | | | ( | | -// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS -// -// License: BSD License -// license: StructuralMechanicsApplication/license.txt -// -// Main authors: Massimo Petracca -// - - -#pragma once - - -// System includes -#include - -// External includes - -// Project includes -#include "base_shell_element.h" -#include "custom_utilities/shell_utilities.h" -#include "custom_utilities/shellq4_corotational_coordinate_transformation.hpp" -#include "custom_utilities/shellq4_local_coordinate_system.hpp" - -namespace Kratos -{ -///@name Kratos Globals -///@{ -///@} - -///@name Type Definitions -///@{ -///@} - -///@name Enum's -///@{ -///@} - -///@name Functions -///@{ -///@} - -///@name Kratos Classes -///@{ - -/** \brief ShellThickElement3D4N - * - * This element represents a 4-node bilinear Shell element - * based on the Enhanced Assumed Strain Method (E.A.S.) for the membrane part - * and on the Mixed Interpolation of Tensorial Components (M.I.T.C.) - * for the transverse shear part. - * This element is formulated for small strains, - * but can be used in Geometrically nonlinear problems - * involving large displacements and rotations - * using a Corotational Coordinate Transformation. - * Material nonlinearity is handled by means of the cross section object. - */ - -template -class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ShellThickElement3D4N : - public BaseShellElement::type> -{ -public: - - ///@name Type Definitions - ///@{ - - KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ShellThickElement3D4N); - - using BaseType = BaseShellElement::type>; - - typedef Quaternion QuaternionType; - - using GeometryType = Element::GeometryType; - - using PropertiesType = Element::PropertiesType; - - using NodesArrayType = Element::NodesArrayType; - - using MatrixType = Element::MatrixType; - - using VectorType = Element::VectorType; - - using SizeType = Element::SizeType; - - using Element::GetGeometry; - - using Element::GetProperties; - - using Vector3Type = typename BaseType::Vector3Type; - - ///@} - - ///@name Classes - ///@{ - - /** \brief MITC4Params - * - * This class performs some operations and stores some data to compute - * the transverse shear contribution of the stiffness matrix using the - * M.I.T.C. formulation. - * - * References: - * - Dvorkin,Bathe, "A continuum mechanics based four node shell - * element for general nonlinear analysis", - * Eng.Comput.,vol. 1, 77-88, 1984 - * - Bathe, Dvorkin, "Short communication A four-node plate bending element - * based on Mindlin/Reissner plate theory and a Mixed Interpolation", - * International Journal for Numerical Methods in Eng., - * vol. 21, 367-383, 1985 - */ - struct MITC4Params { - - double Ax; - double Ay; - double Bx; - double By; - double Cx; - double Cy; - Matrix Transformation; - Matrix ShearStrains; - - MITC4Params(const ShellQ4_LocalCoordinateSystem& LCS); - - }; - - class EASOperator; // forward declaration - - /** \brief EASOperatorStorage - * - * This class is meant to store persistent data for the EAS calculations. - * This class is stored in the element and used by the EASOperator. - */ - class EASOperatorStorage - { - - public: - - friend class EASOperator; - - typedef Element::GeometryType GeometryType; - - public: - - EASOperatorStorage(); - - inline void Initialize(const GeometryType& geom); - - inline void InitializeSolutionStep(); - - inline void FinalizeSolutionStep(); - - inline void FinalizeNonLinearIteration(const Vector& displacementVector); - - private: - - array_1d alpha; /*!< (trial) vector containing the 5 enhanced strain parameters */ - array_1d alpha_converged; /*!< (converged) vector containing the 5 enhanced strain parameters */ - - array_1d displ; /*!< (trial) vector containing the displacement vector */ - array_1d displ_converged; /*!< (converged) vector containing the displacement vector */ - - array_1d residual; /*!< vector containing the 5 residuals for the 5 enhanced strain parameters */ - BoundedMatrix Hinv; /*!< 5x5 matrix that stores H^-1 */ - BoundedMatrix L; /*!< 5x24 coupling matrix */ - - bool mInitialized; /*!< Initialization flag */ - - private: - - friend class Serializer; - - virtual void save(Serializer& rSerializer) const; - - virtual void load(Serializer& rSerializer); - - }; - - /** \brief EASOperator - * - * This class performs some operations and stores some data to compute - * the membrane contribution of the stiffness matrix using the - * Enhanced Assumed Strain formulation. - * - * References: - * - J.C.Simo,M.S.Rifai, "A class of mixed assumed strain methods - * and the method of incompatible modes", - * International Journal for Numerical Methods in Eng., - * vol. 29, 1595-1638, 1990 - */ - class EASOperator - { - - public: - - /** - * Constructor - */ - EASOperator(const ShellQ4_LocalCoordinateSystem& LCS, EASOperatorStorage& storage); - - public: - - /** - * this method should be called in the Gauss Loop - * after the standard strain-displacement matrix has been computed, as well as the standard - * generalized strains, but before the computation of the constitutive laws. - */ - inline void GaussPointComputation_Step1(double xi, double eta, const ShellUtilities::JacobianOperator& jac, - Vector& generalizedStrains, - EASOperatorStorage& storage); - - /** - * this method should be called in the Gauss Loop - * after the standard computation of the constitutive laws. - * note: - * the input algorithmic tangent and generalized stress vector are assumed to be already multiplied - * by the integration weight, and their size is assumed to be those of a standard shell element - * (i.e. algorithmicTangent(8x8), generalizedStresses(8x1)) - */ - inline void GaussPointComputation_Step2(const Matrix& D, - const Matrix& B, - const Vector& S, - EASOperatorStorage& storage); - - /** - * this method should be called at the end of the Gauss Loop, - * when the integration is terminated, but before transforming everything - * to the global system: Here we are still operating in the element local - * coordinate system. - */ - inline void ComputeModfiedTangentAndResidual(Matrix& rLeftHandSideMatrix, - Vector& rRightHandSideVector, - EASOperatorStorage& storage); - - private: - - Matrix mF0inv; /*!< 3x3 inverse deformation matrix at the element center */ - double mJ0; /*!< determinant of the jacobian at the element center */ - Vector mEnhancedStrains; /*!< vector of 3 enhanced strains [e.xx, e.yy, 2e.xy] */ - Matrix mG; /*!< 3x5 interpolation matrix in cartesian coordinates */ - }; - - ///@} - - ///@name Life Cycle - ///@{ - - ShellThickElement3D4N(IndexType NewId, - GeometryType::Pointer pGeometry); - - ShellThickElement3D4N(IndexType NewId, - GeometryType::Pointer pGeometry, - PropertiesType::Pointer pProperties); - - ~ShellThickElement3D4N() override = default; - - ///@} - - ///@name Operations - ///@{ - - // Basic - - /** - * @brief Creates a new element - * @param NewId The Id of the new created element - * @param pGeom The pointer to the geometry of the element - * @param pProperties The pointer to property - * @return The pointer to the created element - */ - Element::Pointer Create( - IndexType NewId, - GeometryType::Pointer pGeom, - PropertiesType::Pointer pProperties - ) const override; - - /** - * @brief Creates a new element - * @param NewId The Id of the new created element - * @param ThisNodes The array containing nodes - * @param pProperties The pointer to property - * @return The pointer to the created element - */ - Element::Pointer Create( - IndexType NewId, - NodesArrayType const& ThisNodes, - PropertiesType::Pointer pProperties - ) const override; - - void Initialize(const ProcessInfo& rCurrentProcessInfo) override; - - void FinalizeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo) override; - - void InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override; - - void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override; - - // More results calculation on integration points to interface with python - - using BaseType::CalculateOnIntegrationPoints; - - void CalculateOnIntegrationPoints(const Variable& rVariable, - std::vector& rOutput, const ProcessInfo& rCurrentProcessInfo) override; - - void CalculateOnIntegrationPoints(const Variable& rVariable, - std::vector& rOutput, const ProcessInfo& rCurrentProcessInfo) override; - - /** - * This method provides the place to perform checks on the completeness of the input - * and the compatibility with the problem options as well as the contitutive laws selected - * It is designed to be called only once (or anyway, not often) typically at the beginning - * of the calculations, so to verify that nothing is missing from the input - * or that no common error is found. - * @param rCurrentProcessInfo - * this method is: MANDATORY - */ - int Check(const ProcessInfo& rCurrentProcessInfo) const override; - - - ///@} - - ///@name Public specialized Access - Temporary - ///@{ - - ///@} - -protected: - - ///@name Protected Lyfe Cycle - ///@{ - - /** - * Protected empty constructor - */ - ShellThickElement3D4N() : BaseType() - { - } - - ///@} - -private: - - ///@name Private Operations - ///@{ - - void CalculateStressesFromForceResultants(VectorType& rstresses, - const double& rthickness); - - void CalculateLaminaStrains(ShellCrossSection::Pointer& section, const Vector& generalizedStrains, std::vector& rlaminateStrains); - - void CalculateLaminaStresses(ShellCrossSection::Pointer& section, ShellCrossSection::SectionParameters parameters, const std::vector& rlaminateStrains, std::vector& rlaminateStresses); - - double CalculateTsaiWuPlaneStress(const std::vector& rlaminateStresses, const Matrix& rLamina_Strengths, const unsigned int& rCurrent_Ply); - - void CalculateVonMisesStress(const Vector& generalizedStresses, - const Variable& rVariable, double& rVon_Mises_Result); - - void CheckGeneralizedStressOrStrainOutput(const Variable& rVariable, - int& iJob, bool& bGlobal); - - double CalculateStenbergShearStabilization(const ShellQ4_LocalCoordinateSystem& refCoordinateSystem, const double& meanThickness); - - void CalculateBMatrix(double xi, double eta, - const ShellUtilities::JacobianOperator& Jac, const MITC4Params& params, - const Vector& N, - Matrix& B, Vector& Bdrill); - - void CalculateAll(MatrixType& rLeftHandSideMatrix, - VectorType& rRightHandSideVector, - const ProcessInfo& rCurrentProcessInfo, - const bool CalculateStiffnessMatrixFlag, - const bool CalculateResidualVectorFlag) override; - - void AddBodyForces(const array_1d& dA, VectorType& rRightHandSideVector); - - bool TryCalculateOnIntegrationPoints_GeneralizedStrainsOrStresses(const Variable& rVariable, - std::vector& rValues, - const ProcessInfo& rCurrentProcessInfo); - - /** - * Returns the behavior of this shell (thin/thick) - * @return the shell behavior - */ - ShellCrossSection::SectionBehaviorType GetSectionBehavior() const override; - - ///@} - - ///@name Static Member Variables - ///@{ - ///@} - - ///@name Member Variables - ///@{ - - EASOperatorStorage mEASStorage; /*!< The storage instance for the EAS Operator */ - - ///@} - - ///@name Serialization - ///@{ - - friend class Serializer; - - void save(Serializer& rSerializer) const override; - - void load(Serializer& rSerializer) override; - - ///@} - - ///@name Private Access - ///@{ - ///@} - - ///@name Private Inquiry - ///@{ - ///@} - - ///@name Un accessible methods - ///@{ - ///@} - -}; - -} diff --git a/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp b/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp index c134b05ca136..7a10ec77468c 100644 --- a/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp +++ b/applications/StructuralMechanicsApplication/custom_python/add_custom_constitutive_laws_to_python.cpp @@ -27,6 +27,7 @@ #include "custom_constitutive/user_provided_linear_elastic_law.h" #include "custom_constitutive/timoshenko_beam_elastic_constitutive_law.h" #include "custom_constitutive/timoshenko_plane_strain_beam_elastic_constitutive_law.h" +#include "custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h" namespace Kratos::Python { @@ -74,6 +75,10 @@ void AddCustomConstitutiveLawsToPython(pybind11::module& m) py::class_< TimoshenkoBeamPlaneStrainElasticConstitutiveLaw, typename TimoshenkoBeamPlaneStrainElasticConstitutiveLaw::Pointer, ConstitutiveLaw > (m, "TimoshenkoBeamPlaneStrainElasticConstitutiveLaw").def(py::init<>() ) ; + + py::class_< ReissnerMindlinShellElasticConstitutiveLaw, typename ReissnerMindlinShellElasticConstitutiveLaw::Pointer, ConstitutiveLaw > + (m, "ReissnerMindlinShellElasticConstitutiveLaw").def(py::init<>() ) + ; } } // namespace Kratos::Python. diff --git a/applications/StructuralMechanicsApplication/custom_utilities/constitutive_law_utilities.cpp b/applications/StructuralMechanicsApplication/custom_utilities/constitutive_law_utilities.cpp index abe5ba8336cc..8a162f5497d2 100644 --- a/applications/StructuralMechanicsApplication/custom_utilities/constitutive_law_utilities.cpp +++ b/applications/StructuralMechanicsApplication/custom_utilities/constitutive_law_utilities.cpp @@ -231,7 +231,7 @@ void ConstitutiveLawUtilities::CalculateRotationOperatorVoigt( rVoigtOperator(1, 2) = -c_times_s; rVoigtOperator(2, 0) = -2.0 * c * s; - rVoigtOperator(2, 1) = 2.0 * c * s; + rVoigtOperator(2, 1) = -rVoigtOperator(2, 0); rVoigtOperator(2, 2) = c_square - s_square; } else { const double l1 = rEulerOperator(0, 0); diff --git a/applications/StructuralMechanicsApplication/custom_utilities/structural_mechanics_element_utilities.cpp b/applications/StructuralMechanicsApplication/custom_utilities/structural_mechanics_element_utilities.cpp index be68c6716827..4115b6da283b 100644 --- a/applications/StructuralMechanicsApplication/custom_utilities/structural_mechanics_element_utilities.cpp +++ b/applications/StructuralMechanicsApplication/custom_utilities/structural_mechanics_element_utilities.cpp @@ -204,13 +204,12 @@ void CalculateRayleighDampingMatrix( const double alpha = GetRayleighAlpha(rElement.GetProperties(), rCurrentProcessInfo); const double beta = GetRayleighBeta(rElement.GetProperties(), rCurrentProcessInfo); - if (std::abs(alpha) < 1E-12 && std::abs(beta) < 1E-12) { - // no damping specified, only setting the matrix to zero - if (rDampingMatrix.size1() != MatrixSize || rDampingMatrix.size2() != MatrixSize) { - rDampingMatrix.resize(MatrixSize, MatrixSize, false); - } - noalias(rDampingMatrix) = ZeroMatrix(MatrixSize, MatrixSize); - } else if (std::abs(alpha) > 1E-12 && std::abs(beta) < 1E-12) { + if (rDampingMatrix.size1() != MatrixSize || rDampingMatrix.size2() != MatrixSize) { + rDampingMatrix.resize(MatrixSize, MatrixSize, false); + } + rDampingMatrix.clear(); + + if (std::abs(alpha) > 1E-12 && std::abs(beta) < 1E-12) { // damping only required with the mass matrix rElement.CalculateMassMatrix(rDampingMatrix, rCurrentProcessInfo); // pass damping matrix to avoid creating a temporary rDampingMatrix *= alpha; diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp b/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp index 5abad476935f..5ef2b372efc6 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application.cpp @@ -83,14 +83,19 @@ KratosStructuralMechanicsApplication::KratosStructuralMechanicsApplication() mLinearTimoshenkoCurvedBeamElement3D3N(0, Element::GeometryType::Pointer(new Line3D3(Element::GeometryType::PointsArrayType(3)))), // Adding the shells elements mIsotropicShellElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), + mMITCThickShellElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), + mMITCThickShellCorotationalElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), + // deprecated names mShellThickElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), mShellThickCorotationalElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), + mShellThinCorotationalElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), mShellThinElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), mShellThinCorotationalElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), mShellThickCorotationalElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), mCSDSG3ThickShellLinearElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), mCSDSG3ThickShellCorotationalElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), + // Adding the membrane elements mMembraneElement3D4N(0, Element::GeometryType::Pointer(new Quadrilateral3D4(Element::GeometryType::PointsArrayType(4)))), mMembraneElement3D3N(0, Element::GeometryType::Pointer(new Triangle3D3(Element::GeometryType::PointsArrayType(3)))), @@ -588,12 +593,18 @@ void KratosStructuralMechanicsApplication::Register() { //Register the shells elements KRATOS_REGISTER_ELEMENT("IsotropicShellElement3D3N", mIsotropicShellElement3D3N) - KRATOS_REGISTER_ELEMENT("ShellThickElement3D4N", mShellThickElement3D4N) - KRATOS_REGISTER_ELEMENT("ShellThickElementCorotational3D4N", mShellThickCorotationalElement3D4N) + KRATOS_REGISTER_ELEMENT("MITCThickShellElement3D4N", mMITCThickShellElement3D4N) + KRATOS_REGISTER_ELEMENT("MITCThickShellCorotationalElement3D4N", mMITCThickShellCorotationalElement3D4N) + + // deprecated names + KRATOS_REGISTER_ELEMENT("ShellThickElement3D4N", mShellThickElement3D4N) // It uses MITC + KRATOS_REGISTER_ELEMENT("ShellThickCorotationalElement3D4N", mShellThickCorotationalElement3D4N) // It uses MITC + KRATOS_REGISTER_ELEMENT("ShellThinElementCorotational3D4N", mShellThinCorotationalElement3D4N) KRATOS_REGISTER_ELEMENT("ShellThinElement3D3N", mShellThinElement3D3N) KRATOS_REGISTER_ELEMENT("ShellThickElementCorotational3D3N", mShellThickCorotationalElement3D3N) KRATOS_REGISTER_ELEMENT("ShellThinElementCorotational3D3N", mShellThinCorotationalElement3D3N) + KRATOS_REGISTER_ELEMENT("CSDSG3ThickShellLinearElement3D3N", mCSDSG3ThickShellLinearElement3D3N) KRATOS_REGISTER_ELEMENT("CSDSG3ThickShellCorotationalElement3D3N", mCSDSG3ThickShellCorotationalElement3D3N) diff --git a/applications/StructuralMechanicsApplication/structural_mechanics_application.h b/applications/StructuralMechanicsApplication/structural_mechanics_application.h index f2a7b67d0e3b..ac1d5ea34c7e 100644 --- a/applications/StructuralMechanicsApplication/structural_mechanics_application.h +++ b/applications/StructuralMechanicsApplication/structural_mechanics_application.h @@ -56,13 +56,12 @@ #include "custom_elements/shell_elements/isotropic_shell_element.hpp" #include "custom_elements/membrane_elements/membrane_element.hpp" #include "custom_elements/membrane_elements/membrane_element_2D2N.h" -#include "custom_elements/shell_elements/shell_thick_element_3D4N.hpp" +#include "custom_elements/shell_elements/mitc_thick_shell_element_3D4N.hpp" #include "custom_elements/shell_elements/shell_thin_element_3D4N.hpp" #include "custom_elements/shell_elements/shell_thin_element_3D3N.hpp" #include "custom_elements/shell_elements/shell_thick_element_3D3N.hpp" #include "custom_elements/shell_elements/cs_dsg3_thick_shell_element_3D3N.h" - /* Adding the bushing element */ #include "custom_elements/nodal_elements/bushing_element.h" @@ -303,12 +302,18 @@ class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) KratosStructuralMechanicsAppl // Adding the shells elements const IsotropicShellElement mIsotropicShellElement3D3N; - const ShellThickElement3D4N mShellThickElement3D4N; - const ShellThickElement3D4N mShellThickCorotationalElement3D4N; - const ShellThinElement3D4N mShellThinCorotationalElement3D4N; - const ShellThinElement3D3N mShellThinElement3D3N; - const ShellThinElement3D3N mShellThinCorotationalElement3D3N; + const MITCThickShellElement3D4N mMITCThickShellElement3D4N; + const MITCThickShellElement3D4N mMITCThickShellCorotationalElement3D4N; + + // deprecated + const MITCThickShellElement3D4N mShellThickElement3D4N; + const MITCThickShellElement3D4N mShellThickCorotationalElement3D4N; + + const ShellThinElement3D4N mShellThinCorotationalElement3D4N; + const ShellThinElement3D3N mShellThinElement3D3N; + const ShellThinElement3D3N mShellThinCorotationalElement3D3N; const ShellThickElement3D3N mShellThickCorotationalElement3D3N; + const CSDSG3ThickShellElement3D3N mCSDSG3ThickShellLinearElement3D3N; const CSDSG3ThickShellElement3D3N mCSDSG3ThickShellCorotationalElement3D3N; diff --git a/applications/StructuralMechanicsApplication/tests/InitialStateElasticity/initial_strain_shell_Q4_thick_test.mdpa b/applications/StructuralMechanicsApplication/tests/InitialStateElasticity/initial_strain_shell_Q4_thick_test.mdpa index 5fe1775d3401..de773a2bc1f2 100644 --- a/applications/StructuralMechanicsApplication/tests/InitialStateElasticity/initial_strain_shell_Q4_thick_test.mdpa +++ b/applications/StructuralMechanicsApplication/tests/InitialStateElasticity/initial_strain_shell_Q4_thick_test.mdpa @@ -11,7 +11,7 @@ Begin Nodes 4 0.0500000000 0.0000000000 0.0000000000 End Nodes -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Slab +Begin Elements MITCThickShellCorotationalElement3D4N // GUI group identifier: Slab 1 0 4 2 1 3 End Elements diff --git a/applications/StructuralMechanicsApplication/tests/cpp_tests/test_shells_matrices.cpp b/applications/StructuralMechanicsApplication/tests/cpp_tests/test_shells_matrices.cpp index 42059bdd99a2..8ecc9219e94f 100644 --- a/applications/StructuralMechanicsApplication/tests/cpp_tests/test_shells_matrices.cpp +++ b/applications/StructuralMechanicsApplication/tests/cpp_tests/test_shells_matrices.cpp @@ -23,6 +23,7 @@ #include "includes/debug_helpers.h" #include "structural_mechanics_application_variables.h" #include "custom_constitutive/linear_plane_strain.h" +#include "custom_constitutive/reissner_mindlin_shell_elastic_constitutive_law.h" namespace Kratos { @@ -66,8 +67,11 @@ void CreateShellTestModelPart(std::string const& rElementName, ModelPart& rModel r_node.AddDof(ROTATION_Y); r_node.AddDof(ROTATION_Z); } - - (*p_prop)[CONSTITUTIVE_LAW] = LinearPlaneStrain::Pointer(new LinearPlaneStrain()); + if (rElementName == "MITCThickShellElement3D4N") { + (*p_prop)[CONSTITUTIVE_LAW] = ReissnerMindlinShellElasticConstitutiveLaw::Pointer(new ReissnerMindlinShellElasticConstitutiveLaw()); + } else { + (*p_prop)[CONSTITUTIVE_LAW] = LinearPlaneStrain::Pointer(new LinearPlaneStrain()); + } (*p_prop)[DENSITY] = 1000.0; (*p_prop)[YOUNG_MODULUS] = 1400000.0; (*p_prop)[THICKNESS] = 0.1; @@ -177,7 +181,7 @@ KRATOS_TEST_CASE_IN_SUITE(ShellElementCorotational_4N_LumpedMassMatrix, KratosSt ref_mass_matrix(idx+2, idx+2) = ref_val; } - ConductShellMassMatrixTest("ShellThickElementCorotational3D4N", ref_mass_matrix, true); + ConductShellMassMatrixTest("MITCThickShellElement3D4N", ref_mass_matrix, true); ConductShellMassMatrixTest("ShellThinElementCorotational3D4N", ref_mass_matrix, true); } @@ -247,7 +251,7 @@ KRATOS_TEST_CASE_IN_SUITE(ShellElementCorotational_4N_ConsistentMassMatrix, Krat ref_mass_matrix(22,16)=0.01851851851852; ref_mass_matrix(22,22)=0.03703703703704; ref_mass_matrix(23,5)=0.01851851851852; ref_mass_matrix(23,11)=0.009259259259259; ref_mass_matrix(23,17)=0.01851851851852; ref_mass_matrix(23,23)=0.03703703703704; - ConductShellMassMatrixTest("ShellThickElementCorotational3D4N", ref_mass_matrix, false); + ConductShellMassMatrixTest("MITCThickShellElement3D4N", ref_mass_matrix, false); ConductShellMassMatrixTest("ShellThinElementCorotational3D4N", ref_mass_matrix, false); } @@ -362,109 +366,132 @@ KRATOS_TEST_CASE_IN_SUITE(ShellThinElementCorotational3D3N_DampingMatrix, Kratos } -KRATOS_TEST_CASE_IN_SUITE(ShellThickElementCorotational3D4N_DampingMatrix, KratosStructuralMechanicsFastSuite) +KRATOS_TEST_CASE_IN_SUITE(MITCThickShellCorotationalElement3D4N_DampingMatrix, KratosStructuralMechanicsFastSuite) { Matrix ref_damping_matrix(24, 24); ref_damping_matrix = ZeroMatrix(24,24); - ref_damping_matrix(0,0)=2338.538461538; ref_damping_matrix(0,1)=908.6538461538; ref_damping_matrix(0,5)=-269.2307692308; - ref_damping_matrix(0,6)=-1326.923076923; ref_damping_matrix(0,7)=302.8846153846; ref_damping_matrix(0,11)=-134.6153846154; - ref_damping_matrix(0,12)=-1500; ref_damping_matrix(0,13)=-908.6538461538; ref_damping_matrix(0,17)=-134.6153846154; - ref_damping_matrix(0,18)=490.3846153846; ref_damping_matrix(0,19)=-302.8846153846; ref_damping_matrix(0,23)=-269.2307692308; - ref_damping_matrix(1,0)=908.6538461538; ref_damping_matrix(1,1)=2338.538461538; ref_damping_matrix(1,5)=269.2307692308; - ref_damping_matrix(1,6)=-302.8846153846; ref_damping_matrix(1,7)=490.3846153846; ref_damping_matrix(1,11)=269.2307692308; - ref_damping_matrix(1,12)=-908.6538461538; ref_damping_matrix(1,13)=-1500; ref_damping_matrix(1,17)=134.6153846154; - ref_damping_matrix(1,18)=302.8846153846; ref_damping_matrix(1,19)=-1326.923076923; ref_damping_matrix(1,23)=134.6153846154; - ref_damping_matrix(2,2)=23.88868042527; ref_damping_matrix(2,3)=10.94434021263; ref_damping_matrix(2,4)=-10.94434021263; - ref_damping_matrix(2,8)=-5.472170106316; ref_damping_matrix(2,9)=5.472170106316; ref_damping_matrix(2,10)=-10.94434021263; - ref_damping_matrix(2,14)=-10.94434021263; ref_damping_matrix(2,15)=5.472170106316; ref_damping_matrix(2,16)=-5.472170106316; - ref_damping_matrix(2,20)=-5.472170106316; ref_damping_matrix(2,21)=10.94434021263; ref_damping_matrix(2,22)=-5.472170106316; - ref_damping_matrix(3,2)=10.94434021263; ref_damping_matrix(3,3)=12.96357098186; ref_damping_matrix(3,4)=-0.8413461538462; - ref_damping_matrix(3,8)=5.472170106316; ref_damping_matrix(3,9)=5.808708567855; ref_damping_matrix(3,10)=0.1682692307692; - ref_damping_matrix(3,14)=-5.472170106316; ref_damping_matrix(3,15)=4.462554721701; ref_damping_matrix(3,16)=0.8413461538462; - ref_damping_matrix(3,20)=-10.94434021263; ref_damping_matrix(3,21)=9.598186366479; ref_damping_matrix(3,22)=-0.1682692307692; - ref_damping_matrix(4,2)=-10.94434021263; ref_damping_matrix(4,3)=-0.8413461538462; ref_damping_matrix(4,4)=12.96357098186; - ref_damping_matrix(4,8)=10.94434021263; ref_damping_matrix(4,9)=-0.1682692307692; ref_damping_matrix(4,10)=9.598186366479; - ref_damping_matrix(4,14)=5.472170106316; ref_damping_matrix(4,15)=0.8413461538462; ref_damping_matrix(4,16)=4.462554721701; - ref_damping_matrix(4,20)=-5.472170106316; ref_damping_matrix(4,21)=0.1682692307692; ref_damping_matrix(4,22)=5.808708567855; - ref_damping_matrix(5,0)=-269.2307692308; ref_damping_matrix(5,1)=269.2307692308; ref_damping_matrix(5,5)=717.9487179487; - ref_damping_matrix(5,6)=-134.6153846154; ref_damping_matrix(5,7)=-269.2307692308; ref_damping_matrix(5,11)=358.9743589744; - ref_damping_matrix(5,12)=134.6153846154; ref_damping_matrix(5,13)=-134.6153846154; ref_damping_matrix(5,17)=179.4871794872; - ref_damping_matrix(5,18)=269.2307692308; ref_damping_matrix(5,19)=134.6153846154; ref_damping_matrix(5,23)=358.9743589744; - ref_damping_matrix(6,0)=-1326.923076923; ref_damping_matrix(6,1)=-302.8846153846; ref_damping_matrix(6,5)=-134.6153846154; - ref_damping_matrix(6,6)=2338.538461538; ref_damping_matrix(6,7)=-908.6538461538; ref_damping_matrix(6,11)=-269.2307692308; - ref_damping_matrix(6,12)=490.3846153846; ref_damping_matrix(6,13)=302.8846153846; ref_damping_matrix(6,17)=-269.2307692308; - ref_damping_matrix(6,18)=-1500; ref_damping_matrix(6,19)=908.6538461538; ref_damping_matrix(6,23)=-134.6153846154; - ref_damping_matrix(7,0)=302.8846153846; ref_damping_matrix(7,1)=490.3846153846; ref_damping_matrix(7,5)=-269.2307692308; - ref_damping_matrix(7,6)=-908.6538461538; ref_damping_matrix(7,7)=2338.538461538; ref_damping_matrix(7,11)=-269.2307692308; - ref_damping_matrix(7,12)=-302.8846153846; ref_damping_matrix(7,13)=-1326.923076923; ref_damping_matrix(7,17)=-134.6153846154; - ref_damping_matrix(7,18)=908.6538461538; ref_damping_matrix(7,19)=-1500; ref_damping_matrix(7,23)=-134.6153846154; - ref_damping_matrix(8,2)=-5.472170106316; ref_damping_matrix(8,3)=5.472170106316; ref_damping_matrix(8,4)=10.94434021263; - ref_damping_matrix(8,8)=23.88868042527; ref_damping_matrix(8,9)=10.94434021263; ref_damping_matrix(8,10)=10.94434021263; - ref_damping_matrix(8,14)=-5.472170106316; ref_damping_matrix(8,15)=10.94434021263; ref_damping_matrix(8,16)=5.472170106316; - ref_damping_matrix(8,20)=-10.94434021263; ref_damping_matrix(8,21)=5.472170106316; ref_damping_matrix(8,22)=5.472170106316; - ref_damping_matrix(9,2)=5.472170106316; ref_damping_matrix(9,3)=5.808708567855; ref_damping_matrix(9,4)=-0.1682692307692; - ref_damping_matrix(9,8)=10.94434021263; ref_damping_matrix(9,9)=12.96357098186; ref_damping_matrix(9,10)=0.8413461538462; - ref_damping_matrix(9,14)=-10.94434021263; ref_damping_matrix(9,15)=9.598186366479; ref_damping_matrix(9,16)=0.1682692307692; - ref_damping_matrix(9,20)=-5.472170106316; ref_damping_matrix(9,21)=4.462554721701; ref_damping_matrix(9,22)=-0.8413461538462; - ref_damping_matrix(10,2)=-10.94434021263; ref_damping_matrix(10,3)=0.1682692307692; ref_damping_matrix(10,4)=9.598186366479; - ref_damping_matrix(10,8)=10.94434021263; ref_damping_matrix(10,9)=0.8413461538462; ref_damping_matrix(10,10)=12.96357098186; - ref_damping_matrix(10,14)=5.472170106316; ref_damping_matrix(10,15)=-0.1682692307692; ref_damping_matrix(10,16)=5.808708567855; - ref_damping_matrix(10,20)=-5.472170106316; ref_damping_matrix(10,21)=-0.8413461538462; ref_damping_matrix(10,22)=4.462554721701; - ref_damping_matrix(11,0)=-134.6153846154; ref_damping_matrix(11,1)=269.2307692308; ref_damping_matrix(11,5)=358.9743589744; - ref_damping_matrix(11,6)=-269.2307692308; ref_damping_matrix(11,7)=-269.2307692308; ref_damping_matrix(11,11)=717.9487179487; - ref_damping_matrix(11,12)=269.2307692308; ref_damping_matrix(11,13)=-134.6153846154; ref_damping_matrix(11,17)=358.9743589744; - ref_damping_matrix(11,18)=134.6153846154; ref_damping_matrix(11,19)=134.6153846154; ref_damping_matrix(11,23)=179.4871794872; - ref_damping_matrix(12,0)=-1500; ref_damping_matrix(12,1)=-908.6538461538; ref_damping_matrix(12,5)=134.6153846154; - ref_damping_matrix(12,6)=490.3846153846; ref_damping_matrix(12,7)=-302.8846153846; ref_damping_matrix(12,11)=269.2307692308; - ref_damping_matrix(12,12)=2338.538461538; ref_damping_matrix(12,13)=908.6538461538; ref_damping_matrix(12,17)=269.2307692308; - ref_damping_matrix(12,18)=-1326.923076923; ref_damping_matrix(12,19)=302.8846153846; ref_damping_matrix(12,23)=134.6153846154; - ref_damping_matrix(13,0)=-908.6538461538; ref_damping_matrix(13,1)=-1500; ref_damping_matrix(13,5)=-134.6153846154; - ref_damping_matrix(13,6)=302.8846153846; ref_damping_matrix(13,7)=-1326.923076923; ref_damping_matrix(13,11)=-134.6153846154; - ref_damping_matrix(13,12)=908.6538461538; ref_damping_matrix(13,13)=2338.538461538; ref_damping_matrix(13,17)=-269.2307692308; - ref_damping_matrix(13,18)=-302.8846153846; ref_damping_matrix(13,19)=490.3846153846; ref_damping_matrix(13,23)=-269.2307692308; - ref_damping_matrix(14,2)=-10.94434021263; ref_damping_matrix(14,3)=-5.472170106316; ref_damping_matrix(14,4)=5.472170106316; - ref_damping_matrix(14,8)=-5.472170106316; ref_damping_matrix(14,9)=-10.94434021263; ref_damping_matrix(14,10)=5.472170106316; - ref_damping_matrix(14,14)=23.88868042527; ref_damping_matrix(14,15)=-10.94434021263; ref_damping_matrix(14,16)=10.94434021263; - ref_damping_matrix(14,20)=-5.472170106316; ref_damping_matrix(14,21)=-5.472170106316; ref_damping_matrix(14,22)=10.94434021263; - ref_damping_matrix(15,2)=5.472170106316; ref_damping_matrix(15,3)=4.462554721701; ref_damping_matrix(15,4)=0.8413461538462; - ref_damping_matrix(15,8)=10.94434021263; ref_damping_matrix(15,9)=9.598186366479; ref_damping_matrix(15,10)=-0.1682692307692; - ref_damping_matrix(15,14)=-10.94434021263; ref_damping_matrix(15,15)=12.96357098186; ref_damping_matrix(15,16)=-0.8413461538462; - ref_damping_matrix(15,20)=-5.472170106316; ref_damping_matrix(15,21)=5.808708567855; ref_damping_matrix(15,22)=0.1682692307692; - ref_damping_matrix(16,2)=-5.472170106316; ref_damping_matrix(16,3)=0.8413461538462; ref_damping_matrix(16,4)=4.462554721701; - ref_damping_matrix(16,8)=5.472170106316; ref_damping_matrix(16,9)=0.1682692307692; ref_damping_matrix(16,10)=5.808708567855; - ref_damping_matrix(16,14)=10.94434021263; ref_damping_matrix(16,15)=-0.8413461538462; ref_damping_matrix(16,16)=12.96357098186; - ref_damping_matrix(16,20)=-10.94434021263; ref_damping_matrix(16,21)=-0.1682692307692; ref_damping_matrix(16,22)=9.598186366479; - ref_damping_matrix(17,0)=-134.6153846154; ref_damping_matrix(17,1)=134.6153846154; ref_damping_matrix(17,5)=179.4871794872; - ref_damping_matrix(17,6)=-269.2307692308; ref_damping_matrix(17,7)=-134.6153846154; ref_damping_matrix(17,11)=358.9743589744; - ref_damping_matrix(17,12)=269.2307692308; ref_damping_matrix(17,13)=-269.2307692308; ref_damping_matrix(17,17)=717.9487179487; - ref_damping_matrix(17,18)=134.6153846154; ref_damping_matrix(17,19)=269.2307692308; ref_damping_matrix(17,23)=358.9743589744; - ref_damping_matrix(18,0)=490.3846153846; ref_damping_matrix(18,1)=302.8846153846; ref_damping_matrix(18,5)=269.2307692308; - ref_damping_matrix(18,6)=-1500; ref_damping_matrix(18,7)=908.6538461538; ref_damping_matrix(18,11)=134.6153846154; - ref_damping_matrix(18,12)=-1326.923076923; ref_damping_matrix(18,13)=-302.8846153846; ref_damping_matrix(18,17)=134.6153846154; - ref_damping_matrix(18,18)=2338.538461538; ref_damping_matrix(18,19)=-908.6538461538; ref_damping_matrix(18,23)=269.2307692308; - ref_damping_matrix(19,0)=-302.8846153846; ref_damping_matrix(19,1)=-1326.923076923; ref_damping_matrix(19,5)=134.6153846154; - ref_damping_matrix(19,6)=908.6538461538; ref_damping_matrix(19,7)=-1500; ref_damping_matrix(19,11)=134.6153846154; - ref_damping_matrix(19,12)=302.8846153846; ref_damping_matrix(19,13)=490.3846153846; ref_damping_matrix(19,17)=269.2307692308; - ref_damping_matrix(19,18)=-908.6538461538; ref_damping_matrix(19,19)=2338.538461538; ref_damping_matrix(19,23)=269.2307692308; - ref_damping_matrix(20,2)=-5.472170106316; ref_damping_matrix(20,3)=-10.94434021263; ref_damping_matrix(20,4)=-5.472170106316; - ref_damping_matrix(20,8)=-10.94434021263; ref_damping_matrix(20,9)=-5.472170106316; ref_damping_matrix(20,10)=-5.472170106316; - ref_damping_matrix(20,14)=-5.472170106316; ref_damping_matrix(20,15)=-5.472170106316; ref_damping_matrix(20,16)=-10.94434021263; - ref_damping_matrix(20,20)=23.88868042527; ref_damping_matrix(20,21)=-10.94434021263; ref_damping_matrix(20,22)=-10.94434021263; - ref_damping_matrix(21,2)=10.94434021263; ref_damping_matrix(21,3)=9.598186366479; ref_damping_matrix(21,4)=0.1682692307692; - ref_damping_matrix(21,8)=5.472170106316; ref_damping_matrix(21,9)=4.462554721701; ref_damping_matrix(21,10)=-0.8413461538462; - ref_damping_matrix(21,14)=-5.472170106316; ref_damping_matrix(21,15)=5.808708567855; ref_damping_matrix(21,16)=-0.1682692307692; - ref_damping_matrix(21,20)=-10.94434021263; ref_damping_matrix(21,21)=12.96357098186; ref_damping_matrix(21,22)=0.8413461538462; - ref_damping_matrix(22,2)=-5.472170106316; ref_damping_matrix(22,3)=-0.1682692307692; ref_damping_matrix(22,4)=5.808708567855; - ref_damping_matrix(22,8)=5.472170106316; ref_damping_matrix(22,9)=-0.8413461538462; ref_damping_matrix(22,10)=4.462554721701; - ref_damping_matrix(22,14)=10.94434021263; ref_damping_matrix(22,15)=0.1682692307692; ref_damping_matrix(22,16)=9.598186366479; - ref_damping_matrix(22,20)=-10.94434021263; ref_damping_matrix(22,21)=0.8413461538462; ref_damping_matrix(22,22)=12.96357098186; - ref_damping_matrix(23,0)=-269.2307692308; ref_damping_matrix(23,1)=134.6153846154; ref_damping_matrix(23,5)=358.9743589744; - ref_damping_matrix(23,6)=-134.6153846154; ref_damping_matrix(23,7)=-134.6153846154; ref_damping_matrix(23,11)=179.4871794872; - ref_damping_matrix(23,12)=134.6153846154; ref_damping_matrix(23,13)=-269.2307692308; ref_damping_matrix(23,17)=358.9743589744; - ref_damping_matrix(23,18)=269.2307692308; ref_damping_matrix(23,19)=269.2307692308; ref_damping_matrix(23,23)=717.9487179487; - - ConductShellDampingMatrixTest("ShellThickElementCorotational3D4N", ref_damping_matrix); +ref_damping_matrix(0,0)=1923.1538461538; ref_damping_matrix(0,1)=739.9038461538; ref_damping_matrix(0,5)=-26.9230769231; + ref_damping_matrix(0,6)=-1093.2692307692; ref_damping_matrix(0,7)=-47.5961538462; ref_damping_matrix(0,11)=-13.4615384615; + ref_damping_matrix(0,12)=-1214.4230769231; ref_damping_matrix(0,13)=-739.9038461538; ref_damping_matrix(0,17)=-13.4615384615; + ref_damping_matrix(0,18)=386.5384615385; ref_damping_matrix(0,19)=47.5961538462; ref_damping_matrix(0,23)=-26.9230769231; + + ref_damping_matrix(1,0)=739.9038461538; ref_damping_matrix(1,1)=1923.1538461538; ref_damping_matrix(1,5)=26.9230769231; + ref_damping_matrix(1,6)=47.5961538462; ref_damping_matrix(1,7)=386.5384615385; ref_damping_matrix(1,11)=26.9230769231; + ref_damping_matrix(1,12)=-739.9038461538; ref_damping_matrix(1,13)=-1214.4230769231; ref_damping_matrix(1,17)=13.4615384615; + ref_damping_matrix(1,18)=-47.5961538462; ref_damping_matrix(1,19)=-1093.2692307692; ref_damping_matrix(1,23)=13.4615384615; + + ref_damping_matrix(2,2)=23.8886804253; ref_damping_matrix(2,3)=10.9443402126; ref_damping_matrix(2,4)=-10.9443402126; + ref_damping_matrix(2,8)=-5.4721701063; ref_damping_matrix(2,9)=5.4721701063; ref_damping_matrix(2,10)=-10.9443402126; + ref_damping_matrix(2,14)=-10.9443402126; ref_damping_matrix(2,15)=5.4721701063; ref_damping_matrix(2,16)=-5.4721701063; + ref_damping_matrix(2,20)=-5.4721701063; ref_damping_matrix(2,21)=10.9443402126; ref_damping_matrix(2,22)=-5.4721701063; + + ref_damping_matrix(3,2)=10.9443402126; ref_damping_matrix(3,3)=12.6751094434; ref_damping_matrix(3,4)=-0.625; + ref_damping_matrix(3,8)=5.4721701063; ref_damping_matrix(3,9)=5.6644777986; ref_damping_matrix(3,10)=-0.0480769231; + ref_damping_matrix(3,14)=-5.4721701063; ref_damping_matrix(3,15)=4.6067854909; ref_damping_matrix(3,16)=0.625; + ref_damping_matrix(3,20)=-10.9443402126; ref_damping_matrix(3,21)=9.8866479049; ref_damping_matrix(3,22)=0.0480769231; + + ref_damping_matrix(4,2)=-10.9443402126; ref_damping_matrix(4,3)=-0.625; ref_damping_matrix(4,4)=12.6751094434; + ref_damping_matrix(4,8)=10.9443402126; ref_damping_matrix(4,9)=0.0480769231; ref_damping_matrix(4,10)=9.8866479049; + ref_damping_matrix(4,14)=5.4721701063; ref_damping_matrix(4,15)=0.625; ref_damping_matrix(4,16)=4.6067854909; + ref_damping_matrix(4,20)=-5.4721701063; ref_damping_matrix(4,21)=-0.0480769231; ref_damping_matrix(4,22)=5.6644777986; + + ref_damping_matrix(5,0)=-26.9230769231; ref_damping_matrix(5,1)=26.9230769231; ref_damping_matrix(5,5)=71.7948717949; + ref_damping_matrix(5,6)=-13.4615384615; ref_damping_matrix(5,7)=-26.9230769231; ref_damping_matrix(5,11)=35.8974358974; + ref_damping_matrix(5,12)=13.4615384615; ref_damping_matrix(5,13)=-13.4615384615; ref_damping_matrix(5,17)=17.9487179487; + ref_damping_matrix(5,18)=26.9230769231; ref_damping_matrix(5,19)=13.4615384615; ref_damping_matrix(5,23)=35.8974358974; + + ref_damping_matrix(6,0)=-1093.2692307692; ref_damping_matrix(6,1)=47.5961538462; ref_damping_matrix(6,5)=-13.4615384615; + ref_damping_matrix(6,6)=1923.1538461538; ref_damping_matrix(6,7)=-739.9038461538; ref_damping_matrix(6,11)=-26.9230769231; + ref_damping_matrix(6,12)=386.5384615385; ref_damping_matrix(6,13)=-47.5961538462; ref_damping_matrix(6,17)=-26.9230769231; + ref_damping_matrix(6,18)=-1214.4230769231; ref_damping_matrix(6,19)=739.9038461538; ref_damping_matrix(6,23)=-13.4615384615; + + ref_damping_matrix(7,0)=-47.5961538462; ref_damping_matrix(7,1)=386.5384615385; ref_damping_matrix(7,5)=-26.9230769231; + ref_damping_matrix(7,6)=-739.9038461538; ref_damping_matrix(7,7)=1923.1538461538; ref_damping_matrix(7,11)=-26.9230769231; + ref_damping_matrix(7,12)=47.5961538462; ref_damping_matrix(7,13)=-1093.2692307692; ref_damping_matrix(7,17)=-13.4615384615; + ref_damping_matrix(7,18)=739.9038461538; ref_damping_matrix(7,19)=-1214.4230769231; ref_damping_matrix(7,23)=-13.4615384615; + + ref_damping_matrix(8,2)=-5.4721701063; ref_damping_matrix(8,3)=5.4721701063; ref_damping_matrix(8,4)=10.9443402126; + ref_damping_matrix(8,8)=23.8886804253; ref_damping_matrix(8,9)=10.9443402126; ref_damping_matrix(8,10)=10.9443402126; + ref_damping_matrix(8,14)=-5.4721701063; ref_damping_matrix(8,15)=10.9443402126; ref_damping_matrix(8,16)=5.4721701063; + ref_damping_matrix(8,20)=-10.9443402126; ref_damping_matrix(8,21)=5.4721701063; ref_damping_matrix(8,22)=5.4721701063; + + ref_damping_matrix(9,2)=5.4721701063; ref_damping_matrix(9,3)=5.6644777986; ref_damping_matrix(9,4)=0.0480769231; + ref_damping_matrix(9,8)=10.9443402126; ref_damping_matrix(9,9)=12.6751094434; ref_damping_matrix(9,10)=0.625; + ref_damping_matrix(9,14)=-10.9443402126; ref_damping_matrix(9,15)=9.8866479049; ref_damping_matrix(9,16)=-0.0480769231; + ref_damping_matrix(9,20)=-5.4721701063; ref_damping_matrix(9,21)=4.6067854909; ref_damping_matrix(9,22)=-0.625; + + ref_damping_matrix(10,2)=-10.9443402126; ref_damping_matrix(10,3)=-0.0480769231; ref_damping_matrix(10,4)=9.8866479049; + ref_damping_matrix(10,8)=10.9443402126; ref_damping_matrix(10,9)=0.625; ref_damping_matrix(10,10)=12.6751094434; + ref_damping_matrix(10,14)=5.4721701063; ref_damping_matrix(10,15)=0.0480769231; ref_damping_matrix(10,16)=5.6644777986; + ref_damping_matrix(10,20)=-5.4721701063; ref_damping_matrix(10,21)=-0.625; ref_damping_matrix(10,22)=4.6067854909; + + ref_damping_matrix(11,0)=-13.4615384615; ref_damping_matrix(11,1)=26.9230769231; ref_damping_matrix(11,5)=35.8974358974; + ref_damping_matrix(11,6)=-26.9230769231; ref_damping_matrix(11,7)=-26.9230769231; ref_damping_matrix(11,11)=71.7948717949; + ref_damping_matrix(11,12)=26.9230769231; ref_damping_matrix(11,13)=-13.4615384615; ref_damping_matrix(11,17)=35.8974358974; + ref_damping_matrix(11,18)=13.4615384615; ref_damping_matrix(11,19)=13.4615384615; ref_damping_matrix(11,23)=17.9487179487; + + ref_damping_matrix(12,0)=-1214.4230769231; ref_damping_matrix(12,1)=-739.9038461538; ref_damping_matrix(12,5)=13.4615384615; + ref_damping_matrix(12,6)=386.5384615385; ref_damping_matrix(12,7)=47.5961538462; ref_damping_matrix(12,11)=26.9230769231; + ref_damping_matrix(12,12)=1923.1538461538; ref_damping_matrix(12,13)=739.9038461538; ref_damping_matrix(12,17)=26.9230769231; + ref_damping_matrix(12,18)=-1093.2692307692; ref_damping_matrix(12,19)=-47.5961538462; ref_damping_matrix(12,23)=13.4615384615; + + ref_damping_matrix(13,0)=-739.9038461538; ref_damping_matrix(13,1)=-1214.4230769231; ref_damping_matrix(13,5)=-13.4615384615; + ref_damping_matrix(13,6)=-47.5961538462; ref_damping_matrix(13,7)=-1093.2692307692; ref_damping_matrix(13,11)=-13.4615384615; + ref_damping_matrix(13,12)=739.9038461538; ref_damping_matrix(13,13)=1923.1538461538; ref_damping_matrix(13,17)=-26.9230769231; + ref_damping_matrix(13,18)=47.5961538462; ref_damping_matrix(13,19)=386.5384615385; ref_damping_matrix(13,23)=-26.9230769231; + + ref_damping_matrix(14,2)=-10.9443402126; ref_damping_matrix(14,3)=-5.4721701063; ref_damping_matrix(14,4)=5.4721701063; + ref_damping_matrix(14,8)=-5.4721701063; ref_damping_matrix(14,9)=-10.9443402126; ref_damping_matrix(14,10)=5.4721701063; + ref_damping_matrix(14,14)=23.8886804253; ref_damping_matrix(14,15)=-10.9443402126; ref_damping_matrix(14,16)=10.9443402126; + ref_damping_matrix(14,20)=-5.4721701063; ref_damping_matrix(14,21)=-5.4721701063; ref_damping_matrix(14,22)=10.9443402126; + + ref_damping_matrix(15,2)=5.4721701063; ref_damping_matrix(15,3)=4.6067854909; ref_damping_matrix(15,4)=0.625; + ref_damping_matrix(15,8)=10.9443402126; ref_damping_matrix(15,9)=9.8866479049; ref_damping_matrix(15,10)=0.0480769231; + ref_damping_matrix(15,14)=-10.9443402126; ref_damping_matrix(15,15)=12.6751094434; ref_damping_matrix(15,16)=-0.625; + ref_damping_matrix(15,20)=-5.4721701063; ref_damping_matrix(15,21)=5.6644777986; ref_damping_matrix(15,22)=-0.0480769231; + + ref_damping_matrix(16,2)=-5.4721701063; ref_damping_matrix(16,3)=0.625; ref_damping_matrix(16,4)=4.6067854909; + ref_damping_matrix(16,8)=5.4721701063; ref_damping_matrix(16,9)=-0.0480769231; ref_damping_matrix(16,10)=5.6644777986; + ref_damping_matrix(16,14)=10.9443402126; ref_damping_matrix(16,15)=-0.625; ref_damping_matrix(16,16)=12.6751094434; + ref_damping_matrix(16,20)=-10.9443402126; ref_damping_matrix(16,21)=0.0480769231; ref_damping_matrix(16,22)=9.8866479049; + + ref_damping_matrix(17,0)=-13.4615384615; ref_damping_matrix(17,1)=13.4615384615; ref_damping_matrix(17,5)=17.9487179487; + ref_damping_matrix(17,6)=-26.9230769231; ref_damping_matrix(17,7)=-13.4615384615; ref_damping_matrix(17,11)=35.8974358974; + ref_damping_matrix(17,12)=26.9230769231; ref_damping_matrix(17,13)=-26.9230769231; ref_damping_matrix(17,17)=71.7948717949; + ref_damping_matrix(17,18)=13.4615384615; ref_damping_matrix(17,19)=26.9230769231; ref_damping_matrix(17,23)=35.8974358974; + + ref_damping_matrix(18,0)=386.5384615385; ref_damping_matrix(18,1)=-47.5961538462; ref_damping_matrix(18,5)=26.9230769231; + ref_damping_matrix(18,6)=-1214.4230769231; ref_damping_matrix(18,7)=739.9038461538; ref_damping_matrix(18,11)=13.4615384615; + ref_damping_matrix(18,12)=-1093.2692307692; ref_damping_matrix(18,13)=47.5961538462; ref_damping_matrix(18,17)=13.4615384615; + ref_damping_matrix(18,18)=1923.1538461538; ref_damping_matrix(18,19)=-739.9038461538; ref_damping_matrix(18,23)=26.9230769231; + + ref_damping_matrix(19,0)=47.5961538462; ref_damping_matrix(19,1)=-1093.2692307692; ref_damping_matrix(19,5)=13.4615384615; + ref_damping_matrix(19,6)=739.9038461538; ref_damping_matrix(19,7)=-1214.4230769231; ref_damping_matrix(19,11)=13.4615384615; + ref_damping_matrix(19,12)=-47.5961538462; ref_damping_matrix(19,13)=386.5384615385; ref_damping_matrix(19,17)=26.9230769231; + ref_damping_matrix(19,18)=-739.9038461538; ref_damping_matrix(19,19)=1923.1538461538; ref_damping_matrix(19,23)=26.9230769231; + + ref_damping_matrix(20,2)=-5.4721701063; ref_damping_matrix(20,3)=-10.9443402126; ref_damping_matrix(20,4)=-5.4721701063; + ref_damping_matrix(20,8)=-10.9443402126; ref_damping_matrix(20,9)=-5.4721701063; ref_damping_matrix(20,10)=-5.4721701063; + ref_damping_matrix(20,14)=-5.4721701063; ref_damping_matrix(20,15)=-5.4721701063; ref_damping_matrix(20,16)=-10.9443402126; + ref_damping_matrix(20,20)=23.8886804253; ref_damping_matrix(20,21)=-10.9443402126; ref_damping_matrix(20,22)=-10.9443402126; + + ref_damping_matrix(21,2)=10.9443402126; ref_damping_matrix(21,3)=9.8866479049; ref_damping_matrix(21,4)=-0.0480769231; + ref_damping_matrix(21,8)=5.4721701063; ref_damping_matrix(21,9)=4.6067854909; ref_damping_matrix(21,10)=-0.625; + ref_damping_matrix(21,14)=-5.4721701063; ref_damping_matrix(21,15)=5.6644777986; ref_damping_matrix(21,16)=0.0480769231; + ref_damping_matrix(21,20)=-10.9443402126; ref_damping_matrix(21,21)=12.6751094434; ref_damping_matrix(21,22)=0.625; + + ref_damping_matrix(22,2)=-5.4721701063; ref_damping_matrix(22,3)=0.0480769231; ref_damping_matrix(22,4)=5.6644777986; + ref_damping_matrix(22,8)=5.4721701063; ref_damping_matrix(22,9)=-0.625; ref_damping_matrix(22,10)=4.6067854909; + ref_damping_matrix(22,14)=10.9443402126; ref_damping_matrix(22,15)=-0.0480769231; ref_damping_matrix(22,16)=9.8866479049; + ref_damping_matrix(22,20)=-10.9443402126; ref_damping_matrix(22,21)=0.625; ref_damping_matrix(22,22)=12.6751094434; + + ref_damping_matrix(23,0)=-26.9230769231; ref_damping_matrix(23,1)=13.4615384615; ref_damping_matrix(23,5)=35.8974358974; + ref_damping_matrix(23,6)=-13.4615384615; ref_damping_matrix(23,7)=-13.4615384615; ref_damping_matrix(23,11)=17.9487179487; + ref_damping_matrix(23,12)=13.4615384615; ref_damping_matrix(23,13)=-26.9230769231; ref_damping_matrix(23,17)=35.8974358974; + ref_damping_matrix(23,18)=26.9230769231; ref_damping_matrix(23,19)=26.9230769231; ref_damping_matrix(23,23)=71.7948717949; + + ConductShellDampingMatrixTest("MITCThickShellElement3D4N", ref_damping_matrix); } KRATOS_TEST_CASE_IN_SUITE(ShellThinElementCorotational3D4N_DampingMatrix, KratosStructuralMechanicsFastSuite) diff --git a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate.mdpa b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate.mdpa index 9df8e9c1404c..cd90ec88803d 100644 --- a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate.mdpa +++ b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate.mdpa @@ -17,7 +17,7 @@ Begin Nodes 9 2.00000 0.00000 0.00000 End Nodes -Begin Elements ShellThickElement3D4N// GUI group identifier: plate +Begin Elements MITCThickShellElement3D4N// GUI group identifier: plate 1 0 8 7 4 5 2 0 9 8 5 6 3 0 2 3 6 5 diff --git a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_materials.json b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_materials.json index 3e8b15fe0367..f938f8aabe54 100644 --- a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_materials.json +++ b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_materials.json @@ -5,7 +5,7 @@ "Material": { "name": "Material", "constitutive_law": { - "name": "LinearElasticPlaneStress2DLaw" + "name": "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables": { "DENSITY": 7.85000E+03, diff --git a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_parameters.json b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_parameters.json index a1a8d3391653..9c074e499ef7 100644 --- a/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_parameters.json +++ b/applications/StructuralMechanicsApplication/tests/eigen_test/Eigen_Q4_Thick_2x2_Plate_test_parameters.json @@ -52,7 +52,7 @@ "Parameters" : { "model_part_name" : "Structure", "variable_name" : "EIGENVALUE_VECTOR", - "reference_values": "[88.96614452368635, 3955.0855388258715, 7796.83946434412]" + "reference_values": "[88.96614452368635, 3806.959335300466, 7759.8079134627715]" } }]} } diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp.mdpa index 7c863030189c..0fc4865ad6d8 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp.mdpa @@ -259,7 +259,7 @@ Begin Nodes // GUI group identifier: Group0 243 10.00000 0.00000 0.00000 End Nodes -Begin Elements ShellThickElementCorotational3D4N // GUI group identifier: Group0 +Begin Elements MITCThickShellCorotationalElement3D4N // GUI group identifier: Group0 1 4 7 4 2 5 2 4 9 8 4 7 3 4 12 11 8 9 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp_test_materials.json index b070f493cb44..a1ae78725a97 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp_test_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__BendingRollUp_test_materials.json @@ -5,7 +5,7 @@ "Material": { "name": "Material", "constitutive_law": { - "name": "LinearElasticPlaneStress2DLaw" + "name": "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables": { "YOUNG_MODULUS": 200.0e9, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp.mdpa index dda4f38048f9..7822d7724885 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp.mdpa @@ -259,7 +259,7 @@ Begin Nodes // GUI group identifier: Group0 243 10.00000 0.00000 0.00000 End Nodes -Begin Elements ShellThickElementCorotational3D4N // GUI group identifier: Group0 +Begin Elements MITCThickShellCorotationalElement3D4N // GUI group identifier: Group0 1 4 7 4 2 5 2 4 9 8 4 7 3 4 12 11 8 9 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp_test_materials.json index 3224f17e4daa..0ea3a88b0060 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp_test_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick__DrillingRollUp_test_materials.json @@ -5,7 +5,7 @@ "Material": { "name": "Material", "constitutive_law": { - "name": "LinearElasticPlaneStress2DLaw" + "name": "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables": { "YOUNG_MODULUS": 200.0e9, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test.mdpa deleted file mode 100644 index f6d1647b136b..000000000000 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test.mdpa +++ /dev/null @@ -1,403 +0,0 @@ -Begin ModelPartData -// VARIABLE_NAME value -End ModelPartData - -Begin Properties 0 -End Properties -Begin Nodes - 1 10.0000000000 0.0000000000 20.0000000000 - 2 12.0000000000 0.0000000000 20.0000000000 - 3 14.0000000000 0.0000000000 20.0000000000 - 4 10.0000000000 -5.1763809046 19.3185165251 - 5 12.0000000000 -5.1763809047 19.3185165251 - 6 16.0000000000 0.0000000000 20.0000000000 - 7 14.0000000000 -5.1763809047 19.3185165251 - 8 16.0000000000 -5.1763809047 19.3185165251 - 9 18.0000000000 0.0000000000 20.0000000000 - 10 18.0000000000 -5.1763809046 19.3185165251 - 11 20.0000000000 0.0000000000 20.0000000000 - 12 10.0000000000 -10.0000000000 17.3205080757 - 13 12.0000000000 -10.0000000158 17.3205080666 - 14 14.0000000000 -10.0000000532 17.3205080450 - 15 20.0000000000 -5.1763809046 19.3185165251 - 16 16.0000000000 -10.0000000979 17.3205080192 - 17 18.0000000000 -10.0000001353 17.3205079976 - 18 20.0000000000 -10.0000000000 17.3205080757 - 19 10.0000000000 -14.1421356236 14.1421356238 - 20 12.0000000000 -14.1421356338 14.1421356137 - 21 14.0000000000 -14.1421356310 14.1421356165 - 22 16.0000000000 -14.1421356276 14.1421356198 - 23 18.0000000000 -14.1421356248 14.1421356227 - 24 20.0000000000 -14.1421356236 14.1421356238 - 25 10.0000000000 -17.3205080755 10.0000000003 - 26 12.0000000000 -17.3205080755 10.0000000003 - 27 14.0000000000 -17.3205080755 10.0000000003 - 28 16.0000000000 -17.3205080755 10.0000000003 - 29 18.0000000000 -17.3205080755 10.0000000004 - 30 20.0000000000 -17.3205080755 10.0000000003 - 31 10.0000000000 -19.3185165250 5.1763809049 - 32 12.0000000000 -19.3185165248 5.1763809056 - 33 14.0000000000 -19.3185165244 5.1763809073 - 34 16.0000000000 -19.3185165238 5.1763809093 - 35 18.0000000000 -19.3185165234 5.1763809110 - 36 20.0000000000 -19.3185165250 5.1763809049 - 37 10.0000000000 -20.0000000000 0.0000000000 - 38 12.0000000000 -20.0000000000 0.0000000000 - 39 14.0000000000 -20.0000000000 0.0000000000 - 40 16.0000000000 -20.0000000000 0.0000000000 - 41 18.0000000000 -20.0000000000 0.0000000000 - 42 20.0000000000 -20.0000000000 0.0000000000 -End Nodes - - -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: surface - 1 0 31 32 38 37 - 2 0 25 26 32 31 - 3 0 19 20 26 25 - 4 0 12 13 20 19 - 5 0 4 5 13 12 - 6 0 1 2 5 4 - 7 0 32 33 39 38 - 8 0 26 27 33 32 - 9 0 20 21 27 26 - 10 0 13 14 21 20 - 11 0 5 7 14 13 - 12 0 2 3 7 5 - 13 0 33 34 40 39 - 14 0 27 28 34 33 - 15 0 21 22 28 27 - 16 0 14 16 22 21 - 17 0 7 8 16 14 - 18 0 3 6 8 7 - 19 0 34 35 41 40 - 20 0 28 29 35 34 - 21 0 22 23 29 28 - 22 0 16 17 23 22 - 23 0 8 10 17 16 - 24 0 6 9 10 8 - 25 0 35 36 42 41 - 26 0 29 30 36 35 - 27 0 23 24 30 29 - 28 0 17 18 24 23 - 29 0 10 15 18 17 - 30 0 9 11 15 10 -End Elements - -Begin Conditions SurfaceLoadCondition3D4N// GUI group identifier: surface -1 0 31 32 38 37 -2 0 25 26 32 31 -3 0 19 20 26 25 -4 0 12 13 20 19 -5 0 4 5 13 12 -6 0 1 2 5 4 -7 0 32 33 39 38 -8 0 26 27 33 32 -9 0 20 21 27 26 -10 0 13 14 21 20 -11 0 5 7 14 13 -12 0 2 3 7 5 -13 0 33 34 40 39 -14 0 27 28 34 33 -15 0 21 22 28 27 -16 0 14 16 22 21 -17 0 7 8 16 14 -18 0 3 6 8 7 -19 0 34 35 41 40 -20 0 28 29 35 34 -21 0 22 23 29 28 -22 0 16 17 23 22 -23 0 8 10 17 16 -24 0 6 9 10 8 -25 0 35 36 42 41 -26 0 29 30 36 35 -27 0 23 24 30 29 -28 0 17 18 24 23 -29 0 10 15 18 17 -30 0 9 11 15 10 -End Conditions - -Begin SubModelPart Parts_surface // Group surface // Subtree Parts - Begin SubModelPartNodes - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - End SubModelPartNodes - Begin SubModelPartElements - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart DISPLACEMENT_ends // Group ends // Subtree DISPLACEMENT - Begin SubModelPartNodes - 11 - 15 - 18 - 24 - 30 - 36 - 42 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart DISPLACEMENT_sample // Group sample // Subtree DISPLACEMENT - Begin SubModelPartNodes - 1 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart DISPLACEMENT_xy_sym // Group xy sym // Subtree DISPLACEMENT - Begin SubModelPartNodes - 37 - 38 - 39 - 40 - 41 - 42 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart DISPLACEMENT_xz_sym // Group xz sym // Subtree DISPLACEMENT - Begin SubModelPartNodes - 1 - 2 - 3 - 6 - 9 - 11 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart DISPLACEMENT_yz_sym // Group yz sym // Subtree DISPLACEMENT - Begin SubModelPartNodes - 1 - 4 - 12 - 19 - 25 - 31 - 37 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart ROTATION_ends // Group ends // Subtree ROTATION - Begin SubModelPartNodes - 11 - 15 - 18 - 24 - 30 - 36 - 42 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart ROTATION_xy_sym // Group xy sym // Subtree ROTATION - Begin SubModelPartNodes - 37 - 38 - 39 - 40 - 41 - 42 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart ROTATION_xz_sym // Group xz sym // Subtree ROTATION - Begin SubModelPartNodes - 1 - 2 - 3 - 6 - 9 - 11 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart ROTATION_yz_sym // Group yz sym // Subtree ROTATION - Begin SubModelPartNodes - 1 - 4 - 12 - 19 - 25 - 31 - 37 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - End SubModelPartConditions -End SubModelPart -Begin SubModelPart SurfacePressure3D_surface // Group surface // Subtree SurfacePressure3D - Begin SubModelPartNodes - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - End SubModelPartNodes - Begin SubModelPartElements - End SubModelPartElements - Begin SubModelPartConditions - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - End SubModelPartConditions -End SubModelPart diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_materials.json deleted file mode 100644 index e777756e54f9..000000000000 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_materials.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "properties" : [{ - "model_part_name" : "Structure.Parts_surface", - "properties_id" : 1, - "Material" : { - "constitutive_law" : { - "name" : "LinearElasticOrthotropic2DLaw" - }, - "Variables" : { - "SHELL_ORTHOTROPIC_LAYERS" : [[0.5,0.0,7850,7.5E+6,2E+6,0.25,1.25E+6,0.625E+6,0.625E+6], - [0.5,90.0,7850,7.5E+6,2E+6,0.25,1.25E+6,0.625E+6,0.625E+6]] - }, - "Tables" : {} - } - }] -} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_parameters.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_parameters.json deleted file mode 100644 index 10a06d85309c..000000000000 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_parameters.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "problem_data" : { - "problem_name" : "Shell_Q4_Thick_orthotropic_laminate_linear_static_test", - "parallel_type" : "OpenMP", - "start_time" : 0.0, - "end_time" : 1.0, - "echo_level" : 0 - }, - "solver_settings" : { - "solver_type" : "Static", - "echo_level" : 0, - "model_part_name" : "Structure", - "domain_size" : 3, - "time_stepping" : { - "time_step" : 1.1 - }, - "analysis_type" : "linear", - "model_import_settings" : { - "input_type" : "mdpa", - "input_filename" : "shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test" - }, - "material_import_settings" : { - "materials_filename" : "shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_materials.json" - }, - "line_search" : false, - "convergence_criterion" : "residual_criterion", - "displacement_relative_tolerance" : 0.0001, - "displacement_absolute_tolerance" : 1e-9, - "residual_relative_tolerance" : 0.0001, - "residual_absolute_tolerance" : 1e-9, - "max_iteration" : 10, - "rotation_dofs" : true - }, - "processes" : { - "constraints_process_list" : [{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_ends", - "variable_name" : "DISPLACEMENT", - "value" : [0.0,0.0,0.0], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_sample", - "variable_name" : "DISPLACEMENT", - "value" : [0.0,0.0,null], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_xy_sym", - "variable_name" : "DISPLACEMENT", - "value" : [null,null,0.0], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_xz_sym", - "variable_name" : "DISPLACEMENT", - "value" : [null,0.0,null], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_yz_sym", - "variable_name" : "DISPLACEMENT", - "value" : [0.0,null,null], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.ROTATION_ends", - "variable_name" : "ROTATION", - "value" : [0.0,0.0,0.0], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.ROTATION_xy_sym", - "variable_name" : "ROTATION", - "value" : [0.0,0.0,null], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.ROTATION_xz_sym", - "variable_name" : "ROTATION", - "value" : [0.0,null,0.0], - "interval" : [0.0,"End"] - } - },{ - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process fixes the selected components of a given vector variable", - "process_name" : "AssignVectorVariableProcess", - "Parameters" : { - "model_part_name" : "Structure.ROTATION_yz_sym", - "variable_name" : "ROTATION", - "value" : [null,0.0,0.0], - "interval" : [0.0,"End"] - } - }], - "loads_process_list" : [{ - "python_module" : "assign_scalar_variable_to_conditions_process", - "kratos_module" : "KratosMultiphysics", - "help" : "This process sets a scalar variable value over a condition", - "process_name" : "AssignScalarToConditionsProcess", - "Parameters" : { - "model_part_name" : "Structure.SurfacePressure3D_surface", - "variable_name" : "NEGATIVE_FACE_PRESSURE", - "value" : -2040.37, - "interval" : [0.0,"End"] - } - }], - "list_other_processes": [ - { - "python_module" : "from_json_check_result_process", - "kratos_module" : "KratosMultiphysics", - "help" : "", - "process_name" : "FromJsonCheckResultProcess", - "Parameters" : { - "check_variables" : ["DISPLACEMENT_Z"], - "input_file_name" : "shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_results.json", - "model_part_name" : "Structure.DISPLACEMENT_sample", - "time_frequency" : 0.01 - } - } - ]}, - "print_output_process" : [ - { - "python_module" : "json_output_process", - "kratos_module" : "KratosMultiphysics", - "help" : "", - "process_name" : "JsonOutputProcess", - "Parameters" : { - "output_variables" : ["DISPLACEMENT_Z"], - "output_file_name" : "shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_results.json", - "model_part_name" : "Structure.DISPLACEMENT_sample", - "time_frequency" : 0.01 - } - } - ] -} diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_results.json deleted file mode 100644 index 1de224a5d7db..000000000000 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test_results.json +++ /dev/null @@ -1,2 +0,0 @@ -{"NODE_1": {"DISPLACEMENT_Z": [0.18061458802073682]}, - "TIME": [1.1]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_clamped_cylinder_orthotropic.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_clamped_cylinder_orthotropic.mdpa index 1fb812c1dfd0..93b0b1675189 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_clamped_cylinder_orthotropic.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_clamped_cylinder_orthotropic.mdpa @@ -64,7 +64,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 20 0 19 20 17 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 21 0 20 23 24 21 22 0 19 22 23 20 23 0 23 26 27 24 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder.mdpa index 44b971f3f0f5..c99f3a0973c1 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder.mdpa @@ -33,7 +33,7 @@ Begin Nodes End Nodes -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 1 0 7 10 14 12 2 0 5 6 10 7 3 0 10 13 18 14 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder_results.json index e402636015d3..2977447344ee 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder_results.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_cylinder_results.json @@ -1 +1 @@ -{"TIME": [1.1], "NODE_1": {"DISPLACEMENT_Z": [-1.1642426393641229e-05]}} \ No newline at end of file +{"TIME": [1.1], "NODE_1": {"DISPLACEMENT_Z": [-1.176534805782e-05]}} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere.mdpa index 641c81070826..8b37827e6ea3 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere.mdpa @@ -41,7 +41,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 8 0 10 17 13 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 9 0 16 12 14 19 10 0 18 11 12 16 11 0 12 8 9 14 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere_results.json index 1dd886c786d9..a656eccc1c53 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere_results.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_pinched_hemisphere_results.json @@ -1 +1 @@ -{"TIME": [1.1], "NODE_18": {"DISPLACEMENT_X": [0.01534083698973345]}} \ No newline at end of file +{"TIME": [1.1], "NODE_18": {"DISPLACEMENT_X": [0.0402599]}} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_scordelis_lo_roof.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_scordelis_lo_roof.mdpa index 37754577b0ff..4ed8bb8cb82e 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_scordelis_lo_roof.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_struct_scordelis_lo_roof.mdpa @@ -62,7 +62,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 8 0 11 17 19 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 13 0 14 10 13 18 14 0 12 8 10 14 15 0 10 6 11 13 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_clamped_cylinder_orthotropic.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_clamped_cylinder_orthotropic.mdpa index d4ec58ad5657..39b53de2eb33 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_clamped_cylinder_orthotropic.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_clamped_cylinder_orthotropic.mdpa @@ -292,7 +292,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 143 0 27 32 20 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 144 0 15 12 8 10 145 0 41 33 23 36 146 0 17 15 10 7 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_cylinder.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_cylinder.mdpa index bf3bc6aab926..ba622136beaf 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_cylinder.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_cylinder.mdpa @@ -452,7 +452,7 @@ Begin Nodes End Nodes -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 1 0 126 110 109 127 2 0 161 178 168 148 3 0 110 94 91 109 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere.mdpa index 2fe693ef6572..dc81dd0234d5 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere.mdpa @@ -661,7 +661,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 228 0 316 285 328 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 229 0 115 113 90 92 230 0 217 200 190 208 231 0 200 185 170 190 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere_results.json index 1d078c96e807..a3eca8834227 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere_results.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_pinched_hemisphere_results.json @@ -1 +1 @@ -{"TIME": [1.1], "NODE_1": {"DISPLACEMENT_X": [0.08785106551062884]}} \ No newline at end of file +{"TIME": [1.1], "NODE_1": {"DISPLACEMENT_X": [0.08933598]}} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_scordelis_lo_roof.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_scordelis_lo_roof.mdpa index 2bb728c65459..a0428132d5ca 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_scordelis_lo_roof.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_linear_static_unstruct_scordelis_lo_roof.mdpa @@ -2046,7 +2046,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 426 0 384 437 435 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 657 0 412 428 450 434 658 0 891 886 870 876 659 0 428 441 466 450 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_oscillating_plate.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_oscillating_plate.mdpa index 2dc18b916551..f3e4ed04d86a 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_oscillating_plate.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_oscillating_plate.mdpa @@ -55,7 +55,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 20 0 22 15 20 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 1 0 18 12 11 16 2 0 21 14 12 18 3 0 12 7 6 11 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_pendulus.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_pendulus.mdpa index e1bb3681faab..df8d76e2823c 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_pendulus.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_struct_pendulus.mdpa @@ -55,7 +55,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 24 0 17 10 13 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 9 0 7 4 3 6 10 0 9 8 4 7 11 0 4 2 1 3 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_oscillating_plate.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_oscillating_plate.mdpa index 6ae5e1d9c5d6..36af5168bca6 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_oscillating_plate.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_oscillating_plate.mdpa @@ -99,7 +99,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 45 0 9 8 4 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 1 0 16 10 12 18 2 0 20 25 21 15 3 0 21 18 12 15 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_pendulus.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_pendulus.mdpa index e407552b967e..4b54869a50cd 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_pendulus.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_dynamic_unstruct_pendulus.mdpa @@ -99,7 +99,7 @@ Begin Elements ShellThickElementCorotational3D3N// GUI group identifier: Surface 54 0 20 30 24 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 19 0 15 19 14 9 20 0 10 6 7 13 21 0 7 9 14 13 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough.mdpa index 4a69e9610546..4c8406ef23d3 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough.mdpa @@ -51,7 +51,7 @@ Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: Surface_ 12 0 3 4 2 1 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 13 0 14 9 15 20 14 0 15 22 24 20 15 0 21 14 20 23 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough_results.json index cefd1d6eab5c..47137219ef4c 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough_results.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_struct_hinged_cyl_roof_snapthrough_results.json @@ -1 +1 @@ -{"TIME": [0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.2, 1.4], "NODE_1": {"DISPLACEMENT_Z": [-1.6436986613074323, -3.635403789675603, -6.336744132300938, -27.609316975755583, -28.91334029458107, -30.067652001351806, -31.112488961322025]}} \ No newline at end of file +{"TIME": [0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.2, 1.4], "NODE_1": {"DISPLACEMENT_Z": [-1.6436986613074323, -3.637104, -6.34045, -27.609316975755583, -28.91334029458107, -30.067652001351806, -31.11375]}} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough.mdpa b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough.mdpa index f6ae2e653896..1a976d8799ae 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough.mdpa +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough.mdpa @@ -90,7 +90,7 @@ Begin Elements ShellThinElementCorotational3D4N// GUI group identifier: Surface_ 27 0 47 44 48 49 End Elements -Begin Elements ShellThickElementCorotational3D4N// GUI group identifier: Surface_Q4_thick +Begin Elements MITCThickShellCorotationalElement3D4N// GUI group identifier: Surface_Q4_thick 28 0 1 3 4 2 29 0 5 2 4 7 30 0 10 5 7 12 diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough_results.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough_results.json index a077848eacf0..98a0de382e31 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough_results.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_T3andQ4_nonlinear_static_unstruct_hinged_cyl_roof_snapthrough_results.json @@ -1 +1 @@ -{"NODE_49": {"DISPLACEMENT_Z": [-2.5801032061152034, -6.340533376682972, -28.22301541741852, -29.979126238970657]}, "TIME": [0.3, 0.6, 0.8999999999999999, 1.2]} \ No newline at end of file +{"NODE_49": {"DISPLACEMENT_Z": [-2.5801032061152034, -6.342221, -28.22301541741852, -29.979126238970657]}, "TIME": [0.3, 0.6, 0.8999999999999999, 1.2]} \ No newline at end of file diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_clamped_cylinder_orthotropic_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_clamped_cylinder_orthotropic_materials.json index c33c2e0c44b5..7797afcd8e10 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_clamped_cylinder_orthotropic_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_clamped_cylinder_orthotropic_materials.json @@ -49,15 +49,74 @@ "properties_id" : 4, "Material" : { "constitutive_law" : { - "name" : "LinearElasticOrthotropic2DLaw" + "name" : "ThicknessIntegratedCompositeConstitutiveLaw", + "z_layer_coordinate_vector" : [0.25, 0.75], + "Euler_angle_layer_vector" : [0.0, 90.0], + "thickness_layer_vector" : [0.5, 0.5] }, "Variables" : { - "SHELL_ORTHOTROPIC_LAYERS" : [ - [0.5,0.0,7850,7.5E+6,2E+6,0.25,1.25E+6,0.625E+6,0.625E+6], - [0.5,90.0,7850,7.5E+6,2E+6,0.25,1.25E+6,0.625E+6,0.625E+6] - ] + "THICKNESS" : 1.0, + "DENSITY" : 7850.0 }, - "Tables" : {} + "sub_properties" : [ + { + "properties_id" : 11, + "Material" : { + "constitutive_law" : { + "name" : "GenericAnisotropicPlaneStress2DLaw" + }, + "Variables" : { + "ORTHOTROPIC_ELASTIC_CONSTANTS" : [7.5E+6, 2e6, 2e6, 0.25, 0.25, 0.25], + "SHEAR_MODULUS_XY" : 1.25e6, + "SHEAR_MODULUS_YZ" : 0.625e6, + "SHEAR_MODULUS_XZ" : 0.625e6, + "EULER_ANGLES" : [0.0,0.0,0.0], + "ISOTROPIC_ANISOTROPIC_YIELD_RATIO" : [1,1,1,1,1,1] + }, + "Tables" : {} + }, + "sub_properties" : [{ + "properties_id" : 111, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 7850.0, + "YOUNG_MODULUS" : 2e6, + "POISSON_RATIO" : 0.3 + } + } + }] + },{ + "properties_id" : 12, + "Material" : { + "constitutive_law" : { + "name" : "GenericAnisotropicPlaneStress2DLaw" + }, + "Variables" : { + "ORTHOTROPIC_ELASTIC_CONSTANTS" : [7.5E+6, 2e6, 2e6, 0.25, 0.25, 0.25], + "SHEAR_MODULUS_XY" : 1.25e6, + "SHEAR_MODULUS_YZ" : 0.625e6, + "SHEAR_MODULUS_XZ" : 0.625e6, + "EULER_ANGLES" : [0.0,0.0,0.0], + "ISOTROPIC_ANISOTROPIC_YIELD_RATIO" : [1,1,1,1,1,1] + } + }, + "sub_properties" : [{ + "properties_id" : 121, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 7850.0, + "YOUNG_MODULUS" : 2e6, + "POISSON_RATIO" : 0.0 + } + } + }] + }] } }] } diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_cylinder_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_cylinder_materials.json index 06bb9937c5c5..2775f07aaff2 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_cylinder_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_cylinder_materials.json @@ -4,7 +4,7 @@ "properties_id" : 1, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 3.0, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_hemisphere_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_hemisphere_materials.json index 73027a77a92b..17826b2dede7 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_hemisphere_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_pinched_hemisphere_materials.json @@ -34,7 +34,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.04, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_scordelis_lo_roof_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_scordelis_lo_roof_materials.json index 7ddedd31bc8e..a3bdb26702c0 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_scordelis_lo_roof_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_linear_static_scordelis_lo_roof_materials.json @@ -49,7 +49,7 @@ "properties_id" : 4, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.25, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_lumped_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_lumped_materials.json index 28abeaad4fca..ed0a426296a1 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_lumped_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_lumped_materials.json @@ -36,7 +36,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.1, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_materials.json index 76b47fb6ae9b..5b76ce276a03 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_oscillating_plate_materials.json @@ -34,7 +34,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.1, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_lumped_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_lumped_materials.json index 113467372618..3d371e9bdd36 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_lumped_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_lumped_materials.json @@ -36,7 +36,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.1, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_materials.json index dd0808fba7ea..072d5267c9cc 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_dynamic_pendulus_materials.json @@ -34,7 +34,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 0.1, diff --git a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_static_hinged_cyl_roof_snapthrough_materials.json b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_static_hinged_cyl_roof_snapthrough_materials.json index 74049092a169..90599d641156 100644 --- a/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_static_hinged_cyl_roof_snapthrough_materials.json +++ b/applications/StructuralMechanicsApplication/tests/shell_test/Shell_nonlinear_static_hinged_cyl_roof_snapthrough_materials.json @@ -34,7 +34,7 @@ "properties_id" : 3, "Material" : { "constitutive_law" : { - "name" : "LinearElasticPlaneStress2DLaw" + "name" : "ReissnerMindlinShellElasticConstitutiveLaw" }, "Variables" : { "THICKNESS" : 12.7, diff --git a/applications/StructuralMechanicsApplication/tests/structural_mechanics_test_factory.py b/applications/StructuralMechanicsApplication/tests/structural_mechanics_test_factory.py index 08fa6fe15e76..d64a1d7c05b0 100644 --- a/applications/StructuralMechanicsApplication/tests/structural_mechanics_test_factory.py +++ b/applications/StructuralMechanicsApplication/tests/structural_mechanics_test_factory.py @@ -302,8 +302,8 @@ class Simple2D2NBeamCrTest(StructuralMechanicsTestFactory): class InitialStateElasticityTest(StructuralMechanicsTestFactory): file_name = "InitialStateElasticity/initial_state_test" -class InitialStrainShellQ4ThickTest(StructuralMechanicsTestFactory): - file_name = "InitialStateElasticity/initial_strain_shell_Q4_thick_test" +# class InitialStrainShellQ4ThickTest(StructuralMechanicsTestFactory): +# file_name = "InitialStateElasticity/initial_strain_shell_Q4_thick_test" # TODO: This test will be activated again when the initial state capability is added to the new MITC thick shell. A. Cornejo, 2026. class ShellT3IsotropicLinearStaticStructScordelisLoRoofTests(StructuralMechanicsTestFactory): file_name = "shell_test/Shell_T3_isotropic_linear_static_struct_scordelis_lo_roof" @@ -354,8 +354,6 @@ class ShellQ4ThickDrillingRollUpTests(StructuralMechanicsTestFactory): file_name = "shell_test/Shell_Q4_Thick__DrillingRollUp_test" @KratosUnittest.skipIfApplicationsNotAvailable("ConstitutiveLawsApplication") -class ShellQ4ThickOrthotropicLaminateLinearStaticTests(StructuralMechanicsTestFactory): - file_name = "shell_test/Shell_Q4_Thick_orthotropic_laminate_linear_static_test" class ShellT3ThinBendingRollUpTests(StructuralMechanicsTestFactory): file_name = "shell_test/Shell_T3_Thin__BendingRollUp_test" class ShellT3ThinDrillingRollUpTests(StructuralMechanicsTestFactory): diff --git a/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py b/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py index c6ca9314061f..c766de2a4ed2 100644 --- a/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py +++ b/applications/StructuralMechanicsApplication/tests/test_StructuralMechanicsApplication.py @@ -183,7 +183,6 @@ ### OLD Tests Start, will be removed soon, Philipp Bucher, 31.01.2018 |--- from structural_mechanics_test_factory import ShellQ4ThickBendingRollUpTests as TShellQ4ThickBendingRollUpTests from structural_mechanics_test_factory import ShellQ4ThickDrillingRollUpTests as TShellQ4ThickDrillingRollUpTests -from structural_mechanics_test_factory import ShellQ4ThickOrthotropicLaminateLinearStaticTests as TShellQ4ThickOrthotropicLaminateLinearStaticTests from structural_mechanics_test_factory import ShellT3ThinBendingRollUpTests as TShellT3ThinBendingRollUpTests from structural_mechanics_test_factory import ShellT3ThinDrillingRollUpTests as TShellT3ThinDrillingRollUpTests from structural_mechanics_test_factory import ShellT3IsotropicScordelisTests as TShellT3IsotropicScordelisTests @@ -211,7 +210,7 @@ from structural_mechanics_test_factory import ShellT3AndQ4NonLinearDynamicStructOscillatingPlateLumpedTests as TShellT3AndQ4NonLinearDynamicStructOscillatingPlateLumpedTests # CL tests from structural_mechanics_test_factory import InitialStateElasticityTest as TInitialStateElasticityTest -from structural_mechanics_test_factory import InitialStrainShellQ4ThickTest as TInitialStrainShellQ4ThickTest +# from structural_mechanics_test_factory import InitialStrainShellQ4ThickTest as TInitialStrainShellQ4ThickTest # TODO: A. Cornejo: this test will be activated again when the initial state capability is added to the new MITC thick shell. # Rigid test from structural_mechanics_test_factory import RigidFaceTestWithImposeRigidMovementProcess as TRigidFaceTestWithImposeRigidMovementProcess @@ -286,7 +285,8 @@ def AssembleTestSuites(): # Constitutive Law tests smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCases([TTestConstitutiveLaw])) nightSuite.addTest(TInitialStateElasticityTest('test_execution')) - nightSuite.addTest(TInitialStrainShellQ4ThickTest('test_execution')) + # nightSuite.addTest(TInitialStrainShellQ4ThickTest('test_execution')) + # Constraint tests smallSuite.addTests(KratosUnittest.TestLoader().loadTestsFromTestCase(TestLinkConstraint)) # Mass calculation tests @@ -530,8 +530,6 @@ def AssembleTestSuites(): validationSuite.addTest(TShellT3ThinDrillingRollUpTests('test_execution')) validationSuite.addTest(TShellT3IsotropicScordelisTests('test_execution')) validationSuite.addTest(TShellQ4ThickBendingRollUpTests('test_execution')) - # validationSuite.addTest(TShellQ4ThickDrillingRollUpTests('test_execution')) - validationSuite.addTest(TShellQ4ThickOrthotropicLaminateLinearStaticTests('test_execution')) validationSuite.addTest(TShellT3ThinBendingRollUpTests('test_execution')) validationSuite.addTest(TShellT3ThinOrthotropicLaminateLinearStaticTests('test_execution')) validationSuite.addTest(TShellT3ThickLinearStaticTests('test_execution')) diff --git a/applications/StructuralMechanicsApplication/tests/test_local_axis_visualization.py b/applications/StructuralMechanicsApplication/tests/test_local_axis_visualization.py index 3418667924b5..055cce7efa22 100644 --- a/applications/StructuralMechanicsApplication/tests/test_local_axis_visualization.py +++ b/applications/StructuralMechanicsApplication/tests/test_local_axis_visualization.py @@ -92,9 +92,9 @@ def tearDown(self): kratos_utils.DeleteFileIfExisting(msh_file_name) kratos_utils.DeleteFileIfExisting(output_file_name) # usually this is deleted by the check process but not if it fails - def test_ThickQuadShellElement(self): - self.element_name = "ShellThickElementCorotational3D4N" - self.__ExecuteShellTest() + # def test_ThickQuadShellElement(self): + # self.element_name = "MITCThickShellCorotationalElement3D4N" + # self.__ExecuteShellTest() def test_ThinQuadShellElement(self): self.element_name = "ShellThinElementCorotational3D4N" @@ -151,7 +151,7 @@ def __ExecuteBeamTest(self): #create Element for i in range(nr_elements): model_part.CreateNewElement(self.element_name, i+1, [i+1,i+2], - model_part.GetProperties()[0]) + model_part.GetProperties()[0]) for i, elem in enumerate(model_part.Elements): if i > (nr_elements/2 -1): # prescribing only half of the elements with LOCAL_AXIS_2! diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py index 6ec473f1b9b2..5f50b7993dce 100644 --- a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells.py @@ -130,6 +130,11 @@ def execute_shell_test(self, current_model,element_name, displacement_results, r self._add_variables(mp) self._apply_material_properties(mp) + + if element_name == "MITCThickShellCorotationalElement3D4N": + cl = StructuralMechanicsApplication.ReissnerMindlinShellElasticConstitutiveLaw() + mp.GetProperties()[1].SetValue(KratosMultiphysics.CONSTITUTIVE_LAW, cl) + self._create_nodes(mp,element_name) self._add_dofs(mp) self._create_elements(mp,element_name) @@ -192,9 +197,9 @@ def test_thin_shell_quadrilateral(self): def test_thick_shell_quadrilateral(self): - element_name = "ShellThickElementCorotational3D4N" - displacement_results = [0.0003572969872 , -0.0006341259132 , 0.00127807995001] - rotation_results = [0.0012082600485 , -0.0004098356773 , -0.0011673798349] + element_name = "MITCThickShellCorotationalElement3D4N" + displacement_results = [0.00040886238477951854, -0.0007158925090607913, 0.0013771858098899556] + rotation_results = [0.001403128974121922, -0.0003905313014176117, -0.001580745190969663] current_model = KratosMultiphysics.Model() self.execute_shell_test(current_model, diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_orthotropic.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_orthotropic.py index 1faad46b49af..1b5984b9baf6 100644 --- a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_orthotropic.py +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_orthotropic.py @@ -268,23 +268,23 @@ def test_thin_shell_quadrilateral(self): False) # Do PostProcessing for GiD? - def test_thick_shell_quadrilateral(self): - element_name = "ShellThickElementCorotational3D4N" - displacement_results = [0.0035689894826 , -0.0094851917758 , 0.0191734998621] - rotation_results = [0.009933211939 , 0.0006068078079 , -0.0174332051568] - shell_stress_top_surface_results = [-3.9178477532111 , -4.1074850572552 , -2.4426862077188 , 10.3723187292559 , 1.6354826554283 , 0.0] - shell_stress_bottom_surface_results = [5.2113212123242 , -0.2324161069908 , -2.4426862077188 , -11.6664322521041 , 1.6354826554283 , 0.0] - tsai_wu_result = 3.4966651118454 - - current_model = KratosMultiphysics.Model() - self.execute_shell_test(current_model, - element_name, - displacement_results, - rotation_results, - shell_stress_top_surface_results, - shell_stress_bottom_surface_results, - tsai_wu_result, - False) # Do PostProcessing for GiD? + # def test_thick_shell_quadrilateral(self): + # element_name = "MITCThickShellCorotationalElement3D4N" + # displacement_results = [0.0035689894826 , -0.0094851917758 , 0.0191734998621] + # rotation_results = [0.009933211939 , 0.0006068078079 , -0.0174332051568] + # shell_stress_top_surface_results = [-3.9178477532111 , -4.1074850572552 , -2.4426862077188 , 10.3723187292559 , 1.6354826554283 , 0.0] + # shell_stress_bottom_surface_results = [5.2113212123242 , -0.2324161069908 , -2.4426862077188 , -11.6664322521041 , 1.6354826554283 , 0.0] + # tsai_wu_result = 3.4966651118454 + + # current_model = KratosMultiphysics.Model() + # self.execute_shell_test(current_model, + # element_name, + # displacement_results, + # rotation_results, + # shell_stress_top_surface_results, + # shell_stress_bottom_surface_results, + # tsai_wu_result, + # False) # Do PostProcessing for GiD? def __post_process(self, main_model_part): diff --git a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_stress.py b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_stress.py index 01a8384cf173..8395e52b625c 100644 --- a/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_stress.py +++ b/applications/StructuralMechanicsApplication/tests/test_patch_test_shells_stress.py @@ -244,25 +244,25 @@ def test_thin_shell_quadrilateral(self): False) # Do PostProcessing for GiD? - def test_thick_shell_quadrilateral(self): - element_name = "ShellThickElementCorotational3D4N" - displacement_results = [0.000356813514 , -0.00063451962 , 0.001277536105] - rotation_results = [0.001208329991 , -0.000409163542 , -0.001166832572] - shell_stress_middle_surface_results = [2.673886114206 , -3.482959961533 , 0.751398508523 , 2.763048319957 , 6.546366049819 , 0.0] - shell_stress_top_surface_results = [9.0127433219 , 0.557224675217 , 0.0 , -50.720551115113 , 0.0 , 0.0] - shell_stress_bottom_surface_results = [-3.664971093553 , -7.523144598382 , 0.0 , 56.246647754966 , 0.0 , 0.0] - shell_von_mises_result = 59.607489872219794 - - current_model = KratosMultiphysics.Model() - self.execute_shell_test(current_model, - element_name, - displacement_results, - rotation_results, - shell_stress_middle_surface_results, - shell_stress_top_surface_results, - shell_stress_bottom_surface_results, - shell_von_mises_result, - False) # Do PostProcessing for GiD? + # def test_thick_shell_quadrilateral(self): + # element_name = "MITCThickShellCorotationalElement3D4N" + # displacement_results = [0.000356813514 , -0.00063451962 , 0.001277536105] + # rotation_results = [0.001208329991 , -0.000409163542 , -0.001166832572] + # shell_stress_middle_surface_results = [2.673886114206 , -3.482959961533 , 0.751398508523 , 2.763048319957 , 6.546366049819 , 0.0] + # shell_stress_top_surface_results = [9.0127433219 , 0.557224675217 , 0.0 , -50.720551115113 , 0.0 , 0.0] + # shell_stress_bottom_surface_results = [-3.664971093553 , -7.523144598382 , 0.0 , 56.246647754966 , 0.0 , 0.0] + # shell_von_mises_result = 59.607489872219794 + + # current_model = KratosMultiphysics.Model() + # self.execute_shell_test(current_model, + # element_name, + # displacement_results, + # rotation_results, + # shell_stress_middle_surface_results, + # shell_stress_top_surface_results, + # shell_stress_bottom_surface_results, + # shell_von_mises_result, + # False) # Do PostProcessing for GiD? def __post_process(self, main_model_part):