2017-11-14 22:55:55 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2018-02-15 08:43:10 +05:30
|
|
|
!> @author Philip Eisenlohr, Michigan State University
|
2017-11-14 22:55:55 +05:30
|
|
|
!> @author Zhuowen Zhao, Michigan State University
|
2018-11-25 15:44:09 +05:30
|
|
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief Phenomenological crystal plasticity using a power law formulation for the shear rates
|
2019-01-07 01:48:35 +05:30
|
|
|
!! and a Voce-type kinematic hardening rule
|
2017-09-30 04:06:28 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-12-03 02:08:41 +05:30
|
|
|
submodule(constitutive) plastic_kinehardening
|
2019-05-17 02:26:48 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
type :: tParameters
|
|
|
|
real(pReal) :: &
|
2020-03-16 23:26:54 +05:30
|
|
|
gdot0 = 1.0_pReal, & !< reference shear strain rate for slip
|
|
|
|
n = 1.0_pReal !< stress exponent for slip
|
2020-02-14 11:47:30 +05:30
|
|
|
real(pReal), allocatable, dimension(:) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
theta0, & !< initial hardening rate of forward stress for each slip
|
|
|
|
theta1, & !< asymptotic hardening rate of forward stress for each slip
|
|
|
|
theta0_b, & !< initial hardening rate of back stress for each slip
|
|
|
|
theta1_b, & !< asymptotic hardening rate of back stress for each slip
|
|
|
|
tau1, &
|
2020-03-16 23:26:54 +05:30
|
|
|
tau1_b
|
2020-02-14 11:47:30 +05:30
|
|
|
real(pReal), allocatable, dimension(:,:) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
interaction_slipslip !< slip resistance from slip activity
|
2020-02-14 11:47:30 +05:30
|
|
|
real(pReal), allocatable, dimension(:,:,:) :: &
|
2020-03-16 01:46:28 +05:30
|
|
|
P, &
|
2020-02-01 02:07:18 +05:30
|
|
|
nonSchmid_pos, &
|
|
|
|
nonSchmid_neg
|
|
|
|
integer :: &
|
2020-03-16 01:46:28 +05:30
|
|
|
sum_N_sl, & !< total number of active slip system
|
2020-02-01 02:07:18 +05:30
|
|
|
of_debug = 0
|
2020-03-16 23:26:54 +05:30
|
|
|
logical :: &
|
|
|
|
nonSchmidActive = .false.
|
2020-02-14 11:47:30 +05:30
|
|
|
character(len=pStringLen), allocatable, dimension(:) :: &
|
|
|
|
output
|
2020-02-01 02:07:18 +05:30
|
|
|
end type tParameters
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
type :: tKinehardeningState
|
|
|
|
real(pReal), pointer, dimension(:,:) :: & !< vectors along NipcMyInstance
|
|
|
|
crss, & !< critical resolved stress
|
|
|
|
crss_back, & !< critical resolved back stress
|
|
|
|
sense, & !< sense of acting shear stress (-1 or +1)
|
|
|
|
chi0, & !< backstress at last switch of stress sense
|
|
|
|
gamma0, & !< accumulated shear at last switch of stress sense
|
|
|
|
accshear !< accumulated (absolute) shear
|
|
|
|
end type tKinehardeningState
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2019-01-13 21:33:49 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! containers for parameters and state
|
2020-02-01 02:07:18 +05:30
|
|
|
type(tParameters), allocatable, dimension(:) :: param
|
|
|
|
type(tKinehardeningState), allocatable, dimension(:) :: &
|
|
|
|
dotState, &
|
|
|
|
deltaState, &
|
|
|
|
state
|
2017-09-30 04:06:28 +05:30
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Perform module initialization.
|
2017-09-30 04:06:28 +05:30
|
|
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-06-18 20:53:05 +05:30
|
|
|
module subroutine plastic_kinehardening_init(debug_constitutive)
|
|
|
|
|
|
|
|
class(tNode), pointer, intent(in) :: &
|
|
|
|
debug_constitutive
|
2017-09-30 04:06:28 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
integer :: &
|
|
|
|
Ninstance, &
|
2020-02-14 11:47:30 +05:30
|
|
|
p, o, &
|
2020-02-01 02:07:18 +05:30
|
|
|
NipcMyPhase, &
|
|
|
|
sizeState, sizeDeltaState, sizeDotState, &
|
2020-06-18 20:53:05 +05:30
|
|
|
startIndex, endIndex, &
|
|
|
|
debug_e, debug_i, debug_g
|
2020-03-16 23:26:54 +05:30
|
|
|
integer, dimension(:), allocatable :: &
|
2020-03-16 03:37:23 +05:30
|
|
|
N_sl
|
2020-03-16 23:26:54 +05:30
|
|
|
real(pReal), dimension(:), allocatable :: &
|
|
|
|
xi_0, & !< initial resistance against plastic flow
|
|
|
|
a !< non-Schmid coefficients
|
2020-02-01 02:07:18 +05:30
|
|
|
character(len=pStringLen) :: &
|
|
|
|
extmsg = ''
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-15 00:33:57 +05:30
|
|
|
write(6,'(/,a)') ' <<<+- plastic_'//PLASTICITY_KINEHARDENING_LABEL//' init -+>>>'; flush(6)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
Ninstance = count(phase_plasticity == PLASTICITY_KINEHARDENING_ID)
|
2020-06-18 20:53:05 +05:30
|
|
|
if (debug_constitutive%contains('basic')) &
|
2020-02-01 02:07:18 +05:30
|
|
|
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
allocate(param(Ninstance))
|
|
|
|
allocate(state(Ninstance))
|
|
|
|
allocate(dotState(Ninstance))
|
|
|
|
allocate(deltaState(Ninstance))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
do p = 1, size(phase_plasticityInstance)
|
|
|
|
if (phase_plasticity(p) /= PLASTICITY_KINEHARDENING_ID) cycle
|
|
|
|
associate(prm => param(phase_plasticityInstance(p)), &
|
|
|
|
dot => dotState(phase_plasticityInstance(p)), &
|
|
|
|
dlt => deltaState(phase_plasticityInstance(p)), &
|
|
|
|
stt => state(phase_plasticityInstance(p)),&
|
|
|
|
config => config_phase(p))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-15 00:33:57 +05:30
|
|
|
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
|
|
|
|
|
2018-12-30 20:09:48 +05:30
|
|
|
#ifdef DEBUG
|
2020-06-18 20:53:05 +05:30
|
|
|
debug_g = debug_root%get_asInt('grain',defaultVal=1)
|
|
|
|
debug_e = debug_root%get_asInt('element',defaultVal=1)
|
|
|
|
debug_i = debug_root%get_asInt('integrationpoint',defaultVal=1)
|
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
if (p==material_phaseAt(debug_g,debug_e)) then
|
2020-02-14 11:47:30 +05:30
|
|
|
prm%of_debug = material_phasememberAt(debug_g,debug_i,debug_e)
|
2020-02-01 02:07:18 +05:30
|
|
|
endif
|
2018-12-30 20:09:48 +05:30
|
|
|
#endif
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2018-11-26 00:07:46 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! slip related parameters
|
2020-03-16 03:37:23 +05:30
|
|
|
N_sl = config%getInts('nslip',defaultVal=emptyIntArray)
|
2020-03-16 23:26:54 +05:30
|
|
|
prm%sum_N_sl = sum(abs(N_sl))
|
2020-03-16 01:46:28 +05:30
|
|
|
slipActive: if (prm%sum_N_sl > 0) then
|
2020-03-16 03:37:23 +05:30
|
|
|
prm%P = lattice_SchmidMatrix_slip(N_sl,config%getString('lattice_structure'),&
|
2020-03-16 01:46:28 +05:30
|
|
|
config%getFloat('c/a',defaultVal=0.0_pReal))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
if(trim(config%getString('lattice_structure')) == 'bcc') then
|
2020-03-16 23:26:54 +05:30
|
|
|
a = config%getFloats('nonschmid_coefficients',defaultVal = emptyRealArray)
|
|
|
|
if(size(a) > 0) prm%nonSchmidActive = .true.
|
|
|
|
prm%nonSchmid_pos = lattice_nonSchmidMatrix(N_sl,a,+1)
|
|
|
|
prm%nonSchmid_neg = lattice_nonSchmidMatrix(N_sl,a,-1)
|
2020-02-01 02:07:18 +05:30
|
|
|
else
|
2020-03-16 01:46:28 +05:30
|
|
|
prm%nonSchmid_pos = prm%P
|
|
|
|
prm%nonSchmid_neg = prm%P
|
2020-02-01 02:07:18 +05:30
|
|
|
endif
|
2020-03-16 03:37:23 +05:30
|
|
|
prm%interaction_SlipSlip = lattice_interaction_SlipBySlip(N_sl, &
|
2020-02-01 02:07:18 +05:30
|
|
|
config%getFloats('interaction_slipslip'), &
|
|
|
|
config%getString('lattice_structure'))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 23:26:54 +05:30
|
|
|
xi_0 = config%getFloats('crss0', requiredSize=size(N_sl))
|
2020-03-16 03:37:23 +05:30
|
|
|
prm%tau1 = config%getFloats('tau1', requiredSize=size(N_sl))
|
|
|
|
prm%tau1_b = config%getFloats('tau1_b', requiredSize=size(N_sl))
|
|
|
|
prm%theta0 = config%getFloats('theta0', requiredSize=size(N_sl))
|
|
|
|
prm%theta1 = config%getFloats('theta1', requiredSize=size(N_sl))
|
|
|
|
prm%theta0_b = config%getFloats('theta0_b', requiredSize=size(N_sl))
|
|
|
|
prm%theta1_b = config%getFloats('theta1_b', requiredSize=size(N_sl))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
|
|
|
prm%gdot0 = config%getFloat('gdot0')
|
|
|
|
prm%n = config%getFloat('n_slip')
|
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
! expand: family => system
|
2020-03-16 23:26:54 +05:30
|
|
|
xi_0 = math_expand(xi_0, N_sl)
|
2020-03-16 03:37:23 +05:30
|
|
|
prm%tau1 = math_expand(prm%tau1, N_sl)
|
|
|
|
prm%tau1_b = math_expand(prm%tau1_b, N_sl)
|
|
|
|
prm%theta0 = math_expand(prm%theta0, N_sl)
|
|
|
|
prm%theta1 = math_expand(prm%theta1, N_sl)
|
|
|
|
prm%theta0_b = math_expand(prm%theta0_b,N_sl)
|
|
|
|
prm%theta1_b = math_expand(prm%theta1_b,N_sl)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2019-01-07 01:48:35 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! sanity checks
|
2020-02-01 02:07:18 +05:30
|
|
|
if ( prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
|
|
|
if ( prm%n <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
|
2020-03-16 23:26:54 +05:30
|
|
|
if (any(xi_0 <= 0.0_pReal)) extmsg = trim(extmsg)//' crss0'
|
2020-02-01 02:07:18 +05:30
|
|
|
if (any(prm%tau1 <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1'
|
|
|
|
if (any(prm%tau1_b <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1_b'
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
!ToDo: Any sensible checks for theta?
|
2020-03-16 23:26:54 +05:30
|
|
|
else slipActive
|
|
|
|
xi_0 = emptyRealArray
|
|
|
|
allocate(prm%tau1,prm%tau1_b,prm%theta0,prm%theta1,prm%theta0_b,prm%theta1_b,source=emptyRealArray)
|
|
|
|
allocate(prm%interaction_SlipSlip(0,0))
|
2020-02-01 02:07:18 +05:30
|
|
|
endif slipActive
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2018-11-26 04:44:27 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! allocate state arrays
|
2020-02-01 02:07:18 +05:30
|
|
|
NipcMyPhase = count(material_phaseAt == p) * discretization_nIP
|
2020-03-16 01:46:28 +05:30
|
|
|
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%sum_N_sl
|
|
|
|
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
sizeState = sizeDotState + sizeDeltaState
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-04-01 13:26:59 +05:30
|
|
|
call material_allocateState(plasticState(p),NipcMyPhase,sizeState,sizeDotState,sizeDeltaState)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2019-01-07 01:48:35 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-03-16 03:37:23 +05:30
|
|
|
! state aliases and initialization
|
2020-02-01 02:07:18 +05:30
|
|
|
startIndex = 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%crss => plasticState(p)%state (startIndex:endIndex,:)
|
2020-03-16 23:26:54 +05:30
|
|
|
stt%crss = spread(xi_0, 2, NipcMyPhase)
|
2020-02-01 02:07:18 +05:30
|
|
|
dot%crss => plasticState(p)%dotState(startIndex:endIndex,:)
|
2020-03-16 03:37:23 +05:30
|
|
|
plasticState(p)%atol(startIndex:endIndex) = config%getFloat('atol_xi',defaultVal=1.0_pReal)
|
2020-03-16 04:57:52 +05:30
|
|
|
if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
startIndex = endIndex + 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = endIndex + prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%crss_back => plasticState(p)%state (startIndex:endIndex,:)
|
|
|
|
dot%crss_back => plasticState(p)%dotState(startIndex:endIndex,:)
|
2020-03-16 03:37:23 +05:30
|
|
|
plasticState(p)%atol(startIndex:endIndex) = config%getFloat('atol_xi',defaultVal=1.0_pReal)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
startIndex = endIndex + 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = endIndex + prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%accshear => plasticState(p)%state (startIndex:endIndex,:)
|
|
|
|
dot%accshear => plasticState(p)%dotState(startIndex:endIndex,:)
|
2020-03-16 03:37:23 +05:30
|
|
|
plasticState(p)%atol(startIndex:endIndex) = config%getFloat('atol_gamma',defaultVal=1.0e-6_pReal)
|
2020-03-16 04:57:52 +05:30
|
|
|
if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_gamma'
|
2020-02-01 02:07:18 +05:30
|
|
|
! global alias
|
2020-03-15 00:33:57 +05:30
|
|
|
plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
o = plasticState(p)%offsetDeltaState
|
|
|
|
startIndex = endIndex + 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = endIndex + prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%sense => plasticState(p)%state (startIndex :endIndex ,:)
|
|
|
|
dlt%sense => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
startIndex = endIndex + 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = endIndex + prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%chi0 => plasticState(p)%state (startIndex :endIndex ,:)
|
|
|
|
dlt%chi0 => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
startIndex = endIndex + 1
|
2020-03-16 01:46:28 +05:30
|
|
|
endIndex = endIndex + prm%sum_N_sl
|
2020-02-01 02:07:18 +05:30
|
|
|
stt%gamma0 => plasticState(p)%state (startIndex :endIndex ,:)
|
|
|
|
dlt%gamma0 => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
end associate
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-15 00:33:57 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! exit if any parameter is out of range
|
|
|
|
if (extmsg /= '') call IO_error(211,ext_msg=trim(extmsg)//'('//PLASTICITY_KINEHARDENING_LABEL//')')
|
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
enddo
|
2017-09-30 04:06:28 +05:30
|
|
|
|
2020-03-15 00:33:57 +05:30
|
|
|
|
2019-01-07 01:48:35 +05:30
|
|
|
end subroutine plastic_kinehardening_init
|
2017-09-30 04:06:28 +05:30
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Calculate plastic velocity gradient and its tangent.
|
2017-09-30 04:06:28 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-12-03 02:08:41 +05:30
|
|
|
pure module subroutine plastic_kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
2019-01-07 01:48:35 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal), dimension(3,3), intent(out) :: &
|
|
|
|
Lp !< plastic velocity gradient
|
|
|
|
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
|
|
|
dLp_dMp !< derivative of Lp with respect to the Mandel stress
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal), dimension(3,3), intent(in) :: &
|
|
|
|
Mp !< Mandel stress
|
|
|
|
integer, intent(in) :: &
|
|
|
|
instance, &
|
|
|
|
of
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
integer :: &
|
|
|
|
i,k,l,m,n
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
gdot_pos,gdot_neg, &
|
|
|
|
dgdot_dtau_pos,dgdot_dtau_neg
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
Lp = 0.0_pReal
|
|
|
|
dLp_dMp = 0.0_pReal
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
associate(prm => param(instance))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
call kinetics(Mp,instance,of,gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 01:46:28 +05:30
|
|
|
do i = 1, prm%sum_N_sl
|
|
|
|
Lp = Lp + (gdot_pos(i)+gdot_neg(i))*prm%P(1:3,1:3,i)
|
2020-02-01 02:07:18 +05:30
|
|
|
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
|
|
|
dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) &
|
2020-03-16 01:46:28 +05:30
|
|
|
+ dgdot_dtau_pos(i) * prm%P(k,l,i) * prm%nonSchmid_pos(m,n,i) &
|
|
|
|
+ dgdot_dtau_neg(i) * prm%P(k,l,i) * prm%nonSchmid_neg(m,n,i)
|
2020-02-01 02:07:18 +05:30
|
|
|
enddo
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
end associate
|
2017-11-14 22:55:55 +05:30
|
|
|
|
2017-09-30 04:06:28 +05:30
|
|
|
end subroutine plastic_kinehardening_LpAndItsTangent
|
|
|
|
|
2018-12-22 03:11:39 +05:30
|
|
|
|
2019-01-07 12:06:11 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Calculate the rate of change of microstructure.
|
2019-01-07 12:06:11 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-12-03 02:08:41 +05:30
|
|
|
module subroutine plastic_kinehardening_dotState(Mp,instance,of)
|
2019-01-07 12:06:11 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal), dimension(3,3), intent(in) :: &
|
|
|
|
Mp !< Mandel stress
|
|
|
|
integer, intent(in) :: &
|
|
|
|
instance, &
|
|
|
|
of
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal) :: &
|
|
|
|
sumGamma
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
gdot_pos,gdot_neg
|
2020-02-14 11:47:30 +05:30
|
|
|
|
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
call kinetics(Mp,instance,of,gdot_pos,gdot_neg)
|
|
|
|
dot%accshear(:,of) = abs(gdot_pos+gdot_neg)
|
|
|
|
sumGamma = sum(stt%accshear(:,of))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
dot%crss(:,of) = matmul(prm%interaction_SlipSlip,dot%accshear(:,of)) &
|
|
|
|
* ( prm%theta1 &
|
|
|
|
+ (prm%theta0 - prm%theta1 + prm%theta0*prm%theta1*sumGamma/prm%tau1) &
|
|
|
|
* exp(-sumGamma*prm%theta0/prm%tau1) &
|
|
|
|
)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
dot%crss_back(:,of) = stt%sense(:,of)*dot%accshear(:,of) * &
|
|
|
|
( prm%theta1_b + &
|
|
|
|
(prm%theta0_b - prm%theta1_b &
|
|
|
|
+ prm%theta0_b*prm%theta1_b/(prm%tau1_b+stt%chi0(:,of))*(stt%accshear(:,of)-stt%gamma0(:,of))&
|
|
|
|
) *exp(-(stt%accshear(:,of)-stt%gamma0(:,of)) *prm%theta0_b/(prm%tau1_b+stt%chi0(:,of))) &
|
|
|
|
)
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
end associate
|
2019-01-07 12:06:11 +05:30
|
|
|
|
|
|
|
end subroutine plastic_kinehardening_dotState
|
|
|
|
|
|
|
|
|
2017-09-30 04:06:28 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Calculate (instantaneous) incremental change of microstructure.
|
2017-09-30 04:06:28 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-06-18 20:53:05 +05:30
|
|
|
module subroutine plastic_kinehardening_deltaState(Mp,instance,of,debug_constitutive)
|
2018-12-30 20:09:48 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal), dimension(3,3), intent(in) :: &
|
|
|
|
Mp !< Mandel stress
|
|
|
|
integer, intent(in) :: &
|
|
|
|
instance, &
|
|
|
|
of
|
2020-06-18 20:53:05 +05:30
|
|
|
class(tNode), pointer , intent(in) :: &
|
|
|
|
debug_constitutive
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
gdot_pos,gdot_neg, &
|
|
|
|
sense
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
associate(prm => param(instance), stt => state(instance), dlt => deltaState(instance))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
call kinetics(Mp,instance,of,gdot_pos,gdot_neg)
|
|
|
|
sense = merge(state(instance)%sense(:,of), & ! keep existing...
|
|
|
|
sign(1.0_pReal,gdot_pos+gdot_neg), & ! ...or have a defined
|
|
|
|
dEq0(gdot_pos+gdot_neg,1e-10_pReal)) ! current sense of shear direction
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2017-11-07 04:41:02 +05:30
|
|
|
#ifdef DEBUG
|
2020-06-18 20:53:05 +05:30
|
|
|
if (debug_constitutive%contains('extensive') &
|
2020-02-01 02:07:18 +05:30
|
|
|
.and. (of == prm%of_debug &
|
2020-06-18 20:53:05 +05:30
|
|
|
.or. .not. debug_constitutive%contains('selective'))) then
|
2020-02-01 02:07:18 +05:30
|
|
|
write(6,'(a)') '======= kinehardening delta state ======='
|
|
|
|
write(6,*) sense,state(instance)%sense(:,of)
|
|
|
|
endif
|
2017-11-07 04:41:02 +05:30
|
|
|
#endif
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2018-12-13 12:01:56 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
! switch in sense of shear?
|
2020-02-01 02:07:18 +05:30
|
|
|
where(dNeq(sense,stt%sense(:,of),0.1_pReal))
|
|
|
|
dlt%sense (:,of) = sense - stt%sense(:,of) ! switch sense
|
|
|
|
dlt%chi0 (:,of) = abs(stt%crss_back(:,of)) - stt%chi0(:,of) ! remember current backstress magnitude
|
|
|
|
dlt%gamma0(:,of) = stt%accshear(:,of) - stt%gamma0(:,of) ! remember current accumulated shear
|
|
|
|
else where
|
|
|
|
dlt%sense (:,of) = 0.0_pReal
|
|
|
|
dlt%chi0 (:,of) = 0.0_pReal
|
|
|
|
dlt%gamma0(:,of) = 0.0_pReal
|
|
|
|
end where
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
end associate
|
2017-09-30 04:06:28 +05:30
|
|
|
|
|
|
|
end subroutine plastic_kinehardening_deltaState
|
|
|
|
|
|
|
|
|
2019-03-10 01:13:31 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Write results to HDF5 output file.
|
2019-03-10 01:13:31 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-12-03 02:08:41 +05:30
|
|
|
module subroutine plastic_kinehardening_results(instance,group)
|
2019-03-10 01:13:31 +05:30
|
|
|
|
2019-12-03 02:08:41 +05:30
|
|
|
integer, intent(in) :: instance
|
|
|
|
character(len=*), intent(in) :: group
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2019-03-10 01:13:31 +05:30
|
|
|
integer :: o
|
|
|
|
|
|
|
|
associate(prm => param(instance), stt => state(instance))
|
2020-02-14 11:47:30 +05:30
|
|
|
outputsLoop: do o = 1,size(prm%output)
|
|
|
|
select case(trim(prm%output(o)))
|
|
|
|
case('resistance')
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss,'xi_sl', &
|
|
|
|
'resistance against plastic slip','Pa')
|
2020-02-14 11:47:30 +05:30
|
|
|
case('backstress') ! ToDo: should be 'tau_back'
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss_back,'tau_back', &
|
|
|
|
'back stress against plastic slip','Pa')
|
2020-02-14 11:47:30 +05:30
|
|
|
case ('sense')
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%sense,'sense_of_shear', &
|
|
|
|
'tbd','1')
|
2020-02-14 11:47:30 +05:30
|
|
|
case ('chi0')
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%chi0,'chi0', &
|
|
|
|
'tbd','Pa')
|
2020-02-14 11:47:30 +05:30
|
|
|
case ('gamma0')
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma0,'gamma0', &
|
|
|
|
'tbd','1')
|
2020-02-14 11:47:30 +05:30
|
|
|
case ('accumulatedshear')
|
2020-03-16 01:46:28 +05:30
|
|
|
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%accshear,'gamma_sl', &
|
|
|
|
'plastic shear','1')
|
2019-03-10 01:13:31 +05:30
|
|
|
end select
|
|
|
|
enddo outputsLoop
|
|
|
|
end associate
|
|
|
|
|
|
|
|
end subroutine plastic_kinehardening_results
|
|
|
|
|
|
|
|
|
2018-11-26 11:40:43 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-14 11:47:30 +05:30
|
|
|
!> @brief Calculate shear rates on slip systems and their derivatives with respect to resolved
|
|
|
|
! stress.
|
|
|
|
!> @details: Derivatives are calculated only optionally.
|
2019-01-07 01:48:35 +05:30
|
|
|
! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to
|
2020-02-14 11:47:30 +05:30
|
|
|
! have the optional arguments at the end.
|
2018-11-26 11:40:43 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-01-07 01:48:35 +05:30
|
|
|
pure subroutine kinetics(Mp,instance,of, &
|
|
|
|
gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
2018-11-26 11:40:43 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
real(pReal), dimension(3,3), intent(in) :: &
|
|
|
|
Mp !< Mandel stress
|
|
|
|
integer, intent(in) :: &
|
|
|
|
instance, &
|
|
|
|
of
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), intent(out), dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
gdot_pos, &
|
|
|
|
gdot_neg
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), intent(out), optional, dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
dgdot_dtau_pos, &
|
|
|
|
dgdot_dtau_neg
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 01:46:28 +05:30
|
|
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
2020-02-01 02:07:18 +05:30
|
|
|
tau_pos, &
|
|
|
|
tau_neg
|
|
|
|
integer :: i
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
associate(prm => param(instance), stt => state(instance))
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-03-16 01:46:28 +05:30
|
|
|
do i = 1, prm%sum_N_sl
|
2020-03-16 23:13:04 +05:30
|
|
|
tau_pos(i) = math_tensordot(Mp,prm%nonSchmid_pos(1:3,1:3,i)) - stt%crss_back(i,of)
|
|
|
|
tau_neg(i) = merge(math_tensordot(Mp,prm%nonSchmid_neg(1:3,1:3,i)) - stt%crss_back(i,of), &
|
2020-03-16 23:26:54 +05:30
|
|
|
0.0_pReal, prm%nonSchmidActive)
|
2020-02-01 02:07:18 +05:30
|
|
|
enddo
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
where(dNeq0(tau_pos))
|
2020-03-16 23:26:54 +05:30
|
|
|
gdot_pos = prm%gdot0 * merge(0.5_pReal,1.0_pReal, prm%nonSchmidActive) & ! 1/2 if non-Schmid active
|
2020-02-01 02:07:18 +05:30
|
|
|
* sign(abs(tau_pos/stt%crss(:,of))**prm%n, tau_pos)
|
|
|
|
else where
|
|
|
|
gdot_pos = 0.0_pReal
|
|
|
|
end where
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
where(dNeq0(tau_neg))
|
|
|
|
gdot_neg = prm%gdot0 * 0.5_pReal & ! only used if non-Schmid active, always 1/2
|
|
|
|
* sign(abs(tau_neg/stt%crss(:,of))**prm%n, tau_neg)
|
|
|
|
else where
|
|
|
|
gdot_neg = 0.0_pReal
|
|
|
|
end where
|
2020-02-14 11:47:30 +05:30
|
|
|
|
2020-02-01 02:07:18 +05:30
|
|
|
if (present(dgdot_dtau_pos)) then
|
|
|
|
where(dNeq0(gdot_pos))
|
|
|
|
dgdot_dtau_pos = gdot_pos*prm%n/tau_pos
|
|
|
|
else where
|
|
|
|
dgdot_dtau_pos = 0.0_pReal
|
|
|
|
end where
|
|
|
|
endif
|
|
|
|
if (present(dgdot_dtau_neg)) then
|
|
|
|
where(dNeq0(gdot_neg))
|
|
|
|
dgdot_dtau_neg = gdot_neg*prm%n/tau_neg
|
|
|
|
else where
|
|
|
|
dgdot_dtau_neg = 0.0_pReal
|
|
|
|
end where
|
|
|
|
endif
|
|
|
|
end associate
|
2018-11-26 11:40:43 +05:30
|
|
|
|
|
|
|
end subroutine kinetics
|
|
|
|
|
2019-12-03 02:08:41 +05:30
|
|
|
end submodule plastic_kinehardening
|