Merge branch 'DisloUCLA-Names-as-in-paper' into 'development'
Dislo ucla names as in paper See merge request damask/DAMASK!65
This commit is contained in:
commit
de92469e26
|
@ -7,12 +7,11 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module plastic_disloUCLA
|
module plastic_disloUCLA
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
pReal, &
|
pReal
|
||||||
pInt
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
integer(pInt), dimension(:,:), allocatable, target, public :: &
|
integer, dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_disloUCLA_sizePostResult !< size of each post result output
|
plastic_disloUCLA_sizePostResult !< size of each post result output
|
||||||
character(len=64), dimension(:,:), allocatable, target, public :: &
|
character(len=64), dimension(:,:), allocatable, target, public :: &
|
||||||
plastic_disloUCLA_output !< name of each post result output
|
plastic_disloUCLA_output !< name of each post result output
|
||||||
|
@ -23,34 +22,32 @@ module plastic_disloUCLA
|
||||||
enum, bind(c)
|
enum, bind(c)
|
||||||
enumerator :: &
|
enumerator :: &
|
||||||
undefined_ID, &
|
undefined_ID, &
|
||||||
rho_ID, &
|
rho_mob_ID, &
|
||||||
rhoDip_ID, &
|
rho_dip_ID, &
|
||||||
shearrate_ID, &
|
dot_gamma_sl_ID, &
|
||||||
accumulatedshear_ID, &
|
gamma_sl_ID, &
|
||||||
mfp_ID, &
|
Lambda_sl_ID, &
|
||||||
thresholdstress_ID
|
thresholdstress_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type, private :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
aTolRho, &
|
aTol_rho, &
|
||||||
grainSize, &
|
D, & !< grain size
|
||||||
SolidSolutionStrength, & !< Strength due to elements in solid solution
|
|
||||||
mu, &
|
mu, &
|
||||||
D0, & !< prefactor for self-diffusion coefficient
|
D_0, & !< prefactor for self-diffusion coefficient
|
||||||
Qsd !< activation energy for dislocation climb
|
Q_cl !< activation energy for dislocation climb
|
||||||
real(pReal), allocatable, dimension(:) :: &
|
real(pReal), dimension(:), allocatable :: &
|
||||||
rho0, & !< initial edge dislocation density
|
rho_mob_0, & !< initial dislocation density
|
||||||
rhoDip0, & !< initial edge dipole density
|
rho_dip_0, & !< initial dipole density
|
||||||
burgers, & !< absolute length of burgers vector [m]
|
b_sl, & !< magnitude of burgers vector [m]
|
||||||
nonSchmidCoeff, &
|
nonSchmidCoeff, &
|
||||||
minDipDistance, &
|
D_a, &
|
||||||
CLambda, & !< Adj. parameter for distance between 2 forest dislocations
|
i_sl, & !< Adj. parameter for distance between 2 forest dislocations
|
||||||
atomicVolume, &
|
atomicVolume, &
|
||||||
tau_Peierls, &
|
tau_0, &
|
||||||
tau0, &
|
|
||||||
!* mobility law parameters
|
!* mobility law parameters
|
||||||
H0kp, & !< activation energy for glide [J]
|
delta_F, & !< activation energy for glide [J]
|
||||||
v0, & !< dislocation velocity prefactor [m/s]
|
v0, & !< dislocation velocity prefactor [m/s]
|
||||||
p, & !< p-exponent in glide velocity
|
p, & !< p-exponent in glide velocity
|
||||||
q, & !< q-exponent in glide velocity
|
q, & !< q-exponent in glide velocity
|
||||||
|
@ -58,34 +55,33 @@ module plastic_disloUCLA
|
||||||
kink_height, & !< height of the kink pair
|
kink_height, & !< height of the kink pair
|
||||||
w, & !< width of the kink pair
|
w, & !< width of the kink pair
|
||||||
omega !< attempt frequency for kink pair nucleation
|
omega !< attempt frequency for kink pair nucleation
|
||||||
real(pReal), allocatable, dimension(:,:) :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
interaction_SlipSlip, & !< slip resistance from slip activity
|
h_sl_sl, & !< slip resistance from slip activity
|
||||||
forestProjectionEdge
|
forestProjectionEdge
|
||||||
real(pReal), allocatable, dimension(:,:,:) :: &
|
real(pReal), dimension(:,:,:), allocatable :: &
|
||||||
Schmid, &
|
Schmid, &
|
||||||
nonSchmid_pos, &
|
nonSchmid_pos, &
|
||||||
nonSchmid_neg
|
nonSchmid_neg
|
||||||
integer(pInt) :: &
|
integer :: &
|
||||||
totalNslip !< total number of active slip system
|
sum_N_sl !< total number of active slip system
|
||||||
integer(pInt), allocatable, dimension(:) :: &
|
integer, dimension(:), allocatable :: &
|
||||||
Nslip !< number of active slip systems for each family
|
N_sl !< number of active slip systems for each family
|
||||||
integer(kind(undefined_ID)), allocatable, dimension(:) :: &
|
integer(kind(undefined_ID)), dimension(:),allocatable :: &
|
||||||
outputID !< ID of each post result output
|
outputID !< ID of each post result output
|
||||||
logical :: &
|
logical :: &
|
||||||
dipoleFormation !< flag indicating consideration of dipole formation
|
dipoleFormation !< flag indicating consideration of dipole formation
|
||||||
end type !< container type for internal constitutive parameters
|
end type !< container type for internal constitutive parameters
|
||||||
|
|
||||||
type, private :: tDisloUCLAState
|
type, private :: tDisloUCLAState
|
||||||
real(pReal), pointer, dimension(:,:) :: &
|
real(pReal), dimension(:,:), pointer :: &
|
||||||
rhoEdge, &
|
rho_mob, &
|
||||||
rhoEdgeDip, &
|
rho_dip, &
|
||||||
accshear
|
gamma_sl
|
||||||
end type tDisloUCLAState
|
end type tDisloUCLAState
|
||||||
|
|
||||||
type, private :: tDisloUCLAdependentState
|
type, private :: tDisloUCLAdependentState
|
||||||
real(pReal), allocatable, dimension(:,:) :: &
|
real(pReal), dimension(:,:), allocatable :: &
|
||||||
mfp, &
|
Lambda_sl, &
|
||||||
dislocationSpacing, &
|
|
||||||
threshold_stress
|
threshold_stress
|
||||||
end type tDisloUCLAdependentState
|
end type tDisloUCLAdependentState
|
||||||
|
|
||||||
|
@ -139,14 +135,14 @@ subroutine plastic_disloUCLA_init()
|
||||||
use lattice
|
use lattice
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt) :: &
|
integer :: &
|
||||||
Ninstance, &
|
Ninstance, &
|
||||||
p, i, &
|
p, i, &
|
||||||
NipcMyPhase, &
|
NipcMyPhase, &
|
||||||
sizeState, sizeDotState, &
|
sizeState, sizeDotState, &
|
||||||
startIndex, endIndex
|
startIndex, endIndex
|
||||||
|
|
||||||
integer(pInt), dimension(0), parameter :: emptyIntArray = [integer(pInt)::]
|
integer, dimension(0), parameter :: emptyIntArray = [integer::]
|
||||||
real(pReal), dimension(0), parameter :: emptyRealArray = [real(pReal)::]
|
real(pReal), dimension(0), parameter :: emptyRealArray = [real(pReal)::]
|
||||||
character(len=65536), dimension(0), parameter :: emptyStringArray = [character(len=65536)::]
|
character(len=65536), dimension(0), parameter :: emptyStringArray = [character(len=65536)::]
|
||||||
|
|
||||||
|
@ -163,11 +159,11 @@ subroutine plastic_disloUCLA_init()
|
||||||
write(6,'(/,a)') ' Cereceda et al., International Journal of Plasticity 78:242–256, 2016'
|
write(6,'(/,a)') ' Cereceda et al., International Journal of Plasticity 78:242–256, 2016'
|
||||||
write(6,'(a)') ' https://dx.doi.org/10.1016/j.ijplas.2015.09.002'
|
write(6,'(a)') ' https://dx.doi.org/10.1016/j.ijplas.2015.09.002'
|
||||||
|
|
||||||
Ninstance = int(count(phase_plasticity == PLASTICITY_DISLOUCLA_ID),pInt)
|
Ninstance = count(phase_plasticity == PLASTICITY_DISLOUCLA_ID)
|
||||||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
||||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||||
|
|
||||||
allocate(plastic_disloUCLA_sizePostResult(maxval(phase_Noutput),Ninstance),source=0_pInt)
|
allocate(plastic_disloUCLA_sizePostResult(maxval(phase_Noutput),Ninstance),source=0)
|
||||||
allocate(plastic_disloUCLA_output(maxval(phase_Noutput),Ninstance))
|
allocate(plastic_disloUCLA_output(maxval(phase_Noutput),Ninstance))
|
||||||
plastic_disloUCLA_output = ''
|
plastic_disloUCLA_output = ''
|
||||||
|
|
||||||
|
@ -177,7 +173,7 @@ subroutine plastic_disloUCLA_init()
|
||||||
allocate(dependentState(Ninstance))
|
allocate(dependentState(Ninstance))
|
||||||
|
|
||||||
|
|
||||||
do p = 1_pInt, size(phase_plasticity)
|
do p = 1, size(phase_plasticity)
|
||||||
if (phase_plasticity(p) /= PLASTICITY_DISLOUCLA_ID) cycle
|
if (phase_plasticity(p) /= PLASTICITY_DISLOUCLA_ID) cycle
|
||||||
associate(prm => param(phase_plasticityInstance(p)), &
|
associate(prm => param(phase_plasticityInstance(p)), &
|
||||||
dot => dotState(phase_plasticityInstance(p)), &
|
dot => dotState(phase_plasticityInstance(p)), &
|
||||||
|
@ -189,127 +185,125 @@ subroutine plastic_disloUCLA_init()
|
||||||
! optional parameters that need to be defined
|
! optional parameters that need to be defined
|
||||||
prm%mu = lattice_mu(p)
|
prm%mu = lattice_mu(p)
|
||||||
|
|
||||||
prm%aTolRho = config%getFloat('atol_rho')
|
prm%aTol_rho = config%getFloat('atol_rho')
|
||||||
|
|
||||||
! sanity checks
|
! sanity checks
|
||||||
if (prm%aTolRho <= 0.0_pReal) extmsg = trim(extmsg)//' atol_rho'
|
if (prm%aTol_rho <= 0.0_pReal) extmsg = trim(extmsg)//' atol_rho'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! slip related parameters
|
! slip related parameters
|
||||||
prm%Nslip = config%getInts('nslip',defaultVal=emptyIntArray)
|
prm%N_sl = config%getInts('nslip',defaultVal=emptyIntArray)
|
||||||
prm%totalNslip = sum(prm%Nslip)
|
prm%sum_N_sl = sum(prm%N_sl)
|
||||||
slipActive: if (prm%totalNslip > 0_pInt) then
|
slipActive: if (prm%sum_N_sl > 0) then
|
||||||
prm%Schmid = lattice_SchmidMatrix_slip(prm%Nslip,config%getString('lattice_structure'),&
|
prm%Schmid = lattice_SchmidMatrix_slip(prm%N_sl,config%getString('lattice_structure'),&
|
||||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||||
|
|
||||||
if(trim(config%getString('lattice_structure')) == 'bcc') then
|
if(trim(config%getString('lattice_structure')) == 'bcc') then
|
||||||
prm%nonSchmidCoeff = config%getFloats('nonschmid_coefficients',&
|
prm%nonSchmidCoeff = config%getFloats('nonschmid_coefficients',&
|
||||||
defaultVal = emptyRealArray)
|
defaultVal = emptyRealArray)
|
||||||
prm%nonSchmid_pos = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,+1_pInt)
|
prm%nonSchmid_pos = lattice_nonSchmidMatrix(prm%N_sl,prm%nonSchmidCoeff,+1)
|
||||||
prm%nonSchmid_neg = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,-1_pInt)
|
prm%nonSchmid_neg = lattice_nonSchmidMatrix(prm%N_sl,prm%nonSchmidCoeff,-1)
|
||||||
else
|
else
|
||||||
prm%nonSchmid_pos = prm%Schmid
|
prm%nonSchmid_pos = prm%Schmid
|
||||||
prm%nonSchmid_neg = prm%Schmid
|
prm%nonSchmid_neg = prm%Schmid
|
||||||
endif
|
endif
|
||||||
|
|
||||||
prm%interaction_SlipSlip = lattice_interaction_SlipBySlip(prm%Nslip, &
|
prm%h_sl_sl = lattice_interaction_SlipBySlip(prm%N_sl, &
|
||||||
config%getFloats('interaction_slipslip'), &
|
config%getFloats('interaction_slipslip'), &
|
||||||
config%getString('lattice_structure'))
|
config%getString('lattice_structure'))
|
||||||
prm%forestProjectionEdge = lattice_forestProjection(prm%Nslip,config%getString('lattice_structure'),&
|
prm%forestProjectionEdge = lattice_forestProjection(prm%N_sl,config%getString('lattice_structure'),&
|
||||||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||||
|
|
||||||
prm%rho0 = config%getFloats('rhoedge0', requiredSize=size(prm%Nslip))
|
prm%rho_mob_0 = config%getFloats('rhoedge0', requiredSize=size(prm%N_sl))
|
||||||
prm%rhoDip0 = config%getFloats('rhoedgedip0', requiredSize=size(prm%Nslip))
|
prm%rho_dip_0 = config%getFloats('rhoedgedip0', requiredSize=size(prm%N_sl))
|
||||||
prm%v0 = config%getFloats('v0', requiredSize=size(prm%Nslip))
|
prm%v0 = config%getFloats('v0', requiredSize=size(prm%N_sl))
|
||||||
prm%burgers = config%getFloats('slipburgers', requiredSize=size(prm%Nslip))
|
prm%b_sl = config%getFloats('slipburgers', requiredSize=size(prm%N_sl))
|
||||||
prm%H0kp = config%getFloats('qedge', requiredSize=size(prm%Nslip))
|
prm%delta_F = config%getFloats('qedge', requiredSize=size(prm%N_sl))
|
||||||
|
|
||||||
prm%clambda = config%getFloats('clambdaslip', requiredSize=size(prm%Nslip))
|
prm%i_sl = config%getFloats('clambdaslip', requiredSize=size(prm%N_sl))
|
||||||
prm%tau_Peierls = config%getFloats('tau_peierls', requiredSize=size(prm%Nslip)) ! ToDo: Deprecated
|
prm%tau_0 = config%getFloats('tau_peierls', requiredSize=size(prm%N_sl))
|
||||||
prm%p = config%getFloats('p_slip', requiredSize=size(prm%Nslip), &
|
prm%p = config%getFloats('p_slip', requiredSize=size(prm%N_sl), &
|
||||||
defaultVal=[(1.0_pReal,i=1_pInt,size(prm%Nslip))])
|
defaultVal=[(1.0_pReal,i=1,size(prm%N_sl))])
|
||||||
prm%q = config%getFloats('q_slip', requiredSize=size(prm%Nslip), &
|
prm%q = config%getFloats('q_slip', requiredSize=size(prm%N_sl), &
|
||||||
defaultVal=[(1.0_pReal,i=1_pInt,size(prm%Nslip))])
|
defaultVal=[(1.0_pReal,i=1,size(prm%N_sl))])
|
||||||
prm%kink_height = config%getFloats('kink_height', requiredSize=size(prm%Nslip))
|
prm%kink_height = config%getFloats('kink_height', requiredSize=size(prm%N_sl))
|
||||||
prm%w = config%getFloats('kink_width', requiredSize=size(prm%Nslip))
|
prm%w = config%getFloats('kink_width', requiredSize=size(prm%N_sl))
|
||||||
prm%omega = config%getFloats('omega', requiredSize=size(prm%Nslip))
|
prm%omega = config%getFloats('omega', requiredSize=size(prm%N_sl))
|
||||||
prm%B = config%getFloats('friction_coeff', requiredSize=size(prm%Nslip))
|
prm%B = config%getFloats('friction_coeff', requiredSize=size(prm%N_sl))
|
||||||
|
|
||||||
prm%SolidSolutionStrength = config%getFloat('solidsolutionstrength') ! ToDo: Deprecated
|
prm%D = config%getFloat('grainsize')
|
||||||
prm%grainSize = config%getFloat('grainsize')
|
prm%D_0 = config%getFloat('d0')
|
||||||
prm%D0 = config%getFloat('d0')
|
prm%Q_cl = config%getFloat('qsd')
|
||||||
prm%Qsd = config%getFloat('qsd')
|
prm%atomicVolume = config%getFloat('catomicvolume') * prm%b_sl**3.0_pReal
|
||||||
prm%atomicVolume = config%getFloat('catomicvolume') * prm%burgers**3.0_pReal
|
prm%D_a = config%getFloat('cedgedipmindistance') * prm%b_sl
|
||||||
prm%minDipDistance = config%getFloat('cedgedipmindistance') * prm%burgers
|
|
||||||
prm%dipoleformation = config%getFloat('dipoleformationfactor') > 0.0_pReal !should be on by default, ToDo: change to /key/-type key
|
prm%dipoleformation = config%getFloat('dipoleformationfactor') > 0.0_pReal !should be on by default, ToDo: change to /key/-type key
|
||||||
|
|
||||||
! expand: family => system
|
! expand: family => system
|
||||||
prm%rho0 = math_expand(prm%rho0, prm%Nslip)
|
prm%rho_mob_0 = math_expand(prm%rho_mob_0, prm%N_sl)
|
||||||
prm%rhoDip0 = math_expand(prm%rhoDip0, prm%Nslip)
|
prm%rho_dip_0 = math_expand(prm%rho_dip_0, prm%N_sl)
|
||||||
prm%q = math_expand(prm%q, prm%Nslip)
|
prm%q = math_expand(prm%q, prm%N_sl)
|
||||||
prm%p = math_expand(prm%p, prm%Nslip)
|
prm%p = math_expand(prm%p, prm%N_sl)
|
||||||
prm%H0kp = math_expand(prm%H0kp, prm%Nslip)
|
prm%delta_F = math_expand(prm%delta_F, prm%N_sl)
|
||||||
prm%burgers = math_expand(prm%burgers, prm%Nslip)
|
prm%b_sl = math_expand(prm%b_sl, prm%N_sl)
|
||||||
prm%kink_height = math_expand(prm%kink_height, prm%Nslip)
|
prm%kink_height = math_expand(prm%kink_height, prm%N_sl)
|
||||||
prm%w = math_expand(prm%w, prm%Nslip)
|
prm%w = math_expand(prm%w, prm%N_sl)
|
||||||
prm%omega = math_expand(prm%omega, prm%Nslip)
|
prm%omega = math_expand(prm%omega, prm%N_sl)
|
||||||
prm%tau_Peierls = math_expand(prm%tau_Peierls, prm%Nslip)
|
prm%tau_0 = math_expand(prm%tau_0, prm%N_sl)
|
||||||
prm%v0 = math_expand(prm%v0, prm%Nslip)
|
prm%v0 = math_expand(prm%v0, prm%N_sl)
|
||||||
prm%B = math_expand(prm%B, prm%Nslip)
|
prm%B = math_expand(prm%B, prm%N_sl)
|
||||||
prm%clambda = math_expand(prm%clambda, prm%Nslip)
|
prm%i_sl = math_expand(prm%i_sl, prm%N_sl)
|
||||||
prm%atomicVolume = math_expand(prm%atomicVolume, prm%Nslip)
|
prm%atomicVolume = math_expand(prm%atomicVolume, prm%N_sl)
|
||||||
prm%minDipDistance = math_expand(prm%minDipDistance, prm%Nslip)
|
prm%D_a = math_expand(prm%D_a, prm%N_sl)
|
||||||
|
|
||||||
prm%tau0 = prm%tau_peierls + prm%SolidSolutionStrength
|
|
||||||
|
|
||||||
! sanity checks
|
! sanity checks
|
||||||
if ( prm%D0 <= 0.0_pReal) extmsg = trim(extmsg)//' d0'
|
if ( prm%D_0 <= 0.0_pReal) extmsg = trim(extmsg)//' D_0'
|
||||||
if ( prm%Qsd <= 0.0_pReal) extmsg = trim(extmsg)//' qsd'
|
if ( prm%Q_cl <= 0.0_pReal) extmsg = trim(extmsg)//' Q_cl'
|
||||||
if (any(prm%rho0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0'
|
if (any(prm%rho_mob_0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0'
|
||||||
if (any(prm%rhoDip0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedgedip0'
|
if (any(prm%rho_dip_0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedgedip0'
|
||||||
if (any(prm%v0 < 0.0_pReal)) extmsg = trim(extmsg)//' v0'
|
if (any(prm%v0 < 0.0_pReal)) extmsg = trim(extmsg)//' v0'
|
||||||
if (any(prm%burgers <= 0.0_pReal)) extmsg = trim(extmsg)//' slipburgers'
|
if (any(prm%b_sl <= 0.0_pReal)) extmsg = trim(extmsg)//' slipb_sl'
|
||||||
if (any(prm%H0kp <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge'
|
if (any(prm%delta_F <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge'
|
||||||
if (any(prm%tau_peierls < 0.0_pReal)) extmsg = trim(extmsg)//' tau_peierls'
|
if (any(prm%tau_0 < 0.0_pReal)) extmsg = trim(extmsg)//' tau_0'
|
||||||
if (any(prm%minDipDistance <= 0.0_pReal)) extmsg = trim(extmsg)//' cedgedipmindistance or slipburgers'
|
if (any(prm%D_a <= 0.0_pReal)) extmsg = trim(extmsg)//' cedgedipmindistance or slipb_sl'
|
||||||
if (any(prm%atomicVolume <= 0.0_pReal)) extmsg = trim(extmsg)//' catomicvolume or slipburgers'
|
if (any(prm%atomicVolume <= 0.0_pReal)) extmsg = trim(extmsg)//' catomicvolume or slipb_sl'
|
||||||
|
|
||||||
else slipActive
|
else slipActive
|
||||||
allocate(prm%rho0(0))
|
allocate(prm%rho_mob_0(0))
|
||||||
allocate(prm%rhoDip0(0))
|
allocate(prm%rho_dip_0(0))
|
||||||
endif slipActive
|
endif slipActive
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! exit if any parameter is out of range
|
! exit if any parameter is out of range
|
||||||
if (extmsg /= '') &
|
if (extmsg /= '') &
|
||||||
call IO_error(211_pInt,ext_msg=trim(extmsg)//'('//PLASTICITY_DISLOUCLA_label//')')
|
call IO_error(211,ext_msg=trim(extmsg)//'('//PLASTICITY_DISLOUCLA_label//')')
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! output pararameters
|
! output pararameters
|
||||||
outputs = config%getStrings('(output)',defaultVal=emptyStringArray)
|
outputs = config%getStrings('(output)',defaultVal=emptyStringArray)
|
||||||
allocate(prm%outputID(0))
|
allocate(prm%outputID(0))
|
||||||
do i=1_pInt, size(outputs)
|
do i=1, size(outputs)
|
||||||
outputID = undefined_ID
|
outputID = undefined_ID
|
||||||
select case(trim(outputs(i)))
|
select case(trim(outputs(i)))
|
||||||
|
|
||||||
case ('edge_density')
|
case ('edge_density')
|
||||||
outputID = merge(rho_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(rho_mob_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
case ('dipole_density')
|
case ('dipole_density')
|
||||||
outputID = merge(rhoDip_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(rho_dip_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
case ('shear_rate','shearrate','shear_rate_slip','shearrate_slip')
|
case ('shear_rate','shearrate','shear_rate_slip','shearrate_slip')
|
||||||
outputID = merge(shearrate_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(dot_gamma_sl_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
case ('accumulated_shear','accumulatedshear','accumulated_shear_slip')
|
case ('accumulated_shear','accumulatedshear','accumulated_shear_slip')
|
||||||
outputID = merge(accumulatedshear_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(gamma_sl_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
case ('mfp','mfp_slip')
|
case ('mfp','mfp_slip')
|
||||||
outputID = merge(mfp_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(Lambda_sl_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
case ('threshold_stress','threshold_stress_slip')
|
case ('threshold_stress','threshold_stress_slip')
|
||||||
outputID = merge(thresholdstress_ID,undefined_ID,prm%totalNslip>0_pInt)
|
outputID = merge(thresholdstress_ID,undefined_ID,prm%sum_N_sl>0)
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
if (outputID /= undefined_ID) then
|
if (outputID /= undefined_ID) then
|
||||||
plastic_disloUCLA_output(i,phase_plasticityInstance(p)) = outputs(i)
|
plastic_disloUCLA_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||||
plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
|
plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = prm%sum_N_sl
|
||||||
prm%outputID = [prm%outputID, outputID]
|
prm%outputID = [prm%outputID, outputID]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -318,41 +312,40 @@ subroutine plastic_disloUCLA_init()
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
NipcMyPhase = count(material_phase == p)
|
NipcMyPhase = count(material_phase == p)
|
||||||
sizeDotState = int(size(['rhoEdge ','rhoEdgeDip ','accshearslip']),pInt) * prm%totalNslip
|
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, &
|
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0, &
|
||||||
prm%totalNslip,0_pInt,0_pInt)
|
prm%sum_N_sl,0,0)
|
||||||
plasticState(p)%sizePostResults = sum(plastic_disloUCLA_sizePostResult(:,phase_plasticityInstance(p)))
|
plasticState(p)%sizePostResults = sum(plastic_disloUCLA_sizePostResult(:,phase_plasticityInstance(p)))
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! locally defined state aliases and initialization of state0 and aTolState
|
! locally defined state aliases and initialization of state0 and aTolState
|
||||||
startIndex = 1_pInt
|
startIndex = 1
|
||||||
endIndex = prm%totalNslip
|
endIndex = prm%sum_N_sl
|
||||||
stt%rhoEdge=>plasticState(p)%state(startIndex:endIndex,:)
|
stt%rho_mob=>plasticState(p)%state(startIndex:endIndex,:)
|
||||||
stt%rhoEdge= spread(prm%rho0,2,NipcMyPhase)
|
stt%rho_mob= spread(prm%rho_mob_0,2,NipcMyPhase)
|
||||||
dot%rhoEdge=>plasticState(p)%dotState(startIndex:endIndex,:)
|
dot%rho_mob=>plasticState(p)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolRho
|
plasticState(p)%aTolState(startIndex:endIndex) = prm%aTol_rho
|
||||||
|
|
||||||
startIndex = endIndex + 1_pInt
|
startIndex = endIndex + 1
|
||||||
endIndex = endIndex + prm%totalNslip
|
endIndex = endIndex + prm%sum_N_sl
|
||||||
stt%rhoEdgeDip=>plasticState(p)%state(startIndex:endIndex,:)
|
stt%rho_dip=>plasticState(p)%state(startIndex:endIndex,:)
|
||||||
stt%rhoEdgeDip= spread(prm%rhoDip0,2,NipcMyPhase)
|
stt%rho_dip= spread(prm%rho_dip_0,2,NipcMyPhase)
|
||||||
dot%rhoEdgeDip=>plasticState(p)%dotState(startIndex:endIndex,:)
|
dot%rho_dip=>plasticState(p)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(p)%aTolState(startIndex:endIndex) = prm%aTolRho
|
plasticState(p)%aTolState(startIndex:endIndex) = prm%aTol_rho
|
||||||
|
|
||||||
startIndex = endIndex + 1_pInt
|
startIndex = endIndex + 1
|
||||||
endIndex = endIndex + prm%totalNslip
|
endIndex = endIndex + prm%sum_N_sl
|
||||||
stt%accshear=>plasticState(p)%state(startIndex:endIndex,:)
|
stt%gamma_sl=>plasticState(p)%state(startIndex:endIndex,:)
|
||||||
dot%accshear=>plasticState(p)%dotState(startIndex:endIndex,:)
|
dot%gamma_sl=>plasticState(p)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(p)%aTolState(startIndex:endIndex) = 1.0e6_pReal !ToDo: better make optional parameter
|
plasticState(p)%aTolState(startIndex:endIndex) = 1.0e6_pReal ! Don't use for convergence check
|
||||||
! global alias
|
! global alias
|
||||||
plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:)
|
plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(p)%accumulatedSlip => plasticState(p)%state(startIndex:endIndex,:)
|
plasticState(p)%accumulatedSlip => plasticState(p)%state(startIndex:endIndex,:)
|
||||||
|
|
||||||
allocate(dst%mfp(prm%totalNslip,NipcMyPhase), source=0.0_pReal)
|
allocate(dst%Lambda_sl(prm%sum_N_sl,NipcMyPhase), source=0.0_pReal)
|
||||||
allocate(dst%dislocationSpacing(prm%totalNslip,NipcMyPhase),source=0.0_pReal)
|
allocate(dst%threshold_stress(prm%sum_N_sl,NipcMyPhase), source=0.0_pReal)
|
||||||
allocate(dst%threshold_stress(prm%totalNslip,NipcMyPhase), source=0.0_pReal)
|
|
||||||
|
|
||||||
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
|
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
|
||||||
|
|
||||||
|
@ -366,8 +359,8 @@ end subroutine plastic_disloUCLA_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculates plastic velocity gradient and its tangent
|
!> @brief calculates plastic velocity gradient and its tangent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp,Mp,Temperature,instance,of)
|
pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp, &
|
||||||
|
Mp,T,instance,of)
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
Lp !< plastic velocity gradient
|
Lp !< plastic velocity gradient
|
||||||
|
@ -377,29 +370,29 @@ pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp,Mp,Temperature,inst
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
temperature !< temperature
|
T !< temperature
|
||||||
integer(pInt), intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
of
|
of
|
||||||
|
|
||||||
integer(pInt) :: &
|
integer :: &
|
||||||
i,k,l,m,n
|
i,k,l,m,n
|
||||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
gdot_pos,gdot_neg, &
|
dot_gamma_pos,dot_gamma_neg, &
|
||||||
dgdot_dtau_pos,dgdot_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(instance))
|
associate(prm => param(instance))
|
||||||
|
|
||||||
call kinetics(Mp,Temperature,instance,of,gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
call kinetics(Mp,T,instance,of,dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg)
|
||||||
do i = 1_pInt, prm%totalNslip
|
do i = 1, prm%sum_N_sl
|
||||||
Lp = Lp + (gdot_pos(i)+gdot_neg(i))*prm%Schmid(1:3,1:3,i)
|
Lp = Lp + (dot_gamma_pos(i)+dot_gamma_neg(i))*prm%Schmid(1:3,1:3,i)
|
||||||
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
|
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) &
|
||||||
+ dgdot_dtau_pos(i) * prm%Schmid(k,l,i) * prm%nonSchmid_pos(m,n,i) &
|
+ ddot_gamma_dtau_pos(i) * prm%Schmid(k,l,i) * prm%nonSchmid_pos(m,n,i) &
|
||||||
+ dgdot_dtau_neg(i) * prm%Schmid(k,l,i) * prm%nonSchmid_neg(m,n,i)
|
+ ddot_gamma_dtau_neg(i) * prm%Schmid(k,l,i) * prm%nonSchmid_neg(m,n,i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
@ -410,7 +403,7 @@ end subroutine plastic_disloUCLA_LpAndItsTangent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculates the rate of change of microstructure
|
!> @brief calculates the rate of change of microstructure
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
|
subroutine plastic_disloUCLA_dotState(Mp,T,instance,of)
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
tol_math_check, &
|
tol_math_check, &
|
||||||
dEq0
|
dEq0
|
||||||
|
@ -422,50 +415,52 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
temperature !< temperature
|
T !< temperature
|
||||||
integer(pInt), intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
of
|
of
|
||||||
|
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
VacancyDiffusion
|
VacancyDiffusion
|
||||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
gdot_pos, gdot_neg,&
|
gdot_pos, gdot_neg,&
|
||||||
tau_pos,&
|
tau_pos,&
|
||||||
tau_neg, &
|
tau_neg, &
|
||||||
DotRhoDipFormation, ClimbVelocity, EdgeDipDistance, &
|
v_cl, &
|
||||||
DotRhoEdgeDipClimb
|
dot_rho_dip_formation, &
|
||||||
|
dot_rho_dip_climb, &
|
||||||
|
dip_distance
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance),dot => dotState(instance), dst => dependentState(instance))
|
associate(prm => param(instance), stt => state(instance),dot => dotState(instance), dst => dependentState(instance))
|
||||||
|
|
||||||
call kinetics(Mp,Temperature,instance,of,&
|
call kinetics(Mp,T,instance,of,&
|
||||||
gdot_pos,gdot_neg, &
|
gdot_pos,gdot_neg, &
|
||||||
tau_pos1 = tau_pos,tau_neg1 = tau_neg)
|
tau_pos_out = tau_pos,tau_neg_out = tau_neg)
|
||||||
|
|
||||||
dot%accshear(:,of) = (gdot_pos+gdot_neg) ! ToDo: needs to be abs
|
dot%gamma_sl(:,of) = (gdot_pos+gdot_neg) ! ToDo: needs to be abs
|
||||||
VacancyDiffusion = prm%D0*exp(-prm%Qsd/(kB*Temperature))
|
VacancyDiffusion = prm%D_0*exp(-prm%Q_cl/(kB*T))
|
||||||
|
|
||||||
where(dEq0(tau_pos)) ! ToDo: use avg of pos and neg
|
where(dEq0(tau_pos)) ! ToDo: use avg of pos and neg
|
||||||
DotRhoDipFormation = 0.0_pReal
|
dot_rho_dip_formation = 0.0_pReal
|
||||||
DotRhoEdgeDipClimb = 0.0_pReal
|
dot_rho_dip_climb = 0.0_pReal
|
||||||
else where
|
else where
|
||||||
EdgeDipDistance = math_clip((3.0_pReal*prm%mu*prm%burgers)/(16.0_pReal*PI*abs(tau_pos)), &
|
dip_distance = math_clip(3.0_pReal*prm%mu*prm%b_sl/(16.0_pReal*PI*abs(tau_pos)), &
|
||||||
prm%minDipDistance, & ! lower limit
|
prm%D_a, & ! lower limit
|
||||||
dst%mfp(:,of)) ! upper limit
|
dst%Lambda_sl(:,of)) ! upper limit
|
||||||
DotRhoDipFormation = merge(((2.0_pReal*EdgeDipDistance)/prm%burgers)* stt%rhoEdge(:,of)*abs(dot%accshear(:,of)), & ! ToDo: ignore region of spontaneous annihilation
|
dot_rho_dip_formation = merge(2.0_pReal*dip_distance* stt%rho_mob(:,of)*abs(dot%gamma_sl(:,of))/prm%b_sl, & ! ToDo: ignore region of spontaneous annihilation
|
||||||
0.0_pReal, &
|
0.0_pReal, &
|
||||||
prm%dipoleformation)
|
prm%dipoleformation)
|
||||||
ClimbVelocity = (3.0_pReal*prm%mu*VacancyDiffusion*prm%atomicVolume/(2.0_pReal*pi*kB*Temperature)) &
|
v_cl = (3.0_pReal*prm%mu*VacancyDiffusion*prm%atomicVolume/(2.0_pReal*pi*kB*T)) &
|
||||||
* (1.0_pReal/(EdgeDipDistance+prm%minDipDistance))
|
* (1.0_pReal/(dip_distance+prm%D_a))
|
||||||
DotRhoEdgeDipClimb = (4.0_pReal*ClimbVelocity*stt%rhoEdgeDip(:,of))/(EdgeDipDistance-prm%minDipDistance) ! ToDo: Discuss with Franz: Stress dependency?
|
dot_rho_dip_climb = (4.0_pReal*v_cl*stt%rho_dip(:,of))/(dip_distance-prm%D_a) ! ToDo: Discuss with Franz: Stress dependency?
|
||||||
end where
|
end where
|
||||||
|
|
||||||
dot%rhoEdge(:,of) = abs(dot%accshear(:,of))/(prm%burgers*dst%mfp(:,of)) & ! multiplication
|
dot%rho_mob(:,of) = abs(dot%gamma_sl(:,of))/(prm%b_sl*dst%Lambda_sl(:,of)) & ! multiplication
|
||||||
- DotRhoDipFormation &
|
- dot_rho_dip_formation &
|
||||||
- (2.0_pReal*prm%minDipDistance)/prm%burgers*stt%rhoEdge(:,of)*abs(dot%accshear(:,of)) !* Spontaneous annihilation of 2 single edge dislocations
|
- (2.0_pReal*prm%D_a)/prm%b_sl*stt%rho_mob(:,of)*abs(dot%gamma_sl(:,of)) ! Spontaneous annihilation of 2 single edge dislocations
|
||||||
dot%rhoEdgeDip(:,of) = DotRhoDipFormation &
|
dot%rho_dip(:,of) = dot_rho_dip_formation &
|
||||||
- (2.0_pReal*prm%minDipDistance)/prm%burgers*stt%rhoEdgeDip(:,of)*abs(dot%accshear(:,of)) & !* Spontaneous annihilation of a single edge dislocation with a dipole constituent
|
- (2.0_pReal*prm%D_a)/prm%b_sl*stt%rho_dip(:,of)*abs(dot%gamma_sl(:,of)) & ! Spontaneous annihilation of a single edge dislocation with a dipole constituent
|
||||||
- DotRhoEdgeDipClimb
|
- dot_rho_dip_climb
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -478,25 +473,26 @@ end subroutine plastic_disloUCLA_dotState
|
||||||
subroutine plastic_disloUCLA_dependentState(instance,of)
|
subroutine plastic_disloUCLA_dependentState(instance,of)
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
integer(pInt), intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
of
|
of
|
||||||
|
|
||||||
integer(pInt) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
|
dislocationSpacing
|
||||||
|
integer :: &
|
||||||
i
|
i
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance),dst => dependentState(instance))
|
associate(prm => param(instance), stt => state(instance),dst => dependentState(instance))
|
||||||
|
|
||||||
forall (i = 1_pInt:prm%totalNslip)
|
forall (i = 1:prm%sum_N_sl)
|
||||||
dst%dislocationSpacing(i,of) = sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
|
dislocationSpacing(i) = sqrt(dot_product(stt%rho_mob(:,of)+stt%rho_dip(:,of), &
|
||||||
prm%forestProjectionEdge(:,i)))
|
prm%forestProjectionEdge(:,i)))
|
||||||
dst%threshold_stress(i,of) = prm%mu*prm%burgers(i) &
|
dst%threshold_stress(i,of) = prm%mu*prm%b_sl(i) &
|
||||||
* sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
|
* sqrt(dot_product(stt%rho_mob(:,of)+stt%rho_dip(:,of), &
|
||||||
prm%interaction_SlipSlip(:,i)))
|
prm%h_sl_sl(:,i)))
|
||||||
end forall
|
end forall
|
||||||
|
|
||||||
dst%mfp(:,of) = prm%grainSize/(1.0_pReal+prm%grainSize*dst%dislocationSpacing(:,of)/prm%Clambda)
|
dst%Lambda_sl(:,of) = prm%D/(1.0_pReal+prm%D*dislocationSpacing/prm%i_sl)
|
||||||
dst%dislocationSpacing(:,of) = dst%mfp(:,of) ! ToDo: Hack to recover wrong behavior for the moment
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
@ -506,7 +502,7 @@ end subroutine plastic_disloUCLA_dependentState
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return array of constitutive results
|
!> @brief return array of constitutive results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function plastic_disloUCLA_postResults(Mp,Temperature,instance,of) result(postResults)
|
function plastic_disloUCLA_postResults(Mp,T,instance,of) result(postResults)
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
dEq, dNeq0
|
dEq, dNeq0
|
||||||
use math, only: &
|
use math, only: &
|
||||||
|
@ -517,43 +513,43 @@ function plastic_disloUCLA_postResults(Mp,Temperature,instance,of) result(postRe
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
temperature !< temperature
|
T !< temperature
|
||||||
integer(pInt), intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
of
|
of
|
||||||
|
|
||||||
real(pReal), dimension(sum(plastic_disloUCLA_sizePostResult(:,instance))) :: &
|
real(pReal), dimension(sum(plastic_disloUCLA_sizePostResult(:,instance))) :: &
|
||||||
postResults
|
postResults
|
||||||
|
|
||||||
integer(pInt) :: &
|
integer :: &
|
||||||
o,c,i
|
o,c
|
||||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
gdot_pos,gdot_neg
|
gdot_pos,gdot_neg
|
||||||
|
|
||||||
c = 0_pInt
|
c = 0
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
||||||
|
|
||||||
outputsLoop: do o = 1_pInt,size(prm%outputID)
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
select case(prm%outputID(o))
|
select case(prm%outputID(o))
|
||||||
|
|
||||||
case (rho_ID)
|
case (rho_mob_ID)
|
||||||
postResults(c+1_pInt:c+prm%totalNslip) = stt%rhoEdge(1_pInt:prm%totalNslip,of)
|
postResults(c+1:c+prm%sum_N_sl) = stt%rho_mob(1:prm%sum_N_sl,of)
|
||||||
case (rhoDip_ID)
|
case (rho_dip_ID)
|
||||||
postResults(c+1_pInt:c+prm%totalNslip) = stt%rhoEdgeDip(1_pInt:prm%totalNslip,of)
|
postResults(c+1:c+prm%sum_N_sl) = stt%rho_dip(1:prm%sum_N_sl,of)
|
||||||
case (shearrate_ID)
|
case (dot_gamma_sl_ID)
|
||||||
call kinetics(Mp,Temperature,instance,of,gdot_pos,gdot_neg)
|
call kinetics(Mp,T,instance,of,gdot_pos,gdot_neg)
|
||||||
postResults(c+1:c+prm%totalNslip) = gdot_pos + gdot_neg
|
postResults(c+1:c+prm%sum_N_sl) = gdot_pos + gdot_neg
|
||||||
case (accumulatedshear_ID)
|
case (gamma_sl_ID)
|
||||||
postResults(c+1_pInt:c+prm%totalNslip) = stt%accshear(1_pInt:prm%totalNslip, of)
|
postResults(c+1:c+prm%sum_N_sl) = stt%gamma_sl(1:prm%sum_N_sl, of)
|
||||||
case (mfp_ID)
|
case (Lambda_sl_ID)
|
||||||
postResults(c+1_pInt:c+prm%totalNslip) = dst%mfp(1_pInt:prm%totalNslip, of)
|
postResults(c+1:c+prm%sum_N_sl) = dst%Lambda_sl(1:prm%sum_N_sl, of)
|
||||||
case (thresholdstress_ID)
|
case (thresholdstress_ID)
|
||||||
postResults(c+1_pInt:c+prm%totalNslip) = dst%threshold_stress(1_pInt:prm%totalNslip,of)
|
postResults(c+1:c+prm%sum_N_sl) = dst%threshold_stress(1:prm%sum_N_sl,of)
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
||||||
c = c + prm%totalNslip
|
c = c + prm%sum_N_sl
|
||||||
|
|
||||||
enddo outputsLoop
|
enddo outputsLoop
|
||||||
|
|
||||||
|
@ -575,7 +571,7 @@ subroutine plastic_disloUCLA_results(instance,group)
|
||||||
integer :: o
|
integer :: o
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance))
|
associate(prm => param(instance), stt => state(instance))
|
||||||
outputsLoop: do o = 1_pInt,size(prm%outputID)
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
select case(prm%outputID(o))
|
select case(prm%outputID(o))
|
||||||
end select
|
end select
|
||||||
enddo outputsLoop
|
enddo outputsLoop
|
||||||
|
@ -595,8 +591,8 @@ end subroutine plastic_disloUCLA_results
|
||||||
! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to
|
! NOTE: Against the common convention, the result (i.e. intent(out)) variables are the last to
|
||||||
! have the optional arguments at the end
|
! have the optional arguments at the end
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
pure subroutine kinetics(Mp,Temperature,instance,of, &
|
pure subroutine kinetics(Mp,T,instance,of, &
|
||||||
gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg,tau_pos1,tau_neg1)
|
dot_gamma_pos,dot_gamma_neg,ddot_gamma_dtau_pos,ddot_gamma_dtau_neg,tau_pos_out,tau_neg_out)
|
||||||
use prec, only: &
|
use prec, only: &
|
||||||
tol_math_check, &
|
tol_math_check, &
|
||||||
dEq, dNeq0
|
dEq, dNeq0
|
||||||
|
@ -608,127 +604,103 @@ pure subroutine kinetics(Mp,Temperature,instance,of, &
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Mp !< Mandel stress
|
Mp !< Mandel stress
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
temperature !< temperature
|
T !< temperature
|
||||||
integer(pInt), intent(in) :: &
|
integer, intent(in) :: &
|
||||||
instance, &
|
instance, &
|
||||||
of
|
of
|
||||||
|
|
||||||
real(pReal), intent(out), dimension(param(instance)%totalNslip) :: &
|
real(pReal), intent(out), dimension(param(instance)%sum_N_sl) :: &
|
||||||
gdot_pos, &
|
dot_gamma_pos, &
|
||||||
gdot_neg
|
dot_gamma_neg
|
||||||
real(pReal), intent(out), optional, dimension(param(instance)%totalNslip) :: &
|
real(pReal), intent(out), optional, dimension(param(instance)%sum_N_sl) :: &
|
||||||
dgdot_dtau_pos, &
|
ddot_gamma_dtau_pos, &
|
||||||
dgdot_dtau_neg, &
|
ddot_gamma_dtau_neg, &
|
||||||
tau_pos1, &
|
tau_pos_out, &
|
||||||
tau_neg1
|
tau_neg_out
|
||||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
real(pReal), dimension(param(instance)%sum_N_sl) :: &
|
||||||
StressRatio, &
|
StressRatio, &
|
||||||
StressRatio_p,StressRatio_pminus1, &
|
StressRatio_p,StressRatio_pminus1, &
|
||||||
dvel, vel, &
|
dvel, vel, &
|
||||||
tau_pos,tau_neg, &
|
tau_pos,tau_neg, &
|
||||||
|
t_n, t_k, dtk,dtn, &
|
||||||
needsGoodName ! ToDo: @Karo: any idea?
|
needsGoodName ! ToDo: @Karo: any idea?
|
||||||
integer(pInt) :: j
|
integer :: j
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
associate(prm => param(instance), stt => state(instance), dst => dependentState(instance))
|
||||||
|
|
||||||
do j = 1_pInt, prm%totalNslip
|
do j = 1, prm%sum_N_sl
|
||||||
tau_pos(j) = math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j))
|
tau_pos(j) = math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j))
|
||||||
tau_neg(j) = math_mul33xx33(Mp,prm%nonSchmid_neg(1:3,1:3,j))
|
tau_neg(j) = math_mul33xx33(Mp,prm%nonSchmid_neg(1:3,1:3,j))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
if (present(tau_pos1)) tau_pos1 = tau_pos
|
if (present(tau_pos_out)) tau_pos_out = tau_pos
|
||||||
if (present(tau_neg1)) tau_neg1 = tau_neg
|
if (present(tau_neg_out)) tau_neg_out = tau_neg
|
||||||
|
|
||||||
associate(BoltzmannRatio => prm%H0kp/(kB*Temperature), &
|
associate(BoltzmannRatio => prm%delta_F/(kB*T), &
|
||||||
DotGamma0 => stt%rhoEdge(:,of)*prm%burgers*prm%v0, &
|
dot_gamma_0 => stt%rho_mob(:,of)*prm%b_sl*prm%v0, &
|
||||||
effectiveLength => dst%mfp(:,of) - prm%w)
|
effectiveLength => dst%Lambda_sl(:,of) - prm%w)
|
||||||
|
|
||||||
significantPositiveTau: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
|
significantPositiveTau: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
|
||||||
StressRatio = (abs(tau_pos)-dst%threshold_stress(:,of))/prm%tau0
|
StressRatio = (abs(tau_pos)-dst%threshold_stress(:,of))/prm%tau_0
|
||||||
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)
|
||||||
needsGoodName = exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)
|
needsGoodName = exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)
|
||||||
|
|
||||||
vel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega &
|
t_n = prm%b_sl/(needsGoodName*prm%omega*effectiveLength)
|
||||||
* effectiveLength * tau_pos * needsGoodName &
|
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos) ! our definition of tk is different with the one in dislotwin
|
||||||
/ ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_pos &
|
|
||||||
+ prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName &
|
|
||||||
)
|
|
||||||
|
|
||||||
gdot_pos = DotGamma0 * sign(vel,tau_pos) * 0.5_pReal
|
vel = prm%kink_height/(t_n + t_k)
|
||||||
|
|
||||||
|
dot_gamma_pos = dot_gamma_0 * sign(vel,tau_pos) * 0.5_pReal
|
||||||
else where significantPositiveTau
|
else where significantPositiveTau
|
||||||
gdot_pos = 0.0_pReal
|
dot_gamma_pos = 0.0_pReal
|
||||||
end where significantPositiveTau
|
end where significantPositiveTau
|
||||||
|
|
||||||
if (present(dgdot_dtau_pos)) then
|
if (present(ddot_gamma_dtau_pos)) then
|
||||||
significantPositiveTau2: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
|
significantPositiveTau2: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
|
||||||
dvel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength &
|
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_0
|
||||||
(needsGoodName + tau_pos * abs(needsGoodName)*BoltzmannRatio*prm%p &
|
dtk = -1.0_pReal * t_k / tau_pos
|
||||||
* prm%q/prm%tau0 &
|
|
||||||
* StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) &
|
|
||||||
) &
|
|
||||||
* ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_pos &
|
|
||||||
+ prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName &
|
|
||||||
) &
|
|
||||||
- tau_pos * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal &
|
|
||||||
+ prm%omega * prm%B *effectiveLength **2.0_pReal&
|
|
||||||
* (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 &
|
|
||||||
*StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )&
|
|
||||||
) &
|
|
||||||
) &
|
|
||||||
/(2.0_pReal*prm%burgers**2.0_pReal*tau_pos &
|
|
||||||
+ prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal
|
|
||||||
|
|
||||||
dgdot_dtau_pos = DotGamma0 * dvel* 0.5_pReal
|
dvel = -1.0_pReal * prm%kink_height * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
||||||
|
|
||||||
|
ddot_gamma_dtau_pos = dot_gamma_0 * dvel* 0.5_pReal
|
||||||
else where significantPositiveTau2
|
else where significantPositiveTau2
|
||||||
dgdot_dtau_pos = 0.0_pReal
|
ddot_gamma_dtau_pos = 0.0_pReal
|
||||||
end where significantPositiveTau2
|
end where significantPositiveTau2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
significantNegativeTau: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
|
significantNegativeTau: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
|
||||||
StressRatio = (abs(tau_neg)-dst%threshold_stress(:,of))/prm%tau0
|
StressRatio = (abs(tau_neg)-dst%threshold_stress(:,of))/prm%tau_0
|
||||||
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)
|
||||||
needsGoodName = exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)
|
needsGoodName = exp(-BoltzmannRatio*(1-StressRatio_p) ** prm%q)
|
||||||
|
|
||||||
vel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega &
|
t_n = prm%b_sl/(needsGoodName*prm%omega*effectiveLength)
|
||||||
* effectiveLength * tau_neg * needsGoodName &
|
t_k = effectiveLength * prm%B /(2.0_pReal*prm%b_sl*tau_pos) ! our definition of tk is different with the one in dislotwin
|
||||||
/ ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_neg &
|
|
||||||
+ prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName &
|
|
||||||
)
|
|
||||||
|
|
||||||
gdot_neg = DotGamma0 * sign(vel,tau_neg) * 0.5_pReal
|
vel = prm%kink_height/(t_n + t_k)
|
||||||
|
|
||||||
|
dot_gamma_neg = dot_gamma_0 * sign(vel,tau_neg) * 0.5_pReal
|
||||||
else where significantNegativeTau
|
else where significantNegativeTau
|
||||||
gdot_neg = 0.0_pReal
|
dot_gamma_neg = 0.0_pReal
|
||||||
end where significantNegativeTau
|
end where significantNegativeTau
|
||||||
|
|
||||||
if (present(dgdot_dtau_neg)) then
|
if (present(ddot_gamma_dtau_neg)) then
|
||||||
significantNegativeTau2: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
|
significantNegativeTau2: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
|
||||||
dvel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength &
|
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_0
|
||||||
(needsGoodName + tau_neg * abs(needsGoodName)*BoltzmannRatio*prm%p &
|
dtk = -1.0_pReal * t_k / tau_neg
|
||||||
* prm%q/prm%tau0 &
|
|
||||||
* StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) &
|
|
||||||
) &
|
|
||||||
* ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_neg &
|
|
||||||
+ prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName &
|
|
||||||
) &
|
|
||||||
- tau_neg * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal &
|
|
||||||
+ prm%omega * prm%B *effectiveLength **2.0_pReal&
|
|
||||||
* (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 &
|
|
||||||
*StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )&
|
|
||||||
) &
|
|
||||||
) &
|
|
||||||
/(2.0_pReal*prm%burgers**2.0_pReal*tau_neg &
|
|
||||||
+ prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal
|
|
||||||
|
|
||||||
dgdot_dtau_neg = DotGamma0 * dvel * 0.5_pReal
|
dvel = -1.0_pReal * prm%kink_height * (dtk + dtn) / (t_n + t_k)**2.0_pReal
|
||||||
|
|
||||||
|
ddot_gamma_dtau_neg = dot_gamma_0 * dvel * 0.5_pReal
|
||||||
else where significantNegativeTau2
|
else where significantNegativeTau2
|
||||||
dgdot_dtau_neg = 0.0_pReal
|
ddot_gamma_dtau_neg = 0.0_pReal
|
||||||
end where significantNegativeTau2
|
end where significantNegativeTau2
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue