using new functions
This commit is contained in:
parent
9f2c150944
commit
9425184b52
|
@ -262,6 +262,7 @@ end subroutine CPFEM_general
|
||||||
subroutine CPFEM_forward
|
subroutine CPFEM_forward
|
||||||
|
|
||||||
call crystallite_forward
|
call crystallite_forward
|
||||||
|
call constitutive_forward
|
||||||
|
|
||||||
end subroutine CPFEM_forward
|
end subroutine CPFEM_forward
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,7 @@ end subroutine CPFEM_restartWrite
|
||||||
subroutine CPFEM_forward
|
subroutine CPFEM_forward
|
||||||
|
|
||||||
call crystallite_forward
|
call crystallite_forward
|
||||||
|
call constitutive_forward
|
||||||
|
|
||||||
end subroutine CPFEM_forward
|
end subroutine CPFEM_forward
|
||||||
|
|
||||||
|
|
|
@ -378,6 +378,8 @@ module constitutive
|
||||||
constitutive_thermal_getRateAndItsTangents, &
|
constitutive_thermal_getRateAndItsTangents, &
|
||||||
constitutive_results, &
|
constitutive_results, &
|
||||||
constitutive_allocateState, &
|
constitutive_allocateState, &
|
||||||
|
constitutive_forward, &
|
||||||
|
constitutive_restore, &
|
||||||
plastic_nonlocal_updateCompatibility, &
|
plastic_nonlocal_updateCompatibility, &
|
||||||
plastic_active, &
|
plastic_active, &
|
||||||
source_active, &
|
source_active, &
|
||||||
|
@ -864,6 +866,44 @@ subroutine constitutive_allocateState(state, &
|
||||||
end subroutine constitutive_allocateState
|
end subroutine constitutive_allocateState
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief Restore data after homog cutback.
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine constitutive_restore(i,e)
|
||||||
|
|
||||||
|
integer, intent(in) :: &
|
||||||
|
i, & !< integration point number
|
||||||
|
e !< element number
|
||||||
|
integer :: &
|
||||||
|
c, & !< constituent number
|
||||||
|
s
|
||||||
|
|
||||||
|
do c = 1,homogenization_Nconstituents(material_homogenizationAt(e))
|
||||||
|
do s = 1, phase_Nsources(material_phaseAt(c,e))
|
||||||
|
sourceState(material_phaseAt(c,e))%p(s)%state( :,material_phasememberAt(c,i,e)) = &
|
||||||
|
sourceState(material_phaseAt(c,e))%p(s)%partitionedState0(:,material_phasememberAt(c,i,e))
|
||||||
|
enddo
|
||||||
|
enddo
|
||||||
|
|
||||||
|
end subroutine constitutive_restore
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief Forward data after successful increment.
|
||||||
|
! ToDo: Any guessing for the current states possible?
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
subroutine constitutive_forward
|
||||||
|
|
||||||
|
integer :: i, j
|
||||||
|
|
||||||
|
do i = 1, size(sourceState)
|
||||||
|
do j = 1,phase_Nsources(i)
|
||||||
|
sourceState(i)%p(j)%state0 = sourceState(i)%p(j)%state
|
||||||
|
enddo; enddo
|
||||||
|
|
||||||
|
end subroutine constitutive_forward
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief writes constitutive results to HDF5 output file
|
!> @brief writes constitutive results to HDF5 output file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -515,8 +515,7 @@ subroutine crystallite_restore(i,e,includeL)
|
||||||
logical, intent(in) :: &
|
logical, intent(in) :: &
|
||||||
includeL !< protect agains fake cutback
|
includeL !< protect agains fake cutback
|
||||||
integer :: &
|
integer :: &
|
||||||
c, & !< constituent number
|
c !< constituent number
|
||||||
s
|
|
||||||
|
|
||||||
do c = 1,homogenization_Nconstituents(material_homogenizationAt(e))
|
do c = 1,homogenization_Nconstituents(material_homogenizationAt(e))
|
||||||
if (includeL) then
|
if (includeL) then
|
||||||
|
@ -529,10 +528,6 @@ subroutine crystallite_restore(i,e,includeL)
|
||||||
|
|
||||||
plasticState (material_phaseAt(c,e))%state( :,material_phasememberAt(c,i,e)) = &
|
plasticState (material_phaseAt(c,e))%state( :,material_phasememberAt(c,i,e)) = &
|
||||||
plasticState (material_phaseAt(c,e))%partitionedState0(:,material_phasememberAt(c,i,e))
|
plasticState (material_phaseAt(c,e))%partitionedState0(:,material_phasememberAt(c,i,e))
|
||||||
do s = 1, phase_Nsources(material_phaseAt(c,e))
|
|
||||||
sourceState(material_phaseAt(c,e))%p(s)%state( :,material_phasememberAt(c,i,e)) = &
|
|
||||||
sourceState(material_phaseAt(c,e))%p(s)%partitionedState0(:,material_phasememberAt(c,i,e))
|
|
||||||
enddo
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end subroutine crystallite_restore
|
end subroutine crystallite_restore
|
||||||
|
@ -1198,8 +1193,6 @@ subroutine integrateSourceState(g,i,e)
|
||||||
zeta
|
zeta
|
||||||
real(pReal), dimension(max(constitutive_plasticity_maxSizeDotState,constitutive_source_maxSizeDotState)) :: &
|
real(pReal), dimension(max(constitutive_plasticity_maxSizeDotState,constitutive_source_maxSizeDotState)) :: &
|
||||||
r ! state residuum
|
r ! state residuum
|
||||||
real(pReal), dimension(constitutive_plasticity_maxSizeDotState,2) :: &
|
|
||||||
plastic_dotState
|
|
||||||
real(pReal), dimension(constitutive_source_maxSizeDotState,2,maxval(phase_Nsources)) :: source_dotState
|
real(pReal), dimension(constitutive_source_maxSizeDotState,2,maxval(phase_Nsources)) :: source_dotState
|
||||||
logical :: &
|
logical :: &
|
||||||
broken
|
broken
|
||||||
|
@ -1224,7 +1217,6 @@ subroutine integrateSourceState(g,i,e)
|
||||||
|
|
||||||
iteration: do NiterationState = 1, num%nState
|
iteration: do NiterationState = 1, num%nState
|
||||||
|
|
||||||
if(nIterationState > 1) plastic_dotState(1:size_pl,2) = plastic_dotState(1:size_pl,1)
|
|
||||||
do s = 1, phase_Nsources(p)
|
do s = 1, phase_Nsources(p)
|
||||||
if(nIterationState > 1) source_dotState(1:size_so(s),2,s) = source_dotState(1:size_so(s),1,s)
|
if(nIterationState > 1) source_dotState(1:size_so(s),2,s) = source_dotState(1:size_so(s),1,s)
|
||||||
source_dotState(1:size_so(s),1,s) = sourceState(p)%p(s)%dotState(:,c)
|
source_dotState(1:size_so(s),1,s) = sourceState(p)%p(s)%dotState(:,c)
|
||||||
|
@ -1651,10 +1643,6 @@ subroutine crystallite_forward
|
||||||
do i = 1, size(plasticState)
|
do i = 1, size(plasticState)
|
||||||
plasticState(i)%state0 = plasticState(i)%state
|
plasticState(i)%state0 = plasticState(i)%state
|
||||||
enddo
|
enddo
|
||||||
do i = 1, size(sourceState)
|
|
||||||
do j = 1,phase_Nsources(i)
|
|
||||||
sourceState(i)%p(j)%state0 = sourceState(i)%p(j)%state
|
|
||||||
enddo; enddo
|
|
||||||
do i = 1,size(material_name_homogenization)
|
do i = 1,size(material_name_homogenization)
|
||||||
homogState (i)%state0 = homogState (i)%state
|
homogState (i)%state0 = homogState (i)%state
|
||||||
damageState (i)%state0 = damageState (i)%state
|
damageState (i)%state0 = damageState (i)%state
|
||||||
|
|
|
@ -255,6 +255,7 @@ subroutine materialpoint_stressAndItsTangent(dt)
|
||||||
subStep(i,e) = num%subStepSizeHomog * subStep(i,e) ! crystallite had severe trouble, so do a significant cutback
|
subStep(i,e) = num%subStepSizeHomog * subStep(i,e) ! crystallite had severe trouble, so do a significant cutback
|
||||||
|
|
||||||
call crystallite_restore(i,e,subStep(i,e) < 1.0_pReal)
|
call crystallite_restore(i,e,subStep(i,e) < 1.0_pReal)
|
||||||
|
call constitutive_restore(i,e)
|
||||||
|
|
||||||
if(homogState(material_homogenizationAt(e))%sizeState > 0) &
|
if(homogState(material_homogenizationAt(e))%sizeState > 0) &
|
||||||
homogState(material_homogenizationAt(e))%State( :,material_homogenizationMemberAt(i,e)) = &
|
homogState(material_homogenizationAt(e))%State( :,material_homogenizationMemberAt(i,e)) = &
|
||||||
|
|
Loading…
Reference in New Issue