added helper functions to communicate accumulated slip between damage and plasticity modules
This commit is contained in:
parent
e943a3a8b0
commit
9b1e55f0e4
|
@ -36,7 +36,8 @@ module constitutive
|
|||
constitutive_postResults
|
||||
|
||||
private :: &
|
||||
constitutive_hooke_TandItsTangent
|
||||
constitutive_hooke_TandItsTangent, &
|
||||
constitutive_getAccumulatedSlip
|
||||
|
||||
contains
|
||||
|
||||
|
@ -60,7 +61,9 @@ subroutine constitutive_init
|
|||
debug_constitutive, &
|
||||
debug_levelBasic
|
||||
use numerics, only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
use IO, only: &
|
||||
IO_error, &
|
||||
|
@ -186,12 +189,16 @@ subroutine constitutive_init
|
|||
if (any(phase_thermal == LOCAL_THERMAL_adiabatic_ID)) call thermal_adiabatic_init(FILEUNIT)
|
||||
close(FILEUNIT)
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! write description file for constitutive phase output
|
||||
|
@ -464,7 +471,11 @@ subroutine constitutive_microstructure(Tstar_v, Fe, Fp, ipc, ip, el)
|
|||
real(pReal) :: &
|
||||
damage, &
|
||||
Tstar_v_effective(6)
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
|
||||
select case (phase_plasticity(material_phase(ipc,ip,el)))
|
||||
|
||||
case (PLASTICITY_DISLOTWIN_ID)
|
||||
|
@ -486,7 +497,8 @@ subroutine constitutive_microstructure(Tstar_v, Fe, Fp, ipc, ip, el)
|
|||
Tstar_v_effective = Tstar_v/(damage*damage)
|
||||
call damage_brittle_microstructure(Tstar_v_effective, Fe, ipc, ip, el)
|
||||
case (LOCAL_DAMAGE_ductile_ID)
|
||||
call damage_ductile_microstructure(ipc, ip, el)
|
||||
call constitutive_getAccumulatedSlip(nSlip,accumulatedSlip,Fp,ipc, ip, el)
|
||||
call damage_ductile_microstructure(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
case (LOCAL_DAMAGE_gurson_ID)
|
||||
call damage_gurson_microstructure(ipc, ip, el)
|
||||
|
||||
|
@ -1041,6 +1053,74 @@ function constitutive_getTemperature(ipc, ip, el)
|
|||
end select
|
||||
|
||||
end function constitutive_getTemperature
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip on each system defined
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_getAccumulatedSlip(nSlip,accumulatedSlip,Fp,ipc, ip, el)
|
||||
use prec, only: &
|
||||
pReal, &
|
||||
pInt
|
||||
use math, only: &
|
||||
math_mul33xx33, &
|
||||
math_norm33, &
|
||||
math_I3
|
||||
use material, only: &
|
||||
phase_plasticity, &
|
||||
material_phase, &
|
||||
PLASTICITY_none_ID, &
|
||||
PLASTICITY_j2_ID, &
|
||||
PLASTICITY_phenopowerlaw_ID, &
|
||||
PLASTICITY_dislotwin_ID, &
|
||||
PLASTICITY_dislokmc_ID, &
|
||||
PLASTICITY_titanmod_ID, &
|
||||
PLASTICITY_nonlocal_ID
|
||||
use constitutive_phenopowerlaw, only: &
|
||||
constitutive_phenopowerlaw_getAccumulatedSlip
|
||||
use constitutive_dislotwin, only: &
|
||||
constitutive_dislotwin_getAccumulatedSlip
|
||||
use constitutive_dislokmc, only: &
|
||||
constitutive_dislokmc_getAccumulatedSlip
|
||||
use constitutive_titanmod, only: &
|
||||
constitutive_titanmod_getAccumulatedSlip
|
||||
use constitutive_nonlocal, only: &
|
||||
constitutive_nonlocal_getAccumulatedSlip
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
real(pReal), intent(in), dimension(3,3) :: &
|
||||
Fp !< plastic velocity gradient
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
|
||||
select case (phase_plasticity(material_phase(ipc,ip,el)))
|
||||
case (PLASTICITY_none_ID)
|
||||
nSlip = 0_pInt
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
case (PLASTICITY_J2_ID)
|
||||
nSlip = 1_pInt
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
accumulatedSlip(1) = math_norm33(math_mul33xx33(transpose(Fp),Fp) - math_I3)/2.0_pReal
|
||||
case (PLASTICITY_PHENOPOWERLAW_ID)
|
||||
call constitutive_phenopowerlaw_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
case (PLASTICITY_DISLOTWIN_ID)
|
||||
call constitutive_dislotwin_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
case (PLASTICITY_DISLOKMC_ID)
|
||||
call constitutive_dislokmc_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
case (PLASTICITY_TITANMOD_ID)
|
||||
call constitutive_titanmod_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
case (PLASTICITY_NONLOCAL_ID)
|
||||
call constitutive_nonlocal_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
end select
|
||||
|
||||
end subroutine constitutive_getAccumulatedSlip
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -152,6 +152,7 @@ module constitutive_dislokmc
|
|||
constitutive_dislokmc_microstructure, &
|
||||
constitutive_dislokmc_LpAndItsTangent, &
|
||||
constitutive_dislokmc_dotState, &
|
||||
constitutive_dislokmc_getAccumulatedSlip, &
|
||||
constitutive_dislokmc_postResults
|
||||
private :: &
|
||||
constitutive_dislokmc_stateInit, &
|
||||
|
@ -202,7 +203,9 @@ subroutine constitutive_dislokmc_init(fileUnit)
|
|||
MATERIAL_partPhase
|
||||
use lattice
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -222,12 +225,16 @@ subroutine constitutive_dislokmc_init(fileUnit)
|
|||
line = ''
|
||||
real(pReal), dimension(:), allocatable :: tempPerSlip, tempPerTwin
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOKMC_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOKMC_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_plasticity == PLASTICITY_DISLOKMC_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -1673,6 +1680,51 @@ subroutine constitutive_dislokmc_dotState(Tstar_v,Temperature,ipc,ip,el)
|
|||
enddo
|
||||
|
||||
end subroutine constitutive_dislokmc_dotState
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_dislokmc_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
plasticState, &
|
||||
phase_plasticityInstance
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
offset, &
|
||||
phase, &
|
||||
instance, &
|
||||
offset_accshear_slip, &
|
||||
f, j, i
|
||||
|
||||
offset = mappingConstitutive(1,ipc,ip,el)
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
instance = phase_plasticityInstance(phase)
|
||||
nSlip = constitutive_dislokmc_totalNslip(instance)
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
offset_accshear_slip = 2_pInt*nSlip
|
||||
|
||||
j = 0_pInt
|
||||
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
|
||||
do i = 1_pInt,constitutive_dislokmc_Nslip(f,instance) ! process each (active) slip system in family
|
||||
j = j+1_pInt
|
||||
accumulatedSlip(j) = plasticState(phase)%state(offset_accshear_slip+j,offset)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine constitutive_dislokmc_getAccumulatedSlip
|
||||
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -166,6 +166,7 @@ module constitutive_dislotwin
|
|||
constitutive_dislotwin_microstructure, &
|
||||
constitutive_dislotwin_LpAndItsTangent, &
|
||||
constitutive_dislotwin_dotState, &
|
||||
constitutive_dislotwin_getAccumulatedSlip, &
|
||||
constitutive_dislotwin_postResults
|
||||
private :: &
|
||||
constitutive_dislotwin_stateInit, &
|
||||
|
@ -216,7 +217,9 @@ subroutine constitutive_dislotwin_init(fileUnit)
|
|||
MATERIAL_partPhase
|
||||
use lattice
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -236,12 +239,16 @@ subroutine constitutive_dislotwin_init(fileUnit)
|
|||
line = ''
|
||||
real(pReal), dimension(:), allocatable :: tempPerSlip, tempPerTwin, tempPerTrans
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOTWIN_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOTWIN_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_plasticity == PLASTICITY_DISLOTWIN_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -1895,6 +1902,52 @@ subroutine constitutive_dislotwin_dotState(Tstar_v,Temperature,ipc,ip,el)
|
|||
end subroutine constitutive_dislotwin_dotState
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_dislotwin_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
plasticState, &
|
||||
phase_plasticityInstance
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
offset, &
|
||||
phase, &
|
||||
instance, &
|
||||
offset_accshear_slip, &
|
||||
f, j, i
|
||||
|
||||
offset = mappingConstitutive(1,ipc,ip,el)
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
instance = phase_plasticityInstance(phase)
|
||||
nSlip = constitutive_dislotwin_totalNslip(instance)
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
offset_accshear_slip = 2_pInt*nSlip
|
||||
|
||||
j = 0_pInt
|
||||
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
|
||||
do i = 1_pInt,constitutive_dislotwin_Nslip(f,instance) ! process each (active) slip system in family
|
||||
j = j+1_pInt
|
||||
accumulatedSlip(j) = plasticState(phase)%state(offset_accshear_slip+j,offset)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine constitutive_dislotwin_getAccumulatedSlip
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -94,7 +94,9 @@ subroutine constitutive_j2_init(fileUnit)
|
|||
debug_constitutive, &
|
||||
debug_levelBasic
|
||||
use numerics, only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
use math, only: &
|
||||
math_Mandel3333to66, &
|
||||
|
@ -153,12 +155,16 @@ subroutine constitutive_j2_init(fileUnit)
|
|||
integer(HID_T) :: ID,ID2,ID4
|
||||
#endif
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_J2_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_J2_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_plasticity == PLASTICITY_J2_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -500,7 +506,7 @@ subroutine constitutive_j2_dotState(Tstar_v,ipc,ip,el)
|
|||
|
||||
end subroutine constitutive_j2_dotState
|
||||
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -250,6 +250,7 @@ module constitutive_nonlocal
|
|||
constitutive_nonlocal_dotState, &
|
||||
constitutive_nonlocal_deltaState, &
|
||||
constitutive_nonlocal_updateCompatibility, &
|
||||
constitutive_nonlocal_getAccumulatedSlip, &
|
||||
constitutive_nonlocal_postResults
|
||||
|
||||
private :: &
|
||||
|
@ -300,7 +301,9 @@ use material, only: homogenization_maxNgrains, &
|
|||
material_phase
|
||||
use lattice
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
|
||||
|
@ -338,12 +341,16 @@ integer(pInt) :: phase, &
|
|||
|
||||
integer(pInt) :: NofMyPhase
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_NONLOCAL_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_NONLOCAL_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstances = int(count(phase_plasticity == PLASTICITY_NONLOCAL_ID),pInt)
|
||||
if (maxNinstances == 0) return ! we don't have to do anything if there's no instance for this constitutive law
|
||||
|
@ -3545,6 +3552,45 @@ endif
|
|||
|
||||
end function constitutive_nonlocal_dislocationstress
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_nonlocal_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
plasticState, &
|
||||
phase_plasticityInstance
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
offset, &
|
||||
phase, &
|
||||
instance, &
|
||||
offset_accshear_slip, &
|
||||
s
|
||||
|
||||
offset = mappingConstitutive(1,ipc,ip,el)
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
instance = phase_plasticityInstance(phase)
|
||||
nSlip = totalNslip(instance)
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
forall (s = 1:nSlip) &
|
||||
accumulatedSlip(s) = plasticState(phase)%dotState(iGamma(s,instance),offset)
|
||||
|
||||
end subroutine constitutive_nonlocal_getAccumulatedSlip
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -89,6 +89,7 @@ module constitutive_phenopowerlaw
|
|||
constitutive_phenopowerlaw_init, &
|
||||
constitutive_phenopowerlaw_LpAndItsTangent, &
|
||||
constitutive_phenopowerlaw_dotState, &
|
||||
constitutive_phenopowerlaw_getAccumulatedSlip, &
|
||||
constitutive_phenopowerlaw_postResults
|
||||
private :: &
|
||||
constitutive_phenopowerlaw_aTolState, &
|
||||
|
@ -138,7 +139,9 @@ subroutine constitutive_phenopowerlaw_init(fileUnit)
|
|||
MATERIAL_partPhase
|
||||
use lattice
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -159,12 +162,16 @@ subroutine constitutive_phenopowerlaw_init(fileUnit)
|
|||
integer(pInt) :: NofMyPhase
|
||||
real(pReal), dimension(:), allocatable :: tempPerSlip
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_PHENOPOWERLAW_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_PHENOPOWERLAW_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -990,6 +997,54 @@ subroutine constitutive_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
|
|||
end subroutine constitutive_phenopowerlaw_dotState
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_phenopowerlaw_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
plasticState, &
|
||||
phase_plasticityInstance
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
offset, &
|
||||
phase, &
|
||||
instance, &
|
||||
offset_accshear_slip, &
|
||||
nTwin, &
|
||||
f, j, i
|
||||
|
||||
offset = mappingConstitutive(1,ipc,ip,el)
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
instance = phase_plasticityInstance(phase)
|
||||
nSlip = constitutive_phenopowerlaw_totalNslip(instance)
|
||||
nTwin = constitutive_phenopowerlaw_totalNtwin(instance)
|
||||
offset_accshear_slip = nSlip + nTwin + 2_pInt
|
||||
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
j = 0_pInt
|
||||
slipFamiliesLoop: do f = 1_pInt,lattice_maxNslipFamily
|
||||
do i = 1_pInt,constitutive_phenopowerlaw_Nslip(f,instance) ! process each (active) slip system in family
|
||||
j = j+1_pInt
|
||||
accumulatedSlip(j) = plasticState(phase)%state(offset_accshear_slip+j,offset)
|
||||
enddo
|
||||
enddo slipFamiliesLoop
|
||||
|
||||
end subroutine constitutive_phenopowerlaw_getAccumulatedSlip
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief return array of constitutive results
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -176,6 +176,7 @@ module constitutive_titanmod
|
|||
constitutive_titanmod_init, &
|
||||
constitutive_titanmod_LpAndItsTangent, &
|
||||
constitutive_titanmod_dotState, &
|
||||
constitutive_titanmod_getAccumulatedSlip, &
|
||||
constitutive_titanmod_postResults, &
|
||||
constitutive_titanmod_homogenizedC
|
||||
|
||||
|
@ -219,7 +220,9 @@ subroutine constitutive_titanmod_init(fileUnit)
|
|||
MATERIAL_partPhase
|
||||
use lattice
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -244,12 +247,16 @@ subroutine constitutive_titanmod_init(fileUnit)
|
|||
tag = '', &
|
||||
line = ''
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_TITANMOD_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_TITANMOD_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id$'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_plasticity == PLASTICITY_TITANMOD_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -1775,6 +1782,52 @@ implicit none
|
|||
enddo twinFamiliesLoop
|
||||
|
||||
end subroutine constitutive_titanmod_dotState
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief returns accumulated slip
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine constitutive_titanmod_getAccumulatedSlip(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use lattice, only: &
|
||||
lattice_maxNslipFamily
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
plasticState, &
|
||||
phase_plasticityInstance
|
||||
|
||||
implicit none
|
||||
|
||||
real(pReal), dimension(:), allocatable :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
nSlip
|
||||
integer(pInt), intent(in) :: &
|
||||
ipc, & !< grain number
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
integer(pInt) :: &
|
||||
offset, &
|
||||
phase, &
|
||||
instance, &
|
||||
offset_accshear_slip, &
|
||||
f, j, i
|
||||
|
||||
offset = mappingConstitutive(1,ipc,ip,el)
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
instance = phase_plasticityInstance(phase)
|
||||
nSlip = constitutive_titanmod_totalNslip(instance)
|
||||
allocate(accumulatedSlip(nSlip))
|
||||
offset_accshear_slip = 2_pInt*nSlip
|
||||
|
||||
j = 0_pInt
|
||||
do f = 1_pInt,lattice_maxNslipFamily ! loop over all slip families
|
||||
do i = 1_pInt,constitutive_titanmod_Nslip(f,instance) ! process each (active) slip system in family
|
||||
j = j+1_pInt
|
||||
accumulatedSlip(j) = plasticState(phase)%state(offset_accshear_slip+j,offset)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
end subroutine constitutive_titanmod_getAccumulatedSlip
|
||||
|
||||
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -88,7 +88,9 @@ subroutine damage_brittle_init(fileUnit)
|
|||
damageState, &
|
||||
MATERIAL_partPhase
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -103,12 +105,16 @@ subroutine damage_brittle_init(fileUnit)
|
|||
tag = '', &
|
||||
line = ''
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- damage_'//LOCAL_DAMAGE_BRITTLE_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id: damage_brittle.f90 3210 2014-06-17 15:24:44Z MPIE\m.diehl $'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- damage_'//LOCAL_DAMAGE_BRITTLE_label//' init -+>>>'
|
||||
write(6,'(a)') ' $Id: damage_brittle.f90 3210 2014-06-17 15:24:44Z MPIE\m.diehl $'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_damage == LOCAL_DAMAGE_BRITTLE_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
|
|
@ -88,7 +88,9 @@ subroutine damage_ductile_init(fileUnit)
|
|||
damageState, &
|
||||
MATERIAL_partPhase
|
||||
use numerics,only: &
|
||||
#ifdef FEM
|
||||
worldrank, &
|
||||
#endif
|
||||
numerics_integrator
|
||||
|
||||
implicit none
|
||||
|
@ -103,12 +105,16 @@ subroutine damage_ductile_init(fileUnit)
|
|||
tag = '', &
|
||||
line = ''
|
||||
|
||||
mainProcess: if (worldrank == 0) then
|
||||
write(6,'(/,a)') ' <<<+- damage_'//LOCAL_DAMAGE_DUCTILE_LABEL//' init -+>>>'
|
||||
write(6,'(a)') ' $Id: damage_ductile.f90 3210 2014-06-17 15:24:44Z MPIE\m.diehl $'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#ifdef FEM
|
||||
if (worldrank == 0) then
|
||||
#endif
|
||||
write(6,'(/,a)') ' <<<+- damage_'//LOCAL_DAMAGE_DUCTILE_LABEL//' init -+>>>'
|
||||
write(6,'(a)') ' $Id: damage_ductile.f90 3210 2014-06-17 15:24:44Z MPIE\m.diehl $'
|
||||
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
||||
#include "compilation_info.f90"
|
||||
endif mainProcess
|
||||
#ifdef FEM
|
||||
endif
|
||||
#endif
|
||||
|
||||
maxNinstance = int(count(phase_damage == LOCAL_DAMAGE_DUCTILE_ID),pInt)
|
||||
if (maxNinstance == 0_pInt) return
|
||||
|
@ -185,8 +191,8 @@ subroutine damage_ductile_init(fileUnit)
|
|||
endif
|
||||
enddo outputsLoop
|
||||
! Determine size of state array
|
||||
sizeDotState = 2_pInt
|
||||
sizeState = 3_pInt
|
||||
sizeDotState = 1_pInt
|
||||
sizeState = 2_pInt
|
||||
|
||||
damageState(phase)%sizeState = sizeState
|
||||
damageState(phase)%sizeDotState = sizeDotState
|
||||
|
@ -283,18 +289,15 @@ subroutine damage_ductile_dotState(Lp, ipc, ip, el)
|
|||
|
||||
damageState(phase)%dotState(1,constituent) = &
|
||||
(1.0_pReal/lattice_DamageMobility(phase))* &
|
||||
(damageState(phase)%state(3,constituent) - &
|
||||
(damageState(phase)%state(2,constituent) - &
|
||||
damageState(phase)%state(1,constituent))
|
||||
|
||||
damageState(phase)%dotState(2,constituent) = &
|
||||
math_norm33(Lp)
|
||||
|
||||
end subroutine damage_ductile_dotState
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief calculates derived quantities from state
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine damage_ductile_microstructure(ipc, ip, el)
|
||||
subroutine damage_ductile_microstructure(nSlip,accumulatedSlip,ipc, ip, el)
|
||||
use material, only: &
|
||||
mappingConstitutive, &
|
||||
phase_damageInstance, &
|
||||
|
@ -308,17 +311,20 @@ subroutine damage_ductile_microstructure(ipc, ip, el)
|
|||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: &
|
||||
nSlip, &
|
||||
ipc, & !< component-ID of integration point
|
||||
ip, & !< integration point
|
||||
el !< element
|
||||
real(pReal), dimension(nSlip), intent(in) :: &
|
||||
accumulatedSlip
|
||||
integer(pInt) :: &
|
||||
phase, constituent
|
||||
|
||||
phase = mappingConstitutive(2,ipc,ip,el)
|
||||
constituent = mappingConstitutive(1,ipc,ip,el)
|
||||
damageState(phase)%state(3,constituent) = min(damageState(phase)%state(3,constituent), &
|
||||
damageState(phase)%state(2,constituent) = min(damageState(phase)%state(2,constituent), &
|
||||
damage_ductile_critpStrain(phase)/ &
|
||||
damageState(phase)%state(2,constituent)) !< akin to damage surface
|
||||
sum(accumulatedSlip)) !< akin to damage surface
|
||||
|
||||
end subroutine damage_ductile_microstructure
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ subroutine damage_gurson_dotState(Lp, ipc, ip, el)
|
|||
damageState(phase)%dotState(4,constituent) ! total rate of void fraction evolution
|
||||
|
||||
damageState(phase)%dotState(3,constituent) = &
|
||||
damageState(phase)%state(6,constituent) + &
|
||||
damageState(phase)%state(6,constituent) * &
|
||||
damageState(phase)%dotState(4,constituent) ! void nucleation rate
|
||||
|
||||
damageState(phase)%dotState(4,constituent) = &
|
||||
|
|
Loading…
Reference in New Issue