new names

This commit is contained in:
Martin Diehl 2020-12-23 14:24:44 +01:00
parent 8ac880c0ad
commit be4616368b
1 changed files with 70 additions and 70 deletions

View File

@ -150,8 +150,8 @@ subroutine materialpoint_stressAndItsTangent(dt)
integer :: & integer :: &
NiterationHomog, & NiterationHomog, &
NiterationMPstate, & NiterationMPstate, &
i, & !< integration point number ip, & !< integration point number
e, & !< element number el, & !< element number
myNgrains, co myNgrains, co
real(pReal), dimension(discretization_nIPs,discretization_Nelems) :: & real(pReal), dimension(discretization_nIPs,discretization_Nelems) :: &
subFrac, & subFrac, &
@ -161,28 +161,28 @@ subroutine materialpoint_stressAndItsTangent(dt)
converged converged
logical, dimension(2,discretization_nIPs,discretization_Nelems) :: & logical, dimension(2,discretization_nIPs,discretization_Nelems) :: &
doneAndHappy doneAndHappy
integer :: m integer :: ce
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! initialize restoration points ! initialize restoration points
do e = FEsolving_execElem(1),FEsolving_execElem(2) do el = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1),FEsolving_execIP(2); do ip = FEsolving_execIP(1),FEsolving_execIP(2);
call constitutive_initializeRestorationPoints(i,e) call constitutive_initializeRestorationPoints(ip,el)
subFrac(i,e) = 0.0_pReal subFrac(ip,el) = 0.0_pReal
converged(i,e) = .false. ! pretend failed step ... converged(ip,el) = .false. ! pretend failed step ...
subStep(i,e) = 1.0_pReal/num%subStepSizeHomog ! ... larger then the requested calculation subStep(ip,el) = 1.0_pReal/num%subStepSizeHomog ! ... larger then the requested calculation
requested(i,e) = .true. ! everybody requires calculation requested(ip,el) = .true. ! everybody requires calculation
if (homogState(material_homogenizationAt(e))%sizeState > 0) & if (homogState(material_homogenizationAt(el))%sizeState > 0) &
homogState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) = & homogState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = &
homogState(material_homogenizationAt(e))%State0( :,material_homogenizationMemberAt(i,e)) homogState(material_homogenizationAt(el))%State0( :,material_homogenizationMemberAt(ip,el))
if (damageState(material_homogenizationAt(e))%sizeState > 0) & if (damageState(material_homogenizationAt(el))%sizeState > 0) &
damageState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) = & damageState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = &
damageState(material_homogenizationAt(e))%State0( :,material_homogenizationMemberAt(i,e)) damageState(material_homogenizationAt(el))%State0( :,material_homogenizationMemberAt(ip,el))
enddo enddo
enddo enddo
@ -192,93 +192,93 @@ subroutine materialpoint_stressAndItsTangent(dt)
any(subStep(FEsolving_execIP(1):FEsolving_execIP(2),& any(subStep(FEsolving_execIP(1):FEsolving_execIP(2),&
FEsolving_execElem(1):FEsolving_execElem(2)) > num%subStepMinHomog)) FEsolving_execElem(1):FEsolving_execElem(2)) > num%subStepMinHomog))
!$OMP PARALLEL DO PRIVATE(m,myNgrains,NiterationMPstate) !$OMP PARALLEL DO PRIVATE(ce,myNgrains,NiterationMPstate)
elementLooping1: do e = FEsolving_execElem(1),FEsolving_execElem(2) elementLooping1: do el = FEsolving_execElem(1),FEsolving_execElem(2)
myNgrains = homogenization_Nconstituents(material_homogenizationAt(e)) myNgrains = homogenization_Nconstituents(material_homogenizationAt(el))
IpLooping1: do i = FEsolving_execIP(1),FEsolving_execIP(2) IpLooping1: do ip = FEsolving_execIP(1),FEsolving_execIP(2)
if (converged(i,e)) then if (converged(ip,el)) then
subFrac(i,e) = subFrac(i,e) + subStep(i,e) subFrac(ip,el) = subFrac(ip,el) + subStep(ip,el)
subStep(i,e) = min(1.0_pReal-subFrac(i,e),num%stepIncreaseHomog*subStep(i,e)) ! introduce flexibility for step increase/acceleration subStep(ip,el) = min(1.0_pReal-subFrac(ip,el),num%stepIncreaseHomog*subStep(ip,el)) ! introduce flexibility for step increase/acceleration
steppingNeeded: if (subStep(i,e) > num%subStepMinHomog) then steppingNeeded: if (subStep(ip,el) > num%subStepMinHomog) then
! wind forward grain starting point ! wind forward grain starting point
call constitutive_windForward(i,e) call constitutive_windForward(ip,el)
if(homogState(material_homogenizationAt(e))%sizeState > 0) & if(homogState(material_homogenizationAt(el))%sizeState > 0) &
homogState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) = & homogState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = &
homogState(material_homogenizationAt(e))%State (:,material_homogenizationMemberAt(i,e)) homogState(material_homogenizationAt(el))%State (:,material_homogenizationMemberAt(ip,el))
if(damageState(material_homogenizationAt(e))%sizeState > 0) & if(damageState(material_homogenizationAt(el))%sizeState > 0) &
damageState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) = & damageState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el)) = &
damageState(material_homogenizationAt(e))%State (:,material_homogenizationMemberAt(i,e)) damageState(material_homogenizationAt(el))%State (:,material_homogenizationMemberAt(ip,el))
endif steppingNeeded endif steppingNeeded
else else
if ( (myNgrains == 1 .and. subStep(i,e) <= 1.0 ) .or. & ! single grain already tried internal subStepping in crystallite if ( (myNgrains == 1 .and. subStep(ip,el) <= 1.0 ) .or. & ! single grain already tried internal subStepping in crystallite
num%subStepSizeHomog * subStep(i,e) <= num%subStepMinHomog ) then ! would require too small subStep num%subStepSizeHomog * subStep(ip,el) <= num%subStepMinHomog ) then ! would require too small subStep
! cutback makes no sense ! cutback makes no sense
if (.not. terminallyIll) then ! so first signals terminally ill... if (.not. terminallyIll) then ! so first signals terminally ill...
print*, ' Integration point ', i,' at element ', e, ' terminally ill' print*, ' Integration point ', ip,' at element ', el, ' terminally ill'
endif endif
terminallyIll = .true. ! ...and kills all others terminallyIll = .true. ! ...and kills all others
else ! cutback makes sense else ! cutback makes sense
subStep(i,e) = num%subStepSizeHomog * subStep(i,e) ! crystallite had severe trouble, so do a significant cutback subStep(ip,el) = num%subStepSizeHomog * subStep(ip,el) ! crystallite had severe trouble, so do a significant cutback
call crystallite_restore(i,e,subStep(i,e) < 1.0_pReal) call crystallite_restore(ip,el,subStep(ip,el) < 1.0_pReal)
call constitutive_restore(i,e) call constitutive_restore(ip,el)
if(homogState(material_homogenizationAt(e))%sizeState > 0) & if(homogState(material_homogenizationAt(el))%sizeState > 0) &
homogState(material_homogenizationAt(e))%State( :,material_homogenizationMemberAt(i,e)) = & homogState(material_homogenizationAt(el))%State( :,material_homogenizationMemberAt(ip,el)) = &
homogState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) homogState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el))
if(damageState(material_homogenizationAt(e))%sizeState > 0) & if(damageState(material_homogenizationAt(el))%sizeState > 0) &
damageState(material_homogenizationAt(e))%State( :,material_homogenizationMemberAt(i,e)) = & damageState(material_homogenizationAt(el))%State( :,material_homogenizationMemberAt(ip,el)) = &
damageState(material_homogenizationAt(e))%subState0(:,material_homogenizationMemberAt(i,e)) damageState(material_homogenizationAt(el))%subState0(:,material_homogenizationMemberAt(ip,el))
endif endif
endif endif
if (subStep(i,e) > num%subStepMinHomog) then if (subStep(ip,el) > num%subStepMinHomog) then
requested(i,e) = .true. requested(ip,el) = .true.
doneAndHappy(1:2,i,e) = [.false.,.true.] doneAndHappy(1:2,ip,el) = [.false.,.true.]
endif endif
NiterationMPstate = 0 NiterationMPstate = 0
convergenceLooping: do while (.not. terminallyIll .and. requested(i,e) & convergenceLooping: do while (.not. terminallyIll .and. requested(ip,el) &
.and. .not. doneAndHappy(1,i,e) & .and. .not. doneAndHappy(1,ip,el) &
.and. NiterationMPstate < num%nMPstate) .and. NiterationMPstate < num%nMPstate)
NiterationMPstate = NiterationMPstate + 1 NiterationMPstate = NiterationMPstate + 1
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! deformation partitioning ! deformation partitioning
if(requested(i,e) .and. .not. doneAndHappy(1,i,e)) then ! requested but not yet done if(requested(ip,el) .and. .not. doneAndHappy(1,ip,el)) then ! requested but not yet done
m = (e-1)*discretization_nIPs + i ce = (el-1)*discretization_nIPs + ip
call mech_partition(homogenization_F0(1:3,1:3,m) & call mech_partition(homogenization_F0(1:3,1:3,ce) &
+ (homogenization_F(1:3,1:3,m)-homogenization_F0(1:3,1:3,m))& + (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce))&
*(subStep(i,e)+subFrac(i,e)), & *(subStep(ip,el)+subFrac(ip,el)), &
i,e) ip,el)
crystallite_dt(1:myNgrains,i,e) = dt*subStep(i,e) ! propagate materialpoint dt to grains crystallite_dt(1:myNgrains,ip,el) = dt*subStep(ip,el) ! propagate materialpoint dt to grains
converged(i,e) = .true. converged(ip,el) = .true.
do co = 1, myNgrains do co = 1, myNgrains
converged(i,e) = converged(i,e) .and. crystallite_stress(co,i,e) converged(ip,el) = converged(ip,el) .and. crystallite_stress(co,ip,el)
enddo enddo
endif endif
if (requested(i,e) .and. .not. doneAndHappy(1,i,e)) then if (requested(ip,el) .and. .not. doneAndHappy(1,ip,el)) then
if (.not. converged(i,e)) then if (.not. converged(ip,el)) then
doneAndHappy(1:2,i,e) = [.true.,.false.] doneAndHappy(1:2,ip,el) = [.true.,.false.]
else else
m = (e-1)*discretization_nIPs + i ce = (el-1)*discretization_nIPs + ip
doneAndHappy(1:2,i,e) = updateState(dt*subStep(i,e), & doneAndHappy(1:2,ip,el) = updateState(dt*subStep(ip,el), &
homogenization_F0(1:3,1:3,m) & homogenization_F0(1:3,1:3,ce) &
+ (homogenization_F(1:3,1:3,m)-homogenization_F0(1:3,1:3,m)) & + (homogenization_F(1:3,1:3,ce)-homogenization_F0(1:3,1:3,ce)) &
*(subStep(i,e)+subFrac(i,e)), & *(subStep(ip,el)+subFrac(ip,el)), &
i,e) ip,el)
converged(i,e) = all(doneAndHappy(1:2,i,e)) ! converged if done and happy converged(ip,el) = all(doneAndHappy(1:2,ip,el)) ! converged if done and happy
endif endif
endif endif
@ -294,9 +294,9 @@ subroutine materialpoint_stressAndItsTangent(dt)
if (.not. terminallyIll ) then if (.not. terminallyIll ) then
call crystallite_orientations() ! calculate crystal orientations call crystallite_orientations() ! calculate crystal orientations
!$OMP PARALLEL DO !$OMP PARALLEL DO
elementLooping3: do e = FEsolving_execElem(1),FEsolving_execElem(2) elementLooping3: do el = FEsolving_execElem(1),FEsolving_execElem(2)
IpLooping3: do i = FEsolving_execIP(1),FEsolving_execIP(2) IpLooping3: do ip = FEsolving_execIP(1),FEsolving_execIP(2)
call mech_homogenize(i,e) call mech_homogenize(ip,el)
enddo IpLooping3 enddo IpLooping3
enddo elementLooping3 enddo elementLooping3
!$OMP END PARALLEL DO !$OMP END PARALLEL DO