consistent names
This commit is contained in:
parent
494ed244a0
commit
261f32d7c9
|
@ -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
|
||||||
|
|
|
@ -28,7 +28,7 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function source_damage_isoBrittle_init(source_length) result(mySources)
|
module function source_damage_isoBrittle_init(source_length) result(mySources)
|
||||||
|
|
||||||
integer, intent(in) :: source_length
|
integer, intent(in) :: source_length
|
||||||
logical, dimension(:,:), allocatable :: mySources
|
logical, dimension(:,:), allocatable :: mySources
|
||||||
|
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
|
@ -52,7 +52,7 @@ module function source_damage_isoBrittle_init(source_length) result(mySources)
|
||||||
allocate(source_damage_isoBrittle_instance(phases%length), source=0)
|
allocate(source_damage_isoBrittle_instance(phases%length), source=0)
|
||||||
|
|
||||||
do p = 1, phases%length
|
do p = 1, phases%length
|
||||||
phase => phases%get(p)
|
phase => phases%get(p)
|
||||||
if(any(mySources(:,p))) source_damage_isoBrittle_instance(p) = count(mySources(:,1:p))
|
if(any(mySources(:,p))) source_damage_isoBrittle_instance(p) = count(mySources(:,1:p))
|
||||||
if(count(mySources(:,p)) == 0) cycle
|
if(count(mySources(:,p)) == 0) cycle
|
||||||
sources => phase%get('source')
|
sources => phase%get('source')
|
||||||
|
@ -60,7 +60,7 @@ module function source_damage_isoBrittle_init(source_length) result(mySources)
|
||||||
if(mySources(sourceOffset,p)) then
|
if(mySources(sourceOffset,p)) then
|
||||||
source_damage_isoBrittle_offset(p) = sourceOffset
|
source_damage_isoBrittle_offset(p) = sourceOffset
|
||||||
associate(prm => param(source_damage_isoBrittle_instance(p)))
|
associate(prm => param(source_damage_isoBrittle_instance(p)))
|
||||||
src => sources%get(sourceOffset)
|
src => sources%get(sourceOffset)
|
||||||
|
|
||||||
prm%W_crit = src%get_asFloat('W_crit')
|
prm%W_crit = src%get_asFloat('W_crit')
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ module function source_damage_isoBrittle_init(source_length) result(mySources)
|
||||||
#else
|
#else
|
||||||
prm%output = src%get_asStrings('output',defaultVal=emptyStringArray)
|
prm%output = src%get_asStrings('output',defaultVal=emptyStringArray)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
! sanity checks
|
! sanity checks
|
||||||
if (prm%W_crit <= 0.0_pReal) extmsg = trim(extmsg)//' W_crit'
|
if (prm%W_crit <= 0.0_pReal) extmsg = trim(extmsg)//' W_crit'
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue