From c0584b47e1330a56fbbdfc262f781cd3c306392a Mon Sep 17 00:00:00 2001 From: Pratheek Shanthraj Date: Sat, 11 Oct 2014 10:09:36 +0000 Subject: [PATCH] modified damage diffusion tensor for brittle damage so this is now doing griffith's fracture criterion --- code/constitutive.f90 | 37 +++++++++++++++++++++++++++++++++++++ code/damage_brittle.f90 | 29 +++++++++++++++++++++++++++++ code/homogenization.f90 | 7 +++---- 3 files changed, 69 insertions(+), 4 deletions(-) diff --git a/code/constitutive.f90 b/code/constitutive.f90 index 22c8e8edd..ca115d111 100644 --- a/code/constitutive.f90 +++ b/code/constitutive.f90 @@ -32,6 +32,7 @@ module constitutive constitutive_getLocalDamage, & constitutive_putLocalDamage, & constitutive_getDamage, & + constitutive_getDamageDiffusion33, & constitutive_getAdiabaticTemperature, & constitutive_putAdiabaticTemperature, & constitutive_getTemperature, & @@ -1019,6 +1020,42 @@ function constitutive_getDamage(ipc, ip, el) end select end function constitutive_getDamage + +!-------------------------------------------------------------------------------------------------- +!> @brief returns damage diffusion tensor +!-------------------------------------------------------------------------------------------------- +function constitutive_getDamageDiffusion33(ipc, ip, el) + use prec, only: & + pReal + use lattice, only: & + lattice_DamageDiffusion33 + use material, only: & + material_phase, & + LOCAL_DAMAGE_none_ID, & + LOCAL_DAMAGE_brittle_ID, & + LOCAL_DAMAGE_ductile_ID, & + LOCAL_DAMAGE_gurson_ID, & + phase_damage + use damage_brittle, only: & + damage_brittle_getDamageDiffusion33 + + implicit none + integer(pInt), intent(in) :: & + ipc, & !< grain number + ip, & !< integration point number + el !< element number + real(pReal), dimension(3,3) :: & + constitutive_getDamageDiffusion33 + + constitutive_getDamageDiffusion33 = lattice_DamageDiffusion33(1:3,1:3,material_phase(ipc,ip,el)) + select case(phase_damage(material_phase(ipc,ip,el))) + case (LOCAL_DAMAGE_brittle_ID) + constitutive_getDamageDiffusion33 = damage_brittle_getDamageDiffusion33(ipc, ip, el) + + end select + +end function constitutive_getDamageDiffusion33 + !-------------------------------------------------------------------------------------------------- !> @brief returns local (unregularised) temperature !-------------------------------------------------------------------------------------------------- diff --git a/code/damage_brittle.f90 b/code/damage_brittle.f90 index ee861ef14..da64b1f12 100644 --- a/code/damage_brittle.f90 +++ b/code/damage_brittle.f90 @@ -46,6 +46,7 @@ module damage_brittle damage_brittle_microstructure, & constitutive_brittle_getDamage, & constitutive_brittle_putDamage, & + damage_brittle_getDamageDiffusion33, & damage_brittle_postResults contains @@ -361,6 +362,34 @@ subroutine constitutive_brittle_putDamage(ipc, ip, el, localDamage) end subroutine constitutive_brittle_putDamage +!-------------------------------------------------------------------------------------------------- +!> @brief returns brittle damage diffusion tensor +!-------------------------------------------------------------------------------------------------- +function damage_brittle_getDamageDiffusion33(ipc, ip, el) + use lattice, only: & + lattice_DamageDiffusion33 + use material, only: & + mappingConstitutive, & + damageState + + implicit none + integer(pInt), intent(in) :: & + ipc, & !< grain number + ip, & !< integration point number + el !< element number + real(pReal), dimension(3,3) :: & + damage_brittle_getDamageDiffusion33 + integer(pInt) :: & + phase, constituent + + phase = mappingConstitutive(2,ipc,ip,el) + constituent = mappingConstitutive(1,ipc,ip,el) + damage_brittle_getDamageDiffusion33 = & + damageState(phase)%state(2,constituent)* & + lattice_DamageDiffusion33(1:3,1:3,phase) + +end function damage_brittle_getDamageDiffusion33 + !-------------------------------------------------------------------------------------------------- !> @brief return array of constitutive results !-------------------------------------------------------------------------------------------------- diff --git a/code/homogenization.f90 b/code/homogenization.f90 index 368704414..10b7020e5 100644 --- a/code/homogenization.f90 +++ b/code/homogenization.f90 @@ -1029,16 +1029,15 @@ end function field_getThermalConductivity33 function field_getDamageDiffusion33(ip,el) use mesh, only: & mesh_element - use lattice, only: & - lattice_DamageDiffusion33 use material, only: & - material_phase, & material_homog, & field_damage_type, & FIELD_DAMAGE_NONLOCAL_ID, & homogenization_Ngrains use crystallite, only: & crystallite_push33ToRef + use constitutive, only: & + constitutive_getDamageDiffusion33 implicit none real(pReal), dimension(3,3) :: field_getDamageDiffusion33 @@ -1054,7 +1053,7 @@ function field_getDamageDiffusion33(ip,el) case (FIELD_DAMAGE_NONLOCAL_ID) do ipc = 1, homogenization_Ngrains(mesh_element(3,el)) field_getDamageDiffusion33 = field_getDamageDiffusion33 + & - crystallite_push33ToRef(ipc,ip,el,lattice_DamageDiffusion33(:,:,material_phase(ipc,ip,el))) + crystallite_push33ToRef(ipc,ip,el,constitutive_getDamageDiffusion33(ipc,ip,el)) enddo end select