WIP: mechanics takes care of mechanics variables

This commit is contained in:
Martin Diehl 2020-12-22 10:03:19 +01:00
parent 831e0ce1b9
commit 0e0814dbc3
2 changed files with 25 additions and 14 deletions

View File

@ -160,6 +160,10 @@ module constitutive
integer(HID_T), intent(in) :: fileHandle integer(HID_T), intent(in) :: fileHandle
end subroutine mech_restart_read end subroutine mech_restart_read
module subroutine mech_initializeRestorationPoints(ph,me)
integer, intent(in) :: ph, me
end subroutine mech_initializeRestorationPoints
! == cleaned:end =================================================================================== ! == cleaned:end ===================================================================================
module function constitutive_collectDotState(FpArray, subdt, ipc, ip, el,phase,of) result(broken) module function constitutive_collectDotState(FpArray, subdt, ipc, ip, el,phase,of) result(broken)
@ -197,11 +201,6 @@ module function constitutive_deltaState(S, Fi, ipc, ip, el, phase, of) result(br
end function constitutive_deltaState end function constitutive_deltaState
module function plastic_active(plastic_label) result(active_plastic)
character(len=*), intent(in) :: plastic_label
logical, dimension(:), allocatable :: active_plastic
end function plastic_active
module function source_active(source_label,src_length) result(active_source) module function source_active(source_label,src_length) result(active_source)
character(len=*), intent(in) :: source_label character(len=*), intent(in) :: source_label
integer, intent(in) :: src_length integer, intent(in) :: src_length
@ -437,7 +436,6 @@ end function constitutive_deltaState
constitutive_forward, & constitutive_forward, &
constitutive_restore, & constitutive_restore, &
plastic_nonlocal_updateCompatibility, & plastic_nonlocal_updateCompatibility, &
plastic_active, &
source_active, & source_active, &
kinematics_active, & kinematics_active, &
converged, & converged, &
@ -1195,20 +1193,17 @@ subroutine constitutive_initializeRestorationPoints(i,e)
e !< element number e !< element number
integer :: & integer :: &
c, & !< constituent number c, & !< constituent number
s,p, m s,ph, me
do c = 1,homogenization_Nconstituents(material_homogenizationAt(e)) do c = 1,homogenization_Nconstituents(material_homogenizationAt(e))
p = material_phaseAt(c,e) ph = material_phaseAt(c,e)
m = material_phaseMemberAt(c,i,e) me = material_phaseMemberAt(c,i,e)
crystallite_partitionedFp0(1:3,1:3,c,i,e) = crystallite_Fp0(1:3,1:3,c,i,e) crystallite_partitionedFp0(1:3,1:3,c,i,e) = crystallite_Fp0(1:3,1:3,c,i,e)
crystallite_partitionedLp0(1:3,1:3,c,i,e) = crystallite_Lp0(1:3,1:3,c,i,e) crystallite_partitionedLp0(1:3,1:3,c,i,e) = crystallite_Lp0(1:3,1:3,c,i,e)
constitutive_mech_partionedFi0(p)%data(1:3,1:3,m) = constitutive_mech_Fi0(p)%data(1:3,1:3,m)
constitutive_mech_partionedLi0(p)%data(1:3,1:3,m) = constitutive_mech_Li0(p)%data(1:3,1:3,m)
crystallite_partitionedF0(1:3,1:3,c,i,e) = crystallite_F0(1:3,1:3,c,i,e) crystallite_partitionedF0(1:3,1:3,c,i,e) = crystallite_F0(1:3,1:3,c,i,e)
crystallite_partitionedS0(1:3,1:3,c,i,e) = crystallite_S0(1:3,1:3,c,i,e) crystallite_partitionedS0(1:3,1:3,c,i,e) = crystallite_S0(1:3,1:3,c,i,e)
plasticState(material_phaseAt(c,e))%partitionedState0(:,material_phasememberAt(c,i,e)) = & call mech_initializeRestorationPoints(ph,me)
plasticState(material_phaseAt(c,e))%state0( :,material_phasememberAt(c,i,e))
do s = 1, phase_Nsources(material_phaseAt(c,e)) do s = 1, phase_Nsources(material_phaseAt(c,e))
sourceState(material_phaseAt(c,e))%p(s)%partitionedState0(:,material_phasememberAt(c,i,e)) = & sourceState(material_phaseAt(c,e))%p(s)%partitionedState0(:,material_phasememberAt(c,i,e)) = &
sourceState(material_phaseAt(c,e))%p(s)%state0( :,material_phasememberAt(c,i,e)) sourceState(material_phaseAt(c,e))%p(s)%state0( :,material_phasememberAt(c,i,e))

View File

@ -360,7 +360,7 @@ end subroutine mech_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief checks if a plastic module is active or not !> @brief checks if a plastic module is active or not
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function plastic_active(plastic_label) result(active_plastic) function plastic_active(plastic_label) result(active_plastic)
character(len=*), intent(in) :: plastic_label !< type of plasticity model character(len=*), intent(in) :: plastic_label !< type of plasticity model
logical, dimension(:), allocatable :: active_plastic logical, dimension(:), allocatable :: active_plastic
@ -1376,5 +1376,21 @@ subroutine crystallite_results(group,ph)
end subroutine crystallite_results end subroutine crystallite_results
!--------------------------------------------------------------------------------------------------
!> @brief Backup data for homog cutback.
!--------------------------------------------------------------------------------------------------
module subroutine mech_initializeRestorationPoints(ph,me)
integer, intent(in) :: &
ph, &
me
constitutive_mech_partionedFi0(ph)%data(1:3,1:3,me) = constitutive_mech_Fi0(ph)%data(1:3,1:3,me)
constitutive_mech_partionedLi0(ph)%data(1:3,1:3,me) = constitutive_mech_Li0(ph)%data(1:3,1:3,me)
plasticState(ph)%partitionedState0(:,me) = plasticState(ph)%state0(:,me)
end subroutine mech_initializeRestorationPoints
end submodule constitutive_mech end submodule constitutive_mech