Merge branch 'nonSchmid-adaptation' into 'development'
Non-Schmid adaptation Closes #324 See merge request damask/DAMASK!817
This commit is contained in:
commit
68ed6937cb
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit b752a1e5d3a10a579329b386ed23d961fe2d35cb
|
Subproject commit 9d2a98d72d9bf547dd697124cb795cf6a9668d30
|
|
@ -389,7 +389,6 @@ module crystal
|
||||||
crystal_SchmidMatrix_twin, &
|
crystal_SchmidMatrix_twin, &
|
||||||
crystal_SchmidMatrix_trans, &
|
crystal_SchmidMatrix_trans, &
|
||||||
crystal_SchmidMatrix_cleavage, &
|
crystal_SchmidMatrix_cleavage, &
|
||||||
crystal_nonSchmidMatrix, &
|
|
||||||
crystal_interaction_SlipBySlip, &
|
crystal_interaction_SlipBySlip, &
|
||||||
crystal_interaction_TwinByTwin, &
|
crystal_interaction_TwinByTwin, &
|
||||||
crystal_interaction_TransByTrans, &
|
crystal_interaction_TransByTrans, &
|
||||||
|
@ -594,54 +593,6 @@ function crystal_C66_trans(Ntrans,C_parent66,crystal_target, &
|
||||||
end function crystal_C66_trans
|
end function crystal_C66_trans
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
!> @brief Non-schmid projections for cI with up to 6 coefficients
|
|
||||||
! https://doi.org/10.1016/j.actamat.2012.03.053, eq. (17)
|
|
||||||
! https://doi.org/10.1016/j.actamat.2008.07.037, table 1
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
function crystal_nonSchmidMatrix(Nslip,nonSchmidCoefficients,sense) result(nonSchmidMatrix)
|
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
|
||||||
real(pREAL), dimension(:), intent(in) :: nonSchmidCoefficients !< non-Schmid coefficients for projections
|
|
||||||
integer, intent(in) :: sense !< sense (-1,+1)
|
|
||||||
real(pREAL), dimension(1:3,1:3,sum(Nslip)) :: nonSchmidMatrix
|
|
||||||
|
|
||||||
real(pREAL), dimension(1:3,1:3,sum(Nslip)) :: coordinateSystem !< coordinate system of slip system
|
|
||||||
real(pREAL), dimension(3) :: direction, normal, np
|
|
||||||
type(tRotation) :: R
|
|
||||||
integer :: i
|
|
||||||
|
|
||||||
|
|
||||||
if (abs(sense) /= 1) error stop 'Sense in crystal_nonSchmidMatrix'
|
|
||||||
|
|
||||||
coordinateSystem = buildCoordinateSystem(Nslip,CI_NSLIPSYSTEM,CI_SYSTEMSLIP,'cI',0.0_pREAL)
|
|
||||||
coordinateSystem(1:3,1,1:sum(Nslip)) = coordinateSystem(1:3,1,1:sum(Nslip))*real(sense,pREAL) ! convert unidirectional coordinate system
|
|
||||||
nonSchmidMatrix = crystal_SchmidMatrix_slip(Nslip,'cI',0.0_pREAL) ! Schmid contribution
|
|
||||||
|
|
||||||
do i = 1,sum(Nslip)
|
|
||||||
direction = coordinateSystem(1:3,1,i)
|
|
||||||
normal = coordinateSystem(1:3,2,i)
|
|
||||||
call R%fromAxisAngle([direction,60.0_pREAL],degrees=.true.,P=1)
|
|
||||||
np = R%rotate(normal)
|
|
||||||
|
|
||||||
if (size(nonSchmidCoefficients)>0) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(1) * math_outer(direction, np)
|
|
||||||
if (size(nonSchmidCoefficients)>1) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(2) * math_outer(math_cross(normal, direction), normal)
|
|
||||||
if (size(nonSchmidCoefficients)>2) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(3) * math_outer(math_cross(np, direction), np)
|
|
||||||
if (size(nonSchmidCoefficients)>3) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(4) * math_outer(normal, normal)
|
|
||||||
if (size(nonSchmidCoefficients)>4) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(5) * math_outer(math_cross(normal, direction), &
|
|
||||||
math_cross(normal, direction))
|
|
||||||
if (size(nonSchmidCoefficients)>5) nonSchmidMatrix(1:3,1:3,i) = nonSchmidMatrix(1:3,1:3,i) &
|
|
||||||
+ nonSchmidCoefficients(6) * math_outer(direction, direction)
|
|
||||||
end do
|
|
||||||
|
|
||||||
end function crystal_nonSchmidMatrix
|
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Slip-slip interaction matrix
|
!> @brief Slip-slip interaction matrix
|
||||||
!> @details only active slip systems are considered
|
!> @details only active slip systems are considered
|
||||||
|
@ -1395,17 +1346,26 @@ end function crystal_interaction_TwinBySlip
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Schmid matrix for slip
|
!> @brief Schmid matrix for slip
|
||||||
!> details only active slip systems are considered
|
!> details only active slip systems are considered
|
||||||
|
! Non-schmid projections for cI with up to 6 coefficients
|
||||||
|
! https://doi.org/10.1016/j.actamat.2012.03.053, eq. (17)
|
||||||
|
! https://doi.org/10.1016/j.actamat.2008.07.037, table 1
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function crystal_SchmidMatrix_slip(Nslip,lattice,cOverA) result(SchmidMatrix)
|
function crystal_SchmidMatrix_slip(Nslip,lattice,cOverA,nonSchmidCoefficients,sense) result(SchmidMatrix)
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
integer, dimension(:), intent(in) :: Nslip !< number of active slip systems per family
|
||||||
character(len=*), intent(in) :: lattice !< Bravais lattice (Pearson symbol)
|
character(len=*), intent(in) :: lattice !< Bravais lattice (Pearson symbol)
|
||||||
real(pREAL), intent(in) :: cOverA
|
real(pREAL), intent(in) :: cOverA
|
||||||
|
real(pREAL), dimension(:,:), optional, intent(in) :: nonSchmidCoefficients !< non-Schmid coefficients for projections
|
||||||
|
integer, optional, intent(in) :: sense !< sense (-1,+1)
|
||||||
real(pREAL), dimension(3,3,sum(Nslip)) :: SchmidMatrix
|
real(pREAL), dimension(3,3,sum(Nslip)) :: SchmidMatrix
|
||||||
|
|
||||||
real(pREAL), dimension(3,3,sum(Nslip)) :: coordinateSystem
|
real(pREAL), dimension(3,3,sum(Nslip)) :: coordinateSystem
|
||||||
real(pREAL), dimension(:,:), allocatable :: slipSystems
|
real(pREAL), dimension(:,:), allocatable :: slipSystems
|
||||||
integer, dimension(:), allocatable :: NslipMax
|
integer, dimension(:), allocatable :: NslipMax
|
||||||
|
integer, dimension(:), allocatable :: slipFamily
|
||||||
|
real(pREAL), dimension(3) :: direction, normal, np
|
||||||
|
real(pREAL), dimension(6) :: coeff !< local nonSchmid coefficient variable
|
||||||
|
type(tRotation) :: R
|
||||||
integer :: i
|
integer :: i
|
||||||
|
|
||||||
select case(lattice)
|
select case(lattice)
|
||||||
|
@ -1431,12 +1391,41 @@ function crystal_SchmidMatrix_slip(Nslip,lattice,cOverA) result(SchmidMatrix)
|
||||||
if (any(Nslip < 0)) &
|
if (any(Nslip < 0)) &
|
||||||
call IO_error(144,ext_msg='Nslip '//trim(lattice))
|
call IO_error(144,ext_msg='Nslip '//trim(lattice))
|
||||||
|
|
||||||
|
slipFamily = math_expand([(i, i=1,size(Nslip))],Nslip)
|
||||||
coordinateSystem = buildCoordinateSystem(Nslip,NslipMax,slipSystems,lattice,cOverA)
|
coordinateSystem = buildCoordinateSystem(Nslip,NslipMax,slipSystems,lattice,cOverA)
|
||||||
|
if (present(sense)) then
|
||||||
|
if (abs(sense) /= 1) error stop 'neither +1 nor -1 sense in crystal_SchmidMatrix_slip'
|
||||||
|
coordinateSystem(1:3,1,1:sum(Nslip)) = coordinateSystem(1:3,1,1:sum(Nslip)) * real(sense,pREAL)
|
||||||
|
end if
|
||||||
|
|
||||||
do i = 1, sum(Nslip)
|
do i = 1,sum(Nslip)
|
||||||
SchmidMatrix(1:3,1:3,i) = math_outer(coordinateSystem(1:3,1,i),coordinateSystem(1:3,2,i))
|
direction = coordinateSystem(1:3,1,i)
|
||||||
|
normal = coordinateSystem(1:3,2,i)
|
||||||
|
|
||||||
|
SchmidMatrix(1:3,1:3,i) = math_outer(direction,normal)
|
||||||
if (abs(math_trace33(SchmidMatrix(1:3,1:3,i))) > tol_math_check) &
|
if (abs(math_trace33(SchmidMatrix(1:3,1:3,i))) > tol_math_check) &
|
||||||
error stop 'dilatational Schmid matrix for slip'
|
error stop 'dilatational Schmid matrix for slip'
|
||||||
|
|
||||||
|
if (present(nonSchmidCoefficients)) then
|
||||||
|
select case(lattice)
|
||||||
|
case('cI')
|
||||||
|
coeff(:) = 0.0_pREAL
|
||||||
|
select case(slipFamily(i))
|
||||||
|
case(1)
|
||||||
|
coeff(:size(nonSchmidCoefficients(1,:))) = nonSchmidCoefficients(1,:)
|
||||||
|
call R%fromAxisAngle([direction,60.0_pREAL],degrees=.true.,P=1)
|
||||||
|
np = R%rotate(normal)
|
||||||
|
SchmidMatrix(1:3,1:3,i) = SchmidMatrix(1:3,1:3,i) &
|
||||||
|
+ coeff(1) * math_outer(direction, np) &
|
||||||
|
+ coeff(2) * math_outer(math_cross(normal, direction), normal) &
|
||||||
|
+ coeff(3) * math_outer(math_cross(np, direction), np) &
|
||||||
|
+ coeff(4) * math_outer(normal, normal) &
|
||||||
|
+ coeff(5) * math_outer(math_cross(normal, direction), &
|
||||||
|
math_cross(normal, direction)) &
|
||||||
|
+ coeff(6) * math_outer(direction, direction)
|
||||||
|
end select
|
||||||
|
end select
|
||||||
|
end if
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end function crystal_SchmidMatrix_slip
|
end function crystal_SchmidMatrix_slip
|
||||||
|
|
|
@ -204,6 +204,7 @@ end subroutine math_sort
|
||||||
!> @brief vector expansion
|
!> @brief vector expansion
|
||||||
!> @details takes a set of numbers (a,b,c,...) and corresponding multiples (x,y,z,...)
|
!> @details takes a set of numbers (a,b,c,...) and corresponding multiples (x,y,z,...)
|
||||||
!> to return a vector of x times a, y times b, z times c, ...
|
!> to return a vector of x times a, y times b, z times c, ...
|
||||||
|
!> If there are more multiples than numbers, the numbers are treated as a ring, i.e. looped modulo their size
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure function math_expand_int(what,how)
|
pure function math_expand_int(what,how)
|
||||||
|
|
||||||
|
@ -227,6 +228,7 @@ end function math_expand_int
|
||||||
!> @brief vector expansion
|
!> @brief vector expansion
|
||||||
!> @details takes a set of numbers (a,b,c,...) and corresponding multiples (x,y,z,...)
|
!> @details takes a set of numbers (a,b,c,...) and corresponding multiples (x,y,z,...)
|
||||||
!> to return a vector of x times a, y times b, z times c, ...
|
!> to return a vector of x times a, y times b, z times c, ...
|
||||||
|
!> If there are more multiples than numbers, the numbers are treated as a ring, i.e. looped modulo their size
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure function math_expand_real(what,how)
|
pure function math_expand_real(what,how)
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,9 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
real(pREAL),dimension(:), allocatable :: &
|
real(pREAL),dimension(:), allocatable :: &
|
||||||
f_edge, & !< edge character fraction of total dislocation density
|
f_edge, & !< edge character fraction of total dislocation density
|
||||||
rho_mob_0, & !< initial dislocation density
|
rho_mob_0, & !< initial dislocation density
|
||||||
rho_dip_0, & !< initial dipole density
|
rho_dip_0 !< initial dipole density
|
||||||
a !< non-Schmid coefficients
|
real(pREAL), dimension(:,:), allocatable :: &
|
||||||
|
a_nS !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
refs, &
|
refs, &
|
||||||
extmsg
|
extmsg
|
||||||
|
@ -153,12 +154,14 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
prm%P_sl = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
prm%P_sl = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
||||||
|
|
||||||
if (phase_lattice(ph) == 'cI') then
|
if (phase_lattice(ph) == 'cI') then
|
||||||
a = pl%get_as1dReal('a_nonSchmid_110',defaultVal = emptyRealArray)
|
allocate(a_nS(3,size(pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray))))
|
||||||
prm%P_nS_pos = crystal_nonSchmidMatrix(N_sl,a,+1)
|
a_nS(1,:) = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
||||||
prm%P_nS_neg = crystal_nonSchmidMatrix(N_sl,a,-1)
|
prm%P_nS_pos = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=+1)
|
||||||
|
prm%P_nS_neg = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=-1)
|
||||||
|
deallocate(a_nS)
|
||||||
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
|
||||||
end if
|
end if
|
||||||
|
|
||||||
prm%dipoleformation = .not. pl%get_asBool('no_dipole_formation', defaultVal=.false.)
|
prm%dipoleformation = .not. pl%get_asBool('no_dipole_formation', defaultVal=.false.)
|
||||||
|
@ -291,8 +294,7 @@ pure module subroutine dislotungsten_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
T !< temperature
|
T !< temperature
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma, ddot_gamma_dtau
|
||||||
ddot_gamma_dtau_pos,ddot_gamma_dtau_neg
|
|
||||||
|
|
||||||
|
|
||||||
T = thermal_T(ph,en)
|
T = thermal_T(ph,en)
|
||||||
|
@ -301,13 +303,14 @@ pure module subroutine dislotungsten_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
|
|
||||||
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,ddot_gamma_dtau)
|
||||||
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(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(i) * prm%P_sl(k,l,i) &
|
||||||
+ ddot_gamma_dtau_neg(i) * prm%P_sl(k,l,i) * prm%P_nS_neg(m,n,i)
|
* merge(prm%P_nS_pos(m,n,i), &
|
||||||
|
prm%P_nS_neg(m,n,i), dot_gamma(i)>0.0_pREAL)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
@ -329,52 +332,50 @@ module function dislotungsten_dotState(Mp,ph,en) result(dotState)
|
||||||
dotState
|
dotState
|
||||||
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_pos, dot_gamma_neg,&
|
tau_eff, &
|
||||||
tau_pos,&
|
|
||||||
tau_neg, &
|
|
||||||
v_cl, &
|
v_cl, &
|
||||||
dot_rho_dip_formation, &
|
dot_rho_dip_formation, &
|
||||||
dot_rho_dip_climb, &
|
dot_rho_dip_climb, &
|
||||||
d_hat
|
d_hat
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
mu, T
|
mu, nu, T
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), dst => dependentState(ph), &
|
associate(prm => param(ph), stt => state(ph), dst => dependentState(ph), &
|
||||||
dot_rho_mob => dotState(indexDotState(ph)%rho_mob(1):indexDotState(ph)%rho_mob(2)), &
|
dot_rho_mob => dotState(indexDotState(ph)%rho_mob(1):indexDotState(ph)%rho_mob(2)), &
|
||||||
dot_rho_dip => dotState(indexDotState(ph)%rho_dip(1):indexDotState(ph)%rho_dip(2)), &
|
dot_rho_dip => dotState(indexDotState(ph)%rho_dip(1):indexDotState(ph)%rho_dip(2)), &
|
||||||
dot_gamma_sl => dotState(indexDotState(ph)%gamma_sl(1):indexDotState(ph)%gamma_sl(2)))
|
dot_gamma => dotState(indexDotState(ph)%gamma_sl(1):indexDotState(ph)%gamma_sl(2)))
|
||||||
|
|
||||||
mu = elastic_mu(ph,en,prm%isotropic_bound)
|
mu = elastic_mu(ph,en,prm%isotropic_bound)
|
||||||
|
nu = elastic_nu(ph,en,prm%isotropic_bound)
|
||||||
T = thermal_T(ph,en)
|
T = thermal_T(ph,en)
|
||||||
|
|
||||||
call kinetics(Mp,T,ph,en,&
|
call kinetics(Mp,T,ph,en,&
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma, tau = tau_eff)
|
||||||
tau_pos_out = tau_pos,tau_neg_out = tau_neg)
|
|
||||||
|
|
||||||
dot_gamma_sl = abs(dot_gamma_pos+dot_gamma_neg)
|
dot_gamma = abs(dot_gamma)
|
||||||
|
|
||||||
where(dEq0((tau_pos+tau_neg)*0.5_pREAL))
|
where(dEq0(dot_gamma))
|
||||||
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*mu*prm%b_sl/(16.0_pREAL*PI*abs(tau_pos+tau_neg)*0.5_pREAL), &
|
d_hat = math_clip(mu*prm%b_sl/(8.0_pREAL*PI*(1.0_pREAL-nu)*tau_eff), &
|
||||||
prm%d_caron, & ! lower limit
|
left = prm%d_caron, & ! lower limit
|
||||||
dst%Lambda_sl(:,en)) ! upper limit
|
right = 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/prm%b_sl, &
|
dot_rho_dip_formation = merge(dot_gamma * 2.0_pREAL*(d_hat-prm%d_caron)/prm%b_sl * stt%rho_mob(:,en), &
|
||||||
0.0_pREAL, &
|
0.0_pREAL, &
|
||||||
prm%dipoleformation)
|
prm%dipoleformation)
|
||||||
v_cl = (3.0_pREAL*mu*prm%D_0*exp(-prm%Q_cl/(K_B*T))*prm%f_at/(TAU*K_B*T)) &
|
v_cl = (3.0_pREAL*mu*prm%D_0*exp(-prm%Q_cl/(K_B*T))*prm%f_at/(2.0_pREAL*PI*K_B*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 = dot_gamma_sl/(prm%b_sl*dst%Lambda_sl(:,en)) & ! multiplication
|
dot_rho_mob = dot_gamma / (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 ! Spontaneous annihilation of 2 edges
|
- dot_gamma * 2.0_pREAL*prm%d_caron/prm%b_sl * stt%rho_mob(:,en) ! spontaneous annihilation of 2 edges
|
||||||
dot_rho_dip = dot_rho_dip_formation &
|
dot_rho_dip = dot_rho_dip_formation &
|
||||||
- (2.0_pREAL*prm%d_caron)/prm%b_sl*stt%rho_dip(:,en)*dot_gamma_sl & ! Spontaneous annihilation of an edge with a dipole
|
- dot_rho_dip_climb &
|
||||||
- dot_rho_dip_climb
|
- dot_gamma * 2.0_pREAL*prm%d_caron/prm%b_sl * stt%rho_dip(:,en) ! spontaneous annihilation of an edge with a dipole
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -457,7 +458,7 @@ end subroutine plastic_dislotungsten_result
|
||||||
! at the end since some of them are optional.
|
! at the end since some of them are optional.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics(Mp,T,ph,en, &
|
pure subroutine kinetics(Mp,T,ph,en, &
|
||||||
dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg,tau_pos_out,tau_neg_out)
|
dot_gamma,ddot_gamma_dtau,tau)
|
||||||
|
|
||||||
real(pREAL), dimension(3,3), intent(in) :: &
|
real(pREAL), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -467,41 +468,34 @@ pure subroutine kinetics(Mp,T,ph,en, &
|
||||||
ph, &
|
ph, &
|
||||||
en
|
en
|
||||||
|
|
||||||
real(pREAL), intent(out), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl), intent(out) :: &
|
||||||
dot_gamma_pos, &
|
dot_gamma
|
||||||
dot_gamma_neg
|
real(pREAL), dimension(param(ph)%sum_N_sl), optional, intent(out) :: &
|
||||||
real(pREAL), intent(out), optional, dimension(param(ph)%sum_N_sl) :: &
|
ddot_gamma_dtau, &
|
||||||
ddot_gamma_dtau_pos, &
|
tau
|
||||||
ddot_gamma_dtau_neg, &
|
|
||||||
tau_pos_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, &
|
||||||
dvel, &
|
|
||||||
tau_pos, tau_neg, tau_eff, &
|
tau_pos, tau_neg, tau_eff, &
|
||||||
t_n, t_k, dtk,dtn
|
t_n,t_k, dtk,dtn
|
||||||
integer :: j
|
integer :: i
|
||||||
|
|
||||||
|
|
||||||
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
|
tau_pos = [(math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i)),i=1,prm%sum_N_sl)]
|
||||||
tau_pos(j) = math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,j))
|
tau_neg = [(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)),i=1,prm%sum_N_sl)]
|
||||||
tau_neg(j) = math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,j))
|
tau_eff = math_clip(max(tau_pos,tau_neg) - dst%tau_pass(:,en),left = 0.0_pREAL)
|
||||||
end do
|
|
||||||
|
|
||||||
if (present(tau_pos_out)) tau_pos_out = tau_pos
|
if (present(tau)) tau = tau_eff
|
||||||
if (present(tau_neg_out)) tau_neg_out = tau_neg
|
|
||||||
|
|
||||||
associate(BoltzmannRatio => prm%Q_s/(K_B*T), &
|
associate(BoltzmannRatio => prm%Q_s/(K_B*T), &
|
||||||
b_rho_half => stt%rho_mob(:,en) * prm%b_sl * 0.5_pREAL, &
|
b_rho => stt%rho_mob(:,en) * prm%b_sl, &
|
||||||
effectiveLength => dst%Lambda_sl(:,en) - prm%w)
|
effectiveLength => dst%Lambda_sl(:,en) - prm%w)
|
||||||
|
|
||||||
tau_eff = abs(tau_pos)-dst%tau_pass(:,en)
|
|
||||||
|
|
||||||
significantPositiveTau: where(tau_eff > tol_math_check)
|
where(tau_eff > tol_math_check)
|
||||||
StressRatio = tau_eff/prm%tau_Peierls
|
StressRatio = tau_eff/prm%tau_Peierls
|
||||||
StressRatio_p = StressRatio** prm%p
|
StressRatio_p = StressRatio** prm%p
|
||||||
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pREAL)
|
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pREAL)
|
||||||
|
@ -510,53 +504,21 @@ pure subroutine kinetics(Mp,T,ph,en, &
|
||||||
/ (prm%omega*effectiveLength)
|
/ (prm%omega*effectiveLength)
|
||||||
t_k = effectiveLength * prm%B /(2.0_pREAL*prm%b_sl*tau_eff) ! corrected eq. (14)
|
t_k = effectiveLength * prm%B /(2.0_pREAL*prm%b_sl*tau_eff) ! corrected eq. (14)
|
||||||
|
|
||||||
dot_gamma_pos = b_rho_half * sign(prm%h/(t_n + t_k),tau_pos)
|
dot_gamma = b_rho * prm%h/(t_n + t_k) * merge(+1.0_pREAL,-1.0_pREAL, tau_pos>tau_neg)
|
||||||
else where significantPositiveTau
|
else where
|
||||||
dot_gamma_pos = 0.0_pREAL
|
dot_gamma = 0.0_pREAL
|
||||||
end where significantPositiveTau
|
end where
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_pos)) then
|
if (present(ddot_gamma_dtau)) then
|
||||||
significantPositiveTau2: where(abs(tau_pos)-dst%tau_pass(:,en) > tol_math_check)
|
where(tau_eff > tol_math_check)
|
||||||
dtn = -1.0_pREAL * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pREAL-StressRatio_p)**(prm%q - 1.0_pREAL) &
|
dtn = -1.0_pREAL * t_n * BoltzmannRatio * prm%p * prm%q * (1.0_pREAL-StressRatio_p)**(prm%q - 1.0_pREAL) &
|
||||||
* StressRatio_pminus1 / prm%tau_Peierls
|
* StressRatio_pminus1 / prm%tau_Peierls
|
||||||
dtk = -1.0_pREAL * t_k / tau_pos
|
dtk = -1.0_pREAL * t_k / tau_eff
|
||||||
|
|
||||||
dvel = -1.0_pREAL * prm%h * (dtk + dtn) / (t_n + t_k)**2
|
ddot_gamma_dtau = -1.0_pREAL * dot_gamma * (dtn + dtk) / (t_n + t_k)
|
||||||
|
else where
|
||||||
ddot_gamma_dtau_pos = b_rho_half * dvel
|
ddot_gamma_dtau = 0.0_pREAL
|
||||||
else where significantPositiveTau2
|
end where
|
||||||
ddot_gamma_dtau_pos = 0.0_pREAL
|
|
||||||
end where significantPositiveTau2
|
|
||||||
end if
|
|
||||||
|
|
||||||
tau_eff = abs(tau_neg)-dst%tau_pass(:,en)
|
|
||||||
|
|
||||||
significantNegativeTau: where(tau_eff > tol_math_check)
|
|
||||||
StressRatio = tau_eff/prm%tau_Peierls
|
|
||||||
StressRatio_p = StressRatio** prm%p
|
|
||||||
StressRatio_pminus1 = StressRatio**(prm%p-1.0_pREAL)
|
|
||||||
|
|
||||||
t_n = prm%b_sl*exp(BoltzmannRatio*(1.0_pREAL-StressRatio_p) ** prm%q) &
|
|
||||||
/ (prm%omega*effectiveLength)
|
|
||||||
t_k = effectiveLength * prm%B /(2.0_pREAL*prm%b_sl*tau_eff) ! corrected eq. (14)
|
|
||||||
|
|
||||||
dot_gamma_neg = b_rho_half * sign(prm%h/(t_n + t_k),tau_neg)
|
|
||||||
else where significantNegativeTau
|
|
||||||
dot_gamma_neg = 0.0_pREAL
|
|
||||||
end where significantNegativeTau
|
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_neg)) then
|
|
||||||
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_pminus1 / prm%tau_Peierls
|
|
||||||
dtk = -1.0_pREAL * t_k / tau_neg
|
|
||||||
|
|
||||||
dvel = -1.0_pREAL * prm%h * (dtk + dtn) / (t_n + t_k)**2
|
|
||||||
|
|
||||||
ddot_gamma_dtau_neg = b_rho_half * dvel
|
|
||||||
else where significantNegativeTau2
|
|
||||||
ddot_gamma_dtau_neg = 0.0_pREAL
|
|
||||||
end where significantNegativeTau2
|
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
|
@ -29,8 +29,6 @@ submodule(phase:plastic) kinehardening
|
||||||
P_nS_neg
|
P_nS_neg
|
||||||
integer :: &
|
integer :: &
|
||||||
sum_N_sl
|
sum_N_sl
|
||||||
logical :: &
|
|
||||||
nonSchmidActive = .false.
|
|
||||||
character(len=pSTRLEN), allocatable, dimension(:) :: &
|
character(len=pSTRLEN), allocatable, dimension(:) :: &
|
||||||
output
|
output
|
||||||
character(len=:), allocatable, dimension(:) :: &
|
character(len=:), allocatable, dimension(:) :: &
|
||||||
|
@ -83,9 +81,10 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
N_sl
|
N_sl
|
||||||
real(pREAL), dimension(:), allocatable :: &
|
real(pREAL), dimension(:), allocatable :: &
|
||||||
xi_0, & !< initial forest stress
|
xi_0 !< initial forest stress
|
||||||
!! τ_for,0
|
!! τ_for,0
|
||||||
a !< non-Schmid coefficients
|
real(pREAL), dimension(:,:), allocatable :: &
|
||||||
|
a_nS !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
refs, &
|
refs, &
|
||||||
extmsg
|
extmsg
|
||||||
|
@ -144,13 +143,13 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
prm%P = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
prm%P = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
||||||
|
|
||||||
if (phase_lattice(ph) == 'cI') then
|
if (phase_lattice(ph) == 'cI') then
|
||||||
a = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
allocate(a_nS(3,size(pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray))),source=0.0_pREAL)
|
||||||
prm%nonSchmidActive = size(a) > 0
|
a_nS(1,:) = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
||||||
prm%P_nS_pos = crystal_nonSchmidMatrix(N_sl,a,+1)
|
prm%P_nS_pos = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=+1)
|
||||||
prm%P_nS_neg = crystal_nonSchmidMatrix(N_sl,a,-1)
|
prm%P_nS_neg = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=-1)
|
||||||
else
|
else
|
||||||
prm%P_nS_pos = prm%P
|
prm%P_nS_pos = +prm%P
|
||||||
prm%P_nS_neg = prm%P
|
prm%P_nS_neg = -prm%P
|
||||||
end if
|
end if
|
||||||
|
|
||||||
prm%h_sl_sl = crystal_interaction_SlipBySlip(N_sl,pl%get_as1dReal('h_sl-sl'), &
|
prm%h_sl_sl = crystal_interaction_SlipBySlip(N_sl,pl%get_as1dReal('h_sl-sl'), &
|
||||||
|
@ -256,7 +255,7 @@ end function plastic_kinehardening_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Calculate plastic velocity gradient and its tangent.
|
!> @brief Calculate plastic velocity gradient and its tangent.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure module subroutine kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en)
|
pure module subroutine kinehardening_LpAndItsTangent(Lp,dLp_dMp, Mp,ph,en)
|
||||||
|
|
||||||
real(pREAL), dimension(3,3), intent(out) :: &
|
real(pREAL), dimension(3,3), intent(out) :: &
|
||||||
Lp !< plastic velocity gradient
|
Lp !< plastic velocity gradient
|
||||||
|
@ -272,22 +271,22 @@ pure module subroutine kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en)
|
||||||
integer :: &
|
integer :: &
|
||||||
i,k,l,m,n
|
i,k,l,m,n
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma, ddot_gamma_dtau
|
||||||
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,ph,en, dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg)
|
call kinetics(Mp,ph,en, dot_gamma,ddot_gamma_dtau)
|
||||||
|
|
||||||
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(1:3,1:3,i)
|
Lp = Lp + dot_gamma(i)*prm%P(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(k,l,i) * prm%P_nS_pos(m,n,i) &
|
+ ddot_gamma_dtau(i) * prm%P(k,l,i) &
|
||||||
+ ddot_gamma_dtau_neg(i) * prm%P(k,l,i) * prm%P_nS_neg(m,n,i)
|
* merge(prm%P_nS_pos(m,n,i), &
|
||||||
|
prm%P_nS_neg(m,n,i), dot_gamma(i)>0.0_pREAL)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
@ -310,8 +309,6 @@ module function plastic_kinehardening_dotState(Mp,ph,en) result(dotState)
|
||||||
|
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
sumGamma
|
sumGamma
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
|
||||||
dot_gamma_pos,dot_gamma_neg
|
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), &
|
associate(prm => param(ph), stt => state(ph), &
|
||||||
|
@ -319,9 +316,9 @@ module function plastic_kinehardening_dotState(Mp,ph,en) result(dotState)
|
||||||
dot_chi => dotState(IndexDotState(ph)%chi(1):IndexDotState(ph)%chi(2)),&
|
dot_chi => dotState(IndexDotState(ph)%chi(1):IndexDotState(ph)%chi(2)),&
|
||||||
dot_gamma => dotState(IndexDotState(ph)%gamma(1):IndexDotState(ph)%gamma(2)))
|
dot_gamma => dotState(IndexDotState(ph)%gamma(1):IndexDotState(ph)%gamma(2)))
|
||||||
|
|
||||||
call kinetics(Mp,ph,en, dot_gamma_pos,dot_gamma_neg)
|
call kinetics(Mp,ph,en, dot_gamma)
|
||||||
dot_gamma = abs(dot_gamma_pos+dot_gamma_neg)
|
|
||||||
sumGamma = sum(stt%gamma(:,en))
|
sumGamma = sum(stt%gamma(:,en))
|
||||||
|
dot_gamma = abs(dot_gamma)
|
||||||
|
|
||||||
|
|
||||||
dot_xi = matmul(prm%h_sl_sl,dot_gamma) &
|
dot_xi = matmul(prm%h_sl_sl,dot_gamma) &
|
||||||
|
@ -355,16 +352,16 @@ module subroutine plastic_kinehardening_deltaState(Mp,ph,en)
|
||||||
en
|
en
|
||||||
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_pos,dot_gamma_neg, &
|
dot_gamma, &
|
||||||
sgn_gamma
|
sgn_gamma
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph))
|
associate(prm => param(ph), stt => state(ph), dlt => deltaState(ph))
|
||||||
|
|
||||||
call kinetics(Mp,ph,en, dot_gamma_pos,dot_gamma_neg)
|
call kinetics(Mp,ph,en, dot_gamma)
|
||||||
sgn_gamma = merge(state(ph)%sgn_gamma(:,en), &
|
sgn_gamma = merge(state(ph)%sgn_gamma(:,en), &
|
||||||
sign(1.0_pREAL,dot_gamma_pos+dot_gamma_neg), &
|
sign(1.0_pREAL,dot_gamma), &
|
||||||
dEq0(dot_gamma_pos+dot_gamma_neg,1e-10_pREAL))
|
dEq0(dot_gamma,1e-10_pREAL))
|
||||||
|
|
||||||
where(dNeq(sgn_gamma,stt%sgn_gamma(:,en),0.1_pREAL)) ! ToDo sgn_gamma*stt%sgn_gamma(:,en)<0
|
where(dNeq(sgn_gamma,stt%sgn_gamma(:,en),0.1_pREAL)) ! ToDo sgn_gamma*stt%sgn_gamma(:,en)<0
|
||||||
dlt%sgn_gamma (:,en) = sgn_gamma - stt%sgn_gamma (:,en)
|
dlt%sgn_gamma (:,en) = sgn_gamma - stt%sgn_gamma (:,en)
|
||||||
|
@ -433,7 +430,7 @@ end subroutine plastic_kinehardening_result
|
||||||
! at the end since some of them are optional.
|
! at the end since some of them are optional.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics(Mp,ph,en, &
|
pure subroutine kinetics(Mp,ph,en, &
|
||||||
dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg)
|
dot_gamma,ddot_gamma_dtau)
|
||||||
|
|
||||||
real(pREAL), dimension(3,3), intent(in) :: &
|
real(pREAL), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -441,12 +438,10 @@ pure subroutine kinetics(Mp,ph,en, &
|
||||||
ph, &
|
ph, &
|
||||||
en
|
en
|
||||||
|
|
||||||
real(pREAL), intent(out), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl), intent(out) :: &
|
||||||
dot_gamma_pos, &
|
dot_gamma
|
||||||
dot_gamma_neg
|
real(pREAL), dimension(param(ph)%sum_N_sl), optional, intent(out) :: &
|
||||||
real(pREAL), intent(out), dimension(param(ph)%sum_N_sl), optional :: &
|
ddot_gamma_dtau
|
||||||
ddot_gamma_dtau_pos, &
|
|
||||||
ddot_gamma_dtau_neg
|
|
||||||
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
tau_pos, &
|
tau_pos, &
|
||||||
|
@ -456,38 +451,18 @@ pure subroutine kinetics(Mp,ph,en, &
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph))
|
associate(prm => param(ph), stt => state(ph))
|
||||||
|
|
||||||
do i = 1, prm%sum_N_sl
|
tau_pos = [(math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i)) - stt%chi(i,en),i=1,prm%sum_N_sl)]
|
||||||
tau_pos(i) = math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i)) - stt%chi(i,en)
|
tau_neg = [(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)) + stt%chi(i,en),i=1,prm%sum_N_sl)]
|
||||||
tau_neg(i) = merge(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)) - stt%chi(i,en), &
|
|
||||||
0.0_pREAL, prm%nonSchmidActive)
|
|
||||||
end do
|
|
||||||
|
|
||||||
where(dNeq0(tau_pos))
|
dot_gamma = merge(+1.0_pREAL,-1.0_pREAL, tau_pos>tau_neg) &
|
||||||
dot_gamma_pos = prm%dot_gamma_0 * merge(0.5_pREAL,1.0_pREAL, prm%nonSchmidActive) & ! 1/2 if non-Schmid active
|
* prm%dot_gamma_0 &
|
||||||
* sign(abs(tau_pos/stt%xi(:,en))**prm%n, tau_pos)
|
* (max(tau_pos,tau_neg)/stt%xi(:,en))**prm%n
|
||||||
else where
|
|
||||||
dot_gamma_pos = 0.0_pREAL
|
|
||||||
end where
|
|
||||||
|
|
||||||
where(dNeq0(tau_neg))
|
if (present(ddot_gamma_dtau)) then
|
||||||
dot_gamma_neg = prm%dot_gamma_0 * 0.5_pREAL & ! only used if non-Schmid active, always 1/2
|
where(dNeq0(dot_gamma))
|
||||||
* sign(abs(tau_neg/stt%xi(:,en))**prm%n, tau_neg)
|
ddot_gamma_dtau = dot_gamma*prm%n/max(tau_pos,tau_neg)
|
||||||
else where
|
else where
|
||||||
dot_gamma_neg = 0.0_pREAL
|
ddot_gamma_dtau = 0.0_pREAL
|
||||||
end where
|
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_pos)) then
|
|
||||||
where(dNeq0(dot_gamma_pos))
|
|
||||||
ddot_gamma_dtau_pos = dot_gamma_pos*prm%n/tau_pos
|
|
||||||
else where
|
|
||||||
ddot_gamma_dtau_pos = 0.0_pREAL
|
|
||||||
end where
|
|
||||||
end if
|
|
||||||
if (present(ddot_gamma_dtau_neg)) then
|
|
||||||
where(dNeq0(dot_gamma_neg))
|
|
||||||
ddot_gamma_dtau_neg = dot_gamma_neg*prm%n/tau_neg
|
|
||||||
else where
|
|
||||||
ddot_gamma_dtau_neg = 0.0_pREAL
|
|
||||||
end where
|
end where
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,7 @@ submodule(phase:plastic) nonlocal
|
||||||
character(len=pSTRLEN), dimension(:), allocatable :: &
|
character(len=pSTRLEN), dimension(:), allocatable :: &
|
||||||
output
|
output
|
||||||
logical :: &
|
logical :: &
|
||||||
shortRangeStressCorrection, & !< use of short range stress correction by excess density gradient term
|
shortRangeStressCorrection !< use of short range stress correction by excess density gradient term
|
||||||
nonSchmidActive = .false.
|
|
||||||
character(len=:), allocatable, dimension(:) :: &
|
character(len=:), allocatable, dimension(:) :: &
|
||||||
systems_sl
|
systems_sl
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
@ -125,7 +124,7 @@ submodule(phase:plastic) nonlocal
|
||||||
type :: tNonlocalDependentState
|
type :: tNonlocalDependentState
|
||||||
real(pREAL), allocatable, dimension(:,:) :: &
|
real(pREAL), allocatable, dimension(:,:) :: &
|
||||||
tau_pass, &
|
tau_pass, &
|
||||||
tau_Back
|
tau_back
|
||||||
real(pREAL), allocatable, dimension(:,:,:,:,:) :: &
|
real(pREAL), allocatable, dimension(:,:,:,:,:) :: &
|
||||||
compatibility
|
compatibility
|
||||||
end type tNonlocalDependentState
|
end type tNonlocalDependentState
|
||||||
|
@ -176,14 +175,13 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
|
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstances, &
|
|
||||||
ph, &
|
ph, &
|
||||||
Nmembers, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState, sizeDependentState, sizeDeltaState, &
|
sizeState, sizeDotState, sizeDependentState, sizeDeltaState, &
|
||||||
s1, s2, &
|
s1, s2, &
|
||||||
s, t, l
|
s, t, l
|
||||||
real(pREAL), dimension(:), allocatable :: &
|
real(pREAL), dimension(:,:), allocatable :: &
|
||||||
a
|
a_nS !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
refs, &
|
refs, &
|
||||||
extmsg
|
extmsg
|
||||||
|
@ -196,8 +194,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
pl
|
pl
|
||||||
|
|
||||||
myPlasticity = plastic_active('nonlocal')
|
myPlasticity = plastic_active('nonlocal')
|
||||||
Ninstances = count(myPlasticity)
|
if (count(myPlasticity) == 0) then
|
||||||
if (Ninstances == 0) then
|
|
||||||
call geometry_plastic_nonlocal_disable()
|
call geometry_plastic_nonlocal_disable()
|
||||||
return
|
return
|
||||||
end if
|
end if
|
||||||
|
@ -210,7 +207,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
print'(/,1x,a)', 'C. Kords, Dissertation RWTH Aachen, 2014'
|
print'(/,1x,a)', 'C. Kords, Dissertation RWTH Aachen, 2014'
|
||||||
print'( 1x,a)', 'http://publications.rwth-aachen.de/record/229993'
|
print'( 1x,a)', 'http://publications.rwth-aachen.de/record/229993'
|
||||||
|
|
||||||
print'(/,1x,a,1x,i0)', '# phases:',Ninstances; flush(IO_STDOUT)
|
print'(/,1x,a,1x,i0)', '# phases:',count(myPlasticity); flush(IO_STDOUT)
|
||||||
|
|
||||||
phases => config_material%get_dict('phase')
|
phases => config_material%get_dict('phase')
|
||||||
allocate(geom(phases%length))
|
allocate(geom(phases%length))
|
||||||
|
@ -253,13 +250,13 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
prm%P_sl = crystal_SchmidMatrix_slip(ini%N_sl,phase_lattice(ph), phase_cOverA(ph))
|
prm%P_sl = crystal_SchmidMatrix_slip(ini%N_sl,phase_lattice(ph), phase_cOverA(ph))
|
||||||
|
|
||||||
if (phase_lattice(ph) == 'cI') then
|
if (phase_lattice(ph) == 'cI') then
|
||||||
a = pl%get_as1dReal('a_nonSchmid_110',defaultVal = emptyRealArray)
|
allocate(a_nS(3,size(pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray))),source=0.0_pREAL) ! anticipating parameters for all three families
|
||||||
if (size(a) > 0) prm%nonSchmidActive = .true.
|
a_nS(1,:) = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
||||||
prm%P_nS_pos = crystal_nonSchmidMatrix(ini%N_sl,a,+1)
|
prm%P_nS_pos = crystal_SchmidMatrix_slip(ini%N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=+1)
|
||||||
prm%P_nS_neg = crystal_nonSchmidMatrix(ini%N_sl,a,-1)
|
prm%P_nS_neg = crystal_SchmidMatrix_slip(ini%N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=-1)
|
||||||
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
|
||||||
end if
|
end if
|
||||||
|
|
||||||
prm%h_sl_sl = crystal_interaction_SlipBySlip(ini%N_sl,pl%get_as1dReal('h_sl-sl'), &
|
prm%h_sl_sl = crystal_interaction_SlipBySlip(ini%N_sl,pl%get_as1dReal('h_sl-sl'), &
|
||||||
|
@ -801,16 +798,10 @@ module subroutine nonlocal_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
dv_dtauNS(:,2) = dv_dtauNS(:,1)
|
dv_dtauNS(:,2) = dv_dtauNS(:,1)
|
||||||
|
|
||||||
!screws
|
!screws
|
||||||
if (prm%nonSchmidActive) then
|
|
||||||
do t = 3,4
|
do t = 3,4
|
||||||
call kinetics(v(:,t), dv_dtau(:,t), dv_dtauNS(:,t), &
|
call kinetics(v(:,t), dv_dtau(:,t), dv_dtauNS(:,t), &
|
||||||
tau, tauNS(:,t), dst%tau_pass(:,en),2,Temperature, ph)
|
tau, tauNS(:,t), dst%tau_pass(:,en),2,Temperature, ph)
|
||||||
end do
|
end do
|
||||||
else
|
|
||||||
v(:,3:4) = spread(v(:,1),2,2)
|
|
||||||
dv_dtau(:,3:4) = spread(dv_dtau(:,1),2,2)
|
|
||||||
dv_dtauNS(:,3:4) = spread(dv_dtauNS(:,1),2,2)
|
|
||||||
end if
|
|
||||||
|
|
||||||
stt%v(:,en) = pack(v,.true.)
|
stt%v(:,en) = pack(v,.true.)
|
||||||
|
|
||||||
|
@ -1592,12 +1583,12 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T,
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
c, & !< dislocation character (1:edge, 2:screw)
|
c, & !< dislocation character (1:edge, 2:screw)
|
||||||
ph
|
ph
|
||||||
real(pREAL), intent(in) :: &
|
|
||||||
T !< T
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl), intent(in) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl), intent(in) :: &
|
||||||
tau, & !< resolved external shear stress (without non Schmid effects)
|
tau, & !< resolved external shear stress (without non Schmid effects)
|
||||||
tauNS, & !< resolved external shear stress (including non Schmid effects)
|
tauNS, & !< resolved external shear stress (including non Schmid effects)
|
||||||
tauThreshold !< threshold shear stress
|
tauThreshold !< threshold shear stress
|
||||||
|
real(pREAL), intent(in) :: &
|
||||||
|
T !< T
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl), intent(out) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl), intent(out) :: &
|
||||||
v, & !< velocity
|
v, & !< velocity
|
||||||
dv_dtau, & !< velocity derivative with respect to resolved shear stress (without non Schmid contributions)
|
dv_dtau, & !< velocity derivative with respect to resolved shear stress (without non Schmid contributions)
|
||||||
|
@ -1634,7 +1625,7 @@ pure subroutine kinetics(v, dv_dtau, dv_dtauNS, tau, tauNS, tauThreshold, c, T,
|
||||||
!* Peierls contribution
|
!* Peierls contribution
|
||||||
tauEff = max(0.0_pREAL, abs(tauNS(s)) - tauThreshold(s))
|
tauEff = max(0.0_pREAL, abs(tauNS(s)) - tauThreshold(s))
|
||||||
lambda_P = prm%b_sl(s)
|
lambda_P = prm%b_sl(s)
|
||||||
activationVolume_P = prm%w *prm%b_sl(s)**3
|
activationVolume_P = prm%w * prm%b_sl(s)**3
|
||||||
criticalStress_P = prm%peierlsStress(s,c)
|
criticalStress_P = prm%peierlsStress(s,c)
|
||||||
activationEnergy_P = criticalStress_P * activationVolume_P
|
activationEnergy_P = criticalStress_P * activationVolume_P
|
||||||
tauRel_P = min(1.0_pREAL, tauEff / criticalStress_P)
|
tauRel_P = min(1.0_pREAL, tauEff / criticalStress_P)
|
||||||
|
|
|
@ -36,8 +36,6 @@ submodule(phase:plastic) phenopowerlaw
|
||||||
integer :: &
|
integer :: &
|
||||||
sum_N_sl, & !< total number of active slip system
|
sum_N_sl, & !< total number of active slip system
|
||||||
sum_N_tw !< total number of active twin systems
|
sum_N_tw !< total number of active twin systems
|
||||||
logical :: &
|
|
||||||
nonSchmidActive = .false.
|
|
||||||
character(len=pSTRLEN), allocatable, dimension(:) :: &
|
character(len=pSTRLEN), allocatable, dimension(:) :: &
|
||||||
output
|
output
|
||||||
character(len=:), allocatable, dimension(:) :: &
|
character(len=:), allocatable, dimension(:) :: &
|
||||||
|
@ -89,8 +87,9 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
real(pREAL), dimension(:), allocatable :: &
|
real(pREAL), dimension(:), allocatable :: &
|
||||||
xi_0_sl, & !< initial critical shear stress for slip
|
xi_0_sl, & !< initial critical shear stress for slip
|
||||||
xi_0_tw, & !< initial critical shear stress for twin
|
xi_0_tw, & !< initial critical shear stress for twin
|
||||||
a, & !< non-Schmid coefficients
|
|
||||||
ones
|
ones
|
||||||
|
real(pREAL), dimension(:,:), allocatable :: &
|
||||||
|
a_nS !< non-Schmid coefficients
|
||||||
character(len=:), allocatable :: &
|
character(len=:), allocatable :: &
|
||||||
refs, &
|
refs, &
|
||||||
extmsg
|
extmsg
|
||||||
|
@ -160,13 +159,13 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
prm%P_sl = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
prm%P_sl = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph))
|
||||||
|
|
||||||
if (phase_lattice(ph) == 'cI') then
|
if (phase_lattice(ph) == 'cI') then
|
||||||
a = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
allocate(a_nS(3,size(pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray))),source=0.0_pREAL)
|
||||||
if (size(a) > 0) prm%nonSchmidActive = .true.
|
a_nS(1,:) = pl%get_as1dReal('a_nonSchmid_110',defaultVal=emptyRealArray)
|
||||||
prm%P_nS_pos = crystal_nonSchmidMatrix(N_sl,a,+1)
|
prm%P_nS_pos = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=+1)
|
||||||
prm%P_nS_neg = crystal_nonSchmidMatrix(N_sl,a,-1)
|
prm%P_nS_neg = crystal_SchmidMatrix_slip(N_sl,phase_lattice(ph),phase_cOverA(ph),nonSchmidCoefficients=a_nS,sense=-1)
|
||||||
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
|
||||||
end if
|
end if
|
||||||
|
|
||||||
prm%systems_sl = crystal_labels_slip(N_sl,phase_lattice(ph))
|
prm%systems_sl = crystal_labels_slip(N_sl,phase_lattice(ph))
|
||||||
|
@ -312,23 +311,24 @@ pure module subroutine phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,ph,en)
|
||||||
integer :: &
|
integer :: &
|
||||||
i,k,l,m,n
|
i,k,l,m,n
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_sl_pos,dot_gamma_sl_neg, &
|
dot_gamma_sl,ddot_gamma_dtau_sl
|
||||||
ddot_gamma_dtau_sl_pos,ddot_gamma_dtau_sl_neg
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_tw) :: &
|
real(pREAL), dimension(param(ph)%sum_N_tw) :: &
|
||||||
dot_gamma_tw,ddot_gamma_dtau_tw
|
dot_gamma_tw,ddot_gamma_dtau_tw
|
||||||
|
|
||||||
|
|
||||||
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_sl(Mp,ph,en,dot_gamma_sl_pos,dot_gamma_sl_neg,ddot_gamma_dtau_sl_pos,ddot_gamma_dtau_sl_neg)
|
call kinetics_sl(Mp,ph,en,dot_gamma_sl,ddot_gamma_dtau_sl)
|
||||||
slipSystems: do i = 1, prm%sum_N_sl
|
slipSystems: do i = 1, prm%sum_N_sl
|
||||||
Lp = Lp + (dot_gamma_sl_pos(i)+dot_gamma_sl_neg(i))*prm%P_sl(1:3,1:3,i)
|
Lp = Lp + dot_gamma_sl(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_sl_pos(i) * prm%P_sl(k,l,i) * prm%P_nS_pos(m,n,i) &
|
+ ddot_gamma_dtau_sl(i) * prm%P_sl(k,l,i) &
|
||||||
+ ddot_gamma_dtau_sl_neg(i) * prm%P_sl(k,l,i) * prm%P_nS_neg(m,n,i)
|
* merge(prm%P_nS_pos(m,n,i), &
|
||||||
|
prm%P_nS_neg(m,n,i), dot_gamma_sl(i)>0.0_pREAL)
|
||||||
end do slipSystems
|
end do slipSystems
|
||||||
|
|
||||||
call kinetics_tw(Mp,ph,en,dot_gamma_tw,ddot_gamma_dtau_tw)
|
call kinetics_tw(Mp,ph,en,dot_gamma_tw,ddot_gamma_dtau_tw)
|
||||||
|
@ -360,33 +360,33 @@ module function phenopowerlaw_dotState(Mp,ph,en) result(dotState)
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
sumF
|
sumF
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
dot_gamma_sl_pos,dot_gamma_sl_neg, &
|
|
||||||
xi_sl_sat_offset, &
|
xi_sl_sat_offset, &
|
||||||
left_SlipSlip
|
left_SlipSlip
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph), &
|
associate(prm => param(ph), stt => state(ph), &
|
||||||
dot_xi_sl => dotState(indexDotState(ph)%xi_sl(1):indexDotState(ph)%xi_sl(2)), &
|
dot_xi_sl => dotState(indexDotState(ph)%xi_sl(1):indexDotState(ph)%xi_sl(2)), &
|
||||||
dot_xi_tw => dotState(indexDotState(ph)%xi_tw(1):indexDotState(ph)%xi_tw(2)), &
|
dot_xi_tw => dotState(indexDotState(ph)%xi_tw(1):indexDotState(ph)%xi_tw(2)), &
|
||||||
dot_gamma_sl => dotState(indexDotState(ph)%gamma_sl(1):indexDotState(ph)%gamma_sl(2)), &
|
dot_gamma_sl => dotState(indexDotState(ph)%gamma_sl(1):indexDotState(ph)%gamma_sl(2)), &
|
||||||
dot_gamma_tw => dotState(indexDotState(ph)%gamma_tw(1):indexDotState(ph)%gamma_tw(2)))
|
dot_gamma_tw => dotState(indexDotState(ph)%gamma_tw(1):indexDotState(ph)%gamma_tw(2)))
|
||||||
|
|
||||||
call kinetics_sl(Mp,ph,en, dot_gamma_sl_pos,dot_gamma_sl_neg)
|
call kinetics_sl(Mp,ph,en, dot_gamma_sl)
|
||||||
dot_gamma_sl = abs(dot_gamma_sl_pos+dot_gamma_sl_neg)
|
|
||||||
call kinetics_tw(Mp,ph,en, dot_gamma_tw)
|
call kinetics_tw(Mp,ph,en, dot_gamma_tw)
|
||||||
|
dot_gamma_sl = abs(dot_gamma_sl)
|
||||||
sumF = sum(stt%gamma_tw(:,en)/prm%gamma_char)
|
sumF = sum(stt%gamma_tw(:,en)/prm%gamma_char)
|
||||||
|
|
||||||
xi_sl_sat_offset = prm%f_sat_sl_tw*sqrt(sumF)
|
xi_sl_sat_offset = prm%f_sat_sl_tw*sqrt(sumF)
|
||||||
|
|
||||||
left_SlipSlip = sign(abs(1.0_pREAL-stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset))**prm%a_sl, &
|
left_SlipSlip = sign(abs(1.0_pREAL - stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset))**prm%a_sl, &
|
||||||
1.0_pREAL-stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset))
|
1.0_pREAL - stt%xi_sl(:,en) / (prm%xi_inf_sl+xi_sl_sat_offset))
|
||||||
|
|
||||||
dot_xi_sl = prm%h_0_sl_sl * (1.0_pREAL + prm%c_1 * sumF**prm%c_2) &
|
dot_xi_sl = prm%h_0_sl_sl * (1.0_pREAL + prm%c_1 * sumF**prm%c_2) &
|
||||||
* left_SlipSlip * matmul(prm%h_sl_sl,dot_gamma_sl) &
|
* left_SlipSlip &
|
||||||
|
* matmul(prm%h_sl_sl,dot_gamma_sl) &
|
||||||
+ matmul(prm%h_sl_tw,dot_gamma_tw)
|
+ matmul(prm%h_sl_tw,dot_gamma_tw)
|
||||||
|
|
||||||
dot_xi_tw = prm%h_0_tw_sl * sum(stt%gamma_sl(:,en))**prm%c_3 &
|
dot_xi_tw = prm%h_0_tw_sl * sum(stt%gamma_sl(:,en))**prm%c_3 * matmul(prm%h_tw_sl,dot_gamma_sl) &
|
||||||
* matmul(prm%h_tw_sl,dot_gamma_sl) &
|
+ prm%h_0_tw_tw * sumF **prm%c_4 * matmul(prm%h_tw_tw,dot_gamma_tw)
|
||||||
+ prm%h_0_tw_tw * sumF**prm%c_4 * matmul(prm%h_tw_tw,dot_gamma_tw)
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -436,12 +436,12 @@ end subroutine plastic_phenopowerlaw_result
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Calculate shear rates on slip systems and their derivatives with respect to resolved
|
!> @brief Calculate shear rates on slip systems and their derivatives with respect to resolved
|
||||||
! stress.
|
! stress.
|
||||||
!> @details Derivatives are calculated only optionally.
|
!> @details Sign of dot_gamma_sl conveys sense of shear.
|
||||||
! NOTE: Contrary to common convention, here the result (i.e. intent(out)) variables have to be put
|
! Derivatives are calculated only optionally, hence, contrary to common convention,
|
||||||
! at the end since some of them are optional.
|
! here the result (i.e. intent(out)) variables have to be put at the end.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics_sl(Mp,ph,en, &
|
pure subroutine kinetics_sl(Mp,ph,en, &
|
||||||
dot_gamma_sl_pos,dot_gamma_sl_neg,ddot_gamma_dtau_sl_pos,ddot_gamma_dtau_sl_neg)
|
dot_gamma_sl,ddot_gamma_dtau_sl)
|
||||||
|
|
||||||
real(pREAL), dimension(3,3), intent(in) :: &
|
real(pREAL), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
|
@ -449,52 +449,31 @@ pure subroutine kinetics_sl(Mp,ph,en, &
|
||||||
ph, &
|
ph, &
|
||||||
en
|
en
|
||||||
|
|
||||||
real(pREAL), intent(out), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl), intent(out) :: &
|
||||||
dot_gamma_sl_pos, &
|
dot_gamma_sl
|
||||||
dot_gamma_sl_neg
|
real(pREAL), dimension(param(ph)%sum_N_sl), optional, intent(out) :: &
|
||||||
real(pREAL), intent(out), optional, dimension(param(ph)%sum_N_sl) :: &
|
ddot_gamma_dtau_sl
|
||||||
ddot_gamma_dtau_sl_pos, &
|
|
||||||
ddot_gamma_dtau_sl_neg
|
|
||||||
|
|
||||||
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
real(pREAL), dimension(param(ph)%sum_N_sl) :: &
|
||||||
tau_sl_pos, &
|
tau_sl_pos, &
|
||||||
tau_sl_neg
|
tau_sl_neg
|
||||||
integer :: i
|
integer :: i
|
||||||
|
|
||||||
|
|
||||||
associate(prm => param(ph), stt => state(ph))
|
associate(prm => param(ph), stt => state(ph))
|
||||||
|
|
||||||
do i = 1, prm%sum_N_sl
|
tau_sl_pos = [(math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i)),i=1,prm%sum_N_sl)]
|
||||||
tau_sl_pos(i) = math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i))
|
tau_sl_neg = [(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)),i=1,prm%sum_N_sl)]
|
||||||
tau_sl_neg(i) = merge(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)), &
|
|
||||||
0.0_pREAL, prm%nonSchmidActive)
|
|
||||||
end do
|
|
||||||
|
|
||||||
where(dNeq0(tau_sl_pos))
|
dot_gamma_sl = merge(+1.0_pREAL,-1.0_pREAL, tau_sl_pos>tau_sl_neg) &
|
||||||
dot_gamma_sl_pos = prm%dot_gamma_0_sl * merge(0.5_pREAL,1.0_pREAL, prm%nonSchmidActive) & ! 1/2 if non-Schmid active
|
* prm%dot_gamma_0_sl &
|
||||||
* sign(abs(tau_sl_pos/stt%xi_sl(:,en))**prm%n_sl, tau_sl_pos)
|
* (max(tau_sl_pos,tau_sl_neg)/stt%xi_sl(:,en))**prm%n_sl
|
||||||
else where
|
|
||||||
dot_gamma_sl_pos = 0.0_pREAL
|
|
||||||
end where
|
|
||||||
|
|
||||||
where(dNeq0(tau_sl_neg))
|
if (present(ddot_gamma_dtau_sl)) then
|
||||||
dot_gamma_sl_neg = prm%dot_gamma_0_sl * 0.5_pREAL & ! only used if non-Schmid active, always 1/2
|
where(dNeq0(dot_gamma_sl))
|
||||||
* sign(abs(tau_sl_neg/stt%xi_sl(:,en))**prm%n_sl, tau_sl_neg)
|
ddot_gamma_dtau_sl = dot_gamma_sl*prm%n_sl/max(tau_sl_pos,tau_sl_neg)
|
||||||
else where
|
else where
|
||||||
dot_gamma_sl_neg = 0.0_pREAL
|
ddot_gamma_dtau_sl = 0.0_pREAL
|
||||||
end where
|
|
||||||
|
|
||||||
if (present(ddot_gamma_dtau_sl_pos)) then
|
|
||||||
where(dNeq0(dot_gamma_sl_pos))
|
|
||||||
ddot_gamma_dtau_sl_pos = dot_gamma_sl_pos*prm%n_sl/tau_sl_pos
|
|
||||||
else where
|
|
||||||
ddot_gamma_dtau_sl_pos = 0.0_pREAL
|
|
||||||
end where
|
|
||||||
end if
|
|
||||||
if (present(ddot_gamma_dtau_sl_neg)) then
|
|
||||||
where(dNeq0(dot_gamma_sl_neg))
|
|
||||||
ddot_gamma_dtau_sl_neg = dot_gamma_sl_neg*prm%n_sl/tau_sl_neg
|
|
||||||
else where
|
|
||||||
ddot_gamma_dtau_sl_neg = 0.0_pREAL
|
|
||||||
end where
|
end where
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
@ -504,8 +483,8 @@ end subroutine kinetics_sl
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Calculate shear rates on twin systems and their derivatives with respect to resolved
|
!> @brief Calculate shear rates on twin systems and their derivatives with respect to resolved stress.
|
||||||
! stress. Twinning is assumed to take place only in an untwinned volume.
|
! Twinning is assumed to take place only in an untwinned volume.
|
||||||
!> @details Derivatives are calculated and returned if corresponding output variables are present in the argument list.
|
!> @details Derivatives are calculated and returned if corresponding output variables are present in the argument list.
|
||||||
! NOTE: Contrary to common convention, here the result (i.e. intent(out)) variables have to be put
|
! NOTE: Contrary to common convention, here the result (i.e. intent(out)) variables have to be put
|
||||||
! at the end since some of them are optional.
|
! at the end since some of them are optional.
|
||||||
|
@ -535,7 +514,7 @@ pure subroutine kinetics_tw(Mp,ph,en,&
|
||||||
|
|
||||||
where(tau_tw > 0.0_pREAL)
|
where(tau_tw > 0.0_pREAL)
|
||||||
dot_gamma_tw = (1.0_pREAL-sum(stt%gamma_tw(:,en)/prm%gamma_char)) & ! only twin in untwinned volume fraction
|
dot_gamma_tw = (1.0_pREAL-sum(stt%gamma_tw(:,en)/prm%gamma_char)) & ! only twin in untwinned volume fraction
|
||||||
* prm%dot_gamma_0_tw*(abs(tau_tw)/stt%xi_tw(:,en))**prm%n_tw
|
* prm%dot_gamma_0_tw*(tau_tw/stt%xi_tw(:,en))**prm%n_tw
|
||||||
else where
|
else where
|
||||||
dot_gamma_tw = 0.0_pREAL
|
dot_gamma_tw = 0.0_pREAL
|
||||||
end where
|
end where
|
||||||
|
|
Loading…
Reference in New Issue