Merge branch 'NewStyleKinematicHardening-3' into development

This commit is contained in:
Martin Diehl 2019-01-08 01:12:05 +01:00
commit 070952dbb8
6 changed files with 721 additions and 1041 deletions

View File

@ -150,7 +150,7 @@ subroutine constitutive_init()
if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init if (any(phase_plasticity == PLASTICITY_NONE_ID)) call plastic_none_init
if (any(phase_plasticity == PLASTICITY_ISOTROPIC_ID)) call plastic_isotropic_init if (any(phase_plasticity == PLASTICITY_ISOTROPIC_ID)) call plastic_isotropic_init
if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init if (any(phase_plasticity == PLASTICITY_PHENOPOWERLAW_ID)) call plastic_phenopowerlaw_init
if (any(phase_plasticity == PLASTICITY_KINEHARDENING_ID)) call plastic_kinehardening_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_KINEHARDENING_ID)) call plastic_kinehardening_init
if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call plastic_dislotwin_init(FILEUNIT) if (any(phase_plasticity == PLASTICITY_DISLOTWIN_ID)) call plastic_dislotwin_init(FILEUNIT)
if (any(phase_plasticity == PLASTICITY_DISLOUCLA_ID)) call plastic_disloucla_init if (any(phase_plasticity == PLASTICITY_DISLOUCLA_ID)) call plastic_disloucla_init
if (any(phase_plasticity == PLASTICITY_NONLOCAL_ID)) then if (any(phase_plasticity == PLASTICITY_NONLOCAL_ID)) then
@ -490,8 +490,9 @@ subroutine constitutive_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, S6, Fi, ipc, ip, e
call plastic_phenopowerlaw_LpAndItsTangent (Lp,dLp_dMp,Mp,instance,of) call plastic_phenopowerlaw_LpAndItsTangent (Lp,dLp_dMp,Mp,instance,of)
case (PLASTICITY_KINEHARDENING_ID) plasticityType case (PLASTICITY_KINEHARDENING_ID) plasticityType
call plastic_kinehardening_LpAndItsTangent (Lp,dLp_dMp99, math_Mandel33to6(Mp),ipc,ip,el) of = phasememberAt(ipc,ip,el)
dLp_dMp = math_Plain99to3333(dLp_dMp99) ! ToDo: We revert here the last statement in plastic_xx_LpAndItsTanget instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_LpAndItsTangent (Lp,dLp_dMp, Mp,instance,of)
case (PLASTICITY_NONLOCAL_ID) plasticityType case (PLASTICITY_NONLOCAL_ID) plasticityType
call plastic_nonlocal_LpAndItsTangent (Lp,dLp_dMp99, math_Mandel33to6(Mp), & call plastic_nonlocal_LpAndItsTangent (Lp,dLp_dMp99, math_Mandel33to6(Mp), &
@ -874,7 +875,9 @@ subroutine constitutive_collectDotState(S6, FeArray, Fi, FpArray, subdt, subfrac
call plastic_phenopowerlaw_dotState(Mp,instance,of) call plastic_phenopowerlaw_dotState(Mp,instance,of)
case (PLASTICITY_KINEHARDENING_ID) plasticityType case (PLASTICITY_KINEHARDENING_ID) plasticityType
call plastic_kinehardening_dotState(math_Mandel33to6(Mp),ipc,ip,el) of = phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_dotState(Mp,instance,of)
case (PLASTICITY_DISLOTWIN_ID) plasticityType case (PLASTICITY_DISLOTWIN_ID) plasticityType
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
@ -930,6 +933,8 @@ subroutine constitutive_collectDeltaState(S6, Fe, Fi, ipc, ip, el)
math_Mandel33to6, & math_Mandel33to6, &
math_mul33x33 math_mul33x33
use material, only: & use material, only: &
phasememberAt, &
phase_plasticityInstance, &
phase_plasticity, & phase_plasticity, &
phase_source, & phase_source, &
phase_Nsources, & phase_Nsources, &
@ -955,19 +960,22 @@ subroutine constitutive_collectDeltaState(S6, Fe, Fi, ipc, ip, el)
Fe, & !< elastic deformation gradient Fe, & !< elastic deformation gradient
Fi !< intermediate deformation gradient Fi !< intermediate deformation gradient
real(pReal), dimension(3,3) :: & real(pReal), dimension(3,3) :: &
Mstar Mp
integer(pInt) :: & integer(pInt) :: &
s !< counter in source loop s, & !< counter in source loop
instance, of
Mstar = math_mul33x33(math_mul33x33(transpose(Fi),Fi),math_Mandel6to33(S6)) Mp = math_mul33x33(math_mul33x33(transpose(Fi),Fi),math_Mandel6to33(S6))
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el))) plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_KINEHARDENING_ID) plasticityType case (PLASTICITY_KINEHARDENING_ID) plasticityType
call plastic_kinehardening_deltaState(math_Mandel33to6(Mstar),ipc,ip,el) of = phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
call plastic_kinehardening_deltaState(Mp,instance,of)
case (PLASTICITY_NONLOCAL_ID) plasticityType case (PLASTICITY_NONLOCAL_ID) plasticityType
call plastic_nonlocal_deltaState(math_Mandel33to6(Mstar),ip,el) call plastic_nonlocal_deltaState(math_Mandel33to6(Mp),ip,el)
end select plasticityType end select plasticityType
@ -1090,8 +1098,10 @@ function constitutive_postResults(S6, Fi, FeArray, ipc, ip, el)
plastic_phenopowerlaw_postResults(Mp,instance,of) plastic_phenopowerlaw_postResults(Mp,instance,of)
case (PLASTICITY_KINEHARDENING_ID) plasticityType case (PLASTICITY_KINEHARDENING_ID) plasticityType
of = phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
constitutive_postResults(startPos:endPos) = & constitutive_postResults(startPos:endPos) = &
plastic_kinehardening_postResults(S6,ipc,ip,el) plastic_kinehardening_postResults(Mp,instance,of)
case (PLASTICITY_DISLOTWIN_ID) plasticityType case (PLASTICITY_DISLOTWIN_ID) plasticityType
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)

View File

@ -63,8 +63,7 @@ module plastic_disloUCLA
interaction_SlipSlip, & !< slip resistance from slip activity interaction_SlipSlip, & !< slip resistance from slip activity
forestProjectionEdge forestProjectionEdge
real(pReal), allocatable, dimension(:,:,:) :: & real(pReal), allocatable, dimension(:,:,:) :: &
Schmid_slip, & Schmid, &
Schmid_twin, &
nonSchmid_pos, & nonSchmid_pos, &
nonSchmid_neg nonSchmid_neg
integer(pInt) :: & integer(pInt) :: &
@ -77,13 +76,11 @@ module plastic_disloUCLA
dipoleformation dipoleformation
end type !< container type for internal constitutive parameters end type !< container type for internal constitutive parameters
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type, private :: tDisloUCLAState type, private :: tDisloUCLAState
real(pReal), pointer, dimension(:,:) :: & real(pReal), pointer, dimension(:,:) :: &
rhoEdge, & rhoEdge, &
rhoEdgeDip, & rhoEdgeDip, &
accshear_slip accshear
end type end type
type, private :: tDisloUCLAdependentState type, private :: tDisloUCLAdependentState
@ -93,6 +90,8 @@ module plastic_disloUCLA
threshold_stress threshold_stress
end type tDisloUCLAdependentState end type tDisloUCLAdependentState
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type(tDisloUCLAState ), allocatable, dimension(:), private :: & type(tDisloUCLAState ), allocatable, dimension(:), private :: &
dotState, & dotState, &
state state
@ -110,6 +109,7 @@ module plastic_disloUCLA
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief module initialization !> @brief module initialization
!> @details reads in material parameters, allocates arrays, and does sanity checks !> @details reads in material parameters, allocates arrays, and does sanity checks
@ -152,7 +152,7 @@ subroutine plastic_disloUCLA_init()
f,j,k,o, & f,j,k,o, &
Ninstance, & Ninstance, &
p, i, & p, i, &
NipcMyPhase, outputSize, & NipcMyPhase, &
sizeState, sizeDotState, & sizeState, sizeDotState, &
startIndex, endIndex startIndex, endIndex
@ -213,7 +213,7 @@ subroutine plastic_disloUCLA_init()
prm%Nslip = config%getInts('nslip',defaultVal=emptyIntArray) prm%Nslip = config%getInts('nslip',defaultVal=emptyIntArray)
prm%totalNslip = sum(prm%Nslip) prm%totalNslip = sum(prm%Nslip)
slipActive: if (prm%totalNslip > 0_pInt) then slipActive: if (prm%totalNslip > 0_pInt) then
prm%Schmid_slip = lattice_SchmidMatrix_slip(prm%Nslip,structure(1:3),& prm%Schmid = lattice_SchmidMatrix_slip(prm%Nslip,structure(1:3),&
config%getFloat('c/a',defaultVal=0.0_pReal)) config%getFloat('c/a',defaultVal=0.0_pReal))
if(structure=='bcc') then if(structure=='bcc') then
prm%nonSchmidCoeff = config%getFloats('nonschmid_coefficients',& prm%nonSchmidCoeff = config%getFloats('nonschmid_coefficients',&
@ -221,8 +221,8 @@ subroutine plastic_disloUCLA_init()
prm%nonSchmid_pos = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,+1_pInt) prm%nonSchmid_pos = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,+1_pInt)
prm%nonSchmid_neg = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,-1_pInt) prm%nonSchmid_neg = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,-1_pInt)
else else
prm%nonSchmid_pos = prm%Schmid_slip prm%nonSchmid_pos = prm%Schmid
prm%nonSchmid_neg = prm%Schmid_slip prm%nonSchmid_neg = prm%Schmid
endif endif
prm%interaction_SlipSlip = lattice_interaction_SlipSlip(prm%Nslip, & prm%interaction_SlipSlip = lattice_interaction_SlipSlip(prm%Nslip, &
config%getFloats('interaction_slipslip'), & config%getFloats('interaction_slipslip'), &
@ -272,17 +272,17 @@ subroutine plastic_disloUCLA_init()
prm%tau0 = prm%tau_peierls + prm%SolidSolutionStrength prm%tau0 = prm%tau_peierls + prm%SolidSolutionStrength
! sanity checks ! sanity checks
if ( prm%D0 <= 0.0_pReal) extmsg = trim(extmsg)//' d0'
if ( prm%Qsd <= 0.0_pReal) extmsg = trim(extmsg)//' qsd'
if (any(prm%rho0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0' if (any(prm%rho0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0'
if (any(prm%rhoDip0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedgedip0' if (any(prm%rhoDip0 < 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%burgers <= 0.0_pReal)) extmsg = trim(extmsg)//' slipburgers'
if (any(prm%H0kp <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge' if (any(prm%H0kp <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge'
if (any(prm%tau_peierls < 0.0_pReal)) extmsg = trim(extmsg)//' tau_peierls' if (any(prm%tau_peierls < 0.0_pReal)) extmsg = trim(extmsg)//' tau_peierls'
if ( prm%D0 <= 0.0_pReal) extmsg = trim(extmsg)//' d0' if (any(prm%minDipDistance <= 0.0_pReal)) extmsg = trim(extmsg)//' cedgedipmindistance or slipburgers'
if ( prm%Qsd <= 0.0_pReal) extmsg = trim(extmsg)//' qsd' if (any(prm%atomicVolume <= 0.0_pReal)) extmsg = trim(extmsg)//' catomicvolume or slipburgers'
!if (plastic_disloUCLA_CAtomicVolume(instance) <= 0.0_pReal) &
! call IO_error(211_pInt,el=instance,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOUCLA_label//')')
else slipActive else slipActive
allocate(prm%rho0(0)) allocate(prm%rho0(0))
allocate(prm%rhoDip0(0)) allocate(prm%rhoDip0(0))
@ -299,7 +299,6 @@ subroutine plastic_disloUCLA_init()
allocate(prm%outputID(0)) allocate(prm%outputID(0))
do i=1_pInt, size(outputs) do i=1_pInt, size(outputs)
outputID = undefined_ID outputID = undefined_ID
outputSize = prm%totalNslip
select case(trim(outputs(i))) select case(trim(outputs(i)))
case ('edge_density') case ('edge_density')
@ -321,7 +320,7 @@ subroutine plastic_disloUCLA_init()
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)) = outputSize plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
prm%outputID = [prm%outputID, outputID] prm%outputID = [prm%outputID, outputID]
endif endif
@ -329,7 +328,7 @@ 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 = int(size(['rhoEdge ','rhoEdgeDip ','accshearslip']),pInt) * prm%totalNslip
sizeState = sizeDotState sizeState = sizeDotState
@ -373,9 +372,9 @@ subroutine plastic_disloUCLA_init()
startIndex = endIndex + 1_pInt startIndex = endIndex + 1_pInt
endIndex = endIndex + prm%totalNslip endIndex = endIndex + prm%totalNslip
stt%accshear_slip=>plasticState(p)%state(startIndex:endIndex,:) stt%accshear=>plasticState(p)%state(startIndex:endIndex,:)
dot%accshear_slip=>plasticState(p)%dotState(startIndex:endIndex,:) dot%accshear=>plasticState(p)%dotState(startIndex:endIndex,:)
plasticState(p)%aTolState(startIndex:endIndex) = 1e6_pReal plasticState(p)%aTolState(startIndex:endIndex) = 1e6_pReal !ToDo: better make optional parameter
! 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,:)
@ -393,36 +392,6 @@ subroutine plastic_disloUCLA_init()
end subroutine plastic_disloUCLA_init end subroutine plastic_disloUCLA_init
!--------------------------------------------------------------------------------------------------
!> @brief calculates derived quantities from state
!--------------------------------------------------------------------------------------------------
subroutine plastic_disloUCLA_dependentState(instance,of)
implicit none
integer(pInt), intent(in) :: instance, of
integer(pInt) :: &
i
associate(prm => param(instance), stt => state(instance),dst => dependentState(instance))
forall (i = 1_pInt:prm%totalNslip)
dst%dislocationSpacing(i,of) = sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
prm%forestProjectionEdge(:,i)))
dst%threshold_stress(i,of) = prm%mu*prm%burgers(i) &
* sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
prm%interaction_SlipSlip(i,:)))
end forall
dst%mfp(:,of) = prm%grainSize/(1.0_pReal+prm%grainSize*dst%dislocationSpacing(:,of)/prm%Clambda)
dst%dislocationSpacing(:,of) = dst%mfp(:,of) ! ToDo: Hack to recover wrong behavior for the moment
end associate
end subroutine plastic_disloUCLA_dependentState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculates plastic velocity gradient and its tangent !> @brief calculates plastic velocity gradient and its tangent
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -445,22 +414,22 @@ pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp,Mp,Temperature,inst
integer(pInt) :: & integer(pInt) :: &
i,k,l,m,n i,k,l,m,n
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
dgdot_dtauslip_pos,dgdot_dtauslip_neg, & gdot_pos,gdot_neg, &
gdot_slip_pos,gdot_slip_neg dgdot_dtau_pos,dgdot_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_slip_pos,gdot_slip_neg,dgdot_dtauslip_pos,dgdot_dtauslip_neg) call kinetics(Mp,Temperature,instance,of,gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
slipSystems: do i = 1_pInt, prm%totalNslip do i = 1_pInt, prm%totalNslip
Lp = Lp + (gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i) Lp = Lp + (gdot_pos(i)+gdot_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_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
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_dtauslip_pos(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_pos(m,n,i) & + dgdot_dtau_pos(i) * prm%Schmid(k,l,i) * prm%nonSchmid_pos(m,n,i) &
+ dgdot_dtauslip_neg(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_neg(m,n,i) + dgdot_dtau_neg(i) * prm%Schmid(k,l,i) * prm%nonSchmid_neg(m,n,i)
enddo slipSystems enddo
end associate end associate
@ -479,39 +448,40 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
math_clip math_clip
implicit none implicit none
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 temperature !< temperature
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
instance, of instance, &
of
real(pReal) :: & real(pReal) :: &
VacancyDiffusion VacancyDiffusion
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
gdot_slip_pos, gdot_slip_neg,& gdot_pos, gdot_neg,&
tau_slip_pos,& tau_pos,&
tau_slip_neg, & tau_neg, &
DotRhoDipFormation, ClimbVelocity, EdgeDipDistance, & DotRhoDipFormation, ClimbVelocity, EdgeDipDistance, &
DotRhoEdgeDipClimb DotRhoEdgeDipClimb
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,Temperature,instance,of,&
gdot_slip_pos,gdot_slip_neg, & gdot_pos,gdot_neg, &
tau_slip_pos1 = tau_slip_pos,tau_slip_neg1 = tau_slip_neg) tau_pos1 = tau_pos,tau_neg1 = tau_neg)
dot%accshear_slip(:,of) = (gdot_slip_pos+gdot_slip_neg) ! ToDo: needs to be abs dot%accshear(:,of) = (gdot_pos+gdot_neg) ! ToDo: needs to be abs
VacancyDiffusion = prm%D0*exp(-prm%Qsd/(kB*Temperature)) VacancyDiffusion = prm%D0*exp(-prm%Qsd/(kB*Temperature))
where(dEq0(tau_slip_pos)) ! ToDo: use avg of pos and neg where(dEq0(tau_pos)) ! ToDo: use avg of pos and neg
DotRhoDipFormation = 0.0_pReal DotRhoDipFormation = 0.0_pReal
DotRhoEdgeDipClimb = 0.0_pReal DotRhoEdgeDipClimb = 0.0_pReal
else where else where
EdgeDipDistance = math_clip((3.0_pReal*prm%mu*prm%burgers)/(16.0_pReal*PI*abs(tau_slip_pos)), & EdgeDipDistance = math_clip((3.0_pReal*prm%mu*prm%burgers)/(16.0_pReal*PI*abs(tau_pos)), &
prm%minDipDistance, & ! lower limit prm%minDipDistance, & ! lower limit
dst%mfp(:,of)) ! upper limit dst%mfp(:,of)) ! upper limit
DotRhoDipFormation = merge(((2.0_pReal*EdgeDipDistance)/prm%burgers)* stt%rhoEdge(:,of)*abs(dot%accshear_slip(:,of)), & ! ToDo: ignore region of spontaneous annihilation DotRhoDipFormation = merge(((2.0_pReal*EdgeDipDistance)/prm%burgers)* stt%rhoEdge(:,of)*abs(dot%accshear(:,of)), & ! 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)) & ClimbVelocity = (3.0_pReal*prm%mu*VacancyDiffusion*prm%atomicVolume/(2.0_pReal*pi*kB*Temperature)) &
@ -519,11 +489,11 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
DotRhoEdgeDipClimb = (4.0_pReal*ClimbVelocity*stt%rhoEdgeDip(:,of))/(EdgeDipDistance-prm%minDipDistance) ! ToDo: Discuss with Franz: Stress dependency? DotRhoEdgeDipClimb = (4.0_pReal*ClimbVelocity*stt%rhoEdgeDip(:,of))/(EdgeDipDistance-prm%minDipDistance) ! ToDo: Discuss with Franz: Stress dependency?
end where end where
dot%rhoEdge(:,of) = abs(dot%accshear_slip(:,of))/(prm%burgers*dst%mfp(:,of)) & ! multiplication dot%rhoEdge(:,of) = abs(dot%accshear(:,of))/(prm%burgers*dst%mfp(:,of)) & ! multiplication
- DotRhoDipFormation & - DotRhoDipFormation &
- (2.0_pReal*prm%minDipDistance)/prm%burgers*stt%rhoEdge(:,of)*abs(dot%accshear_slip(:,of)) !* Spontaneous annihilation of 2 single edge dislocations - (2.0_pReal*prm%minDipDistance)/prm%burgers*stt%rhoEdge(:,of)*abs(dot%accshear(:,of)) !* Spontaneous annihilation of 2 single edge dislocations
dot%rhoEdgeDip(:,of) = DotRhoDipFormation & dot%rhoEdgeDip(:,of) = DotRhoDipFormation &
- (2.0_pReal*prm%minDipDistance)/prm%burgers*stt%rhoEdgeDip(:,of)*abs(dot%accshear_slip(:,of)) & !* Spontaneous annihilation of a single edge dislocation with a dipole constituent - (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
- DotRhoEdgeDipClimb - DotRhoEdgeDipClimb
end associate end associate
@ -531,6 +501,37 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
end subroutine plastic_disloUCLA_dotState end subroutine plastic_disloUCLA_dotState
!--------------------------------------------------------------------------------------------------
!> @brief calculates derived quantities from state
!--------------------------------------------------------------------------------------------------
subroutine plastic_disloUCLA_dependentState(instance,of)
implicit none
integer(pInt), intent(in) :: &
instance, &
of
integer(pInt) :: &
i
associate(prm => param(instance), stt => state(instance),dst => dependentState(instance))
forall (i = 1_pInt:prm%totalNslip)
dst%dislocationSpacing(i,of) = sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
prm%forestProjectionEdge(:,i)))
dst%threshold_stress(i,of) = prm%mu*prm%burgers(i) &
* sqrt(dot_product(stt%rhoEdge(:,of)+stt%rhoEdgeDip(:,of), &
prm%interaction_SlipSlip(i,:)))
end forall
dst%mfp(:,of) = prm%grainSize/(1.0_pReal+prm%grainSize*dst%dislocationSpacing(:,of)/prm%Clambda)
dst%dislocationSpacing(:,of) = dst%mfp(:,of) ! ToDo: Hack to recover wrong behavior for the moment
end associate
end subroutine plastic_disloUCLA_dependentState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -556,7 +557,7 @@ function plastic_disloUCLA_postResults(Mp,Temperature,instance,of) result(postRe
integer(pInt) :: & integer(pInt) :: &
o,c,i o,c,i
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
gdot_slip_pos,gdot_slip_neg gdot_pos,gdot_neg
c = 0_pInt c = 0_pInt
@ -570,10 +571,10 @@ function plastic_disloUCLA_postResults(Mp,Temperature,instance,of) result(postRe
case (rhoDip_ID) case (rhoDip_ID)
postResults(c+1_pInt:c+prm%totalNslip) = stt%rhoEdgeDip(1_pInt:prm%totalNslip,of) postResults(c+1_pInt:c+prm%totalNslip) = stt%rhoEdgeDip(1_pInt:prm%totalNslip,of)
case (shearrate_ID) case (shearrate_ID)
call kinetics(Mp,Temperature,instance,of,gdot_slip_pos,gdot_slip_neg) call kinetics(Mp,Temperature,instance,of,gdot_pos,gdot_neg)
postResults(c+1:c+prm%totalNslip) = gdot_slip_pos + gdot_slip_neg postResults(c+1:c+prm%totalNslip) = gdot_pos + gdot_neg
case (accumulatedshear_ID) case (accumulatedshear_ID)
postResults(c+1_pInt:c+prm%totalNslip) = stt%accshear_slip(1_pInt:prm%totalNslip, of) postResults(c+1_pInt:c+prm%totalNslip) = stt%accshear(1_pInt:prm%totalNslip, of)
case (mfp_ID) case (mfp_ID)
postResults(c+1_pInt:c+prm%totalNslip) = dst%mfp(1_pInt:prm%totalNslip, of) postResults(c+1_pInt:c+prm%totalNslip) = dst%mfp(1_pInt:prm%totalNslip, of)
case (thresholdstress_ID) case (thresholdstress_ID)
@ -608,7 +609,7 @@ end function plastic_disloUCLA_postResults
! 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,Temperature,instance,of, &
gdot_slip_pos,gdot_slip_neg,dgdot_dtauslip_pos,dgdot_dtauslip_neg,tau_slip_pos1,tau_slip_neg1) gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg,tau_pos1,tau_neg1)
use prec, only: & use prec, only: &
tol_math_check, & tol_math_check, &
dEq, dNeq0 dEq, dNeq0
@ -626,119 +627,119 @@ pure subroutine kinetics(Mp,Temperature,instance,of, &
of of
real(pReal), intent(out), dimension(param(instance)%totalNslip) :: & real(pReal), intent(out), dimension(param(instance)%totalNslip) :: &
gdot_slip_pos, & gdot_pos, &
gdot_slip_neg gdot_neg
real(pReal), intent(out), optional, dimension(param(instance)%totalNslip) :: & real(pReal), intent(out), optional, dimension(param(instance)%totalNslip) :: &
dgdot_dtauslip_pos, & dgdot_dtau_pos, &
dgdot_dtauslip_neg, & dgdot_dtau_neg, &
tau_slip_pos1, & tau_pos1, &
tau_slip_neg1 tau_neg1
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
StressRatio, & StressRatio, &
StressRatio_p,StressRatio_pminus1, & StressRatio_p,StressRatio_pminus1, &
dvel_slip, vel_slip, & dvel, vel, &
tau_slip_pos,tau_slip_neg, & tau_pos,tau_neg, &
needsGoodName ! ToDo: @Karo: any idea? needsGoodName ! ToDo: @Karo: any idea?
integer(pInt) :: j integer(pInt) :: 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_pInt, prm%totalNslip
tau_slip_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_slip_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_slip_pos1)) tau_slip_pos1 = tau_slip_pos if (present(tau_pos1)) tau_pos1 = tau_pos
if (present(tau_slip_neg1)) tau_slip_neg1 = tau_slip_neg if (present(tau_neg1)) tau_neg1 = tau_neg
associate(BoltzmannRatio => prm%H0kp/(kB*Temperature), & associate(BoltzmannRatio => prm%H0kp/(kB*Temperature), &
DotGamma0 => stt%rhoEdge(:,of)*prm%burgers*prm%v0, & DotGamma0 => stt%rhoEdge(:,of)*prm%burgers*prm%v0, &
effectiveLength => dst%mfp(:,of) - prm%w) effectiveLength => dst%mfp(:,of) - prm%w)
significantPositiveTau: where(abs(tau_slip_pos)-dst%threshold_stress(:,of) > tol_math_check) significantPositiveTau: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
StressRatio = (abs(tau_slip_pos)-dst%threshold_stress(:,of))/prm%tau0 StressRatio = (abs(tau_pos)-dst%threshold_stress(:,of))/prm%tau0
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_slip = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega & vel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega &
* effectiveLength * tau_slip_pos * needsGoodName & * effectiveLength * tau_pos * needsGoodName &
/ ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_slip_pos & / ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_pos &
+ prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName & + prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName &
) )
gdot_slip_pos = DotGamma0 * sign(vel_slip,tau_slip_pos) * 0.5_pReal gdot_pos = DotGamma0 * sign(vel,tau_pos) * 0.5_pReal
else where significantPositiveTau else where significantPositiveTau
gdot_slip_pos = 0.0_pReal gdot_pos = 0.0_pReal
end where significantPositiveTau end where significantPositiveTau
if (present(dgdot_dtauslip_pos)) then if (present(dgdot_dtau_pos)) then
significantPositiveTau2: where(abs(tau_slip_pos)-dst%threshold_stress(:,of) > tol_math_check) significantPositiveTau2: where(abs(tau_pos)-dst%threshold_stress(:,of) > tol_math_check)
dvel_slip = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength & dvel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength &
* ( & * ( &
(needsGoodName + tau_slip_pos * abs(needsGoodName)*BoltzmannRatio*prm%p & (needsGoodName + tau_pos * abs(needsGoodName)*BoltzmannRatio*prm%p &
* prm%q/prm%tau0 & * prm%q/prm%tau0 &
* StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) & * StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) &
) & ) &
* ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_slip_pos & * ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_pos &
+ prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName & + prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName &
) & ) &
- tau_slip_pos * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal & - tau_pos * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal &
+ prm%omega * prm%B *effectiveLength **2.0_pReal& + prm%omega * prm%B *effectiveLength **2.0_pReal&
* (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 & * (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 &
*StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )& *StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )&
) & ) &
) & ) &
/(2.0_pReal*prm%burgers**2.0_pReal*tau_slip_pos & /(2.0_pReal*prm%burgers**2.0_pReal*tau_pos &
+ prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal + prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal
dgdot_dtauslip_pos = DotGamma0 * dvel_slip* 0.5_pReal dgdot_dtau_pos = DotGamma0 * dvel* 0.5_pReal
else where significantPositiveTau2 else where significantPositiveTau2
dgdot_dtauslip_pos = 0.0_pReal dgdot_dtau_pos = 0.0_pReal
end where significantPositiveTau2 end where significantPositiveTau2
endif endif
significantNegativeTau: where(abs(tau_slip_neg)-dst%threshold_stress(:,of) > tol_math_check) significantNegativeTau: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
StressRatio = (abs(tau_slip_neg)-dst%threshold_stress(:,of))/prm%tau0 StressRatio = (abs(tau_neg)-dst%threshold_stress(:,of))/prm%tau0
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_slip = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega & vel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega &
* effectiveLength * tau_slip_neg * needsGoodName & * effectiveLength * tau_neg * needsGoodName &
/ ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_slip_neg & / ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_neg &
+ prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName & + prm%omega * prm%B * effectiveLength**2.0_pReal* needsGoodName &
) )
gdot_slip_neg = DotGamma0 * sign(vel_slip,tau_slip_neg) * 0.5_pReal gdot_neg = DotGamma0 * sign(vel,tau_neg) * 0.5_pReal
else where significantNegativeTau else where significantNegativeTau
gdot_slip_neg = 0.0_pReal gdot_neg = 0.0_pReal
end where significantNegativeTau end where significantNegativeTau
if (present(dgdot_dtauslip_neg)) then if (present(dgdot_dtau_neg)) then
significantNegativeTau2: where(abs(tau_slip_neg)-dst%threshold_stress(:,of) > tol_math_check) significantNegativeTau2: where(abs(tau_neg)-dst%threshold_stress(:,of) > tol_math_check)
dvel_slip = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength & dvel = 2.0_pReal*prm%burgers * prm%kink_height * prm%omega* effectiveLength &
* ( & * ( &
(needsGoodName + tau_slip_neg * abs(needsGoodName)*BoltzmannRatio*prm%p & (needsGoodName + tau_neg * abs(needsGoodName)*BoltzmannRatio*prm%p &
* prm%q/prm%tau0 & * prm%q/prm%tau0 &
* StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) & * StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) &
) & ) &
* ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_slip_neg & * ( 2.0_pReal*(prm%burgers**2.0_pReal)*tau_neg &
+ prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName & + prm%omega * prm%B* effectiveLength **2.0_pReal* needsGoodName &
) & ) &
- tau_slip_neg * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal & - tau_neg * needsGoodName * (2.0_pReal*prm%burgers**2.0_pReal &
+ prm%omega * prm%B *effectiveLength **2.0_pReal& + prm%omega * prm%B *effectiveLength **2.0_pReal&
* (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 & * (abs(needsGoodName)*BoltzmannRatio*prm%p *prm%q/prm%tau0 &
*StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )& *StressRatio_pminus1*(1-StressRatio_p)**(prm%q-1.0_pReal) )&
) & ) &
) & ) &
/(2.0_pReal*prm%burgers**2.0_pReal*tau_slip_neg & /(2.0_pReal*prm%burgers**2.0_pReal*tau_neg &
+ prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal + prm%omega * prm%B* effectiveLength**2.0_pReal* needsGoodName )**2.0_pReal
dgdot_dtauslip_neg = DotGamma0 * dvel_slip * 0.5_pReal dgdot_dtau_neg = DotGamma0 * dvel * 0.5_pReal
else where significantNegativeTau2 else where significantNegativeTau2
dgdot_dtauslip_neg = 0.0_pReal dgdot_dtau_neg = 0.0_pReal
end where significantNegativeTau2 end where significantNegativeTau2
end if end if
end associate end associate

View File

@ -50,14 +50,14 @@ module plastic_isotropic
dilatation dilatation
end type end type
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type, private :: tIsotropicState type, private :: tIsotropicState
real(pReal), pointer, dimension(:) :: & real(pReal), pointer, dimension(:) :: &
flowstress, & flowstress, &
accumulatedShear accumulatedShear
end type end type
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type(tIsotropicState), allocatable, dimension(:), private :: & type(tIsotropicState), allocatable, dimension(:), private :: &
dotState, & dotState, &
state state
@ -140,8 +140,8 @@ subroutine plastic_isotropic_init()
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) & if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
allocate(plastic_isotropic_sizePostResult(maxval(phase_Noutput), Ninstance),source=0_pInt) allocate(plastic_isotropic_sizePostResult(maxval(phase_Noutput),Ninstance),source=0_pInt)
allocate(plastic_isotropic_output(maxval(phase_Noutput), Ninstance)) allocate(plastic_isotropic_output(maxval(phase_Noutput),Ninstance))
plastic_isotropic_output = '' plastic_isotropic_output = ''
allocate(param(Ninstance)) allocate(param(Ninstance))
@ -181,15 +181,15 @@ subroutine plastic_isotropic_init()
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! sanity checks ! sanity checks
extmsg = '' extmsg = ''
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//'aTolShear ' if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' aTolShear'
if (prm%tau0 < 0.0_pReal) extmsg = trim(extmsg)//'tau0 ' if (prm%tau0 < 0.0_pReal) extmsg = trim(extmsg)//' tau0'
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//'gdot0 ' if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
if (prm%n <= 0.0_pReal) extmsg = trim(extmsg)//'n ' if (prm%n <= 0.0_pReal) extmsg = trim(extmsg)//' n'
if (prm%tausat <= prm%tau0) extmsg = trim(extmsg)//'tausat ' if (prm%tausat <= prm%tau0) extmsg = trim(extmsg)//' tausat'
if (prm%a <= 0.0_pReal) extmsg = trim(extmsg)//'a ' if (prm%a <= 0.0_pReal) extmsg = trim(extmsg)//' a'
if (prm%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//'m ' if (prm%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//' m'
if (prm%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//'atol_flowstress ' if (prm%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//' atol_flowstress'
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//'atol_shear ' if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' atol_shear'
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! exit if any parameter is out of range ! exit if any parameter is out of range
@ -231,17 +231,17 @@ subroutine plastic_isotropic_init()
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! locally defined state aliases and initialization of state0 and aTolState ! locally defined state aliases and initialization of state0 and aTolState
stt%flowstress => plasticState(p)%state (1,1:NipcMyPhase) stt%flowstress => plasticState(p)%state (1,:)
stt%flowstress = prm%tau0 stt%flowstress = prm%tau0
dot%flowstress => plasticState(p)%dotState (1,1:NipcMyPhase) dot%flowstress => plasticState(p)%dotState(1,:)
plasticState(p)%aTolState(1) = prm%aTolFlowstress plasticState(p)%aTolState(1) = prm%aTolFlowstress
stt%accumulatedShear => plasticState(p)%state (2,1:NipcMyPhase) stt%accumulatedShear => plasticState(p)%state (2,:)
dot%accumulatedShear => plasticState(p)%dotState (2,1:NipcMyPhase) dot%accumulatedShear => plasticState(p)%dotState(2,:)
plasticState(p)%aTolState(2) = prm%aTolShear plasticState(p)%aTolState(2) = prm%aTolShear
! global alias ! global alias
plasticState(p)%slipRate => plasticState(p)%dotState(2:2,1:NipcMyPhase) plasticState(p)%slipRate => plasticState(p)%dotState(2:2,:)
plasticState(p)%accumulatedSlip => plasticState(p)%state (2:2,1:NipcMyPhase) plasticState(p)%accumulatedSlip => plasticState(p)%state (2:2,:)
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,6 @@ subroutine plastic_none_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate state arrays ! allocate state arrays
NipcMyPhase = count(material_phase == p) NipcMyPhase = count(material_phase == p)
call material_allocatePlasticState(p,NipcMyPhase,0_pInt,0_pInt,0_pInt, & call material_allocatePlasticState(p,NipcMyPhase,0_pInt,0_pInt,0_pInt, &
0_pInt,0_pInt,0_pInt) 0_pInt,0_pInt,0_pInt)
plasticState(p)%sizePostResults = 0_pInt plasticState(p)%sizePostResults = 0_pInt

View File

@ -74,8 +74,6 @@ module plastic_phenopowerlaw
outputID !< ID of each post result output outputID !< ID of each post result output
end type !< container type for internal constitutive parameters end type !< container type for internal constitutive parameters
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type, private :: tPhenopowerlawState type, private :: tPhenopowerlawState
real(pReal), pointer, dimension(:,:) :: & real(pReal), pointer, dimension(:,:) :: &
xi_slip, & xi_slip, &
@ -84,6 +82,8 @@ module plastic_phenopowerlaw
gamma_twin gamma_twin
end type end type
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
type(tPhenopowerlawState), allocatable, dimension(:), private :: & type(tPhenopowerlawState), allocatable, dimension(:), private :: &
dotState, & dotState, &
state state
@ -234,9 +234,9 @@ subroutine plastic_phenopowerlaw_init
prm%H_int = math_expand(prm%H_int, prm%Nslip) prm%H_int = math_expand(prm%H_int, prm%Nslip)
! sanity checks ! sanity checks
if (prm%gdot0_slip <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0_slip' if ( prm%gdot0_slip <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0_slip'
if (prm%a_slip <= 0.0_pReal) extmsg = trim(extmsg)//' a_slip' if ( prm%a_slip <= 0.0_pReal) extmsg = trim(extmsg)//' a_slip'
if (prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip' if ( prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
if (any(prm%xi_slip_0 <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_slip_0' if (any(prm%xi_slip_0 <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_slip_0'
if (any(prm%xi_slip_sat < prm%xi_slip_0)) extmsg = trim(extmsg)//' xi_slip_sat' if (any(prm%xi_slip_sat < prm%xi_slip_0)) extmsg = trim(extmsg)//' xi_slip_sat'
else slipActive else slipActive
@ -343,8 +343,8 @@ subroutine plastic_phenopowerlaw_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate state arrays ! allocate state arrays
NipcMyPhase = count(material_phase == p) NipcMyPhase = count(material_phase == p)
sizeDotState = size(['tau_slip ','gamma_slip']) * prm%TotalNslip & sizeDotState = size(['tau_slip ','gamma_slip']) * prm%totalNslip &
+ size(['tau_twin ','gamma_twin']) * prm%TotalNtwin + size(['tau_twin ','gamma_twin']) * prm%totalNtwin
sizeState = sizeDotState sizeState = sizeDotState
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, & call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, &
@ -393,8 +393,8 @@ end subroutine plastic_phenopowerlaw_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculates plastic velocity gradient and its tangent !> @brief calculates plastic velocity gradient and its tangent
!> @details asumme that deformation by dislocation glide affects twinned and untwinned volume !> @details asummes that deformation by dislocation glide affects twinned and untwinned volume
! equally (Taylor assumption). Twinning happens only in untwinned volume ( ! equally (Taylor assumption). Twinning happens only in untwinned volume
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
pure subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of) pure subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
@ -413,8 +413,8 @@ pure subroutine plastic_phenopowerlaw_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
integer(pInt) :: & integer(pInt) :: &
i,k,l,m,n i,k,l,m,n
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
dgdot_dtauslip_pos,dgdot_dtauslip_neg, & gdot_slip_pos,gdot_slip_neg, &
gdot_slip_pos,gdot_slip_neg dgdot_dtauslip_pos,dgdot_dtauslip_neg
real(pReal), dimension(param(instance)%totalNtwin) :: & real(pReal), dimension(param(instance)%totalNtwin) :: &
gdot_twin,dgdot_dtautwin gdot_twin,dgdot_dtautwin
@ -632,6 +632,7 @@ pure subroutine kinetics_slip(Mp,instance,of, &
real(pReal), intent(out), optional, dimension(param(instance)%totalNslip) :: & real(pReal), intent(out), optional, dimension(param(instance)%totalNslip) :: &
dgdot_dtau_slip_pos, & dgdot_dtau_slip_pos, &
dgdot_dtau_slip_neg dgdot_dtau_slip_neg
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
tau_slip_pos, & tau_slip_pos, &
tau_slip_neg tau_slip_neg
@ -656,7 +657,7 @@ pure subroutine kinetics_slip(Mp,instance,of, &
end where end where
where(dNeq0(tau_slip_neg)) where(dNeq0(tau_slip_neg))
gdot_slip_neg = 0.5_pReal*prm%gdot0_slip & gdot_slip_neg = prm%gdot0_slip * 0.5_pReal & ! only used if non-Schmid active, always 1/2
* sign(abs(tau_slip_neg/stt%xi_slip(:,of))**prm%n_slip, tau_slip_neg) * sign(abs(tau_slip_neg/stt%xi_slip(:,of))**prm%n_slip, tau_slip_neg)
else where else where
gdot_slip_neg = 0.0_pReal gdot_slip_neg = 0.0_pReal