diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 03a7c620d..12d192025 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -233,7 +233,7 @@ end subroutine homogenization_init !-------------------------------------------------------------------------------------------------- subroutine homogenization_mechanical_response(Delta_t,FEsolving_execIP,FEsolving_execElem) - real(pReal), intent(in) :: Delta_t !< time increment + real(pReal), intent(in) :: Delta_t !< time increment integer, dimension(2), intent(in) :: FEsolving_execElem, FEsolving_execIP integer :: & NiterationMPstate, & @@ -269,7 +269,7 @@ subroutine homogenization_mechanical_response(Delta_t,FEsolving_execIP,FEsolving call mechanical_partition(homogenization_F(1:3,1:3,ce),ce) converged = all([(phase_mechanical_constitutive(Delta_t,co,ip,el),co=1,homogenization_Nconstituents(ho))]) - + converged = converged .and. all([(phase_damage_constitutive(Delta_t,co,ip,el),co=1,homogenization_Nconstituents(ho))]) if (converged) then doneAndHappy = mechanical_updateState(Delta_t,homogenization_F(1:3,1:3,ce),ce) converged = all(doneAndHappy) diff --git a/src/phase.f90 b/src/phase.f90 index b551c4170..49f1adc16 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -221,13 +221,11 @@ module phase end function phase_thermal_constitutive - module function integrateDamageState(Delta_t,co,ce) result(broken) + module function phase_damage_constitutive(Delta_t,co,ip,el) result(converged_) real(pReal), intent(in) :: Delta_t - integer, intent(in) :: & - ce, & - co - logical :: broken - end function integrateDamageState + integer, intent(in) :: co, ip, el + logical :: converged_ + end function phase_damage_constitutive module function phase_mechanical_constitutive(Delta_t,co,ip,el) result(converged_) real(pReal), intent(in) :: Delta_t @@ -321,12 +319,12 @@ module phase crystallite_init, & phase_mechanical_constitutive, & phase_thermal_constitutive, & + phase_damage_constitutive, & phase_mechanical_dPdF, & crystallite_orientations, & crystallite_push33ToRef, & phase_restartWrite, & phase_restartRead, & - integrateDamageState, & phase_thermal_setField, & phase_set_phi, & phase_P, & diff --git a/src/phase_damage.f90 b/src/phase_damage.f90 index 89d3b1653..4164854fe 100644 --- a/src/phase_damage.f90 +++ b/src/phase_damage.f90 @@ -125,6 +125,27 @@ module subroutine damage_init end subroutine damage_init +!-------------------------------------------------------------------------------------------------- +!> @brief calculate stress (P) +!-------------------------------------------------------------------------------------------------- +module function phase_damage_constitutive(Delta_t,co,ip,el) result(converged_) + + real(pReal), intent(in) :: Delta_t + integer, intent(in) :: & + co, & + ip, & + el + logical :: converged_ + + integer :: & + ph, en + + + converged_ = .not. integrateDamageState(Delta_t,co,(el-1)*discretization_nIPs + ip) + +end function phase_damage_constitutive + + !-------------------------------------------------------------------------------------------------- !> @brief returns the degraded/modified elasticity matrix !-------------------------------------------------------------------------------------------------- @@ -197,7 +218,7 @@ end function phase_f_phi !> @brief integrate stress, state with adaptive 1st order explicit Euler method !> using Fixed Point Iteration to adapt the stepsize !-------------------------------------------------------------------------------------------------- -module function integrateDamageState(Delta_t,co,ce) result(broken) +function integrateDamageState(Delta_t,co,ce) result(broken) real(pReal), intent(in) :: Delta_t integer, intent(in) :: & diff --git a/src/phase_mechanical.f90 b/src/phase_mechanical.f90 index e03998989..8b04a0009 100644 --- a/src/phase_mechanical.f90 +++ b/src/phase_mechanical.f90 @@ -1059,8 +1059,6 @@ module function phase_mechanical_constitutive(Delta_t,co,ip,el) result(converged enddo cutbackLooping - converged_ = converged_ .and. .not. integrateDamageState(Delta_t,co,(el-1)*discretization_nIPs + ip) - end function phase_mechanical_constitutive