From e3506576e7d5b7a35687bf2a07e1edd8be3f9e5d Mon Sep 17 00:00:00 2001 From: Sharan Roongta Date: Mon, 10 May 2021 14:31:21 +0200 Subject: [PATCH] isobrittle handles stiffness degradation implicitly --- PRIVATE | 2 +- src/phase.f90 | 7 +++++++ src/phase_damage.f90 | 19 +++++++++++++++++++ src/phase_mechanical_elastic.f90 | 8 +------- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/PRIVATE b/PRIVATE index 95f7faea9..6f6acb341 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 95f7faea920dd6956884e4a55f72e5d5b1ffcdc8 +Subproject commit 6f6acb3412fa7bf14b16c0a4994d735b740c7e6f diff --git a/src/phase.f90 b/src/phase.f90 index 927ba6b2b..35cd7db1f 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -241,6 +241,13 @@ module phase end function phase_homogenizedC + module function phase_damage_C(C_homogenized,ph,en) result(C) ! ToDo: SR: better name? + real(pReal), dimension(3,3,3,3), intent(in) :: C_homogenized + integer, intent(in) :: ph,en + real(pReal), dimension(3,3,3,3) :: C + end function phase_damage_C + + module function phase_f_phi(phi,co,ce) result(f) integer, intent(in) :: ce,co real(pReal), intent(in) :: & diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 5a1d5970b..98f7813f3 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -137,6 +137,25 @@ module subroutine damage_init end subroutine damage_init +!-------------------------------------------------------------------------------------------------- +!> @brief returns the degraded/modified elasticity matrix +!-------------------------------------------------------------------------------------------------- +module function phase_damage_C(C_homogenized,ph,en) result(C) + + real(pReal), dimension(3,3,3,3), intent(in) :: C_homogenized + integer, intent(in) :: ph,en + real(pReal), dimension(3,3,3,3) :: C + + damageType: select case (phase_source(ph)) + case (DAMAGE_ISOBRITTLE_ID) damageType + C = C_homogenized * damage_phi(ph,en)**2 + case default damageType + C = C_homogenized + end select damageType + +end function phase_damage_C + + !---------------------------------------------------------------------------------------------- !< @brief returns local part of nonlocal damage driving force !---------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanical_elastic.f90 b/src/phase_mechanical_elastic.f90 index 9c18bfa7f..be0792473 100644 --- a/src/phase_mechanical_elastic.f90 +++ b/src/phase_mechanical_elastic.f90 @@ -94,13 +94,7 @@ module subroutine phase_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & i, j C = math_66toSym3333(phase_homogenizedC(ph,en)) - - DegradationLoop: do d = 1, phase_NstiffnessDegradations(ph) - degradationType: select case(phase_stiffnessDegradation(d,ph)) - case (STIFFNESS_DEGRADATION_damage_ID) degradationType - C = C * damage_phi(ph,en)**2 - end select degradationType - enddo DegradationLoop + C = phase_damage_C(C,ph,en) E = 0.5_pReal*(matmul(transpose(Fe),Fe)-math_I3) !< Green-Lagrange strain in unloaded configuration S = math_mul3333xx33(C,matmul(matmul(transpose(Fi),E),Fi)) !< 2PK stress in lattice configuration in work conjugate with GL strain pulled back to lattice configuration