diff --git a/ProcessLib/TH2M/IntegrationPointData.h b/ProcessLib/TH2M/IntegrationPointData.h index d96684e7400c3658d7908ca5a95bd91502889d24..a14e57ffeac5edb8ffa6d9e96d28b26d0b1a62f8 100644 --- a/ProcessLib/TH2M/IntegrationPointData.h +++ b/ProcessLib/TH2M/IntegrationPointData.h @@ -41,7 +41,8 @@ struct IntegrationPointData final MathLib::KelvinVector::kelvin_vector_dimensions(DisplacementDim); sigma_eff.setZero(kelvin_vector_size); sigma_sw.setZero(kelvin_vector_size); - eps.setZero(kelvin_vector_size); + eps.resize( + kelvin_vector_size); // Later initialization from displacement eps_m.setZero(kelvin_vector_size); eps_m_prev.resize(kelvin_vector_size); sigma_eff_prev.resize(kelvin_vector_size); diff --git a/ProcessLib/TH2M/TH2MFEM-impl.h b/ProcessLib/TH2M/TH2MFEM-impl.h index f0f2fd2c691d0eab3c6531c305cae5137c6b5c9f..9dcabc5d0a1fa79f4c1d120a0ee85e0fcc022429 100644 --- a/ProcessLib/TH2M/TH2MFEM-impl.h +++ b/ProcessLib/TH2M/TH2MFEM-impl.h @@ -947,6 +947,9 @@ void TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure, auto const temperature = local_x.template segment<temperature_size>(temperature_index); + auto const displacement = + local_x.template segment<displacement_size>(displacement_index); + constexpr double dt = std::numeric_limits<double>::quiet_NaN(); auto const& medium = *_process_data.media_map.getMedium(_element.getID()); auto const& solid_phase = medium.phase("Solid"); @@ -961,6 +964,12 @@ void TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure, auto& ip_data = _ip_data[ip]; auto const& Np = ip_data.N_p; auto const& NT = Np; + auto const& Nu = ip_data.N_u; + auto const& gradNu = ip_data.dNdx_u; + auto const x_coord = + NumLib::interpolateXCoordinate<ShapeFunctionDisplacement, + ShapeMatricesTypeDisplacement>( + _element, Nu); ParameterLib::SpatialPosition const pos{ std::nullopt, _element.getID(), ip, MathLib::Point3d( @@ -974,7 +983,14 @@ void TH2MLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure, double const T = NT.dot(temperature); vars.temperature = T; + auto const Bu = + LinearBMatrix::computeBMatrix<DisplacementDim, + ShapeFunctionDisplacement::NPOINTS, + typename BMatricesType::BMatrixType>( + gradNu, Nu, x_coord, _is_axially_symmetric); + auto& eps = ip_data.eps; + eps.noalias() = Bu * displacement; // Set volumetric strain rate for the general case without swelling. vars.volumetric_strain = Invariants::trace(eps); diff --git a/Tests/Data/TH2M/M/MultiMaterialEhlers/square_1e1_2_matIDs_t_0.7000.vtu b/Tests/Data/TH2M/M/MultiMaterialEhlers/square_1e1_2_matIDs_t_0.7000.vtu index e189ca7604334d4187808b04ac5b8646bc3fd020..b94e9cc3c03e2954b184de49ee9a47dd54d5fbc6 100644 --- a/Tests/Data/TH2M/M/MultiMaterialEhlers/square_1e1_2_matIDs_t_0.7000.vtu +++ b/Tests/Data/TH2M/M/MultiMaterialEhlers/square_1e1_2_matIDs_t_0.7000.vtu @@ -4,7 +4,6 @@ <FieldData> <DataArray type="Int8" Name="IntegrationPointMetaData" NumberOfTuples="1002" format="appended" RangeMin="34" RangeMax="125" offset="0" /> <DataArray type="Int8" Name="OGS_VERSION" NumberOfTuples="25" format="appended" RangeMin="45" RangeMax="121" offset="312" /> - <DataArray type="Float64" Name="epsilon_ip" NumberOfComponents="4" NumberOfTuples="48" format="appended" RangeMin="0.00049497474683" RangeMax="0.00049497474683" offset="400" /> <DataArray type="Float64" Name="material_state_variable_ElasticStrain_ip" NumberOfComponents="4" NumberOfTuples="24" format="appended" RangeMin="0.00043074710448" RangeMax="0.00043074710448" offset="1000" /> <DataArray type="Float64" Name="material_state_variable_EquivalentPlasticStrain_ip" NumberOfTuples="24" format="appended" RangeMin="9.19908e-05" RangeMax="9.19908e-05" offset="1576" /> <DataArray type="Float64" Name="material_state_variable_damage.kappa_d_ip" NumberOfTuples="24" format="appended" RangeMin="0" RangeMax="0" offset="1728" />