diff --git a/ProcessLib/LargeDeformation/ConstitutiveRelations/Base.h b/ProcessLib/LargeDeformation/ConstitutiveRelations/Base.h index 004e8170611c9bfef39f57bdedb008cd9c80653e..5a6c28d48dfef442a652798c8d9ffd68df4b19c9 100644 --- a/ProcessLib/LargeDeformation/ConstitutiveRelations/Base.h +++ b/ProcessLib/LargeDeformation/ConstitutiveRelations/Base.h @@ -132,13 +132,17 @@ struct DeformationGradientData // TODO Move initialization to the local assembler. MaterialPropertyLib::Tensor<DisplacementDim> deformation_gradient = MaterialPropertyLib::Tensor<DisplacementDim>::Zero(); + double volume_ratio = 0; static auto reflect() { using Self = DeformationGradientData<DisplacementDim>; - return ProcessLib::Reflection::reflectWithName( - "deformation_gradient", &Self::deformation_gradient); + return std::tuple{ + ProcessLib::Reflection::makeReflectionData( + "deformation_gradient", &Self::deformation_gradient), + ProcessLib::Reflection::makeReflectionData("volume_ratio", + &Self::volume_ratio)}; } }; diff --git a/ProcessLib/LargeDeformation/LargeDeformationFEM.h b/ProcessLib/LargeDeformation/LargeDeformationFEM.h index f6d8a4abebd87d93be3ce4d760f1e57e2bb71316..d54fcd6bf034f98ca4e456dbf4418de5d47c7260 100644 --- a/ProcessLib/LargeDeformation/LargeDeformationFEM.h +++ b/ProcessLib/LargeDeformation/LargeDeformationFEM.h @@ -239,6 +239,9 @@ public: output_data.eps_data.eps = B * u; output_data.deformation_gradient_data.deformation_gradient = grad_u + MathLib::VectorizedTensor::identity<DisplacementDim>(); + output_data.deformation_gradient_data.volume_ratio = + MathLib::VectorizedTensor::determinant( + output_data.deformation_gradient_data.deformation_gradient); CS.eval( models, t, dt, x_position, //