From bbeb031da5f7eaa872e6974045e407e3f77593d0 Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Wed, 4 Nov 2020 12:43:52 +0100 Subject: [PATCH] only hooke is implemented one function call is enough for the moment. Should complicate/(have switch cases) when other laws apart from hooke is implemented. --- src/constitutive.f90 | 34 +++++++++++++++++++--------------- src/constitutive_mech.f90 | 27 +-------------------------- 2 files changed, 20 insertions(+), 41 deletions(-) diff --git a/src/constitutive.f90 b/src/constitutive.f90 index 71a386903..f207ed884 100644 --- a/src/constitutive.f90 +++ b/src/constitutive.f90 @@ -301,21 +301,6 @@ module constitutive C end subroutine source_damage_isoBrittle_deltaState - module subroutine constitutive_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) - integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element - real(pReal), intent(in), dimension(3,3) :: & - Fe, & !< elastic deformation gradient - Fi !< intermediate deformation gradient - real(pReal), intent(out), dimension(3,3) :: & - S !< 2nd Piola-Kirchhoff stress tensor - real(pReal), intent(out), dimension(3,3,3,3) :: & - dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient - dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient - end subroutine constitutive_SandItsTangents - module subroutine plastic_results end subroutine plastic_results @@ -358,6 +343,25 @@ module constitutive end interface constitutive_dependentState + interface constitutive_SandItsTangents + + module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) + integer, intent(in) :: & + ipc, & !< component-ID of integration point + ip, & !< integration point + el !< element + real(pReal), intent(in), dimension(3,3) :: & + Fe, & !< elastic deformation gradient + Fi !< intermediate deformation gradient + real(pReal), intent(out), dimension(3,3) :: & + S !< 2nd Piola-Kirchhoff stress tensor + real(pReal), intent(out), dimension(3,3,3,3) :: & + dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient + dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient + end subroutine constitutive_hooke_SandItsTangents + + end interface constitutive_SandItsTangents + type :: tDebugOptions logical :: & diff --git a/src/constitutive_mech.f90 b/src/constitutive_mech.f90 index 71169b0ee..9b3c7e5dc 100644 --- a/src/constitutive_mech.f90 +++ b/src/constitutive_mech.f90 @@ -292,36 +292,11 @@ module function plastic_active(plastic_label) result(active_plastic) end function plastic_active -!-------------------------------------------------------------------------------------------------- -!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to -!> the elastic/intermediate deformation gradients depending on the selected elastic law -!! (so far no case switch because only Hooke is implemented) -!-------------------------------------------------------------------------------------------------- -module subroutine constitutive_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) - - integer, intent(in) :: & - ipc, & !< component-ID of integration point - ip, & !< integration point - el !< element - real(pReal), intent(in), dimension(3,3) :: & - Fe, & !< elastic deformation gradient - Fi !< intermediate deformation gradient - real(pReal), intent(out), dimension(3,3) :: & - S !< 2nd Piola-Kirchhoff stress tensor - real(pReal), intent(out), dimension(3,3,3,3) :: & - dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient - dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient - - call constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, Fe, Fi, ipc, ip, el) - -end subroutine constitutive_SandItsTangents - - !-------------------------------------------------------------------------------------------------- !> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to !> the elastic and intermediate deformation gradients using Hooke's law !-------------------------------------------------------------------------------------------------- -subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & +module subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & Fe, Fi, ipc, ip, el) integer, intent(in) :: &