simplified

This commit is contained in:
Martin Diehl 2018-11-30 08:25:23 +01:00
parent c4df2eeac4
commit 4e86d239de
1 changed files with 19 additions and 40 deletions

View File

@ -63,7 +63,8 @@ module plastic_disloUCLA
real(pReal) :: & real(pReal) :: &
aTolRho, & aTolRho, &
grainSize, & grainSize, &
SolidSolutionStrength !< Strength due to elements in solid solution SolidSolutionStrength, & !< Strength due to elements in solid solution
mu
real(pReal), allocatable, dimension(:) :: & real(pReal), allocatable, dimension(:) :: &
B, & !< friction coeff. B (kMC) B, & !< friction coeff. B (kMC)
rho0, & !< initial edge dislocation density per slip system for each family and instance rho0, & !< initial edge dislocation density per slip system for each family and instance
@ -242,6 +243,7 @@ do p = 1_pInt, size(phase_plasticityInstance)
stt => state(phase_plasticityInstance(p))) stt => state(phase_plasticityInstance(p)))
structure = config_phase(p)%getString('lattice_structure') structure = config_phase(p)%getString('lattice_structure')
prm%mu = lattice_mu(p)
prm%aTolRho = config_phase(p)%getFloat('atol_rho') prm%aTolRho = config_phase(p)%getFloat('atol_rho')
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -306,6 +308,7 @@ do p = 1_pInt, size(phase_plasticityInstance)
prm%clambda = math_expand(prm%clambda, prm%Nslip) prm%clambda = math_expand(prm%clambda, prm%Nslip)
instance = phase_plasticityInstance(p) instance = phase_plasticityInstance(p)
plastic_disloUCLA_totalNslip(instance) = prm%totalNslip
if (plastic_disloUCLA_CAtomicVolume(instance) <= 0.0_pReal) & if (plastic_disloUCLA_CAtomicVolume(instance) <= 0.0_pReal) &
call IO_error(211_pInt,el=instance,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOUCLA_label//')') call IO_error(211_pInt,el=instance,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOUCLA_label//')')
if (plastic_disloUCLA_D0(instance) <= 0.0_pReal) & if (plastic_disloUCLA_D0(instance) <= 0.0_pReal) &
@ -418,10 +421,7 @@ plastic_disloUCLA_Noutput(phase_plasticityInstance(p)) = plastic_disloUCLA_Noutp
sanityChecks: do phase = 1_pInt, size(phase_plasticity) sanityChecks: do phase = 1_pInt, size(phase_plasticity)
myPhase: if (phase_plasticity(phase) == PLASTICITY_disloUCLA_ID) then myPhase: if (phase_plasticity(phase) == PLASTICITY_disloUCLA_ID) then
instance = phase_plasticityInstance(phase) instance = phase_plasticityInstance(phase)
if (sum(plastic_disloUCLA_Nslip(:,instance)) < 0_pInt) &
call IO_error(211_pInt,el=instance,ext_msg='Nslip ('//PLASTICITY_DISLOUCLA_label//')')
do f = 1_pInt,lattice_maxNslipFamily do f = 1_pInt,lattice_maxNslipFamily
if (plastic_disloUCLA_Nslip(f,instance) > 0_pInt) then
!if (plastic_disloUCLA_rhoEdge0(f,instance) < 0.0_pReal) & !if (plastic_disloUCLA_rhoEdge0(f,instance) < 0.0_pReal) &
! call IO_error(211_pInt,el=instance,ext_msg='rhoEdge0 ('//PLASTICITY_DISLOUCLA_label//')') ! call IO_error(211_pInt,el=instance,ext_msg='rhoEdge0 ('//PLASTICITY_DISLOUCLA_label//')')
!if (plastic_disloUCLA_rhoEdgeDip0(f,instance) < 0.0_pReal) & !if (plastic_disloUCLA_rhoEdgeDip0(f,instance) < 0.0_pReal) &
@ -432,12 +432,10 @@ plastic_disloUCLA_Noutput(phase_plasticityInstance(p)) = plastic_disloUCLA_Noutp
! call IO_error(211_pInt,el=instance,ext_msg='v0 ('//PLASTICITY_DISLOUCLA_label//')') ! call IO_error(211_pInt,el=instance,ext_msg='v0 ('//PLASTICITY_DISLOUCLA_label//')')
!if (plastic_disloUCLA_tau_peierlsPerSlipFamily(f,instance) < 0.0_pReal) & !if (plastic_disloUCLA_tau_peierlsPerSlipFamily(f,instance) < 0.0_pReal) &
! call IO_error(211_pInt,el=instance,ext_msg='tau_peierls ('//PLASTICITY_DISLOUCLA_label//')') ! call IO_error(211_pInt,el=instance,ext_msg='tau_peierls ('//PLASTICITY_DISLOUCLA_label//')')
endif
enddo enddo
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! Determine total number of active slip systems ! Determine total number of active slip systems
plastic_disloUCLA_Nslip(:,instance) = min(lattice_NslipSystem(:,phase),plastic_disloUCLA_Nslip(:,instance)) plastic_disloUCLA_Nslip(:,instance) = min(lattice_NslipSystem(:,phase),plastic_disloUCLA_Nslip(:,instance))
plastic_disloUCLA_totalNslip(instance) = sum(plastic_disloUCLA_Nslip(:,instance))
endif myPhase endif myPhase
enddo sanityChecks enddo sanityChecks
@ -476,13 +474,13 @@ plastic_disloUCLA_Noutput(phase_plasticityInstance(p)) = plastic_disloUCLA_Noutp
!* Process slip related parameters ------------------------------------------------ !* Process slip related parameters ------------------------------------------------
mySlipFamilies: do f = 1_pInt,size(prm%Nslip,1) mySlipFamilies: do f = 1_pInt,size(prm%Nslip,1)
index_myFamily = sum(plastic_disloUCLA_Nslip(1:f-1_pInt,instance)) ! index in truncated slip system list index_myFamily = sum(prm%Nslip(1:f-1_pInt)) ! index in truncated slip system list
mySlipSystems: do j = 1_pInt,plastic_disloUCLA_Nslip(f,instance) mySlipSystems: do j = 1_pInt,prm%Nslip(f)
!* Calculation of forest projections for edge dislocations !* Calculation of forest projections for edge dislocations
otherSlipFamilies: do o = 1_pInt,size(prm%Nslip,1) otherSlipFamilies: do o = 1_pInt,size(prm%Nslip,1)
index_otherFamily = sum(plastic_disloUCLA_Nslip(1:o-1_pInt,instance)) index_otherFamily = sum(prm%Nslip(1:o-1_pInt))
otherSlipSystems: do k = 1_pInt,plastic_disloUCLA_Nslip(o,instance) otherSlipSystems: do k = 1_pInt,prm%Nslip(o)
plastic_disloUCLA_forestProjectionEdge(index_myFamily+j,index_otherFamily+k,instance) = & plastic_disloUCLA_forestProjectionEdge(index_myFamily+j,index_otherFamily+k,instance) = &
abs(math_mul3x3(lattice_sn(:,sum(lattice_NslipSystem(1:f-1,phase))+j,phase), & abs(math_mul3x3(lattice_sn(:,sum(lattice_NslipSystem(1:f-1,phase))+j,phase), &
lattice_st(:,sum(lattice_NslipSystem(1:o-1,phase))+k,phase))) lattice_st(:,sum(lattice_NslipSystem(1:o-1,phase))+k,phase)))
@ -535,8 +533,6 @@ subroutine plastic_disloUCLA_microstructure(temperature,ipc,ip,el)
phase_plasticityInstance, & phase_plasticityInstance, &
phaseAt, phasememberAt, & phaseAt, phasememberAt, &
material_phase material_phase
use lattice, only: &
lattice_mu
implicit none implicit none
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
@ -549,13 +545,11 @@ subroutine plastic_disloUCLA_microstructure(temperature,ipc,ip,el)
integer(pInt) :: & integer(pInt) :: &
instance, & instance, &
ns,s, & ns,s, &
ph, &
of of
real(pReal), dimension(plastic_disloUCLA_totalNslip(phase_plasticityInstance(material_phase(ipc,ip,el)))) :: & real(pReal), dimension(plastic_disloUCLA_totalNslip(phase_plasticityInstance(material_phase(ipc,ip,el)))) :: &
invLambdaSlip invLambdaSlip
!* Shortened notation !* Shortened notation
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
ph = phaseAt(ipc,ip,el)
instance = phase_plasticityInstance(phaseAt(ipc,ip,el)) instance = phase_plasticityInstance(phaseAt(ipc,ip,el))
ns = plastic_disloUCLA_totalNslip(instance) ns = plastic_disloUCLA_totalNslip(instance)
@ -575,7 +569,7 @@ subroutine plastic_disloUCLA_microstructure(temperature,ipc,ip,el)
!* threshold stress for dislocation motion !* threshold stress for dislocation motion
forall (s = 1_pInt:ns) & forall (s = 1_pInt:ns) &
mse%threshold_stress(s,of) = & mse%threshold_stress(s,of) = &
lattice_mu(ph)*prm%burgers(s)*& prm%mu*prm%burgers(s)*&
sqrt(dot_product(stt%rhoEdge(1_pInt:ns,of)+stt%rhoEdgeDip(1_pInt:ns,of),& sqrt(dot_product(stt%rhoEdge(1_pInt:ns,of)+stt%rhoEdgeDip(1_pInt:ns,of),&
prm%interaction_SlipSlip(s,1:ns))) prm%interaction_SlipSlip(s,1:ns)))
end associate end associate
@ -644,10 +638,6 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
phase_plasticityInstance, & phase_plasticityInstance, &
plasticState, & plasticState, &
phaseAt, phasememberAt phaseAt, phasememberAt
use lattice, only: &
lattice_maxNslipFamily, &
lattice_NslipSystem, &
lattice_mu
implicit none implicit none
real(pReal), dimension(3,3), intent(in):: & real(pReal), dimension(3,3), intent(in):: &
@ -659,8 +649,7 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
ip, & !< integration point ip, & !< integration point
el !< element el !< element
integer(pInt) :: instance,ns,f,i,j,index_myFamily, & integer(pInt) :: instance,ns,f,i,j, &
ph, &
of of
real(pReal) :: & real(pReal) :: &
EdgeDipMinDistance,& EdgeDipMinDistance,&
@ -681,22 +670,17 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
!* Shortened notation !* Shortened notation
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
ph = phaseAt(ipc,ip,el) instance = phase_plasticityInstance(phaseAt(ipc,ip,el))
instance = phase_plasticityInstance(ph)
ns = plastic_disloUCLA_totalNslip(instance) ns = plastic_disloUCLA_totalNslip(instance)
plasticState(ph)%dotState(:,of) = 0.0_pReal plasticState(phaseAt(ipc,ip,el))%dotState(:,of) = 0.0_pReal
associate(prm => param(instance), stt => state(instance),mse => microstructure(instance)) associate(prm => param(instance), stt => state(instance),mse => microstructure(instance))
!* Dislocation density evolution !* Dislocation density evolution
call kinetics(Mp,Temperature,instance,of, & call kinetics(Mp,Temperature,instance,of, &
gdot_slip_pos,dgdot_dtauslip_pos,tau_slip_pos,gdot_slip_neg,dgdot_dtauslip_neg,tau_slip_neg) gdot_slip_pos,dgdot_dtauslip_pos,tau_slip_pos,gdot_slip_neg,dgdot_dtauslip_neg,tau_slip_neg)
dotState(instance)%accshear_slip(:,of) = (gdot_slip_pos+gdot_slip_neg)*0.5_pReal dotState(instance)%accshear_slip(:,of) = (gdot_slip_pos+gdot_slip_neg)*0.5_pReal
j = 0_pInt do j = 1_pInt, prm%totalNslip
slipFamilies: do f = 1_pInt,lattice_maxNslipFamily
index_myFamily = sum(lattice_NslipSystem(1:f-1_pInt,ph)) ! at which index starts my family
slipSystems: do i = 1_pInt,plastic_disloUCLA_Nslip(f,instance)
j = j+1_pInt
!* Multiplication !* Multiplication
DotRhoMultiplication = abs(dotState(instance)%accshear_slip(j,of))/& DotRhoMultiplication = abs(dotState(instance)%accshear_slip(j,of))/&
@ -710,7 +694,7 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
DotRhoDipFormation = 0.0_pReal DotRhoDipFormation = 0.0_pReal
else else
EdgeDipDistance = & EdgeDipDistance = &
(3.0_pReal*lattice_mu(ph)*prm%burgers(j))/& (3.0_pReal*prm%mu*prm%burgers(j))/&
(16.0_pReal*pi*abs(tau_slip_pos(j))) (16.0_pReal*pi*abs(tau_slip_pos(j)))
if (EdgeDipDistance>mse%mfp(j,of)) EdgeDipDistance=mse%mfp(j,of) if (EdgeDipDistance>mse%mfp(j,of)) EdgeDipDistance=mse%mfp(j,of)
if (EdgeDipDistance<EdgeDipMinDistance) EdgeDipDistance=EdgeDipMinDistance if (EdgeDipDistance<EdgeDipMinDistance) EdgeDipDistance=EdgeDipMinDistance
@ -738,7 +722,7 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
DotRhoEdgeDipClimb = 0.0_pReal DotRhoEdgeDipClimb = 0.0_pReal
else else
ClimbVelocity = & ClimbVelocity = &
((3.0_pReal*lattice_mu(ph)*VacancyDiffusion*AtomicVolume)/(2.0_pReal*pi*kB*Temperature))*& ((3.0_pReal*prm%mu*VacancyDiffusion*AtomicVolume)/(2.0_pReal*pi*kB*Temperature))*&
(1/(EdgeDipDistance+EdgeDipMinDistance)) (1/(EdgeDipDistance+EdgeDipMinDistance))
DotRhoEdgeDipClimb = & DotRhoEdgeDipClimb = &
(4.0_pReal*ClimbVelocity*stt%rhoEdgeDip(j,of))/(EdgeDipDistance-EdgeDipMinDistance) (4.0_pReal*ClimbVelocity*stt%rhoEdgeDip(j,of))/(EdgeDipDistance-EdgeDipMinDistance)
@ -753,8 +737,7 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,ipc,ip,el)
DotRhoDipFormation-DotRhoEdgeDipAnnihilation-DotRhoEdgeDipClimb DotRhoDipFormation-DotRhoEdgeDipAnnihilation-DotRhoEdgeDipClimb
enddo slipSystems enddo
enddo slipFamilies
end associate end associate
end subroutine plastic_disloUCLA_dotState end subroutine plastic_disloUCLA_dotState
@ -775,8 +758,6 @@ math_mul33xx33
phase_plasticityInstance,& phase_plasticityInstance,&
!plasticState, & !plasticState, &
phaseAt, phasememberAt phaseAt, phasememberAt
use lattice, only: &
lattice_mu
implicit none implicit none
real(pReal), dimension(3,3), intent(in) :: & real(pReal), dimension(3,3), intent(in) :: &
@ -795,15 +776,13 @@ math_mul33xx33
instance,& instance,&
ns,& ns,&
o,i,c,j,& o,i,c,j,&
ph, &
of of
real(pReal), dimension(plastic_disloUCLA_totalNslip(phase_plasticityInstance(material_phase(ipc,ip,el)))) :: & real(pReal), dimension(plastic_disloUCLA_totalNslip(phase_plasticityInstance(material_phase(ipc,ip,el)))) :: &
gdot_slip_pos,dgdot_dtauslip_pos,tau_slip_pos,gdot_slip_neg,dgdot_dtauslip_neg,tau_slip_neg gdot_slip_pos,dgdot_dtauslip_pos,tau_slip_pos,gdot_slip_neg,dgdot_dtauslip_neg,tau_slip_neg
!* Shortened notation !* Shortened notation
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
ph = phaseAt(ipc,ip,el) instance = phase_plasticityInstance(phaseAt(ipc,ip,el))
instance = phase_plasticityInstance(ph)
ns = plastic_disloUCLA_totalNslip(instance) ns = plastic_disloUCLA_totalNslip(instance)
!* Required output !* Required output
@ -859,7 +838,7 @@ math_mul33xx33
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
if (dNeq0(abs(math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j))))) then if (dNeq0(abs(math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j))))) then
postResults(c+j) = & postResults(c+j) = &
(3.0_pReal*lattice_mu(ph)*prm%burgers(j))/& (3.0_pReal*prm%mu*prm%burgers(j))/&
(16.0_pReal*pi*abs(math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j)))) (16.0_pReal*pi*abs(math_mul33xx33(Mp,prm%nonSchmid_pos(1:3,1:3,j))))
else else
postResults(c+j) = huge(1.0_pReal) postResults(c+j) = huge(1.0_pReal)
@ -894,7 +873,7 @@ math_mul33xx33
instance,of instance,of
integer(pInt) :: & integer(pInt) :: &
f,i,j,index_myFamily i,j
real(pReal) :: StressRatio_p,StressRatio_pminus1,& real(pReal) :: StressRatio_p,StressRatio_pminus1,&
BoltzmannRatio,DotGamma0,stressRatio,& BoltzmannRatio,DotGamma0,stressRatio,&
dvel_slip, vel_slip dvel_slip, vel_slip