consistent access via (ph)ase and phase(me)mber
This commit is contained in:
parent
d2ae859b1c
commit
494ed244a0
|
@ -229,8 +229,8 @@ module constitutive
|
||||||
logical :: converged_
|
logical :: converged_
|
||||||
end function crystallite_stress
|
end function crystallite_stress
|
||||||
|
|
||||||
module function constitutive_homogenizedC(co,ip,el) result(C)
|
module function constitutive_homogenizedC(ph,me) result(C)
|
||||||
integer, intent(in) :: co, ip, el
|
integer, intent(in) :: ph, me
|
||||||
real(pReal), dimension(6,6) :: C
|
real(pReal), dimension(6,6) :: C
|
||||||
end function constitutive_homogenizedC
|
end function constitutive_homogenizedC
|
||||||
|
|
||||||
|
|
|
@ -436,7 +436,8 @@ 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(co,ip,el), Fe, &
|
call source_damage_isoBrittle_deltaState (constitutive_homogenizedC(material_phaseAt(co,el), &
|
||||||
|
material_phaseMemberAt(co,ip,el)), Fe, &
|
||||||
co, ip, el)
|
co, ip, el)
|
||||||
broken = any(IEEE_is_NaN(damageState(ph)%p(so)%deltaState(:,of)))
|
broken = any(IEEE_is_NaN(damageState(ph)%p(so)%deltaState(:,of)))
|
||||||
if(.not. broken) then
|
if(.not. broken) then
|
||||||
|
|
|
@ -307,13 +307,9 @@ submodule(constitutive) constitutive_mech
|
||||||
character(len=*), intent(in) :: group
|
character(len=*), intent(in) :: group
|
||||||
end subroutine plastic_nonlocal_results
|
end subroutine plastic_nonlocal_results
|
||||||
|
|
||||||
module function plastic_dislotwin_homogenizedC(co,ip,el) result(homogenizedC)
|
module function plastic_dislotwin_homogenizedC(ph,me) result(homogenizedC)
|
||||||
real(pReal), dimension(6,6) :: &
|
real(pReal), dimension(6,6) :: homogenizedC
|
||||||
homogenizedC
|
integer, intent(in) :: ph,me
|
||||||
integer, intent(in) :: &
|
|
||||||
co, & !< component-ID of integration point
|
|
||||||
ip, & !< integration point
|
|
||||||
el !< element
|
|
||||||
end function plastic_dislotwin_homogenizedC
|
end function plastic_dislotwin_homogenizedC
|
||||||
|
|
||||||
|
|
||||||
|
@ -559,16 +555,16 @@ subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, &
|
||||||
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
||||||
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
|
dS_dFe, & !< derivative of 2nd P-K stress with respect to elastic deformation gradient
|
||||||
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
|
dS_dFi !< derivative of 2nd P-K stress with respect to intermediate deformation gradient
|
||||||
|
|
||||||
real(pReal), dimension(3,3) :: E
|
real(pReal), dimension(3,3) :: E
|
||||||
real(pReal), dimension(3,3,3,3) :: C
|
real(pReal), dimension(3,3,3,3) :: C
|
||||||
integer :: &
|
integer :: &
|
||||||
ho, & !< homogenization
|
ho, & !< homogenization
|
||||||
d !< counter in degradation loop
|
d, & !< counter in degradation loop
|
||||||
integer :: &
|
i, j, ph, me
|
||||||
i, j
|
|
||||||
|
|
||||||
ho = material_homogenizationAt(el)
|
ho = material_homogenizationAt(el)
|
||||||
C = math_66toSym3333(constitutive_homogenizedC(co,ip,el))
|
C = math_66toSym3333(constitutive_homogenizedC(material_phaseAt(co,el),material_phaseMemberAt(co,ip,el)))
|
||||||
|
|
||||||
DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(co,el))
|
DegradationLoop: do d = 1, phase_NstiffnessDegradations(material_phaseAt(co,el))
|
||||||
degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(co,el)))
|
degradationType: select case(phase_stiffnessDegradation(d,material_phaseAt(co,el)))
|
||||||
|
@ -1535,19 +1531,16 @@ end subroutine mech_forward
|
||||||
!> @brief returns the homogenize elasticity matrix
|
!> @brief returns the homogenize elasticity matrix
|
||||||
!> ToDo: homogenizedC66 would be more consistent
|
!> ToDo: homogenizedC66 would be more consistent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function constitutive_homogenizedC(co,ip,el) result(C)
|
module function constitutive_homogenizedC(ph,me) result(C)
|
||||||
|
|
||||||
real(pReal), dimension(6,6) :: C
|
real(pReal), dimension(6,6) :: C
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: ph, me
|
||||||
co, & !< component-ID of integration point
|
|
||||||
ip, & !< integration point
|
|
||||||
el !< element
|
|
||||||
|
|
||||||
plasticityType: select case (phase_plasticity(material_phaseAt(co,el)))
|
plasticityType: select case (phase_plasticity(ph))
|
||||||
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
case (PLASTICITY_DISLOTWIN_ID) plasticityType
|
||||||
C = plastic_dislotwin_homogenizedC(co,ip,el)
|
C = plastic_dislotwin_homogenizedC(ph,me)
|
||||||
case default plasticityType
|
case default plasticityType
|
||||||
C = lattice_C66(1:6,1:6,material_phaseAt(co,el))
|
C = lattice_C66(1:6,1:6,ph)
|
||||||
end select plasticityType
|
end select plasticityType
|
||||||
|
|
||||||
end function constitutive_homogenizedC
|
end function constitutive_homogenizedC
|
||||||
|
|
|
@ -485,35 +485,32 @@ end function plastic_dislotwin_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Return the homogenized elasticity matrix.
|
!> @brief Return the homogenized elasticity matrix.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module function plastic_dislotwin_homogenizedC(co,ip,el) result(homogenizedC)
|
module function plastic_dislotwin_homogenizedC(ph,me) result(homogenizedC)
|
||||||
|
|
||||||
|
integer, intent(in) :: &
|
||||||
|
ph, me
|
||||||
real(pReal), dimension(6,6) :: &
|
real(pReal), dimension(6,6) :: &
|
||||||
homogenizedC
|
homogenizedC
|
||||||
integer, intent(in) :: &
|
|
||||||
co, & !< component-ID of integration point
|
|
||||||
ip, & !< integration point
|
|
||||||
el !< element
|
|
||||||
|
|
||||||
integer :: i, &
|
integer :: i
|
||||||
of
|
|
||||||
real(pReal) :: f_unrotated
|
real(pReal) :: f_unrotated
|
||||||
|
|
||||||
of = material_phasememberAt(co,ip,el)
|
|
||||||
associate(prm => param(phase_plasticityInstance(material_phaseAt(co,el))),&
|
associate(prm => param(phase_plasticityInstance(ph)),&
|
||||||
stt => state(phase_plasticityInstance(material_phaseAT(co,el))))
|
stt => state(phase_plasticityInstance(ph)))
|
||||||
|
|
||||||
f_unrotated = 1.0_pReal &
|
f_unrotated = 1.0_pReal &
|
||||||
- sum(stt%f_tw(1:prm%sum_N_tw,of)) &
|
- sum(stt%f_tw(1:prm%sum_N_tw,me)) &
|
||||||
- sum(stt%f_tr(1:prm%sum_N_tr,of))
|
- sum(stt%f_tr(1:prm%sum_N_tr,me))
|
||||||
|
|
||||||
homogenizedC = f_unrotated * prm%C66
|
homogenizedC = f_unrotated * prm%C66
|
||||||
do i=1,prm%sum_N_tw
|
do i=1,prm%sum_N_tw
|
||||||
homogenizedC = homogenizedC &
|
homogenizedC = homogenizedC &
|
||||||
+ stt%f_tw(i,of)*prm%C66_tw(1:6,1:6,i)
|
+ stt%f_tw(i,me)*prm%C66_tw(1:6,1:6,i)
|
||||||
enddo
|
enddo
|
||||||
do i=1,prm%sum_N_tr
|
do i=1,prm%sum_N_tr
|
||||||
homogenizedC = homogenizedC &
|
homogenizedC = homogenizedC &
|
||||||
+ stt%f_tr(i,of)*prm%C66_tr(1:6,1:6,i)
|
+ stt%f_tr(i,me)*prm%C66_tr(1:6,1:6,i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
|
@ -656,8 +656,11 @@ module function mech_RGC_updateState(P,F,avgF,dt,dPdF,ip,el) result(doneAndHappy
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
el !< element number
|
el !< element number
|
||||||
|
|
||||||
|
real(pReal), dimension(6,6) :: C
|
||||||
|
|
||||||
equivalentMu = lattice_equivalent_mu(constitutive_homogenizedC(grainID,ip,el),'voigt')
|
|
||||||
|
C = constitutive_homogenizedC(material_phaseAt(grainID,el),material_phaseMemberAt(grainID,ip,el))
|
||||||
|
equivalentMu = lattice_equivalent_mu(C,'voigt')
|
||||||
|
|
||||||
end function equivalentMu
|
end function equivalentMu
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue