diff --git a/ProcessLib/TH2M/IntegrationPointData.h b/ProcessLib/TH2M/IntegrationPointData.h index d96684e7400..a14e57ffeac 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 f0f2fd2c691..9dcabc5d0a1 100644 --- a/ProcessLib/TH2M/TH2MFEM-impl.h +++ b/ProcessLib/TH2M/TH2MFEM-impl.h @@ -947,6 +947,9 @@ void TH2MLocalAssembler(temperature_index); + auto const displacement = + local_x.template segment(displacement_index); + constexpr double dt = std::numeric_limits::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( + _element, Nu); ParameterLib::SpatialPosition const pos{ std::nullopt, _element.getID(), ip, MathLib::Point3d( @@ -974,7 +983,14 @@ void TH2MLocalAssembler( + 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 e189ca76043..b94e9cc3c03 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 @@ -