diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 2408462c9..195ede741 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -166,6 +166,11 @@ module homogenization real(pReal) :: mu end function homogenization_mu_phi + module function homogenization_K_phi(ce) result(K) + integer, intent(in) :: ce + real(pReal), dimension(3,3) :: K + end function homogenization_K_phi + module function homogenization_f_phi(phi,ce) result(f) integer, intent(in) :: ce real(pReal), intent(in) :: phi @@ -441,32 +446,6 @@ subroutine homogenization_restartRead(fileHandle) end subroutine homogenization_restartRead -!-------------------------------------------------------------------------------------------------- -!> @brief returns homogenized non local damage diffusion tensor in reference configuration -!-------------------------------------------------------------------------------------------------- -function homogenization_K_phi(ce) - - integer, intent(in) :: ce - real(pReal), dimension(3,3) :: & - homogenization_K_phi - integer :: & - ho, & - co - - ho = material_homogenizationID(ce) - homogenization_K_phi = 0.0_pReal - - do co = 1, homogenization_Nconstituents(ho) - homogenization_K_phi = homogenization_K_phi + & - crystallite_push33ToRef(co,ce,lattice_K_phi(1:3,1:3,material_phaseID(co,ce))) - enddo - - homogenization_K_phi = & - num_damage%charLength**2*homogenization_K_phi/real(homogenization_Nconstituents(ho),pReal) - -end function homogenization_K_phi - - !-------------------------------------------------------------------------------------------------- !> @brief parses the homogenization part from the material configuration !-------------------------------------------------------------------------------------------------- diff --git a/src/homogenization_damage.f90 b/src/homogenization_damage.f90 index c7c82331b..79906b8f0 100644 --- a/src/homogenization_damage.f90 +++ b/src/homogenization_damage.f90 @@ -154,6 +154,21 @@ module subroutine homogenization_set_phi(phi,ce) end subroutine homogenization_set_phi +!-------------------------------------------------------------------------------------------------- +!> @brief returns homogenized non local damage diffusion tensor in reference configuration +!-------------------------------------------------------------------------------------------------- +module function homogenization_K_phi(ce) result(K) + + integer, intent(in) :: ce + real(pReal), dimension(3,3) :: K + + + K = crystallite_push33ToRef(1,ce,lattice_K_phi(1:3,1:3,material_phaseID(1,ce))) \ + * num_damage%charLength**2 + +end function homogenization_K_phi + + !-------------------------------------------------------------------------------------------------- !> @brief writes results to HDF5 output file !-------------------------------------------------------------------------------------------------- diff --git a/src/homogenization_thermal.f90 b/src/homogenization_thermal.f90 index eb9f796ce..6e47d8854 100644 --- a/src/homogenization_thermal.f90 +++ b/src/homogenization_thermal.f90 @@ -229,7 +229,6 @@ module function homogenization_T(ce) result(T) end function homogenization_T - !-------------------------------------------------------------------------------------------------- !> @brief return heat generation rate !--------------------------------------------------------------------------------------------------