use en/ph access

This commit is contained in:
Martin Diehl 2022-02-04 08:49:00 +01:00
parent 2bd10a1261
commit 3a0596a274
4 changed files with 14 additions and 21 deletions

View File

@ -272,14 +272,12 @@ module phase
type(tRotationContainer), dimension(:), intent(in) :: orientation
end subroutine plastic_nonlocal_updateCompatibility
module subroutine plastic_dependentState(co,ip,el)
module subroutine plastic_dependentState(en,ph)
integer, intent(in) :: &
co, & !< component-ID of integration point
ip, & !< integration point
el !< element
en, &
ph
end subroutine plastic_dependentState
module subroutine damage_anisobrittle_LiAndItsTangent(Ld, dLd_dTstar, S, ph,en)
integer, intent(in) :: ph, en
real(pReal), intent(in), dimension(3,3) :: &
@ -503,7 +501,8 @@ subroutine crystallite_init()
el, & !< counter in element loop
cMax, & !< maximum number of integration point components
iMax, & !< maximum number of integration points
eMax !< maximum number of elements
eMax, & !< maximum number of elements
en, ph
class(tNode), pointer :: &
num_crystallite, &
@ -560,8 +559,10 @@ subroutine crystallite_init()
do ip = 1, iMax
ce = (el-1)*discretization_nIPs + ip
do co = 1,homogenization_Nconstituents(material_homogenizationID(ce))
en = material_phaseEntry(co,ce)
ph = material_phaseID(co,ce)
call crystallite_orientations(co,ip,el)
call plastic_dependentState(co,ip,el) ! update dependent state variables to be consistent with basic states
call plastic_dependentState(en,ph) ! update dependent state variables to be consistent with basic states
end do
end do
end do

View File

@ -431,7 +431,7 @@ function integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) result(broken)
ph = material_phaseID(co,(el-1)*discretization_nIPs + ip)
en = material_phaseEntry(co,(el-1)*discretization_nIPs + ip)
call plastic_dependentState(co,ip,el)
call plastic_dependentState(en,ph)
Lpguess = phase_mechanical_Lp(ph)%data(1:3,1:3,en) ! take as first guess
Liguess = phase_mechanical_Li(ph)%data(1:3,1:3,en) ! take as first guess

View File

@ -341,20 +341,12 @@ end function plastic_dotState
!--------------------------------------------------------------------------------------------------
!> @brief calls microstructure function of the different plasticity constitutive models
!--------------------------------------------------------------------------------------------------
module subroutine plastic_dependentState(co, ip, el)
module subroutine plastic_dependentState(en,ph)
integer, intent(in) :: &
co, & !< component-ID of integration point
ip, & !< integration point
el !< element
en, &
ph
integer :: &
ph, &
en
ph = material_phaseID(co,(el-1)*discretization_nIPs + ip)
en = material_phaseEntry(co,(el-1)*discretization_nIPs + ip)
plasticType: select case (phase_plasticity(ph))

View File

@ -672,8 +672,8 @@ module subroutine nonlocal_dependentState(ph, en)
neighbor_rhoTotal(1,:,n) = sum(abs(rho_neighbor0(:,edg)),2)
neighbor_rhoTotal(2,:,n) = sum(abs(rho_neighbor0(:,scr)),2)
connection_latticeConf(1:3,n) = matmul(invFe, geom(ph)%IPcoordinates(1:3,en) &
- geom(ph)%IPcoordinates(1:3,en-1)) ! ToDo: broken for different materials
connection_latticeConf(1:3,n) = matmul(invFe, geom(ph)%IPcoordinates(1:3,no) &
- geom(ph)%IPcoordinates(1:3,en))
normal_latticeConf = matmul(transpose(invFp), geom(ph)%IPareaNormal(1:3,n,en))
if (math_inner(normal_latticeConf,connection_latticeConf(1:3,n)) < 0.0_pReal) & ! neighboring connection points in opposite direction to face normal: must be periodic image
connection_latticeConf(1:3,n) = normal_latticeConf * geom(ph)%V_0(en)/geom(ph)%IParea(n,en) ! instead take the surface normal scaled with the diameter of the cell