Merge branch 'Euler-one-loop' into 'development'
Euler one loop See merge request damask/DAMASK!145
This commit is contained in:
commit
81789024ce
|
@ -1052,7 +1052,7 @@ subroutine integrateStateFPI
|
||||||
crystallite_Fp(1:3,1:3,g,i,e), &
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
g, i, e)
|
g, i, e)
|
||||||
|
|
||||||
crystallite_todo(g,i,e) = integrateStress(g,i,e,1.0_pReal)
|
crystallite_todo(g,i,e) = integrateStress(g,i,e)
|
||||||
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
|
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
|
||||||
nonlocalBroken = .true.
|
nonlocalBroken = .true.
|
||||||
if(.not. crystallite_todo(g,i,e)) exit iteration
|
if(.not. crystallite_todo(g,i,e)) exit iteration
|
||||||
|
@ -1150,12 +1150,70 @@ end subroutine integrateStateFPI
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine integrateStateEuler
|
subroutine integrateStateEuler
|
||||||
|
|
||||||
call update_dotState(1.0_pReal)
|
integer :: &
|
||||||
call update_state(1.0_pReal)
|
e, & !< element index in element loop
|
||||||
call update_deltaState
|
i, & !< integration point index in ip loop
|
||||||
call update_dependentState
|
g, & !< grain index in grain loop
|
||||||
call update_stress(1.0_pReal)
|
p, &
|
||||||
call setConvergenceFlag
|
c, &
|
||||||
|
s, &
|
||||||
|
sizeDotState
|
||||||
|
logical :: &
|
||||||
|
nonlocalBroken
|
||||||
|
|
||||||
|
nonlocalBroken = .false.
|
||||||
|
!$OMP PARALLEL DO PRIVATE (sizeDotState,p,c)
|
||||||
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
|
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||||
|
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
||||||
|
if(crystallite_todo(g,i,e) .and. (.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then
|
||||||
|
|
||||||
|
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
||||||
|
|
||||||
|
call constitutive_collectDotState(crystallite_S(1:3,1:3,g,i,e), &
|
||||||
|
crystallite_partionedF0, &
|
||||||
|
crystallite_Fi(1:3,1:3,g,i,e), &
|
||||||
|
crystallite_partionedFp0, &
|
||||||
|
crystallite_subdt(g,i,e), g,i,e)
|
||||||
|
crystallite_todo(g,i,e) = all(.not. IEEE_is_NaN(plasticState(p)%dotState(:,c)))
|
||||||
|
do s = 1, phase_Nsources(p)
|
||||||
|
crystallite_todo(g,i,e) = crystallite_todo(g,i,e) .and. all(.not. IEEE_is_NaN(sourceState(p)%p(s)%dotState(:,c)))
|
||||||
|
enddo
|
||||||
|
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
|
||||||
|
nonlocalBroken = .true.
|
||||||
|
if(.not. crystallite_todo(g,i,e)) cycle
|
||||||
|
|
||||||
|
sizeDotState = plasticState(p)%sizeDotState
|
||||||
|
plasticState(p)%state(1:sizeDotState,c) = plasticState(p)%subState0(1:sizeDotState,c) &
|
||||||
|
+ plasticState(p)%dotState (1:sizeDotState,c) &
|
||||||
|
* crystallite_subdt(g,i,e)
|
||||||
|
do s = 1, phase_Nsources(p)
|
||||||
|
sizeDotState = sourceState(p)%p(s)%sizeDotState
|
||||||
|
sourceState(p)%p(s)%state(1:sizeDotState,c) = sourceState(p)%p(s)%subState0(1:sizeDotState,c) &
|
||||||
|
+ sourceState(p)%p(s)%dotState (1:sizeDotState,c) &
|
||||||
|
* crystallite_subdt(g,i,e)
|
||||||
|
enddo
|
||||||
|
|
||||||
|
crystallite_todo(g,i,e) = stateJump(g,i,e)
|
||||||
|
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
|
||||||
|
nonlocalBroken = .true.
|
||||||
|
if(.not. crystallite_todo(g,i,e)) cycle
|
||||||
|
|
||||||
|
call constitutive_dependentState(crystallite_partionedF(1:3,1:3,g,i,e), &
|
||||||
|
crystallite_Fp(1:3,1:3,g,i,e), &
|
||||||
|
g, i, e)
|
||||||
|
|
||||||
|
crystallite_todo(g,i,e) = integrateStress(g,i,e)
|
||||||
|
if(.not. (crystallite_todo(g,i,e) .or. crystallite_localPlasticity(g,i,e))) &
|
||||||
|
nonlocalBroken = .true.
|
||||||
|
|
||||||
|
crystallite_converged(g,i,e) = crystallite_todo(g,i,e)
|
||||||
|
|
||||||
|
endif
|
||||||
|
enddo; enddo; enddo
|
||||||
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
|
if(nonlocalBroken) where(.not. crystallite_localPlasticity) crystallite_todo = .false.
|
||||||
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
|
if (any(plasticState(:)%nonlocal)) call nonlocalConvergenceCheck
|
||||||
|
|
||||||
end subroutine integrateStateEuler
|
end subroutine integrateStateEuler
|
||||||
|
@ -1174,8 +1232,9 @@ subroutine integrateStateAdaptiveEuler
|
||||||
c, &
|
c, &
|
||||||
s, &
|
s, &
|
||||||
sizeDotState
|
sizeDotState
|
||||||
|
logical :: &
|
||||||
|
nonlocalBroken
|
||||||
|
|
||||||
! ToDo: MD: once all constitutives use allocate state, attach residuum arrays to the state in case of adaptive Euler
|
|
||||||
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
real(pReal), dimension(constitutive_plasticity_maxSizeDotState, &
|
||||||
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
homogenization_maxNgrains,discretization_nIP,discretization_nElem) :: &
|
||||||
residuum_plastic
|
residuum_plastic
|
||||||
|
@ -1188,11 +1247,13 @@ subroutine integrateStateAdaptiveEuler
|
||||||
! contribution to state and relative residui and from Euler integration
|
! contribution to state and relative residui and from Euler integration
|
||||||
call update_dotState(1.0_pReal)
|
call update_dotState(1.0_pReal)
|
||||||
|
|
||||||
|
nonlocalBroken = .false.
|
||||||
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
!$OMP PARALLEL DO PRIVATE(sizeDotState,p,c)
|
||||||
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
do e = FEsolving_execElem(1),FEsolving_execElem(2)
|
||||||
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
do i = FEsolving_execIP(1),FEsolving_execIP(2)
|
||||||
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
do g = 1,homogenization_Ngrains(material_homogenizationAt(e))
|
||||||
if (crystallite_todo(g,i,e)) then
|
if(crystallite_todo(g,i,e) .and. (.not. nonlocalBroken .or. crystallite_localPlasticity(g,i,e)) ) then
|
||||||
|
|
||||||
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
p = material_phaseAt(g,e); c = material_phaseMemberAt(g,i,e)
|
||||||
sizeDotState = plasticState(p)%sizeDotState
|
sizeDotState = plasticState(p)%sizeDotState
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue