DAMASK_EICMD/src/phase_mechanical_plastic_ki...

471 lines
21 KiB
Fortran
Raw Normal View History

!--------------------------------------------------------------------------------------------------
!> @author Philip Eisenlohr, Michigan State University
!> @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
!! and a Voce-type kinematic hardening rule
!--------------------------------------------------------------------------------------------------
submodule(phase:plastic) kinehardening
type :: tParameters
real(pReal) :: &
2020-09-22 18:56:34 +05:30
n = 1.0_pReal, & !< stress exponent for slip
dot_gamma_0 = 1.0_pReal !< reference shear strain rate for slip
real(pReal), allocatable, dimension(:) :: &
2020-09-22 18:56:34 +05:30
h_0_f, & !< initial hardening rate of forward stress for each slip
h_inf_f, & !< asymptotic hardening rate of forward stress for each slip
h_0_b, & !< initial hardening rate of back stress for each slip
h_inf_b, & !< asymptotic hardening rate of back stress for each slip
xi_inf_f, &
xi_inf_b
real(pReal), allocatable, dimension(:,:) :: &
interaction_slipslip !< slip resistance from slip activity
real(pReal), allocatable, dimension(:,:,:) :: &
2020-03-16 01:46:28 +05:30
P, &
nonSchmid_pos, &
nonSchmid_neg
integer :: &
2020-03-16 01:46:28 +05:30
sum_N_sl, & !< total number of active slip system
of_debug = 0
2020-03-16 23:26:54 +05:30
logical :: &
nonSchmidActive = .false.
character(len=pStringLen), allocatable, dimension(:) :: &
output
end type tParameters
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
!--------------------------------------------------------------------------------------------------
! containers for parameters and state
type(tParameters), allocatable, dimension(:) :: param
type(tKinehardeningState), allocatable, dimension(:) :: &
dotState, &
deltaState, &
state
contains
!--------------------------------------------------------------------------------------------------
!> @brief Perform module initialization.
!> @details reads in material parameters, allocates arrays, and does sanity checks
!--------------------------------------------------------------------------------------------------
module function plastic_kinehardening_init() result(myPlasticity)
2020-08-15 19:32:10 +05:30
logical, dimension(:), allocatable :: myPlasticity
integer :: &
2020-08-15 19:32:10 +05:30
p, i, o, &
Nconstituents, &
sizeState, sizeDeltaState, sizeDotState, &
2020-07-02 00:52:05 +05:30
startIndex, endIndex
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
character(len=pStringLen) :: &
extmsg = ''
2020-08-15 19:32:10 +05:30
class(tNode), pointer :: &
phases, &
phase, &
2020-11-03 03:16:46 +05:30
mech, &
2020-08-15 19:32:10 +05:30
pl
2020-08-15 19:32:10 +05:30
myPlasticity = plastic_active('kinehardening')
2021-02-14 05:20:42 +05:30
if(count(myPlasticity) == 0) return
2020-07-02 00:52:05 +05:30
2021-02-13 23:27:41 +05:30
print'(/,a)', ' <<<+- phase:mechanical:plastic:kinehardening init -+>>>'
2021-02-14 05:20:42 +05:30
print'(a,i0)', ' # phases: ',count(myPlasticity); flush(IO_STDOUT)
2021-02-13 17:37:35 +05:30
phases => config_material%get('phase')
2021-02-14 05:20:42 +05:30
allocate(param(phases%length))
allocate(state(phases%length))
allocate(dotState(phases%length))
allocate(deltaState(phases%length))
2020-08-15 19:32:10 +05:30
do p = 1, phases%length
2021-02-14 05:20:42 +05:30
if(.not. myPlasticity(p)) cycle
2020-08-15 19:32:10 +05:30
phase => phases%get(p)
2020-11-18 01:54:40 +05:30
mech => phase%get('mechanics')
2021-02-14 05:20:42 +05:30
i = p
2020-08-15 19:32:10 +05:30
associate(prm => param(i), &
dot => dotState(i), &
dlt => deltaState(i), &
stt => state(i))
2020-11-03 03:16:46 +05:30
pl => mech%get('plasticity')
2020-08-15 19:32:10 +05:30
#if defined (__GFORTRAN__)
prm%output = output_asStrings(pl)
#else
prm%output = pl%get_asStrings('output',defaultVal=emptyStringArray)
#endif
2020-03-15 00:33:57 +05:30
2018-12-30 20:09:48 +05:30
#ifdef DEBUG
if (p==material_phaseAt(debugConstitutive%grain,debugConstitutive%element)) then
prm%of_debug = material_phasememberAt(debugConstitutive%grain,debugConstitutive%ip,debugConstitutive%element)
endif
2018-12-30 20:09:48 +05:30
#endif
!--------------------------------------------------------------------------------------------------
! slip related parameters
2020-08-15 19:32:10 +05:30
N_sl = pl%get_asInts('N_sl',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-08-15 19:32:10 +05:30
prm%P = lattice_SchmidMatrix_slip(N_sl,phase%get_asString('lattice'),&
phase%get_asFloat('c/a',defaultVal=0.0_pReal))
if(trim(phase%get_asString('lattice')) == 'cI') then
2020-09-23 04:25:19 +05:30
a = pl%get_asFloats('a_nonSchmid',defaultVal = emptyRealArray)
2020-03-16 23:26:54 +05:30
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)
else
2020-03-16 01:46:28 +05:30
prm%nonSchmid_pos = prm%P
prm%nonSchmid_neg = prm%P
endif
2020-03-16 03:37:23 +05:30
prm%interaction_SlipSlip = lattice_interaction_SlipBySlip(N_sl, &
2020-08-15 19:32:10 +05:30
pl%get_asFloats('h_sl_sl'), &
phase%get_asString('lattice'))
2020-09-22 18:56:34 +05:30
xi_0 = pl%get_asFloats('xi_0', requiredSize=size(N_sl))
prm%xi_inf_f = pl%get_asFloats('xi_inf_f', requiredSize=size(N_sl))
prm%xi_inf_b = pl%get_asFloats('xi_inf_b', requiredSize=size(N_sl))
prm%h_0_f = pl%get_asFloats('h_0_f', requiredSize=size(N_sl))
prm%h_inf_f = pl%get_asFloats('h_inf_f', requiredSize=size(N_sl))
prm%h_0_b = pl%get_asFloats('h_0_b', requiredSize=size(N_sl))
prm%h_inf_b = pl%get_asFloats('h_inf_b', requiredSize=size(N_sl))
2020-09-22 18:56:34 +05:30
prm%dot_gamma_0 = pl%get_asFloat('dot_gamma_0')
prm%n = pl%get_asFloat('n')
! expand: family => system
2020-09-22 18:56:34 +05:30
xi_0 = math_expand(xi_0, N_sl)
prm%xi_inf_f = math_expand(prm%xi_inf_f, N_sl)
prm%xi_inf_b = math_expand(prm%xi_inf_b, N_sl)
prm%h_0_f = math_expand(prm%h_0_f, N_sl)
prm%h_inf_f = math_expand(prm%h_inf_f, N_sl)
prm%h_0_b = math_expand(prm%h_0_b, N_sl)
prm%h_inf_b = math_expand(prm%h_inf_b, N_sl)
!--------------------------------------------------------------------------------------------------
! sanity checks
2020-09-22 18:56:34 +05:30
if ( prm%dot_gamma_0 <= 0.0_pReal) extmsg = trim(extmsg)//' dot_gamma_0'
if ( prm%n <= 0.0_pReal) extmsg = trim(extmsg)//' n'
if (any(xi_0 <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_0'
if (any(prm%xi_inf_f <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_inf_f'
if (any(prm%xi_inf_b <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_inf_b'
!ToDo: Any sensible checks for theta?
2020-03-16 23:26:54 +05:30
else slipActive
xi_0 = emptyRealArray
2020-09-22 18:56:34 +05:30
allocate(prm%xi_inf_f,prm%xi_inf_b,prm%h_0_f,prm%h_inf_f,prm%h_0_b,prm%h_inf_b,source=emptyRealArray)
2020-03-16 23:26:54 +05:30
allocate(prm%interaction_SlipSlip(0,0))
endif slipActive
!--------------------------------------------------------------------------------------------------
! allocate state arrays
2021-01-26 12:24:24 +05:30
Nconstituents = count(material_phaseAt2 == p)
2020-08-15 19:32:10 +05:30
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%sum_N_sl!ToDo: adjust names, ask Philip
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl !ToDo: adjust names
sizeState = sizeDotState + sizeDeltaState
2021-02-09 03:51:53 +05:30
call phase_allocateState(plasticState(p),Nconstituents,sizeState,sizeDotState,sizeDeltaState)
!--------------------------------------------------------------------------------------------------
2020-03-16 03:37:23 +05:30
! state aliases and initialization
startIndex = 1
2020-03-16 01:46:28 +05:30
endIndex = prm%sum_N_sl
stt%crss => plasticState(p)%state (startIndex:endIndex,:)
stt%crss = spread(xi_0, 2, Nconstituents)
dot%crss => plasticState(p)%dotState(startIndex:endIndex,:)
2020-08-15 19:32:10 +05:30
plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
startIndex = endIndex + 1
2020-03-16 01:46:28 +05:30
endIndex = endIndex + prm%sum_N_sl
stt%crss_back => plasticState(p)%state (startIndex:endIndex,:)
dot%crss_back => plasticState(p)%dotState(startIndex:endIndex,:)
2020-08-15 19:32:10 +05:30
plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
startIndex = endIndex + 1
2020-03-16 01:46:28 +05:30
endIndex = endIndex + prm%sum_N_sl
stt%accshear => plasticState(p)%state (startIndex:endIndex,:)
dot%accshear => plasticState(p)%dotState(startIndex:endIndex,:)
2020-08-15 19:32:10 +05:30
plasticState(p)%atol(startIndex:endIndex) = pl%get_asFloat('atol_gamma',defaultVal=1.0e-6_pReal)
if(any(plasticState(p)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_gamma'
! global alias
2020-03-15 00:33:57 +05:30
plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:)
o = plasticState(p)%offsetDeltaState
startIndex = endIndex + 1
2020-03-16 01:46:28 +05:30
endIndex = endIndex + prm%sum_N_sl
stt%sense => plasticState(p)%state (startIndex :endIndex ,:)
dlt%sense => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
startIndex = endIndex + 1
2020-03-16 01:46:28 +05:30
endIndex = endIndex + prm%sum_N_sl
stt%chi0 => plasticState(p)%state (startIndex :endIndex ,:)
dlt%chi0 => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
startIndex = endIndex + 1
2020-03-16 01:46:28 +05:30
endIndex = endIndex + prm%sum_N_sl
stt%gamma0 => plasticState(p)%state (startIndex :endIndex ,:)
dlt%gamma0 => plasticState(p)%deltaState(startIndex-o:endIndex-o,:)
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
end associate
2020-03-15 00:33:57 +05:30
!--------------------------------------------------------------------------------------------------
! exit if any parameter is out of range
2020-08-15 19:32:10 +05:30
if (extmsg /= '') call IO_error(211,ext_msg=trim(extmsg)//'(kinehardening)')
2020-03-15 00:33:57 +05:30
enddo
2020-03-15 00:33:57 +05:30
2020-08-15 19:32:10 +05:30
end function plastic_kinehardening_init
!--------------------------------------------------------------------------------------------------
!> @brief Calculate plastic velocity gradient and its tangent.
!--------------------------------------------------------------------------------------------------
pure module subroutine kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,me)
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
real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress
integer, intent(in) :: &
ph, &
2021-01-26 13:09:17 +05:30
me
integer :: &
i,k,l,m,n
2021-02-14 05:20:42 +05:30
real(pReal), dimension(param(ph)%sum_N_sl) :: &
gdot_pos,gdot_neg, &
dgdot_dtau_pos,dgdot_dtau_neg
Lp = 0.0_pReal
dLp_dMp = 0.0_pReal
2021-02-14 05:20:42 +05:30
associate(prm => param(ph))
2021-02-14 05:20:42 +05:30
call kinetics(Mp,ph,me,gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
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)
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)
enddo
end associate
2021-01-26 12:03:04 +05:30
end subroutine kinehardening_LpAndItsTangent
2018-12-22 03:11:39 +05:30
2019-01-07 12:06:11 +05:30
!--------------------------------------------------------------------------------------------------
!> @brief Calculate the rate of change of microstructure.
2019-01-07 12:06:11 +05:30
!--------------------------------------------------------------------------------------------------
module subroutine plastic_kinehardening_dotState(Mp,ph,me)
2019-01-07 12:06:11 +05:30
real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress
integer, intent(in) :: &
ph, &
2021-01-26 13:09:17 +05:30
me
real(pReal) :: &
sumGamma
2021-02-14 05:20:42 +05:30
real(pReal), dimension(param(ph)%sum_N_sl) :: &
gdot_pos,gdot_neg
2021-02-14 05:20:42 +05:30
associate(prm => param(ph), stt => state(ph),&
dot => dotState(ph))
2021-02-14 05:20:42 +05:30
call kinetics(Mp,ph,me,gdot_pos,gdot_neg)
2021-01-26 13:09:17 +05:30
dot%accshear(:,me) = abs(gdot_pos+gdot_neg)
sumGamma = sum(stt%accshear(:,me))
2021-01-26 13:09:17 +05:30
dot%crss(:,me) = matmul(prm%interaction_SlipSlip,dot%accshear(:,me)) &
2020-09-22 18:56:34 +05:30
* ( prm%h_inf_f &
+ (prm%h_0_f - prm%h_inf_f + prm%h_0_f*prm%h_inf_f*sumGamma/prm%xi_inf_f) &
* exp(-sumGamma*prm%h_0_f/prm%xi_inf_f) &
)
2021-01-26 13:09:17 +05:30
dot%crss_back(:,me) = stt%sense(:,me)*dot%accshear(:,me) * &
2020-09-22 18:56:34 +05:30
( prm%h_inf_b + &
(prm%h_0_b - prm%h_inf_b &
2021-01-26 13:09:17 +05:30
+ prm%h_0_b*prm%h_inf_b/(prm%xi_inf_b+stt%chi0(:,me))*(stt%accshear(:,me)-stt%gamma0(:,me))&
) *exp(-(stt%accshear(:,me)-stt%gamma0(:,me)) *prm%h_0_b/(prm%xi_inf_b+stt%chi0(:,me))) &
)
end associate
2019-01-07 12:06:11 +05:30
end subroutine plastic_kinehardening_dotState
!--------------------------------------------------------------------------------------------------
!> @brief Calculate (instantaneous) incremental change of microstructure.
!--------------------------------------------------------------------------------------------------
2021-02-14 05:20:42 +05:30
module subroutine plastic_kinehardening_deltaState(Mp,ph,me)
2018-12-30 20:09:48 +05:30
real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress
integer, intent(in) :: &
2021-02-14 05:20:42 +05:30
ph, &
2021-01-26 13:09:17 +05:30
me
2021-02-14 05:20:42 +05:30
real(pReal), dimension(param(ph)%sum_N_sl) :: &
gdot_pos,gdot_neg, &
sense
2021-02-14 05:20:42 +05:30
associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph))
2021-02-14 05:20:42 +05:30
call kinetics(Mp,ph,me,gdot_pos,gdot_neg)
sense = merge(state(ph)%sense(:,me), & ! 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
2018-12-13 12:01:56 +05:30
!--------------------------------------------------------------------------------------------------
2021-01-26 13:09:17 +05:30
! switch in sense me shear?
where(dNeq(sense,stt%sense(:,me),0.1_pReal))
dlt%sense (:,me) = sense - stt%sense(:,me) ! switch sense
dlt%chi0 (:,me) = abs(stt%crss_back(:,me)) - stt%chi0(:,me) ! remember current backstress magnitude
dlt%gamma0(:,me) = stt%accshear(:,me) - stt%gamma0(:,me) ! remember current accumulated shear
else where
2021-01-26 13:09:17 +05:30
dlt%sense (:,me) = 0.0_pReal
dlt%chi0 (:,me) = 0.0_pReal
dlt%gamma0(:,me) = 0.0_pReal
end where
end associate
end subroutine plastic_kinehardening_deltaState
!--------------------------------------------------------------------------------------------------
!> @brief Write results to HDF5 output file.
!--------------------------------------------------------------------------------------------------
2021-02-14 05:20:42 +05:30
module subroutine plastic_kinehardening_results(ph,group)
2021-02-14 05:20:42 +05:30
integer, intent(in) :: ph
character(len=*), intent(in) :: group
integer :: o
2021-02-14 05:20:42 +05:30
associate(prm => param(ph), stt => state(ph))
outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o)))
2020-08-15 19:32:10 +05:30
case('xi')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss,trim(prm%output(o)), &
2020-03-16 01:46:28 +05:30
'resistance against plastic slip','Pa')
case('tau_b')
2020-08-15 19:32:10 +05:30
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%crss_back,trim(prm%output(o)), &
2020-03-16 01:46:28 +05:30
'back stress against plastic slip','Pa')
2020-08-15 19:32:10 +05:30
case ('sgn(gamma)')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%sense,trim(prm%output(o)), & ! ToDo: could be int
2020-03-16 01:46:28 +05:30
'tbd','1')
2020-08-15 19:32:10 +05:30
case ('chi_0')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%chi0,trim(prm%output(o)), &
2020-03-16 01:46:28 +05:30
'tbd','Pa')
2020-08-15 19:32:10 +05:30
case ('gamma_0')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%gamma0,trim(prm%output(o)), &
2020-03-16 01:46:28 +05:30
'tbd','1')
2020-08-15 19:32:10 +05:30
case ('gamma')
if(prm%sum_N_sl>0) call results_writeDataset(group,stt%accshear,trim(prm%output(o)), &
2020-03-16 01:46:28 +05:30
'plastic shear','1')
end select
enddo outputsLoop
end associate
end subroutine plastic_kinehardening_results
2018-11-26 11:40:43 +05:30
!--------------------------------------------------------------------------------------------------
!> @brief Calculate shear rates on slip systems and their derivatives with respect to resolved
! stress.
!> @details: Derivatives are calculated only optionally.
! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to
! have the optional arguments at the end.
2018-11-26 11:40:43 +05:30
!--------------------------------------------------------------------------------------------------
2021-02-14 05:20:42 +05:30
pure subroutine kinetics(Mp,ph,me, &
gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
2018-11-26 11:40:43 +05:30
real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress
integer, intent(in) :: &
2021-02-14 05:20:42 +05:30
ph, &
2021-01-26 13:09:17 +05:30
me
2021-02-14 05:20:42 +05:30
real(pReal), intent(out), dimension(param(ph)%sum_N_sl) :: &
gdot_pos, &
gdot_neg
2021-02-14 05:20:42 +05:30
real(pReal), intent(out), optional, dimension(param(ph)%sum_N_sl) :: &
dgdot_dtau_pos, &
dgdot_dtau_neg
2021-02-14 05:20:42 +05:30
real(pReal), dimension(param(ph)%sum_N_sl) :: &
tau_pos, &
tau_neg
integer :: i
2021-02-14 05:20:42 +05:30
associate(prm => param(ph), stt => state(ph))
2020-03-16 01:46:28 +05:30
do i = 1, prm%sum_N_sl
2021-01-26 13:09:17 +05:30
tau_pos(i) = math_tensordot(Mp,prm%nonSchmid_pos(1:3,1:3,i)) - stt%crss_back(i,me)
tau_neg(i) = merge(math_tensordot(Mp,prm%nonSchmid_neg(1:3,1:3,i)) - stt%crss_back(i,me), &
2020-03-16 23:26:54 +05:30
0.0_pReal, prm%nonSchmidActive)
enddo
where(dNeq0(tau_pos))
2020-09-22 22:56:39 +05:30
gdot_pos = prm%dot_gamma_0 * merge(0.5_pReal,1.0_pReal, prm%nonSchmidActive) & ! 1/2 if non-Schmid active
2021-01-26 13:09:17 +05:30
* sign(abs(tau_pos/stt%crss(:,me))**prm%n, tau_pos)
else where
gdot_pos = 0.0_pReal
end where
where(dNeq0(tau_neg))
2020-09-22 22:56:39 +05:30
gdot_neg = prm%dot_gamma_0 * 0.5_pReal & ! only used if non-Schmid active, always 1/2
2021-01-26 13:09:17 +05:30
* sign(abs(tau_neg/stt%crss(:,me))**prm%n, tau_neg)
else where
gdot_neg = 0.0_pReal
end where
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
2021-01-26 05:41:32 +05:30
end submodule kinehardening