function for update of dependent state

not introduced everywhere
This commit is contained in:
Martin Diehl 2019-01-23 18:04:19 +01:00
parent 0a6bcadafe
commit c60bb2edd3
1 changed files with 44 additions and 59 deletions

View File

@ -1975,20 +1975,10 @@ eIter = FEsolving_execElem(1:2)
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
! --- UPDATE DEPENDENT STATES ---
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
!$OMP ENDDO
!$OMP END PARALLEL !$OMP END PARALLEL
call update_dependentState
!$OMP PARALLEL !$OMP PARALLEL
! --- STRESS INTEGRATION --- ! --- STRESS INTEGRATION ---
@ -2204,16 +2194,9 @@ subroutine integrateStateAdaptiveEuler()
!$OMP PARALLEL !$OMP PARALLEL
! --- DOT STATE (HEUN METHOD) --- ! --- DOT STATE (HEUN METHOD) ---
!$OMP DO !$OMP END PARALLEL
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains call update_dotState(1.0_pReal)
if (crystallite_todo(g,i,e)) & !$OMP PARALLEL
call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), &
crystallite_Fe, &
crystallite_Fi(1:3,1:3,g,i,e), &
crystallite_Fp, &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
!$OMP ENDDO
!$OMP DO PRIVATE(p,c,NaN) !$OMP DO PRIVATE(p,c,NaN)
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
!$OMP FLUSH(crystallite_todo) !$OMP FLUSH(crystallite_todo)
@ -2447,19 +2430,9 @@ subroutine integrateStateRK4()
endif endif
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL
call update_dependentState
! --- update dependent states --- !$OMP PARALLEL
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
!$OMP ENDDO
! --- stress integration --- ! --- stress integration ---
@ -2679,20 +2652,12 @@ subroutine integrateStateRKCK45()
endif endif
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL
! --- update dependent states ---
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
!$OMP ENDDO
call update_dependentState
!$OMP PARALLEL
! --- stress integration --- ! --- stress integration ---
@ -2836,21 +2801,11 @@ subroutine integrateStateRKCK45()
endif endif
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL
call update_dependentState
!-------------------------------------------------------------------------------------------------- !$OMP PARALLEL
! --- UPDATE DEPENDENT STATES IF RESIDUUM BELOW TOLERANCE ---
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo
!$OMP ENDDO
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! --- FINAL STRESS INTEGRATION STEP IF RESIDUUM BELOW TOLERANCE --- ! --- FINAL STRESS INTEGRATION STEP IF RESIDUUM BELOW TOLERANCE ---
!$OMP DO !$OMP DO
@ -2891,6 +2846,36 @@ subroutine integrateStateRKCK45()
end subroutine integrateStateRKCK45 end subroutine integrateStateRKCK45
!--------------------------------------------------------------------------------------------------
!> @brief tbd
!--------------------------------------------------------------------------------------------------
subroutine update_dependentState()
use material, only: &
plasticState
use constitutive, only: &
constitutive_dependentState => constitutive_microstructure
implicit none
integer(pInt) :: e, & ! element index in element loop
i, & ! integration point index in ip loop
g ! grain index in grain loop
!$OMP PARALLEL
!$OMP DO
do e = FEsolving_execElem(1),FEsolving_execElem(2)
do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e)
do g = 1,homogenization_Ngrains(mesh_element(3,e))
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
call constitutive_dependentState(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e)
enddo; enddo; enddo
!$OMP ENDDO
!$OMP END PARALLEL
end subroutine update_dependentState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Standard forwarding of state as state = state0 + dotState * (delta t) !> @brief Standard forwarding of state as state = state0 + dotState * (delta t)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------