style adjustments
This commit is contained in:
parent
ddb25ad0e5
commit
bb757cf82e
|
@ -148,7 +148,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
else
|
else
|
||||||
prm%P_nS_pos = prm%P_sl
|
prm%P_nS_pos = prm%P_sl
|
||||||
prm%P_nS_neg = prm%P_sl
|
prm%P_nS_neg = prm%P_sl
|
||||||
endif
|
end if
|
||||||
|
|
||||||
prm%h_sl_sl = lattice_interaction_SlipBySlip(N_sl,pl%get_as1dFloat('h_sl-sl'), &
|
prm%h_sl_sl = lattice_interaction_SlipBySlip(N_sl,pl%get_as1dFloat('h_sl-sl'), &
|
||||||
phase_lattice(ph))
|
phase_lattice(ph))
|
||||||
|
@ -209,13 +209,13 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
if (any(prm%f_at <= 0.0_pReal)) extmsg = trim(extmsg)//' f_at or b_sl'
|
if (any(prm%f_at <= 0.0_pReal)) extmsg = trim(extmsg)//' f_at or b_sl'
|
||||||
|
|
||||||
else slipActive
|
else slipActive
|
||||||
rho_mob_0= emptyRealArray; rho_dip_0 = emptyRealArray
|
rho_mob_0 = emptyRealArray; rho_dip_0 = emptyRealArray
|
||||||
allocate(prm%b_sl,prm%d_caron,prm%i_sl,prm%f_at,prm%tau_Peierls, &
|
allocate(prm%b_sl,prm%d_caron,prm%i_sl,prm%f_at,prm%tau_Peierls, &
|
||||||
prm%Q_s,prm%v_0,prm%p,prm%q,prm%B,prm%h,prm%w,prm%omega, &
|
prm%Q_s,prm%v_0,prm%p,prm%q,prm%B,prm%h,prm%w,prm%omega, &
|
||||||
source = emptyRealArray)
|
source = emptyRealArray)
|
||||||
allocate(prm%forestProjection(0,0))
|
allocate(prm%forestProjection(0,0))
|
||||||
allocate(prm%h_sl_sl (0,0))
|
allocate(prm%h_sl_sl (0,0))
|
||||||
endif slipActive
|
end if slipActive
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
|
@ -258,7 +258,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
! exit if any parameter is out of range
|
! exit if any parameter is out of range
|
||||||
if (extmsg /= '') call IO_error(211,ext_msg=trim(extmsg)//'(dislotungsten)')
|
if (extmsg /= '') call IO_error(211,ext_msg=trim(extmsg)//'(dislotungsten)')
|
||||||
|
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
end function plastic_dislotungsten_init
|
end function plastic_dislotungsten_init
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ end function plastic_dislotungsten_init
|
||||||
!> @brief Calculate plastic velocity gradient and its tangent.
|
!> @brief Calculate plastic velocity gradient and its tangent.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure module subroutine dislotungsten_LpAndItsTangent(Lp,dLp_dMp, &
|
pure module subroutine dislotungsten_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
Mp,T,ph,en)
|
Mp,T,ph,en)
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
Lp !< plastic velocity gradient
|
Lp !< plastic velocity gradient
|
||||||
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
||||||
|
@ -287,19 +287,20 @@ pure module subroutine dislotungsten_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma_pos,dot_gamma_neg, &
|
||||||
ddot_gamma_dtau_pos,ddot_gamma_dtau_neg
|
ddot_gamma_dtau_pos,ddot_gamma_dtau_neg
|
||||||
|
|
||||||
|
|
||||||
Lp = 0.0_pReal
|
Lp = 0.0_pReal
|
||||||
dLp_dMp = 0.0_pReal
|
dLp_dMp = 0.0_pReal
|
||||||
|
|
||||||
associate(prm => param(ph))
|
associate(prm => param(ph))
|
||||||
|
|
||||||
call kinetics(Mp,T,ph,en,dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg)
|
call kinetics(Mp,T,ph,en,dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg)
|
||||||
do i = 1, prm%sum_N_sl
|
do i = 1, prm%sum_N_sl
|
||||||
Lp = Lp + (dot_gamma_pos(i)+dot_gamma_neg(i))*prm%P_sl(1:3,1:3,i)
|
Lp = Lp + (dot_gamma_pos(i)+dot_gamma_neg(i))*prm%P_sl(1:3,1:3,i)
|
||||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
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) &
|
dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) &
|
||||||
+ ddot_gamma_dtau_pos(i) * prm%P_sl(k,l,i) * prm%P_nS_pos(m,n,i) &
|
+ ddot_gamma_dtau_pos(i) * prm%P_sl(k,l,i) * prm%P_nS_pos(m,n,i) &
|
||||||
+ ddot_gamma_dtau_neg(i) * prm%P_sl(k,l,i) * prm%P_nS_neg(m,n,i)
|
+ ddot_gamma_dtau_neg(i) * prm%P_sl(k,l,i) * prm%P_nS_neg(m,n,i)
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -328,35 +329,36 @@ module subroutine dislotungsten_dotState(Mp,T,ph,en)
|
||||||
dot_rho_dip_climb, &
|
dot_rho_dip_climb, &
|
||||||
d_hat
|
d_hat
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), dot => dotState(ph), dst => dependentState(ph))
|
associate(prm => param(ph), stt => state(ph), dot => dotState(ph), dst => dependentState(ph))
|
||||||
|
|
||||||
call kinetics(Mp,T,ph,en,&
|
call kinetics(Mp,T,ph,en,&
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma_pos,dot_gamma_neg, &
|
||||||
tau_pos_out = tau_pos,tau_neg_out = tau_neg)
|
tau_pos_out = tau_pos,tau_neg_out = tau_neg)
|
||||||
|
|
||||||
dot%gamma_sl(:,en) = abs(dot_gamma_pos+dot_gamma_neg)
|
dot%gamma_sl(:,en) = abs(dot_gamma_pos+dot_gamma_neg)
|
||||||
|
|
||||||
where(dEq0(tau_pos)) ! ToDo: use avg of +/-
|
where(dEq0(tau_pos)) ! ToDo: use avg of +/-
|
||||||
dot_rho_dip_formation = 0.0_pReal
|
dot_rho_dip_formation = 0.0_pReal
|
||||||
dot_rho_dip_climb = 0.0_pReal
|
dot_rho_dip_climb = 0.0_pReal
|
||||||
else where
|
else where
|
||||||
d_hat = math_clip(3.0_pReal*prm%mu*prm%b_sl/(16.0_pReal*PI*abs(tau_pos)), & ! ToDo: use avg of +/-
|
d_hat = math_clip(3.0_pReal*prm%mu*prm%b_sl/(16.0_pReal*PI*abs(tau_pos)), & ! ToDo: use avg of +/-
|
||||||
prm%d_caron, & ! lower limit
|
prm%d_caron, & ! lower limit
|
||||||
dst%Lambda_sl(:,en)) ! upper limit
|
dst%Lambda_sl(:,en)) ! upper limit
|
||||||
dot_rho_dip_formation = merge(2.0_pReal*(d_hat-prm%d_caron)*stt%rho_mob(:,en)*dot%gamma_sl(:,en)/prm%b_sl, &
|
dot_rho_dip_formation = merge(2.0_pReal*(d_hat-prm%d_caron)*stt%rho_mob(:,en)*dot%gamma_sl(:,en)/prm%b_sl, &
|
||||||
0.0_pReal, &
|
0.0_pReal, &
|
||||||
prm%dipoleformation)
|
prm%dipoleformation)
|
||||||
v_cl = (3.0_pReal*prm%mu*prm%D_0*exp(-prm%Q_cl/(kB*T))*prm%f_at/(2.0_pReal*PI*kB*T)) &
|
v_cl = (3.0_pReal*prm%mu*prm%D_0*exp(-prm%Q_cl/(kB*T))*prm%f_at/(2.0_pReal*PI*kB*T)) &
|
||||||
* (1.0_pReal/(d_hat+prm%d_caron))
|
* (1.0_pReal/(d_hat+prm%d_caron))
|
||||||
dot_rho_dip_climb = (4.0_pReal*v_cl*stt%rho_dip(:,en))/(d_hat-prm%d_caron) ! ToDo: Discuss with Franz: Stress dependency?
|
dot_rho_dip_climb = (4.0_pReal*v_cl*stt%rho_dip(:,en))/(d_hat-prm%d_caron) ! ToDo: Discuss with Franz: Stress dependency?
|
||||||
end where
|
end where
|
||||||
|
|
||||||
dot%rho_mob(:,en) = dot%gamma_sl(:,en)/(prm%b_sl*dst%Lambda_sl(:,en)) & ! multiplication
|
dot%rho_mob(:,en) = dot%gamma_sl(:,en)/(prm%b_sl*dst%Lambda_sl(:,en)) & ! multiplication
|
||||||
- dot_rho_dip_formation &
|
- dot_rho_dip_formation &
|
||||||
- (2.0_pReal*prm%d_caron)/prm%b_sl*stt%rho_mob(:,en)*dot%gamma_sl(:,en) ! Spontaneous annihilation of 2 edges
|
- (2.0_pReal*prm%d_caron)/prm%b_sl*stt%rho_mob(:,en)*dot%gamma_sl(:,en) ! Spontaneous annihilation of 2 edges
|
||||||
dot%rho_dip(:,en) = dot_rho_dip_formation &
|
dot%rho_dip(:,en) = dot_rho_dip_formation &
|
||||||
- (2.0_pReal*prm%d_caron)/prm%b_sl*stt%rho_dip(:,en)*dot%gamma_sl(:,en) & ! Spontaneous annihilation of an edge with a dipole
|
- (2.0_pReal*prm%d_caron)/prm%b_sl*stt%rho_dip(:,en)*dot%gamma_sl(:,en) & ! Spontaneous annihilation of an edge with a dipole
|
||||||
- dot_rho_dip_climb
|
- dot_rho_dip_climb
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -368,7 +370,7 @@ end subroutine dislotungsten_dotState
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine dislotungsten_dependentState(ph,en)
|
module subroutine dislotungsten_dependentState(ph,en)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ph, &
|
ph, &
|
||||||
en
|
en
|
||||||
|
|
||||||
|
@ -423,7 +425,7 @@ module subroutine plastic_dislotungsten_results(ph,group)
|
||||||
'threshold stress for slip','Pa',prm%systems_sl)
|
'threshold stress for slip','Pa',prm%systems_sl)
|
||||||
end select
|
end select
|
||||||
|
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -456,6 +458,7 @@ pure subroutine kinetics(Mp,T,ph,en, &
|
||||||
ddot_gamma_dtau_neg, &
|
ddot_gamma_dtau_neg, &
|
||||||
tau_pos_out, &
|
tau_pos_out, &
|
||||||
tau_neg_out
|
tau_neg_out
|
||||||
|
|
||||||
real(pReal), dimension(param(ph)%sum_N_sl) :: &
|
real(pReal), dimension(param(ph)%sum_N_sl) :: &
|
||||||
StressRatio, &
|
StressRatio, &
|
||||||
StressRatio_p,StressRatio_pminus1, &
|
StressRatio_p,StressRatio_pminus1, &
|
||||||
|
@ -464,80 +467,80 @@ pure subroutine kinetics(Mp,T,ph,en, &
|
||||||
t_n, t_k, dtk,dtn
|
t_n, t_k, dtk,dtn
|
||||||
integer :: j
|
integer :: j
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), dst => dependentState(ph))
|
associate(prm => param(ph), stt => state(ph), dst => dependentState(ph))
|
||||||
|
|
||||||
do j = 1, prm%sum_N_sl
|
do j = 1, prm%sum_N_sl
|
||||||
tau_pos(j) = math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,j))
|
tau_pos(j) = math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,j))
|
||||||
tau_neg(j) = math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,j))
|
tau_neg(j) = math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,j))
|
||||||
enddo
|
end do
|
||||||
|
|
||||||
|
if (present(tau_pos_out)) tau_pos_out = tau_pos
|
||||||
|
if (present(tau_neg_out)) tau_neg_out = tau_neg
|
||||||
|
|
||||||
if (present(tau_pos_out)) tau_pos_out = tau_pos
|
associate(BoltzmannRatio => prm%Q_s/(kB*T), &
|
||||||
if (present(tau_neg_out)) tau_neg_out = tau_neg
|
dot_gamma_0 => stt%rho_mob(:,en)*prm%b_sl*prm%v_0, &
|
||||||
|
effectiveLength => dst%Lambda_sl(:,en) - prm%w)
|
||||||
|
|
||||||
associate(BoltzmannRatio => prm%Q_s/(kB*T), &
|
significantPositiveTau: where(abs(tau_pos)-dst%tau_pass(:,en) > tol_math_check)
|
||||||
dot_gamma_0 => stt%rho_mob(:,en)*prm%b_sl*prm%v_0, &
|
StressRatio = (abs(tau_pos)-dst%tau_pass(:,en))/prm%tau_Peierls
|
||||||
effectiveLength => dst%Lambda_sl(:,en) - prm%w)
|
StressRatio_p = StressRatio** prm%p
|
||||||
|
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pReal)
|
||||||
|
|
||||||
significantPositiveTau: where(abs(tau_pos)-dst%tau_pass(:,en) > tol_math_check)
|
t_n = prm%b_sl/(exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)*prm%omega*effectiveLength)
|
||||||
StressRatio = (abs(tau_pos)-dst%tau_pass(:,en))/prm%tau_Peierls
|
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos)
|
||||||
StressRatio_p = StressRatio** prm%p
|
|
||||||
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pReal)
|
|
||||||
|
|
||||||
t_n = prm%b_sl/(exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)*prm%omega*effectiveLength)
|
vel = prm%h/(t_n + t_k)
|
||||||
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos)
|
|
||||||
|
|
||||||
vel = prm%h/(t_n + t_k)
|
dot_gamma_pos = dot_gamma_0 * sign(vel,tau_pos) * 0.5_pReal
|
||||||
|
else where significantPositiveTau
|
||||||
|
dot_gamma_pos = 0.0_pReal
|
||||||
|
end where significantPositiveTau
|
||||||
|
|
||||||
dot_gamma_pos = dot_gamma_0 * sign(vel,tau_pos) * 0.5_pReal
|
if (present(ddot_gamma_dtau_pos)) then
|
||||||
else where significantPositiveTau
|
significantPositiveTau2: where(abs(tau_pos)-dst%tau_pass(:,en) > tol_math_check)
|
||||||
dot_gamma_pos = 0.0_pReal
|
dtn = -1.0_pReal * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pReal-StressRatio_p)**(prm%q - 1.0_pReal) &
|
||||||
end where significantPositiveTau
|
* (StressRatio)**(prm%p - 1.0_pReal) / prm%tau_Peierls
|
||||||
|
dtk = -1.0_pReal * t_k / tau_pos
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_pos)) then
|
dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
||||||
significantPositiveTau2: where(abs(tau_pos)-dst%tau_pass(:,en) > tol_math_check)
|
|
||||||
dtn = -1.0_pReal * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pReal-StressRatio_p)**(prm%q - 1.0_pReal) &
|
|
||||||
* (StressRatio)**(prm%p - 1.0_pReal) / prm%tau_Peierls
|
|
||||||
dtk = -1.0_pReal * t_k / tau_pos
|
|
||||||
|
|
||||||
dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
ddot_gamma_dtau_pos = dot_gamma_0 * dvel* 0.5_pReal
|
||||||
|
else where significantPositiveTau2
|
||||||
|
ddot_gamma_dtau_pos = 0.0_pReal
|
||||||
|
end where significantPositiveTau2
|
||||||
|
end if
|
||||||
|
|
||||||
ddot_gamma_dtau_pos = dot_gamma_0 * dvel* 0.5_pReal
|
significantNegativeTau: where(abs(tau_neg)-dst%tau_pass(:,en) > tol_math_check)
|
||||||
else where significantPositiveTau2
|
StressRatio = (abs(tau_neg)-dst%tau_pass(:,en))/prm%tau_Peierls
|
||||||
ddot_gamma_dtau_pos = 0.0_pReal
|
StressRatio_p = StressRatio** prm%p
|
||||||
end where significantPositiveTau2
|
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pReal)
|
||||||
endif
|
|
||||||
|
|
||||||
significantNegativeTau: where(abs(tau_neg)-dst%tau_pass(:,en) > tol_math_check)
|
t_n = prm%b_sl/(exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)*prm%omega*effectiveLength)
|
||||||
StressRatio = (abs(tau_neg)-dst%tau_pass(:,en))/prm%tau_Peierls
|
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos)
|
||||||
StressRatio_p = StressRatio** prm%p
|
|
||||||
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pReal)
|
|
||||||
|
|
||||||
t_n = prm%b_sl/(exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)*prm%omega*effectiveLength)
|
vel = prm%h/(t_n + t_k)
|
||||||
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos)
|
|
||||||
|
|
||||||
vel = prm%h/(t_n + t_k)
|
dot_gamma_neg = dot_gamma_0 * sign(vel,tau_neg) * 0.5_pReal
|
||||||
|
else where significantNegativeTau
|
||||||
|
dot_gamma_neg = 0.0_pReal
|
||||||
|
end where significantNegativeTau
|
||||||
|
|
||||||
dot_gamma_neg = dot_gamma_0 * sign(vel,tau_neg) * 0.5_pReal
|
if (present(ddot_gamma_dtau_neg)) then
|
||||||
else where significantNegativeTau
|
significantNegativeTau2: where(abs(tau_neg)-dst%tau_pass(:,en) > tol_math_check)
|
||||||
dot_gamma_neg = 0.0_pReal
|
dtn = -1.0_pReal * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pReal-StressRatio_p)**(prm%q - 1.0_pReal) &
|
||||||
end where significantNegativeTau
|
* (StressRatio)**(prm%p - 1.0_pReal) / prm%tau_Peierls
|
||||||
|
dtk = -1.0_pReal * t_k / tau_neg
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_neg)) then
|
dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
||||||
significantNegativeTau2: where(abs(tau_neg)-dst%tau_pass(:,en) > tol_math_check)
|
|
||||||
dtn = -1.0_pReal * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pReal-StressRatio_p)**(prm%q - 1.0_pReal) &
|
|
||||||
* (StressRatio)**(prm%p - 1.0_pReal) / prm%tau_Peierls
|
|
||||||
dtk = -1.0_pReal * t_k / tau_neg
|
|
||||||
|
|
||||||
dvel = -1.0_pReal * prm%h * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
ddot_gamma_dtau_neg = dot_gamma_0 * dvel * 0.5_pReal
|
||||||
|
else where significantNegativeTau2
|
||||||
|
ddot_gamma_dtau_neg = 0.0_pReal
|
||||||
|
end where significantNegativeTau2
|
||||||
|
end if
|
||||||
|
|
||||||
ddot_gamma_dtau_neg = dot_gamma_0 * dvel * 0.5_pReal
|
end associate
|
||||||
else where significantNegativeTau2
|
|
||||||
ddot_gamma_dtau_neg = 0.0_pReal
|
|
||||||
end where significantNegativeTau2
|
|
||||||
end if
|
|
||||||
|
|
||||||
end associate
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
end subroutine kinetics
|
end subroutine kinetics
|
||||||
|
|
Loading…
Reference in New Issue