consistent names

This commit is contained in:
Martin Diehl 2021-01-19 10:21:51 +01:00
parent 494ed244a0
commit 261f32d7c9
2 changed files with 23 additions and 25 deletions

View File

@ -411,14 +411,14 @@ end function constitutive_damage_collectDotState
!> @brief for constitutive models having an instantaneous change of state !> @brief for constitutive models having an instantaneous change of state
!> will return false if delta state is not needed/supported by the constitutive model !> will return false if delta state is not needed/supported by the constitutive model
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function constitutive_damage_deltaState(Fe, co, ip, el, ph, of) result(broken) function constitutive_damage_deltaState(Fe, co, ip, el, ph, me) result(broken)
integer, intent(in) :: & integer, intent(in) :: &
co, & !< component-ID of integration point co, & !< component-ID me integration point
ip, & !< integration point ip, & !< integration point
el, & !< element el, & !< element
ph, & ph, &
of me
real(pReal), intent(in), dimension(3,3) :: & real(pReal), intent(in), dimension(3,3) :: &
Fe !< elastic deformation gradient Fe !< elastic deformation gradient
integer :: & integer :: &
@ -436,15 +436,13 @@ function constitutive_damage_deltaState(Fe, co, ip, el, ph, of) result(broken)
sourceType: select case (phase_source(so,ph)) sourceType: select case (phase_source(so,ph))
case (DAMAGE_ISOBRITTLE_ID) sourceType case (DAMAGE_ISOBRITTLE_ID) sourceType
call source_damage_isoBrittle_deltaState (constitutive_homogenizedC(material_phaseAt(co,el), & call source_damage_isoBrittle_deltaState(constitutive_homogenizedC(ph,me), Fe, co, ip, el)
material_phaseMemberAt(co,ip,el)), Fe, & broken = any(IEEE_is_NaN(damageState(ph)%p(so)%deltaState(:,me)))
co, ip, el)
broken = any(IEEE_is_NaN(damageState(ph)%p(so)%deltaState(:,of)))
if(.not. broken) then if(.not. broken) then
myOffset = damageState(ph)%p(so)%offsetDeltaState myOffset = damageState(ph)%p(so)%offsetDeltaState
mySize = damageState(ph)%p(so)%sizeDeltaState mySize = damageState(ph)%p(so)%sizeDeltaState
damageState(ph)%p(so)%state(myOffset + 1: myOffset + mySize,of) = & damageState(ph)%p(so)%state(myOffset + 1: myOffset + mySize,me) = &
damageState(ph)%p(so)%state(myOffset + 1: myOffset + mySize,of) + damageState(ph)%p(so)%deltaState(1:mySize,of) damageState(ph)%p(so)%state(myOffset + 1: myOffset + mySize,me) + damageState(ph)%p(so)%deltaState(1:mySize,me)
endif endif
end select sourceType end select sourceType

View File

@ -106,31 +106,31 @@ module subroutine source_damage_isoBrittle_deltaState(C, Fe, co, ip, el)
C C
integer :: & integer :: &
phase, & ph, &
constituent, & me, &
sourceOffset sourceOffset
real(pReal), dimension(6) :: & real(pReal), dimension(6) :: &
strain strain
real(pReal) :: & real(pReal) :: &
strainenergy strainenergy
phase = material_phaseAt(co,el) !< phase ID at co,ip,el ph = material_phaseAt(co,el) !< ph ID at co,ip,el
constituent = material_phasememberAt(co,ip,el) !< state array offset for phase ID at co,ip,el me = material_phasememberAt(co,ip,el) !< state array offset for ph ID at co,ip,el
sourceOffset = source_damage_isoBrittle_offset(phase) sourceOffset = source_damage_isoBrittle_offset(ph)
strain = 0.5_pReal*math_sym33to6(matmul(transpose(Fe),Fe)-math_I3) strain = 0.5_pReal*math_sym33to6(matmul(transpose(Fe),Fe)-math_I3)
associate(prm => param(source_damage_isoBrittle_instance(phase))) associate(prm => param(source_damage_isoBrittle_instance(ph)))
strainenergy = 2.0_pReal*sum(strain*matmul(C,strain))/prm%W_crit strainenergy = 2.0_pReal*sum(strain*matmul(C,strain))/prm%W_crit
! ToDo: check strainenergy = 2.0_pReal*dot_product(strain,matmul(C,strain))/prm%W_crit ! ToDo: check strainenergy = 2.0_pReal*dot_product(strain,matmul(C,strain))/prm%W_crit
if (strainenergy > damageState(phase)%p(sourceOffset)%subState0(1,constituent)) then if (strainenergy > damageState(ph)%p(sourceOffset)%subState0(1,me)) then
damageState(phase)%p(sourceOffset)%deltaState(1,constituent) = & damageState(ph)%p(sourceOffset)%deltaState(1,me) = &
strainenergy - damageState(phase)%p(sourceOffset)%state(1,constituent) strainenergy - damageState(ph)%p(sourceOffset)%state(1,me)
else else
damageState(phase)%p(sourceOffset)%deltaState(1,constituent) = & damageState(ph)%p(sourceOffset)%deltaState(1,me) = &
damageState(phase)%p(sourceOffset)%subState0(1,constituent) - & damageState(ph)%p(sourceOffset)%subState0(1,me) - &
damageState(phase)%p(sourceOffset)%state(1,constituent) damageState(ph)%p(sourceOffset)%state(1,me)
endif endif
end associate end associate