make consistency check

This commit is contained in:
Martin Diehl 2020-03-15 09:39:35 +01:00
parent a3e2d39854
commit 7ec5a0bd6b
1 changed files with 20 additions and 17 deletions

View File

@ -32,7 +32,7 @@ submodule(constitutive) plastic_dislotwin
V_cs, & !< cross slip volume V_cs, & !< cross slip volume
sbResistance, & !< value for shearband resistance (might become an internal state variable at some point) sbResistance, & !< value for shearband resistance (might become an internal state variable at some point)
sbVelocity, & !< value for shearband velocity_0 sbVelocity, & !< value for shearband velocity_0
sbQedge, & !< activation energy for shear bands E_sb, & !< activation energy for shear bands
SFE_0K, & !< stacking fault energy at zero K SFE_0K, & !< stacking fault energy at zero K
dSFE_dT, & !< temperature dependance of stacking fault energy dSFE_dT, & !< temperature dependance of stacking fault energy
aTol_rho, & !< absolute tolerance for integration of dislocation density aTol_rho, & !< absolute tolerance for integration of dislocation density
@ -144,7 +144,7 @@ module subroutine plastic_dislotwin_init
character(len=pStringLen) :: & character(len=pStringLen) :: &
extmsg = '' extmsg = ''
write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOTWIN_label//' init -+>>>'; flush(6) write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOTWIN_LABEL//' init -+>>>'; flush(6)
write(6,'(/,a)') ' Ma and Roters, Acta Materialia 52(12):36033612, 2004' write(6,'(/,a)') ' Ma and Roters, Acta Materialia 52(12):36033612, 2004'
write(6,'(a)') ' https://doi.org/10.1016/j.actamat.2004.04.012' write(6,'(a)') ' https://doi.org/10.1016/j.actamat.2004.04.012'
@ -177,6 +177,8 @@ module subroutine plastic_dislotwin_init
prm%aTol_f_tw = config%getFloat('atol_twinfrac', defaultVal=0.0_pReal) prm%aTol_f_tw = config%getFloat('atol_twinfrac', defaultVal=0.0_pReal)
prm%aTol_f_tr = config%getFloat('atol_transfrac', defaultVal=0.0_pReal) prm%aTol_f_tr = config%getFloat('atol_transfrac', defaultVal=0.0_pReal)
prm%output = config%getStrings('(output)', defaultVal=emptyStringArray)
! This data is read in already in lattice ! This data is read in already in lattice
prm%mu = lattice_mu(p) prm%mu = lattice_mu(p)
prm%nu = lattice_nu(p) prm%nu = lattice_nu(p)
@ -226,12 +228,11 @@ module subroutine plastic_dislotwin_init
endif endif
! multiplication factor according to crystal structure (nearest neighbors bcc vs fcc/hex) ! multiplication factor according to crystal structure (nearest neighbors bcc vs fcc/hex)
!@details: Refer: Argon & Moffat, Acta Metallurgica, Vol. 29, pg 293 to 299, 1981 ! details: Argon & Moffat, Acta Metallurgica, Vol. 29, pg 293 to 299, 1981
prm%omega = config%getFloat('omega', defaultVal = 1000.0_pReal) & prm%omega = config%getFloat('omega', defaultVal = 1000.0_pReal) &
* merge(12.0_pReal, & * merge(12.0_pReal, &
8.0_pReal, & 8.0_pReal, &
lattice_structure(p) == lattice_FCC_ID .or. lattice_structure(p) == lattice_HEX_ID) any(lattice_structure(p) == [lattice_FCC_ID,lattice_HEX_ID]))
! expand: family => system ! expand: family => system
prm%rho_mob_0 = math_expand(prm%rho_mob_0, prm%N_sl) prm%rho_mob_0 = math_expand(prm%rho_mob_0, prm%N_sl)
@ -375,13 +376,13 @@ module subroutine plastic_dislotwin_init
prm%sbVelocity = config%getFloat('shearbandvelocity',defaultVal=0.0_pReal) prm%sbVelocity = config%getFloat('shearbandvelocity',defaultVal=0.0_pReal)
if (prm%sbVelocity > 0.0_pReal) then if (prm%sbVelocity > 0.0_pReal) then
prm%sbResistance = config%getFloat('shearbandresistance') prm%sbResistance = config%getFloat('shearbandresistance')
prm%sbQedge = config%getFloat('qedgepersbsystem') prm%E_sb = config%getFloat('qedgepersbsystem')
prm%p_sb = config%getFloat('p_shearband') prm%p_sb = config%getFloat('p_shearband')
prm%q_sb = config%getFloat('q_shearband') prm%q_sb = config%getFloat('q_shearband')
! sanity checks ! sanity checks
if (prm%sbResistance < 0.0_pReal) extmsg = trim(extmsg)//' shearbandresistance' if (prm%sbResistance < 0.0_pReal) extmsg = trim(extmsg)//' shearbandresistance'
if (prm%sbQedge < 0.0_pReal) extmsg = trim(extmsg)//' qedgepersbsystem' if (prm%E_sb < 0.0_pReal) extmsg = trim(extmsg)//' qedgepersbsystem'
if (prm%p_sb <= 0.0_pReal) extmsg = trim(extmsg)//' p_shearband' if (prm%p_sb <= 0.0_pReal) extmsg = trim(extmsg)//' p_shearband'
if (prm%q_sb <= 0.0_pReal) extmsg = trim(extmsg)//' q_shearband' if (prm%q_sb <= 0.0_pReal) extmsg = trim(extmsg)//' q_shearband'
endif endif
@ -393,10 +394,10 @@ module subroutine plastic_dislotwin_init
!if (Ndot0PerTwinFamily(f,p) < 0.0_pReal) & !if (Ndot0PerTwinFamily(f,p) < 0.0_pReal) &
! call IO_error(211,el=p,ext_msg='dot_N_0_tw ('//PLASTICITY_DISLOTWIN_label//')') ! call IO_error(211,el=p,ext_msg='dot_N_0_tw ('//PLASTICITY_DISLOTWIN_LABEL//')')
if (any(prm%atomicVolume <= 0.0_pReal)) & if (any(prm%atomicVolume <= 0.0_pReal)) &
call IO_error(211,el=p,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211,el=p,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOTWIN_LABEL//')')
if (prm%sum_N_tw > 0) then if (prm%sum_N_tw > 0) then
if (prm%aTol_rho <= 0.0_pReal) & if (prm%aTol_rho <= 0.0_pReal) &
call IO_error(211,el=p,ext_msg='aTol_rho ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211,el=p,ext_msg='aTol_rho ('//PLASTICITY_DISLOTWIN_label//')')
@ -408,8 +409,6 @@ module subroutine plastic_dislotwin_init
call IO_error(211,el=p,ext_msg='aTol_f_tr ('//PLASTICITY_DISLOTWIN_label//')') call IO_error(211,el=p,ext_msg='aTol_f_tr ('//PLASTICITY_DISLOTWIN_label//')')
endif endif
prm%output = config%getStrings('(output)', defaultVal=emptyStringArray)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! allocate state arrays ! allocate state arrays
NipcMyPhase = count(material_phaseAt == p) * discretization_nIP NipcMyPhase = count(material_phaseAt == p) * discretization_nIP
@ -421,7 +420,7 @@ module subroutine plastic_dislotwin_init
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0) call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! locally defined state aliases and initialization of state0 and aTolState ! locally defined state aliases and initialization of state0 and atolState
startIndex = 1 startIndex = 1
endIndex = prm%sum_N_sl endIndex = prm%sum_N_sl
stt%rho_mob=>plasticState(p)%state(startIndex:endIndex,:) stt%rho_mob=>plasticState(p)%state(startIndex:endIndex,:)
@ -470,10 +469,14 @@ module subroutine plastic_dislotwin_init
allocate(dst%V_tr (prm%sum_N_tr,NipcMyPhase),source=0.0_pReal) allocate(dst%V_tr (prm%sum_N_tr,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
end associate end associate
!--------------------------------------------------------------------------------------------------
! exit if any parameter is out of range
if (extmsg /= '') call IO_error(211,ext_msg=trim(extmsg)//'('//PLASTICITY_DISLOTWIN_LABEL//')')
enddo enddo
end subroutine plastic_dislotwin_init end subroutine plastic_dislotwin_init
@ -587,7 +590,7 @@ module subroutine plastic_dislotwin_LpAndItsTangent(Lp,dLp_dMp,Mp,T,instance,of)
shearBandingContribution: if(dNeq0(prm%sbVelocity)) then shearBandingContribution: if(dNeq0(prm%sbVelocity)) then
BoltzmannRatio = prm%sbQedge/(kB*T) BoltzmannRatio = prm%E_sb/(kB*T)
call math_eigh33(Mp,eigValues,eigVectors) ! is Mp symmetric by design? call math_eigh33(Mp,eigValues,eigVectors) ! is Mp symmetric by design?
do i = 1,6 do i = 1,6