Merge branch 'pheno+' into cmake

This commit is contained in:
zhangc43 2016-05-06 18:26:22 -04:00
commit eaacde48ba
8 changed files with 689 additions and 579 deletions

View File

@ -116,7 +116,7 @@ set (DAMASK_VERSION_MINOR ${DAMASK_V})
# Built-in options for DAMASK build system # Built-in options for DAMASK build system
# -> can be overwritten from commandline/install_script # -> can be overwritten from commandline/install_script
option(OPENMP "Use OpenMP libaries for DAMASK" ON ) option(OPENMP "Use OpenMP libaries for DAMASK" ON )
option(OPTIMIZATION "DAMASK optimization level [OFF,DEFENSIVE,AGGRESSIVE]" "DEFENSIVE" ) option(OPTIMIZATION "DAMASK optimization level [OFF,DEFENSIVE,AGGRESSIVE]" "AGGRESSIVE" )
option(SPECTRAL "Build spectral sovler for DAMASAK" OFF ) option(SPECTRAL "Build spectral sovler for DAMASAK" OFF )
option(FEM "Build FEM solver for DAMASK" OFF ) option(FEM "Build FEM solver for DAMASK" OFF )

View File

@ -10,7 +10,7 @@ spectral: build/spectral
build/spectral: build build/spectral: build
@mkdir build/spectral @mkdir build/spectral
@(cd build/spectral; cmake -Wno-dev -DCMAKE_BUILD_TYPE=RELEASE -DDAMASK_DRIVER=SPECTRAL ../..;) @(cd build/spectral; cmake -Wno-dev -DCMAKE_BUILD_TYPE=RELEASE -DDAMASK_DRIVER=SPECTRAL -DOPTIMIZATION=AGGRESSIVE -DDAMASK_INSTALL=${HOME}/bin ../..;)
build: bin build: bin
@mkdir build @mkdir build

View File

@ -79,7 +79,6 @@ add_library(DAMASK_DRIVERS ALIAS DAMASK_LATTICE)
add_library (DAMASK_PLASTIC "plastic_dislotwin.f90" add_library (DAMASK_PLASTIC "plastic_dislotwin.f90"
"plastic_disloUCLA.f90" "plastic_disloUCLA.f90"
"plastic_isotropic.f90" "plastic_isotropic.f90"
"plastic_j2.f90"
"plastic_phenopowerlaw.f90" "plastic_phenopowerlaw.f90"
"plastic_titanmod.f90" "plastic_titanmod.f90"
"plastic_nonlocal.f90" "plastic_nonlocal.f90"

View File

@ -207,7 +207,7 @@ subroutine constitutive_init()
outputName = PLASTICITY_NONE_label outputName = PLASTICITY_NONE_label
thisNoutput => null() thisNoutput => null()
thisOutput => null() thisOutput => null()
thisSize => null() thisSize => null()
case (PLASTICITY_ISOTROPIC_ID) plasticityType case (PLASTICITY_ISOTROPIC_ID) plasticityType
outputName = PLASTICITY_ISOTROPIC_label outputName = PLASTICITY_ISOTROPIC_label
thisNoutput => plastic_isotropic_Noutput thisNoutput => plastic_isotropic_Noutput
@ -423,7 +423,7 @@ end function constitutive_homogenizedC
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calls microstructure function of the different constitutive models !> @brief calls microstructure function of the different constitutive models
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el) subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el, F0s,Fes,Fps,Tstar_vs)
use prec, only: & use prec, only: &
pReal pReal
use material, only: & use material, only: &
@ -460,7 +460,15 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
ho, & !< homogenization ho, & !< homogenization
tme !< thermal member position tme !< thermal member position
real(pReal), intent(in), dimension(:,:,:,:) :: & real(pReal), intent(in), dimension(:,:,:,:) :: &
orientations !< crystal orientations as quaternions orientations
real(pReal), intent(in), dimension(:,:,:,:,:) :: &
F0s, &
Fes, &
Fps
real(pReal), intent(in), dimension(:,:,:,:) :: &
Tstar_vs !< crystal orientations as quaternions
ho = material_homog(ip,el) ho = material_homog(ip,el)
tme = thermalMapping(ho)%p(ip,el) tme = thermalMapping(ho)%p(ip,el)
@ -475,7 +483,7 @@ subroutine constitutive_microstructure(orientations, Fe, Fp, ipc, ip, el)
case (PLASTICITY_NONLOCAL_ID) plasticityType case (PLASTICITY_NONLOCAL_ID) plasticityType
call plastic_nonlocal_microstructure (Fe,Fp,ip,el) call plastic_nonlocal_microstructure (Fe,Fp,ip,el)
case (PLASTICITY_PHENOPLUS_ID) plasticityType case (PLASTICITY_PHENOPLUS_ID) plasticityType
call plastic_phenoplus_microstructure(orientations,ipc,ip,el) call plastic_phenoplus_microstructure(orientations,ipc,ip,el,F0s,Fes,Fps,Tstar_vs)
end select plasticityType end select plasticityType
end subroutine constitutive_microstructure end subroutine constitutive_microstructure

View File

@ -425,7 +425,7 @@ subroutine crystallite_init
crystallite_partionedFp0 = crystallite_Fp0 crystallite_partionedFp0 = crystallite_Fp0
crystallite_partionedFi0 = crystallite_Fi0 crystallite_partionedFi0 = crystallite_Fi0
crystallite_partionedF0 = crystallite_F0 crystallite_partionedF0 = crystallite_F0
crystallite_partionedF = crystallite_F0 crystallite_partionedF = crystallite_F0
call crystallite_orientations() call crystallite_orientations()
crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations crystallite_orientation0 = crystallite_orientation ! store initial orientations for calculation of grain rotations
@ -438,7 +438,11 @@ subroutine crystallite_init
call constitutive_microstructure(crystallite_orientation, & ! pass orientation to constitutive module call constitutive_microstructure(crystallite_orientation, & ! pass orientation to constitutive module
crystallite_Fe(1:3,1:3,c,i,e), & crystallite_Fe(1:3,1:3,c,i,e), &
crystallite_Fp(1:3,1:3,c,i,e), & crystallite_Fp(1:3,1:3,c,i,e), &
c,i,e) ! update dependent state variables to be consistent with basic states c,i,e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo enddo
enddo enddo
enddo enddo
@ -1715,7 +1719,11 @@ subroutine crystallite_integrateStateRK4()
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
@ -2041,7 +2049,11 @@ subroutine crystallite_integrateStateRKCK45()
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
@ -2261,7 +2273,11 @@ subroutine crystallite_integrateStateRKCK45()
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
@ -2496,7 +2512,11 @@ subroutine crystallite_integrateStateAdaptiveEuler()
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL !$OMP END PARALLEL
@ -2840,7 +2860,11 @@ eIter = FEsolving_execElem(1:2)
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
enddo; enddo; enddo enddo; enddo; enddo
!$OMP ENDDO !$OMP ENDDO
!$OMP END PARALLEL !$OMP END PARALLEL
@ -3085,7 +3109,11 @@ subroutine crystallite_integrateStateFPI()
call constitutive_microstructure(crystallite_orientation, & call constitutive_microstructure(crystallite_orientation, &
crystallite_Fe(1:3,1:3,g,i,e), & crystallite_Fe(1:3,1:3,g,i,e), &
crystallite_Fp(1:3,1:3,g,i,e), & crystallite_Fp(1:3,1:3,g,i,e), &
g, i, e) ! update dependent state variables to be consistent with basic states g, i, e, &
crystallite_F0, &
crystallite_Fe, &
crystallite_Fp, &
crystallite_Tstar_v) ! update dependent state variables to be consistent with basic states
p = phaseAt(g,i,e) p = phaseAt(g,i,e)
c = phasememberAt(g,i,e) c = phasememberAt(g,i,e)
plasticState(p)%previousDotState2(:,c) = plasticState(p)%previousDotState(:,c) plasticState(p)%previousDotState2(:,c) = plasticState(p)%previousDotState(:,c)

View File

@ -18,7 +18,7 @@ module lattice
LATTICE_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures LATTICE_maxNtwinFamily = 4_pInt, & !< max # of twin system families over lattice structures
LATTICE_maxNtransFamily = 2_pInt, & !< max # of transformation system families over lattice structures LATTICE_maxNtransFamily = 2_pInt, & !< max # of transformation system families over lattice structures
LATTICE_maxNcleavageFamily = 3_pInt !< max # of transformation system families over lattice structures LATTICE_maxNcleavageFamily = 3_pInt !< max # of transformation system families over lattice structures
integer(pInt), allocatable, dimension(:,:), protected, public :: & integer(pInt), allocatable, dimension(:,:), protected, public :: &
lattice_NslipSystem, & !< total # of slip systems in each family lattice_NslipSystem, & !< total # of slip systems in each family
lattice_NtwinSystem, & !< total # of twin systems in each family lattice_NtwinSystem, & !< total # of twin systems in each family
@ -26,22 +26,22 @@ module lattice
lattice_NcleavageSystem !< total # of transformation systems in each family lattice_NcleavageSystem !< total # of transformation systems in each family
integer(pInt), allocatable, dimension(:,:,:), protected, public :: & integer(pInt), allocatable, dimension(:,:,:), protected, public :: &
lattice_interactionSlipSlip, & !< Slip--slip interaction type lattice_interactionSlipSlip, & !< Slip--slip interaction type
lattice_interactionSlipTwin, & !< Slip--twin interaction type lattice_interactionSlipTwin, & !< Slip--twin interaction type
lattice_interactionTwinSlip, & !< Twin--slip interaction type lattice_interactionTwinSlip, & !< Twin--slip interaction type
lattice_interactionTwinTwin, & !< Twin--twin interaction type lattice_interactionTwinTwin, & !< Twin--twin interaction type
lattice_interactionSlipTrans, & !< Slip--trans interaction type lattice_interactionSlipTrans, & !< Slip--trans interaction type
lattice_interactionTransSlip, & !< Trans--slip interaction type lattice_interactionTransSlip, & !< Trans--slip interaction type
lattice_interactionTransTrans !< Trans--trans interaction type lattice_interactionTransTrans !< Trans--trans interaction type
real(pReal), allocatable, dimension(:,:,:,:,:), protected, public :: & real(pReal), allocatable, dimension(:,:,:,:,:), protected, public :: &
lattice_Sslip, & !< Schmid and non-Schmid matrices lattice_Sslip, & !< Schmid and non-Schmid matrices
lattice_Scleavage !< Schmid matrices for cleavage systems lattice_Scleavage !< Schmid matrices for cleavage systems
real(pReal), allocatable, dimension(:,:,:,:), protected, public :: & real(pReal), allocatable, dimension(:,:,:,:), protected, public :: &
lattice_Sslip_v, & !< Mandel notation of lattice_Sslip lattice_Sslip_v, & !< Mandel notation of lattice_Sslip
lattice_Scleavage_v !< Mandel notation of lattice_Scleavege lattice_Scleavage_v !< Mandel notation of lattice_Scleavege
real(pReal), allocatable, dimension(:,:,:), protected, public :: & real(pReal), allocatable, dimension(:,:,:), protected, public :: &
lattice_sn, & !< normal direction of slip system lattice_sn, & !< normal direction of slip system
lattice_sd, & !< slip direction of slip system lattice_sd, & !< slip direction of slip system
@ -75,25 +75,25 @@ module lattice
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! face centered cubic ! face centered cubic
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
LATTICE_fcc_NslipSystem = int([12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for fcc LATTICE_fcc_NslipSystem = int([12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for fcc
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
LATTICE_fcc_NtwinSystem = int([12, 0, 0, 0],pInt) !< # of twin systems per family for fcc LATTICE_fcc_NtwinSystem = int([12, 0, 0, 0],pInt) !< # of twin systems per family for fcc
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
LATTICE_fcc_NtransSystem = int([12, 0],pInt) !< # of transformation systems per family for fcc LATTICE_fcc_NtransSystem = int([12, 0],pInt) !< # of transformation systems per family for fcc
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_fcc_NcleavageSystem = int([3, 4, 0],pInt) !< # of cleavage systems per family for fcc LATTICE_fcc_NcleavageSystem = int([3, 4, 0],pInt) !< # of cleavage systems per family for fcc
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_fcc_Nslip = 12_pInt, & !sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc LATTICE_fcc_Nslip = 12_pInt, & !sum(lattice_fcc_NslipSystem), & !< total # of slip systems for fcc
LATTICE_fcc_Ntwin = 12_pInt, & !sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc LATTICE_fcc_Ntwin = 12_pInt, & !sum(lattice_fcc_NtwinSystem), & !< total # of twin systems for fcc
LATTICE_fcc_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for fcc LATTICE_fcc_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for fcc
LATTICE_fcc_Ntrans = 12_pInt, & !sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc LATTICE_fcc_Ntrans = 12_pInt, & !sum(lattice_fcc_NtransSystem), & !< total # of transformation systems for fcc
LATTICE_fcc_Ncleavage = 7_pInt !sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc LATTICE_fcc_Ncleavage = 7_pInt !sum(lattice_fcc_NcleavageSystem) !< total # of cleavage systems for fcc
real(pReal), dimension(3+3,LATTICE_fcc_Nslip), parameter, private :: & real(pReal), dimension(3+3,LATTICE_fcc_Nslip), parameter, private :: &
LATTICE_fcc_systemSlip = reshape(real([& LATTICE_fcc_systemSlip = reshape(real([&
! Slip direction Plane normal ! Slip direction Plane normal
@ -254,10 +254,10 @@ module lattice
2,2,2,2,2,2,2,2,2,1,1,1, & 2,2,2,2,2,2,2,2,2,1,1,1, &
2,2,2,2,2,2,2,2,2,1,1,1 & 2,2,2,2,2,2,2,2,2,1,1,1 &
],pInt),[LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans],order=[2,1]) !< Trans--trans interaction types for fcc ],pInt),[LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans],order=[2,1]) !< Trans--trans interaction types for fcc
real(pReal), dimension(LATTICE_fcc_Ntrans), parameter, private :: & real(pReal), dimension(LATTICE_fcc_Ntrans), parameter, private :: &
LATTICE_fccTohex_shearTrans = sqrt(2.0_pReal)/4.0_pReal LATTICE_fccTohex_shearTrans = sqrt(2.0_pReal)/4.0_pReal
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: & real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
LATTICE_fccTobcc_systemTrans = reshape([& LATTICE_fccTobcc_systemTrans = reshape([&
0.0, 1.0, 0.0, 10.26, & ! Pitsch OR (Ma & Hartmaier 2014, Table 3) 0.0, 1.0, 0.0, 10.26, & ! Pitsch OR (Ma & Hartmaier 2014, Table 3)
@ -287,7 +287,7 @@ module lattice
0, 0, 1, 1, 0, 0, 0, 1, 0, & 0, 0, 1, 1, 0, 0, 0, 1, 0, &
0, 0, 1, 1, 0, 0, 0, 1, 0, & 0, 0, 1, 1, 0, 0, 0, 1, 0, &
0, 0, 1, 1, 0, 0, 0, 1, 0, & 0, 0, 1, 1, 0, 0, 0, 1, 0, &
0, 0, 1, 1, 0, 0, 0, 1, 0 & 0, 0, 1, 1, 0, 0, 0, 1, 0 &
],pInt),[ 9_pInt, LATTICE_fcc_Ntrans]) ],pInt),[ 9_pInt, LATTICE_fcc_Ntrans])
real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: & real(pReal), dimension(4,LATTICE_fcc_Ntrans), parameter, private :: &
@ -308,7 +308,7 @@ module lattice
real(pReal), dimension(LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans), parameter, private :: & ! Matrix for projection of shear from slip system to fault-band (twin) systems real(pReal), dimension(LATTICE_fcc_Ntrans,LATTICE_fcc_Ntrans), parameter, private :: & ! Matrix for projection of shear from slip system to fault-band (twin) systems
LATTICE_fccTobcc_projectionTrans = reshape(real([& ! For ns = nt = nr LATTICE_fccTobcc_projectionTrans = reshape(real([& ! For ns = nt = nr
0, 1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, & 0, 1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
-1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, & -1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & 1,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &
0, 0, 0, 0, 1,-1, 0, 0, 0, 0, 0, 0, & 0, 0, 0, 0, 1,-1, 0, 0, 0, 0, 0, 0, &
@ -357,10 +357,10 @@ module lattice
],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ncleavage]) ],pReal),[ 3_pInt + 3_pInt,LATTICE_fcc_Ncleavage])
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! body centered cubic ! body centered cubic
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
LATTICE_bcc_NslipSystem = int([ 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pInt) !< # of slip systems per family for bcc LATTICE_bcc_NslipSystem = int([ 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], pInt) !< # of slip systems per family for bcc
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
LATTICE_bcc_NtwinSystem = int([ 12, 0, 0, 0], pInt) !< # of twin systems per family for bcc LATTICE_bcc_NtwinSystem = int([ 12, 0, 0, 0], pInt) !< # of twin systems per family for bcc
@ -369,7 +369,7 @@ module lattice
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_bcc_NcleavageSystem = int([3,6,0],pInt) !< # of cleavage systems per family for bcc LATTICE_bcc_NcleavageSystem = int([3,6,0],pInt) !< # of cleavage systems per family for bcc
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_bcc_Nslip = 24_pInt, & !sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc LATTICE_bcc_Nslip = 24_pInt, & !sum(lattice_bcc_NslipSystem), & !< total # of slip systems for bcc
LATTICE_bcc_Ntwin = 12_pInt, & !sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc LATTICE_bcc_Ntwin = 12_pInt, & !sum(lattice_bcc_NtwinSystem), & !< total # of twin systems for bcc
@ -377,10 +377,11 @@ module lattice
LATTICE_bcc_Ntrans = 0_pInt, & !sum(lattice_bcc_NtransSystem), & !< total # of transformation systems for bcc LATTICE_bcc_Ntrans = 0_pInt, & !sum(lattice_bcc_NtransSystem), & !< total # of transformation systems for bcc
LATTICE_bcc_Ncleavage = 9_pInt !sum(lattice_bcc_NcleavageSystem) !< total # of cleavage systems for bcc LATTICE_bcc_Ncleavage = 9_pInt !sum(lattice_bcc_NcleavageSystem) !< total # of cleavage systems for bcc
real(pReal), dimension(3+3,LATTICE_bcc_Nslip), parameter, private :: & real(pReal), dimension(3+3,LATTICE_bcc_Nslip), parameter, private :: &
LATTICE_bcc_systemSlip = reshape(real([& LATTICE_bcc_systemSlip = reshape(real([&
! Slip direction Plane normal ! Slip direction Plane normal
! Slip system <111>{110} ! Slip system <111>{110}
1,-1, 1, 0, 1, 1, & 1,-1, 1, 0, 1, 1, &
-1,-1, 1, 0, 1, 1, & -1,-1, 1, 0, 1, 1, &
1, 1, 1, 0,-1, 1, & 1, 1, 1, 0,-1, 1, &
@ -455,7 +456,7 @@ module lattice
integer(pInt), dimension(LATTICE_bcc_Nslip,LATTICE_bcc_Nslip), parameter, public :: & integer(pInt), dimension(LATTICE_bcc_Nslip,LATTICE_bcc_Nslip), parameter, public :: &
LATTICE_bcc_interactionSlipSlip = reshape(int( [& LATTICE_bcc_interactionSlipSlip = reshape(int( [&
1,2,6,6,5,4,4,3,4,3,5,4, 6,6,4,3,3,4,6,6,4,3,6,6, & ! ---> slip 1,2,6,6,5,4,4,3,4,3,5,4, 6,6,4,3,3,4,6,6,4,3,6,6, & ! ---> slip
2,1,6,6,4,3,5,4,5,4,4,3, 6,6,3,4,4,3,6,6,3,4,6,6, & ! | 2,1,6,6,4,3,5,4,5,4,4,3, 6,6,3,4,4,3,6,6,3,4,6,6, & ! |
6,6,1,2,4,5,3,4,4,5,3,4, 4,3,6,6,6,6,3,4,6,6,4,3, & ! | 6,6,1,2,4,5,3,4,4,5,3,4, 4,3,6,6,6,6,3,4,6,6,4,3, & ! |
6,6,2,1,3,4,4,5,3,4,4,5, 3,4,6,6,6,6,4,3,6,6,3,4, & ! v slip 6,6,2,1,3,4,4,5,3,4,4,5, 3,4,6,6,6,6,4,3,6,6,3,4, & ! v slip
@ -492,7 +493,7 @@ module lattice
3,3,3,2,2,3,3,3,3,2,3,3, & ! ---> twin 3,3,3,2,2,3,3,3,3,2,3,3, & ! ---> twin
3,3,2,3,3,2,3,3,2,3,3,3, & ! | 3,3,2,3,3,2,3,3,2,3,3,3, & ! |
3,2,3,3,3,3,2,3,3,3,3,2, & ! | 3,2,3,3,3,3,2,3,3,3,3,2, & ! |
2,3,3,3,3,3,3,2,3,3,2,3, & ! v slip 2,3,3,3,3,3,3,2,3,3,2,3, & ! v slip
2,3,3,3,3,3,3,2,3,3,2,3, & 2,3,3,3,3,3,3,2,3,3,2,3, &
3,3,2,3,3,2,3,3,2,3,3,3, & 3,3,2,3,3,2,3,3,2,3,3,3, &
3,2,3,3,3,3,2,3,3,3,3,2, & 3,2,3,3,3,3,2,3,3,3,3,2, &
@ -556,17 +557,17 @@ module lattice
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! hexagonal ! hexagonal
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex lattice_hex_NslipSystem = int([ 3, 3, 3, 6, 12, 6, 0, 0, 0, 0, 0, 0, 0],pInt) !< # of slip systems per family for hex
integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNtwinFamily), parameter, public :: &
lattice_hex_NtwinSystem = int([ 6, 6, 6, 6],pInt) !< # of slip systems per family for hex lattice_hex_NtwinSystem = int([ 6, 6, 6, 6],pInt) !< # of slip systems per family for hex
integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNtransFamily), parameter, public :: &
LATTICE_hex_NtransSystem = int([0,0],pInt) !< # of transformation systems per family for hex LATTICE_hex_NtransSystem = int([0,0],pInt) !< # of transformation systems per family for hex
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_hex_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for hex LATTICE_hex_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for hex
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_hex_Nslip = 33_pInt, & !sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex LATTICE_hex_Nslip = 33_pInt, & !sum(lattice_hex_NslipSystem), & !< total # of slip systems for hex
LATTICE_hex_Ntwin = 24_pInt, & !sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex LATTICE_hex_Ntwin = 24_pInt, & !sum(lattice_hex_NtwinSystem), & !< total # of twin systems for hex
@ -609,7 +610,7 @@ module lattice
2, -1, -1, 3, -1, 0, 1, 1, & 2, -1, -1, 3, -1, 0, 1, 1, &
1, -2, 1, 3, 0, 1, -1, 1, & 1, -2, 1, 3, 0, 1, -1, 1, &
-1, -1, 2, 3, 0, 1, -1, 1, & -1, -1, 2, 3, 0, 1, -1, 1, &
! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below) ! pyramidal system: c+a slip <11.3>{-1-1.2} -- as for hexagonal ice (Castelnau et al. 1996, similar to twin system found below)
2, -1, -1, 3, -2, 1, 1, 2, & ! sorted according to similar twin system 2, -1, -1, 3, -2, 1, 1, 2, & ! sorted according to similar twin system
-1, 2, -1, 3, 1, -2, 1, 2, & ! <11.3>{-1-1.2} shear = 2((c/a)^2-2)/(3 c/a) -1, 2, -1, 3, 1, -2, 1, 2, & ! <11.3>{-1-1.2} shear = 2((c/a)^2-2)/(3 c/a)
-1, -1, 2, 3, 1, 1, -2, 2, & -1, -1, 2, 3, 1, 1, -2, 2, &
@ -648,7 +649,7 @@ module lattice
-2, 1, 1, -3, -2, 1, 1, 2, & -2, 1, 1, -3, -2, 1, 1, 2, &
1, -2, 1, -3, 1, -2, 1, 2, & 1, -2, 1, -3, 1, -2, 1, 2, &
1, 1, -2, -3, 1, 1, -2, 2 & 1, 1, -2, -3, 1, 1, -2, 2 &
],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1 ],pReal),[ 4_pInt + 4_pInt ,LATTICE_hex_Ntwin]) !< twin systems for hex, order follows Prof. Tom Bieler's scheme; but numbering in data was restarted from 1
integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: & integer(pInt), dimension(LATTICE_hex_Ntwin), parameter, private :: &
LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below LATTICE_hex_shearTwin = reshape(int( [& ! indicator to formula further below
@ -677,7 +678,7 @@ module lattice
4, & 4, &
4 & 4 &
],pInt),[LATTICE_hex_Ntwin]) ],pInt),[LATTICE_hex_Ntwin])
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Nslip), parameter, public :: & integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Nslip), parameter, public :: &
LATTICE_hex_interactionSlipSlip = reshape(int( [& LATTICE_hex_interactionSlipSlip = reshape(int( [&
1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! ---> slip 1, 2, 2, 3, 3, 3, 7, 7, 7, 13,13,13,13,13,13, 21,21,21,21,21,21,21,21,21,21,21,21, 31,31,31,31,31,31, & ! ---> slip
@ -717,10 +718,10 @@ module lattice
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,36,37,37,37, &
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,36,37,37, &
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,36,37, &
42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 & 42,42,42, 41,41,41, 40,40,40, 39,39,39,39,39,39, 38,38,38,38,38,38,38,38,38,38,38,38, 37,37,37,37,37,36 &
! !
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Nslip],order=[2,1]) !< Slip--slip interaction types for hex (onion peel naming scheme) ],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Nslip],order=[2,1]) !< Slip--slip interaction types for hex (onion peel naming scheme)
integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Ntwin), parameter, public :: & integer(pInt), dimension(LATTICE_hex_Nslip,LATTICE_hex_Ntwin), parameter, public :: &
LATTICE_hex_interactionSlipTwin = reshape(int( [& LATTICE_hex_interactionSlipTwin = reshape(int( [&
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! --> twin 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! --> twin
@ -728,7 +729,7 @@ module lattice
1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! | 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, & ! |
! v ! v
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & ! slip
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, & 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, &
! !
9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, & 9, 9, 9, 9, 9, 9, 10,10,10,10,10,10, 11,11,11,11,11,11, 12,12,12,12,12,12, &
@ -762,7 +763,7 @@ module lattice
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24, &
21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 & 21,21,21,21,21,21, 22,22,22,22,22,22, 23,23,23,23,23,23, 24,24,24,24,24,24 &
! !
],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Ntwin],order=[2,1]) !< Slip--twin interaction types for hex (isotropic, 24 in total) ],pInt),[LATTICE_hex_Nslip,LATTICE_hex_Ntwin],order=[2,1]) !< Slip--twin interaction types for hex (isotropic, 24 in total)
integer(pInt), dimension(LATTICE_hex_Ntwin,LATTICE_hex_Nslip), parameter, public :: & integer(pInt), dimension(LATTICE_hex_Ntwin,LATTICE_hex_Nslip), parameter, public :: &
LATTICE_hex_interactionTwinSlip = reshape(int( [& LATTICE_hex_interactionTwinSlip = reshape(int( [&
@ -835,6 +836,7 @@ module lattice
],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Ncleavage]) ],pReal),[ 4_pInt + 4_pInt,LATTICE_hex_Ncleavage])
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! body centered tetragonal ! body centered tetragonal
integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNslipFamily), parameter, public :: &
@ -848,14 +850,14 @@ module lattice
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_bct_NcleavageSystem = int([0,0,0],pInt) !< # of cleavage systems per family for bct LATTICE_bct_NcleavageSystem = int([0,0,0],pInt) !< # of cleavage systems per family for bct
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_bct_Nslip = 52_pInt, & !sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct LATTICE_bct_Nslip = 52_pInt, & !sum(lattice_bct_NslipSystem), & !< total # of slip systems for bct
LATTICE_bct_Ntwin = 0_pInt, & !sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct LATTICE_bct_Ntwin = 0_pInt, & !sum(lattice_bct_NtwinSystem), & !< total # of twin systems for bct
LATTICE_bct_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for bct LATTICE_bct_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for bct
LATTICE_bct_Ntrans = 0_pInt, & !sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct LATTICE_bct_Ntrans = 0_pInt, & !sum(lattice_bct_NtransSystem), & !< total # of transformation systems for bct
LATTICE_bct_Ncleavage = 0_pInt !sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct LATTICE_bct_Ncleavage = 0_pInt !sum(lattice_bct_NcleavageSystem) !< total # of cleavage systems for bct
real(pReal), dimension(3+3,LATTICE_bct_Nslip), parameter, private :: & real(pReal), dimension(3+3,LATTICE_bct_Nslip), parameter, private :: &
LATTICE_bct_systemSlip = reshape(real([& LATTICE_bct_systemSlip = reshape(real([&
! Slip direction Plane normal ! Slip direction Plane normal
@ -865,7 +867,7 @@ module lattice
! Slip family 2 {110)<001] ! Slip family 2 {110)<001]
0, 0, 1, 1, 1, 0, & 0, 0, 1, 1, 1, 0, &
0, 0, 1, -1, 1, 0, & 0, 0, 1, -1, 1, 0, &
! slip family 3 {100)<010] ! slip family 3 {100)<010]
0, 1, 0, 1, 0, 0, & 0, 1, 0, 1, 0, 0, &
1, 0, 0, 0, 1, 0, & 1, 0, 0, 0, 1, 0, &
! Slip family 4 {110)<1-11]/2 ! Slip family 4 {110)<1-11]/2
@ -876,54 +878,54 @@ module lattice
! Slip family 5 {110)<1-10] ! Slip family 5 {110)<1-10]
1, -1, 0, 1, 1, 0, & 1, -1, 0, 1, 1, 0, &
1, 1, 0, 1,-1, 0, & 1, 1, 0, 1,-1, 0, &
! Slip family 6 {100)<011] ! Slip family 6 {100)<011]
0, 1, 1, 1, 0, 0, & 0, 1, 1, 1, 0, 0, &
0,-1, 1, 1, 0, 0, & 0,-1, 1, 1, 0, 0, &
-1, 0, 1, 0, 1, 0, & -1, 0, 1, 0, 1, 0, &
1, 0, 1, 0, 1, 0, & 1, 0, 1, 0, 1, 0, &
! Slip family 7 {001)<010] ! Slip family 7 {001)<010]
0, 1, 0, 0, 0, 1, & 0, 1, 0, 0, 0, 1, &
1, 0, 0, 0, 0, 1, & 1, 0, 0, 0, 0, 1, &
! Slip family 8 {001)<110] ! Slip family 8 {001)<110]
1, 1, 0, 0, 0, 1, & 1, 1, 0, 0, 0, 1, &
-1, 1, 0, 0, 0, 1, & -1, 1, 0, 0, 0, 1, &
! Slip family 9 {011)<01-1] ! Slip family 9 {011)<01-1]
0, 1,-1, 0, 1, 1, & 0, 1,-1, 0, 1, 1, &
0,-1,-1, 0,-1, 1, & 0,-1,-1, 0,-1, 1, &
-1, 0,-1, -1, 0, 1, & -1, 0,-1, -1, 0, 1, &
1, 0,-1, 1, 0, 1, & 1, 0,-1, 1, 0, 1, &
! Slip family 10 {011)<1-11]/2 ! Slip family 10 {011)<1-11]/2
1,-1, 1, 0, 1, 1, & 1,-1, 1, 0, 1, 1, &
1, 1,-1, 0, 1, 1, & 1, 1,-1, 0, 1, 1, &
1, 1, 1, 0, 1,-1, & 1, 1, 1, 0, 1,-1, &
-1, 1, 1, 0, 1,-1, & -1, 1, 1, 0, 1,-1, &
1,-1,-1, 1, 0, 1, & 1,-1,-1, 1, 0, 1, &
-1,-1, 1, 1, 0, 1, & -1,-1, 1, 1, 0, 1, &
1, 1, 1, 1, 0,-1, & 1, 1, 1, 1, 0,-1, &
1,-1, 1, 1, 0,-1, & 1,-1, 1, 1, 0,-1, &
! Slip family 11 {011)<100] ! Slip family 11 {011)<100]
1, 0, 0, 0, 1, 1, & 1, 0, 0, 0, 1, 1, &
1, 0, 0, 0, 1,-1, & 1, 0, 0, 0, 1,-1, &
0, 1, 0, 1, 0, 1, & 0, 1, 0, 1, 0, 1, &
0, 1, 0, 1, 0,-1, & 0, 1, 0, 1, 0,-1, &
! Slip family 12 {211)<01-1] ! Slip family 12 {211)<01-1]
0, 1,-1, 2, 1, 1, & 0, 1,-1, 2, 1, 1, &
0,-1,-1, 2,-1, 1, & 0,-1,-1, 2,-1, 1, &
1, 0,-1, 1, 2, 1, & 1, 0,-1, 1, 2, 1, &
-1, 0,-1, -1, 2, 1, & -1, 0,-1, -1, 2, 1, &
0, 1,-1, -2, 1, 1, & 0, 1,-1, -2, 1, 1, &
0,-1,-1, -2,-1, 1, & 0,-1,-1, -2,-1, 1, &
-1, 0,-1, -1,-2, 1, & -1, 0,-1, -1,-2, 1, &
1, 0,-1, 1,-2, 1, & 1, 0,-1, 1,-2, 1, &
! Slip family 13 {211)<-111]/2 ! Slip family 13 {211)<-111]/2
-1, 1, 1, 2, 1, 1, & -1, 1, 1, 2, 1, 1, &
-1,-1, 1, 2,-1, 1, & -1,-1, 1, 2,-1, 1, &
1,-1, 1, 1, 2, 1, & 1,-1, 1, 1, 2, 1, &
-1,-1, 1, -1, 2, 1, & -1,-1, 1, -1, 2, 1, &
1, 1, 1, -2, 1, 1, & 1, 1, 1, -2, 1, 1, &
1,-1, 1, -2,-1, 1, & 1,-1, 1, -2,-1, 1, &
-1, 1, 1, -1,-2, 1, & -1, 1, 1, -1,-2, 1, &
1, 1, 1, 1,-2, 1 & 1, 1, 1, 1,-2, 1 &
],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler ],pReal),[ 3_pInt + 3_pInt,LATTICE_bct_Nslip]) !< slip systems for bct sorted by Bieler
integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: & integer(pInt), dimension(LATTICE_bct_Nslip,LATTICE_bct_Nslip), parameter, public :: &
@ -933,7 +935,7 @@ module lattice
! !
6, 6, 4, 5, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, & 6, 6, 4, 5, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
6, 6, 5, 4, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, & 6, 6, 5, 4, 8, 8, 14, 14, 14, 14, 22, 22, 32, 32, 32, 32, 44, 44, 58, 58, 74, 74, 74, 74, 92, 92, 92, 92, 92, 92, 92, 92, 112, 112, 112, 112, 134,134,134,134,134,134,134,134, 158,158,158,158,158,158,158,158, &
! !
12, 12, 11, 11, 9, 10, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, & 12, 12, 11, 11, 9, 10, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
12, 12, 11, 11, 10, 9, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, & 12, 12, 11, 11, 10, 9, 15, 15, 15, 15, 23, 23, 33, 33, 33, 33, 45, 45, 59, 59, 75, 75, 75, 75, 93, 93, 93, 93, 93, 93, 93, 93, 113, 113, 113, 113, 135,135,135,135,135,135,135,135, 159,159,159,159,159,159,159,159, &
! !
@ -993,7 +995,7 @@ module lattice
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,169,170, & 182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,169,170, &
182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,170,169 & 182,182, 181,181, 180,180, 179,179,179,179, 178,178, 177,177,177,177, 176,176, 175,175, 174,174,174,174, 173,173,173,173,173,173,173,173, 172, 172, 172, 172, 171,171,171,171,171,171,171,171, 169,170,170,170,170,170,170,169 &
],pInt),[lattice_bct_Nslip,lattice_bct_Nslip],order=[2,1]) ],pInt),[lattice_bct_Nslip,lattice_bct_Nslip],order=[2,1])
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! isotropic ! isotropic
@ -1008,14 +1010,14 @@ module lattice
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_iso_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for iso LATTICE_iso_NcleavageSystem = int([3,0,0],pInt) !< # of cleavage systems per family for iso
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_iso_Nslip = 0_pInt, & !sum(lattice_iso_NslipSystem), & !< total # of slip systems for iso LATTICE_iso_Nslip = 0_pInt, & !sum(lattice_iso_NslipSystem), & !< total # of slip systems for iso
LATTICE_iso_Ntwin = 0_pInt, & !sum(lattice_iso_NtwinSystem), & !< total # of twin systems for iso LATTICE_iso_Ntwin = 0_pInt, & !sum(lattice_iso_NtwinSystem), & !< total # of twin systems for iso
LATTICE_iso_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for iso LATTICE_iso_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for iso
LATTICE_iso_Ntrans = 0_pInt, & !sum(lattice_iso_NtransSystem), & !< total # of transformation systems for iso LATTICE_iso_Ntrans = 0_pInt, & !sum(lattice_iso_NtransSystem), & !< total # of transformation systems for iso
LATTICE_iso_Ncleavage = 3_pInt !sum(lattice_iso_NcleavageSystem) !< total # of cleavage systems for iso LATTICE_iso_Ncleavage = 3_pInt !sum(lattice_iso_NcleavageSystem) !< total # of cleavage systems for iso
real(pReal), dimension(3+3,LATTICE_iso_Ncleavage), parameter, private :: & real(pReal), dimension(3+3,LATTICE_iso_Ncleavage), parameter, private :: &
LATTICE_iso_systemCleavage = reshape(real([& LATTICE_iso_systemCleavage = reshape(real([&
! Cleavage direction Plane normal ! Cleavage direction Plane normal
@ -1037,14 +1039,14 @@ module lattice
integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: & integer(pInt), dimension(LATTICE_maxNcleavageFamily), parameter, public :: &
LATTICE_ortho_NcleavageSystem = int([1,1,1],pInt) !< # of cleavage systems per family for ortho LATTICE_ortho_NcleavageSystem = int([1,1,1],pInt) !< # of cleavage systems per family for ortho
integer(pInt), parameter, private :: & integer(pInt), parameter, private :: &
LATTICE_ortho_Nslip = 0_pInt, & !sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho LATTICE_ortho_Nslip = 0_pInt, & !sum(lattice_ortho_NslipSystem), & !< total # of slip systems for ortho
LATTICE_ortho_Ntwin = 0_pInt, & !sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho LATTICE_ortho_Ntwin = 0_pInt, & !sum(lattice_ortho_NtwinSystem), & !< total # of twin systems for ortho
LATTICE_ortho_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for ortho LATTICE_ortho_NnonSchmid = 0_pInt, & !< total # of non-Schmid contributions for ortho
LATTICE_ortho_Ntrans = 0_pInt, & !sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho LATTICE_ortho_Ntrans = 0_pInt, & !sum(lattice_ortho_NtransSystem), & !< total # of transformation systems for ortho
LATTICE_ortho_Ncleavage = 3_pInt !sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho LATTICE_ortho_Ncleavage = 3_pInt !sum(lattice_ortho_NcleavageSystem) !< total # of cleavage systems for ortho
real(pReal), dimension(3+3,LATTICE_ortho_Ncleavage), parameter, private :: & real(pReal), dimension(3+3,LATTICE_ortho_Ncleavage), parameter, private :: &
LATTICE_ortho_systemCleavage = reshape(real([& LATTICE_ortho_systemCleavage = reshape(real([&
! Cleavage direction Plane normal ! Cleavage direction Plane normal
@ -1075,14 +1077,14 @@ module lattice
real(pReal), dimension(:,:,:), allocatable, public, protected :: & real(pReal), dimension(:,:,:), allocatable, public, protected :: &
lattice_C66, lattice_trans_C66 lattice_C66, lattice_trans_C66
real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: & real(pReal), dimension(:,:,:,:,:), allocatable, public, protected :: &
lattice_C3333, lattice_trans_C3333 lattice_C3333, lattice_trans_C3333
real(pReal), dimension(:), allocatable, public, protected :: & real(pReal), dimension(:), allocatable, public, protected :: &
lattice_mu, & lattice_mu, &
lattice_nu, & lattice_nu, &
lattice_trans_mu, & lattice_trans_mu, &
lattice_trans_nu lattice_trans_nu
real(pReal), dimension(:,:,:), allocatable, public, protected :: & real(pReal), dimension(:,:,:), allocatable, public, protected :: &
lattice_thermalConductivity33, & lattice_thermalConductivity33, &
lattice_thermalExpansion33, & lattice_thermalExpansion33, &
lattice_damageDiffusion33, & lattice_damageDiffusion33, &
@ -1091,7 +1093,7 @@ module lattice
lattice_porosityDiffusion33, & lattice_porosityDiffusion33, &
lattice_hydrogenfluxDiffusion33, & lattice_hydrogenfluxDiffusion33, &
lattice_hydrogenfluxMobility33 lattice_hydrogenfluxMobility33
real(pReal), dimension(:), allocatable, public, protected :: & real(pReal), dimension(:), allocatable, public, protected :: &
lattice_damageMobility, & lattice_damageMobility, &
lattice_porosityMobility, & lattice_porosityMobility, &
lattice_massDensity, & lattice_massDensity, &
@ -1120,7 +1122,7 @@ module lattice
integer(pInt), dimension(2), parameter, private :: & integer(pInt), dimension(2), parameter, private :: &
lattice_NsymOperations = [24_pInt,12_pInt] lattice_NsymOperations = [24_pInt,12_pInt]
real(pReal), dimension(4,36), parameter, private :: & real(pReal), dimension(4,36), parameter, private :: &
lattice_symOperations = reshape([& lattice_symOperations = reshape([&
@ -1268,7 +1270,7 @@ subroutine lattice_init
debug_levelBasic debug_levelBasic
use numerics, only: & use numerics, only: &
worldrank worldrank
implicit none implicit none
integer(pInt), parameter :: FILEUNIT = 200_pInt integer(pInt), parameter :: FILEUNIT = 200_pInt
integer(pInt) :: Nphases integer(pInt) :: Nphases
@ -1279,11 +1281,11 @@ subroutine lattice_init
integer(pInt) :: section = 0_pInt,i integer(pInt) :: section = 0_pInt,i
real(pReal), dimension(:), allocatable :: & real(pReal), dimension(:), allocatable :: &
CoverA, & !!!!!!< c/a ratio for low symmetry type lattice CoverA, & !!!!!!< c/a ratio for low symmetry type lattice
CoverA_trans, & !< c/a ratio for transformed hex type lattice CoverA_trans, & !< c/a ratio for transformed hex type lattice
a_fcc, & !< lattice parameter a for fcc austenite a_fcc, & !< lattice parameter a for fcc austenite
a_bcc !< lattice paramater a for bcc martensite a_bcc !< lattice paramater a for bcc martensite
mainProcess: if (worldrank == 0) then mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- lattice init -+>>>' write(6,'(/,a)') ' <<<+- lattice init -+>>>'
write(6,'(a15,a)') ' Current time: ',IO_timeStamp() write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
#include "compilation_info.f90" #include "compilation_info.f90"
@ -1373,7 +1375,7 @@ subroutine lattice_init
if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then if (iand(debug_level(debug_lattice),debug_levelBasic) /= 0_pInt) then
write(6,'(a16,1x,i5)') ' # phases:',Nphases write(6,'(a16,1x,i5)') ' # phases:',Nphases
endif endif
allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID) allocate(lattice_structure(Nphases),source = LATTICE_undefined_ID)
allocate(trans_lattice_structure(Nphases),source = LATTICE_undefined_ID) allocate(trans_lattice_structure(Nphases),source = LATTICE_undefined_ID)
allocate(lattice_C66(6,6,Nphases), source=0.0_pReal) allocate(lattice_C66(6,6,Nphases), source=0.0_pReal)
@ -1461,7 +1463,7 @@ subroutine lattice_init
if (IO_isBlank(line)) cycle ! skip empty lines if (IO_isBlank(line)) cycle ! skip empty lines
if (IO_getTag(line,'<','>') /= '') then ! stop at next part if (IO_getTag(line,'<','>') /= '') then ! stop at next part
line = IO_read(fileUnit, .true.) ! reset IO_read line = IO_read(fileUnit, .true.) ! reset IO_read
exit exit
endif endif
if (IO_getTag(line,'[',']') /= '') then ! next section if (IO_getTag(line,'[',']') /= '') then ! next section
section = section + 1_pInt section = section + 1_pInt
@ -1615,7 +1617,7 @@ subroutine lattice_init
end select end select
endif endif
enddo enddo
do i = 1_pInt,Nphases do i = 1_pInt,Nphases
if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) & if ((CoverA(i) < 1.0_pReal .or. CoverA(i) > 2.0_pReal) &
.and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131_pInt,el=i) ! checking physical significance of c/a .and. lattice_structure(i) == LATTICE_hex_ID) call IO_error(131_pInt,el=i) ! checking physical significance of c/a
@ -1652,7 +1654,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
use IO, only: & use IO, only: &
IO_error, & IO_error, &
IO_warning IO_warning
implicit none implicit none
integer(pInt), intent(in) :: myPhase integer(pInt), intent(in) :: myPhase
real(pReal), intent(in) :: & real(pReal), intent(in) :: &
@ -1689,7 +1691,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
lattice_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(lattice_structure(myPhase),& lattice_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(lattice_structure(myPhase),&
lattice_C66(1:6,1:6,myPhase)) lattice_C66(1:6,1:6,myPhase))
lattice_mu(myPhase) = 0.2_pReal *( lattice_C66(1,1,myPhase) & lattice_mu(myPhase) = 0.2_pReal *( lattice_C66(1,1,myPhase) &
- lattice_C66(1,2,myPhase) & - lattice_C66(1,2,myPhase) &
+ 3.0_pReal*lattice_C66(4,4,myPhase)) ! (C11iso-C12iso)/2 with C11iso=(3*C11+2*C12+4*C44)/5 and C12iso=(C11+4*C12-2*C44)/5 + 3.0_pReal*lattice_C66(4,4,myPhase)) ! (C11iso-C12iso)/2 with C11iso=(3*C11+2*C12+4*C44)/5 and C12iso=(C11+4*C12-2*C44)/5
@ -1735,7 +1737,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
lattice_trans_C66(1,3,myPhase) = c13bar lattice_trans_C66(1,3,myPhase) = c13bar
lattice_trans_C66(3,3,myPhase) = c33bar lattice_trans_C66(3,3,myPhase) = c33bar
lattice_trans_C66(4,4,myPhase) = c44bar - B lattice_trans_C66(4,4,myPhase) = c44bar - B
lattice_trans_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(trans_lattice_structure(myPhase),& lattice_trans_C66(1:6,1:6,myPhase) = lattice_symmetrizeC66(trans_lattice_structure(myPhase),&
lattice_trans_C66(1:6,1:6,myPhase)) lattice_trans_C66(1:6,1:6,myPhase))
lattice_trans_mu(myPhase) = 0.2_pReal *( lattice_trans_C66(1,1,myPhase) & lattice_trans_mu(myPhase) = 0.2_pReal *( lattice_trans_C66(1,1,myPhase) &
@ -1772,7 +1774,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
lattice_hydrogenfluxDiffusion33(1:3,1:3,myPhase)) lattice_hydrogenfluxDiffusion33(1:3,1:3,myPhase))
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),& lattice_hydrogenfluxMobility33(1:3,1:3,myPhase) = lattice_symmetrize33(lattice_structure(myPhase),&
lattice_hydrogenfluxMobility33(1:3,1:3,myPhase)) lattice_hydrogenfluxMobility33(1:3,1:3,myPhase))
select case(lattice_structure(myPhase)) select case(lattice_structure(myPhase))
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! fcc ! fcc
@ -1784,7 +1786,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
do i = 1_pInt,myNslip ! assign slip system vectors do i = 1_pInt,myNslip ! assign slip system vectors
sd(1:3,i) = lattice_fcc_systemSlip(1:3,i) sd(1:3,i) = lattice_fcc_systemSlip(1:3,i)
sn(1:3,i) = lattice_fcc_systemSlip(4:6,i) sn(1:3,i) = lattice_fcc_systemSlip(4:6,i)
enddo enddo
do i = 1_pInt,myNtwin ! assign twin system vectors and shears do i = 1_pInt,myNtwin ! assign twin system vectors and shears
td(1:3,i) = lattice_fcc_systemTwin(1:3,i) td(1:3,i) = lattice_fcc_systemTwin(1:3,i)
tn(1:3,i) = lattice_fcc_systemTwin(4:6,i) tn(1:3,i) = lattice_fcc_systemTwin(4:6,i)
@ -1794,11 +1796,11 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
cd(1:3,i) = lattice_fcc_systemCleavage(1:3,i)/norm2(lattice_fcc_systemCleavage(1:3,i)) cd(1:3,i) = lattice_fcc_systemCleavage(1:3,i)/norm2(lattice_fcc_systemCleavage(1:3,i))
cn(1:3,i) = lattice_fcc_systemCleavage(4:6,i)/norm2(lattice_fcc_systemCleavage(4:6,i)) cn(1:3,i) = lattice_fcc_systemCleavage(4:6,i)/norm2(lattice_fcc_systemCleavage(4:6,i))
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i)) ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
enddo enddo
! Phase transformation ! Phase transformation
select case(trans_lattice_structure(myPhase)) select case(trans_lattice_structure(myPhase))
case (LATTICE_bcc_ID) ! fcc to bcc transformation case (LATTICE_bcc_ID) ! fcc to bcc transformation
do i = 1_pInt,myNtrans do i = 1_pInt,myNtrans
Rtr(1:3,1:3,i) = math_axisAngleToR(lattice_fccTobcc_systemTrans(1:3,i), & ! Pitsch rotation Rtr(1:3,1:3,i) = math_axisAngleToR(lattice_fccTobcc_systemTrans(1:3,i), & ! Pitsch rotation
lattice_fccTobcc_systemTrans(4,i)*INRAD) lattice_fccTobcc_systemTrans(4,i)*INRAD)
@ -1894,7 +1896,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
cd(1:3,i) = lattice_bcc_systemCleavage(1:3,i)/norm2(lattice_bcc_systemCleavage(1:3,i)) cd(1:3,i) = lattice_bcc_systemCleavage(1:3,i)/norm2(lattice_bcc_systemCleavage(1:3,i))
cn(1:3,i) = lattice_bcc_systemCleavage(4:6,i)/norm2(lattice_bcc_systemCleavage(4:6,i)) cn(1:3,i) = lattice_bcc_systemCleavage(4:6,i)/norm2(lattice_bcc_systemCleavage(4:6,i))
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i)) ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
enddo enddo
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_bcc_NslipSystem lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_bcc_NslipSystem
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_bcc_NtwinSystem lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_bcc_NtwinSystem
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_bcc_NtransSystem lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_bcc_NtransSystem
@ -1904,7 +1906,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
lattice_interactionSlipTwin(1:myNslip,1:myNtwin,myPhase) = lattice_bcc_interactionSlipTwin lattice_interactionSlipTwin(1:myNslip,1:myNtwin,myPhase) = lattice_bcc_interactionSlipTwin
lattice_interactionTwinSlip(1:myNtwin,1:myNslip,myPhase) = lattice_bcc_interactionTwinSlip lattice_interactionTwinSlip(1:myNtwin,1:myNslip,myPhase) = lattice_bcc_interactionTwinSlip
lattice_interactionTwinTwin(1:myNtwin,1:myNtwin,myPhase) = lattice_bcc_interactionTwinTwin lattice_interactionTwinTwin(1:myNtwin,1:myNtwin,myPhase) = lattice_bcc_interactionTwinTwin
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! hex (including conversion from miller-bravais (a1=a2=a3=c) to miller (a, b, c) indices) ! hex (including conversion from miller-bravais (a1=a2=a3=c) to miller (a, b, c) indices)
case (LATTICE_hex_ID) case (LATTICE_hex_ID)
@ -1912,7 +1914,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
myNtwin = lattice_hex_Ntwin myNtwin = lattice_hex_Ntwin
myNtrans = lattice_hex_Ntrans myNtrans = lattice_hex_Ntrans
myNcleavage = lattice_hex_Ncleavage myNcleavage = lattice_hex_Ncleavage
do i = 1_pInt,myNslip ! assign slip system vectors do i = 1_pInt,myNslip ! assign slip system vectors
sd(1,i) = lattice_hex_systemSlip(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)] sd(1,i) = lattice_hex_systemSlip(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
sd(2,i) = (lattice_hex_systemSlip(1,i)+2.0_pReal*lattice_hex_systemSlip(2,i))*& sd(2,i) = (lattice_hex_systemSlip(1,i)+2.0_pReal*lattice_hex_systemSlip(2,i))*&
0.5_pReal*sqrt(3.0_pReal) 0.5_pReal*sqrt(3.0_pReal)
@ -1920,7 +1922,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
sn(1,i) = lattice_hex_systemSlip(5,i) ! plane (hkil)->(h (h+2k)/sqrt(3) l/(c/a)) sn(1,i) = lattice_hex_systemSlip(5,i) ! plane (hkil)->(h (h+2k)/sqrt(3) l/(c/a))
sn(2,i) = (lattice_hex_systemSlip(5,i)+2.0_pReal*lattice_hex_systemSlip(6,i))/sqrt(3.0_pReal) sn(2,i) = (lattice_hex_systemSlip(5,i)+2.0_pReal*lattice_hex_systemSlip(6,i))/sqrt(3.0_pReal)
sn(3,i) = lattice_hex_systemSlip(8,i)/CoverA sn(3,i) = lattice_hex_systemSlip(8,i)/CoverA
enddo enddo
do i = 1_pInt,myNtwin ! assign twin system vectors and shears do i = 1_pInt,myNtwin ! assign twin system vectors and shears
td(1,i) = lattice_hex_systemTwin(1,i)*1.5_pReal td(1,i) = lattice_hex_systemTwin(1,i)*1.5_pReal
td(2,i) = (lattice_hex_systemTwin(1,i)+2.0_pReal*lattice_hex_systemTwin(2,i))*& td(2,i) = (lattice_hex_systemTwin(1,i)+2.0_pReal*lattice_hex_systemTwin(2,i))*&
@ -1940,7 +1942,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
ts(i) = 2.0_pReal*(CoverA*CoverA-2.0_pReal)/3.0_pReal/CoverA ts(i) = 2.0_pReal*(CoverA*CoverA-2.0_pReal)/3.0_pReal/CoverA
end select end select
enddo enddo
do i = 1_pInt, myNcleavage ! cleavage system vectors do i = 1_pInt, myNcleavage ! cleavage system vectors
cd(1,i) = lattice_hex_systemCleavage(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)] cd(1,i) = lattice_hex_systemCleavage(1,i)*1.5_pReal ! direction [uvtw]->[3u/2 (u+2v)*sqrt(3)/2 w*(c/a)]
cd(2,i) = (lattice_hex_systemCleavage(1,i)+2.0_pReal*lattice_hex_systemCleavage(2,i))*& cd(2,i) = (lattice_hex_systemCleavage(1,i)+2.0_pReal*lattice_hex_systemCleavage(2,i))*&
0.5_pReal*sqrt(3.0_pReal) 0.5_pReal*sqrt(3.0_pReal)
@ -1951,7 +1953,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
cn(3,i) = lattice_hex_systemCleavage(8,i)/CoverA cn(3,i) = lattice_hex_systemCleavage(8,i)/CoverA
cn(1:3,1) = cn(1:3,i)/norm2(cn(1:3,i)) cn(1:3,1) = cn(1:3,i)/norm2(cn(1:3,i))
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i)) ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
enddo enddo
lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_hex_NslipSystem lattice_NslipSystem(1:lattice_maxNslipFamily,myPhase) = lattice_hex_NslipSystem
lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_hex_NtwinSystem lattice_NtwinSystem(1:lattice_maxNtwinFamily,myPhase) = lattice_hex_NtwinSystem
lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_hex_NtransSystem lattice_NtransSystem(1:lattice_maxNtransFamily,myPhase) = lattice_hex_NtransSystem
@ -1994,7 +1996,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(LATTICE_ortho_systemCleavage(1:3,i)) cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(LATTICE_ortho_systemCleavage(1:3,i))
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(LATTICE_ortho_systemCleavage(4:6,i)) cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(LATTICE_ortho_systemCleavage(4:6,i))
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i)) ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
enddo enddo
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -2008,7 +2010,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(lattice_iso_systemCleavage(1:3,i)) cd(1:3,i) = lattice_iso_systemCleavage(1:3,i)/norm2(lattice_iso_systemCleavage(1:3,i))
cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(lattice_iso_systemCleavage(4:6,i)) cn(1:3,i) = lattice_iso_systemCleavage(4:6,i)/norm2(lattice_iso_systemCleavage(4:6,i))
ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i)) ct(1:3,i) = math_crossproduct(cd(1:3,i),cn(1:3,i))
enddo enddo
lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem lattice_NcleavageSystem(1:lattice_maxNcleavageFamily,myPhase) = lattice_iso_NcleavageSystem
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -2028,7 +2030,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
do j = 1_pInt,lattice_NnonSchmid(myPhase) do j = 1_pInt,lattice_NnonSchmid(myPhase)
lattice_Sslip(1:3,1:3,2*j ,i,myPhase) = sns(1:3,1:3,1,j,i) lattice_Sslip(1:3,1:3,2*j ,i,myPhase) = sns(1:3,1:3,1,j,i)
lattice_Sslip(1:3,1:3,2*j+1,i,myPhase) = sns(1:3,1:3,2,j,i) lattice_Sslip(1:3,1:3,2*j+1,i,myPhase) = sns(1:3,1:3,2,j,i)
enddo enddo
do j = 1_pInt,1_pInt+2_pInt*lattice_NnonSchmid(myPhase) do j = 1_pInt,1_pInt+2_pInt*lattice_NnonSchmid(myPhase)
lattice_Sslip_v(1:6,j,i,myPhase) = & lattice_Sslip_v(1:6,j,i,myPhase) = &
math_Mandel33to6(math_symmetric33(lattice_Sslip(1:3,1:3,j,i,myPhase))) math_Mandel33to6(math_symmetric33(lattice_Sslip(1:3,1:3,j,i,myPhase)))
@ -2064,7 +2066,7 @@ subroutine lattice_initializeStructure(myPhase,CoverA,CoverA_trans,a_fcc,a_bcc)
math_Mandel33to6(math_symmetric33(lattice_Scleavage(1:3,1:3,j,i,myPhase))) math_Mandel33to6(math_symmetric33(lattice_Scleavage(1:3,1:3,j,i,myPhase)))
enddo enddo
enddo enddo
end subroutine lattice_initializeStructure end subroutine lattice_initializeStructure
@ -2080,7 +2082,7 @@ pure function lattice_symmetrizeC66(struct,C66)
integer(pInt) :: j,k integer(pInt) :: j,k
lattice_symmetrizeC66 = 0.0_pReal lattice_symmetrizeC66 = 0.0_pReal
select case(struct) select case(struct)
case (LATTICE_iso_ID) case (LATTICE_iso_ID)
forall(k=1_pInt:3_pInt) forall(k=1_pInt:3_pInt)
@ -2093,7 +2095,7 @@ pure function lattice_symmetrizeC66(struct,C66)
forall(j=1_pInt:3_pInt) lattice_symmetrizeC66(k,j) = C66(1,2) forall(j=1_pInt:3_pInt) lattice_symmetrizeC66(k,j) = C66(1,2)
lattice_symmetrizeC66(k,k) = C66(1,1) lattice_symmetrizeC66(k,k) = C66(1,1)
lattice_symmetrizeC66(k+3_pInt,k+3_pInt) = C66(4,4) lattice_symmetrizeC66(k+3_pInt,k+3_pInt) = C66(4,4)
end forall end forall
case (LATTICE_hex_ID) case (LATTICE_hex_ID)
lattice_symmetrizeC66(1,1) = C66(1,1) lattice_symmetrizeC66(1,1) = C66(1,1)
lattice_symmetrizeC66(2,2) = C66(1,1) lattice_symmetrizeC66(2,2) = C66(1,1)
@ -2136,7 +2138,7 @@ pure function lattice_symmetrizeC66(struct,C66)
case default case default
lattice_symmetrizeC66 = C66 lattice_symmetrizeC66 = C66
end select end select
end function lattice_symmetrizeC66 end function lattice_symmetrizeC66
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -2151,7 +2153,7 @@ pure function lattice_symmetrize33(struct,T33)
integer(pInt) :: k integer(pInt) :: k
lattice_symmetrize33 = 0.0_pReal lattice_symmetrize33 = 0.0_pReal
select case(struct) select case(struct)
case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID) case (LATTICE_iso_ID,LATTICE_fcc_ID,LATTICE_bcc_ID)
forall(k=1_pInt:3_pInt) lattice_symmetrize33(k,k) = T33(1,1) forall(k=1_pInt:3_pInt) lattice_symmetrize33(k,k) = T33(1,1)
@ -2166,7 +2168,7 @@ pure function lattice_symmetrize33(struct,T33)
case default case default
lattice_symmetrize33 = T33 lattice_symmetrize33 = T33
end select end select
end function lattice_symmetrize33 end function lattice_symmetrize33
@ -2250,7 +2252,7 @@ pure function lattice_qDisorientation(Q1, Q2, struct)
dQ = math_qMul(math_qConj(Q1),Q2) dQ = math_qMul(math_qConj(Q1),Q2)
lattice_qDisorientation = dQ lattice_qDisorientation = dQ
select case(symmetry) select case(symmetry)
case (1_pInt,2_pInt) case (1_pInt,2_pInt)
s = sum(lattice_NsymOperations(1:symmetry-1_pInt)) s = sum(lattice_NsymOperations(1:symmetry-1_pInt))

File diff suppressed because it is too large Load Diff

View File

@ -557,7 +557,7 @@ subroutine plastic_phenoplus_init(fileUnit)
! allocate state arrays ! allocate state arrays
sizeState = plastic_phenoplus_totalNslip(instance) & ! s_slip sizeState = plastic_phenoplus_totalNslip(instance) & ! s_slip
+ plastic_phenoplus_totalNtwin(instance) & ! s_twin + plastic_phenoplus_totalNtwin(instance) & ! s_twin
+ 2_pInt & ! sum(gamma) + sum(f) + 2_pInt & ! sum(gamma) + sum(twinVolFrac)
+ plastic_phenoplus_totalNslip(instance) & ! accshear_slip + plastic_phenoplus_totalNslip(instance) & ! accshear_slip
+ plastic_phenoplus_totalNtwin(instance) & ! accshear_twin + plastic_phenoplus_totalNtwin(instance) & ! accshear_twin
+ plastic_phenoplus_totalNslip(instance) ! kappa + plastic_phenoplus_totalNslip(instance) ! kappa
@ -568,7 +568,7 @@ subroutine plastic_phenoplus_init(fileUnit)
! memory leak issue. ! memory leak issue.
sizeDotState = plastic_phenoplus_totalNslip(instance) & ! s_slip sizeDotState = plastic_phenoplus_totalNslip(instance) & ! s_slip
+ plastic_phenoplus_totalNtwin(instance) & ! s_twin + plastic_phenoplus_totalNtwin(instance) & ! s_twin
+ 2_pInt & ! sum(gamma) + sum(f) + 2_pInt & ! sum(gamma) + sum(twinVolFrac)
+ plastic_phenoplus_totalNslip(instance) & ! accshear_slip + plastic_phenoplus_totalNslip(instance) & ! accshear_slip
+ plastic_phenoplus_totalNtwin(instance) ! accshear_twin + plastic_phenoplus_totalNtwin(instance) ! accshear_twin
@ -739,183 +739,256 @@ end subroutine plastic_phenoplus_aTolState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculate push-up factors (kappa) for each voxel based on its neighbors !> @brief calculate push-up factors (kappa) for each voxel based on its neighbors
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el) subroutine plastic_phenoplus_microstructure(orientation,ipc,ip,el,F0,Fe,Fp,Tstar_v)
use math, only: pi, & use math, only: pi, &
math_mul33x33, & math_identity2nd, &
math_mul3x3, & math_mul33x33, &
math_transpose33, & math_mul33xx33, &
math_qDot, & math_mul3x3, &
math_qRot, & math_transpose33, &
indeg math_qDot, &
math_qRot, &
indeg
use mesh, only: mesh_element, & use mesh, only: mesh_element, &
FE_NipNeighbors, & FE_NipNeighbors, &
FE_geomtype, & FE_geomtype, &
FE_celltype, & FE_celltype, &
mesh_maxNips, & mesh_maxNips, &
mesh_NcpElems, & mesh_NcpElems, &
mesh_ipNeighborhood mesh_ipNeighborhood
use material, only: material_phase, & use material, only: material_phase, &
material_texture, & material_texture, &
phase_plasticityInstance, & phase_plasticityInstance, &
phaseAt, phasememberAt, & phaseAt, phasememberAt, &
homogenization_maxNgrains, & homogenization_maxNgrains, &
plasticState plasticState
use lattice, only: lattice_sn, & use lattice, only: lattice_Sslip_v, &
lattice_sd, & lattice_maxNslipFamily, &
lattice_qDisorientation lattice_NslipSystem, &
lattice_NslipSystem, &
lattice_sn, &
lattice_sd, &
lattice_qDisorientation
!***input variables !***input variables
implicit none implicit none
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point ipc, & !< component-ID of integration point
ip, & !< integration point ip, & !< integration point
el !< element el
real(pReal), dimension(4,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: & real(pReal), dimension(3,3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
orientation ! crystal orientation in quaternions F0, & !< deformation gradient from last increment
Fe, & !< elastic deformation gradient
Fp !< elastic deformation gradient !< element
real(pReal), dimension(4,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
orientation !< crystal orientation in quaternions
real(pReal), dimension(6,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), intent(in) :: &
Tstar_v !< for calculation of gdot
!***local variables !***local variables
integer(pInt) instance, & !my instance of this plasticity integer(pInt) instance, & !my instance of this plasticity
ph, & !my phase ph, & !my phase
of, & !my spatial position in memory (offset) of, & !my spatial position in memory (offset)
textureID, & !my texture textureID, & !my texture
Nneighbors, & !number of neighbors (<= 6) index_myFamily, &
vld_Nneighbors, & !number of my valid neighbors Nneighbors, & !number of neighbors (<= 6)
n, & !neighbor index (for iterating through all neighbors) vld_Nneighbors, & !number of my valid neighbors
ns, & !number of slip system n, & !neighbor index (for iterating through all neighbors)
nt, & !number of twin system n_calcTaylor, & !
me_slip, & !my slip system index n_phasecheck, & !
neighbor_el, & !element number of neighboring material point ns, & !number of slip system
neighbor_ip, & !integration point of neighboring material point nt, & !number of twin system
neighbor_n, & !I have no idea what is this me_slip, & !my slip system index
neighbor_of, & !spatial position in memory for this neighbor (offset) neighbor_el, & !element number of neighboring material point
neighbor_ph, & !neighbor's phase neighbor_ip, & !integration point of neighboring material point
neighbor_tex, & !neighbor's texture ID neighbor_ipc, & !I have no idea what is this
ne_slip_ac, & !loop to find neighbor shear neighbor_of, & !spatial position in memory for this neighbor (offset)
ne_slip, & !slip system index for neighbor neighbor_ph, & !neighbor's phase
index_kappa, & !index of pushup factors in plasticState neighbor_instance, & !neighbor's instance of this plasticity
offset_acshear_slip, & !offset in PlasticState for the accumulative shear neighbor_tex, & !neighbor's texture ID
j !quickly loop through slip families ne_slip, & !slip system index for neighbor
index_kappa, & !index of pushup factors in plasticState
j, & !quickly loop through slip families
f,i,& !loop counter for me
f_ne, i_ne !loop counter for neighbor
real(pReal) kappa_max, & ! real(pReal) mprime_cut, & !m' cutoff to consider neighboring effect
tmp_myshear_slip, & !temp storage for accumulative shear for me dtaylor_cut, & !threshold for determine high contrast interface using Taylor factor
mprime_cut, & !m' cutoff to consider neighboring effect tau_slip, & !the average accumulative shear from my neighbor
avg_acshear_ne, & !the average accumulative shear from my neighbor taylor_me, & !Taylor factor for me
tmp_mprime, & !temp holder for m' value taylor_ne, & !Taylor factor for my current neighbor
tmp_acshear !temp holder for accumulative shear for m' d_vonstrain, & !von Mises delta strain (temp container)
sum_gdot !total shear rate for given material point
real(pReal), dimension(3,3) :: &
F0_me, & !my deformation gradient from last converged increment
Fe_me, & !my elastic deformation gradient
Fp_me, & !my plastic deformation gradient
dF_me, & !my deformation gradient change (delta)
dE_me, & !my Green Lagrangian strain tensor (delta)
F0_ne, & !
Fe_ne, & !elastic deformation gradient of my current neighbor
Fp_ne, & !plastic deformation gradient of my current neighbor
dF_ne, & !deformation gradient of my current neighbor
dE_ne !delta Green Lagrangian strain tensor
real(pReal), dimension(plastic_phenoplus_totalNslip(phase_plasticityInstance(material_phase(1,ip,el)))) :: & real(pReal), dimension(plastic_phenoplus_totalNslip(phase_plasticityInstance(material_phase(1,ip,el)))) :: &
m_primes, & !m' between me_alpha(one) and neighbor beta(all) m_primes !m' between me_alpha(one) and neighbor beta(all)
me_acshear, & !temp storage for ac_shear of one particular system for me
ne_acshear !temp storage for ac_shear of one particular system for one of my neighbor
real(pReal), dimension(3,plastic_phenoplus_totalNslip(phase_plasticityInstance(material_phase(1,ip,el)))) :: & real(pReal), dimension(3,plastic_phenoplus_totalNslip(phase_plasticityInstance(material_phase(1,ip,el)))) :: &
slipNormal, & slipNormal, &
slipDirect slipDirect
real(pReal), dimension(4) :: my_orientation, & !store my orientation real(pReal), dimension(4) :: &
neighbor_orientation, & !store my neighbor orientation my_orientation, & !store my orientation
absMisorientation neighbor_orientation, & !store my neighbor orientation
absMisorientation
real(pReal), dimension(FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))) :: & real(pReal), dimension(FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))) :: &
ne_mprimes !m' between each neighbor ne_mprimes, & !m' between each neighbor
d_taylors !store (taylor_ne-taylor_me) for each neighbor
!***Get my properties !***Get my properties
Nneighbors = FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el)))) Nneighbors = FE_NipNeighbors(FE_celltype(FE_geomtype(mesh_element(2,el))))
ph = phaseAt(ipc,ip,el) !get my phase ph = phaseAt(ipc,ip,el) !get my phase
of = phasememberAt(ipc,ip,el) !get my spatial location offset in memory of = phasememberAt(ipc,ip,el) !get my spatial location offset in memory
textureID = material_texture(1,ip,el) !get my texture ID textureID = material_texture(1,ip,el) !get my texture ID
instance = phase_plasticityInstance(ph) !get my instance based on phase ID instance = phase_plasticityInstance(ph) !get my instance based on phase ID
ns = plastic_phenoplus_totalNslip(instance) ns = plastic_phenoplus_totalNslip(instance)
nt = plastic_phenoplus_totalNtwin(instance) nt = plastic_phenoplus_totalNtwin(instance)
offset_acshear_slip = ns + nt + 2_pInt index_kappa = ns + nt + 2_pInt + ns + nt !location of kappa in plasticState
index_kappa = ns + nt + 2_pInt + ns + nt !location of kappa in plasticState
mprime_cut = 0.7_pReal !set by Dr.Bieler
!***gather my accumulative shear from palsticState !***init calculation for given voxel
FINDMYSHEAR: do j = 1_pInt,ns mprime_cut = 0.7_pReal !set by Dr.Bieler
me_acshear(j) = plasticState(ph)%state(offset_acshear_slip+j, of) dtaylor_cut = 1.0_pReal !set by Chen, quick test only
enddo FINDMYSHEAR
!***gather my orientation and slip systems !***gather my orientation, F and slip systems
my_orientation = orientation(1:4, ipc, ip, el) my_orientation = orientation(1:4, ipc, ip, el)
slipNormal(1:3, 1:ns) = lattice_sn(1:3, 1:ns, ph) F0_me = F0(1:3, 1:3, ipc, ip, el)
slipDirect(1:3, 1:ns) = lattice_sd(1:3, 1:ns, ph) Fe_me = Fe(1:3, 1:3, ipc, ip, el)
kappa_max = plastic_phenoplus_kappa_max(instance) !maximum pushups allowed (READIN) Fp_me = Fp(1:3, 1:3, ipc, ip, el)
slipNormal(1:3, 1:ns) = lattice_sn(1:3, 1:ns, ph)
slipDirect(1:3, 1:ns) = lattice_sd(1:3, 1:ns, ph)
!***calculate kappa between me and all my neighbors !***check if all my neighbors have the same phase as me
LOOPMYSLIP: DO me_slip=1_pInt,ns vld_Nneighbors = 0
vld_Nneighbors = Nneighbors PHASECHECK: DO n_phasecheck = 1_pInt, Nneighbors
tmp_myshear_slip = me_acshear(me_slip) !******for each of my neighbor
tmp_mprime = 0.0_pReal !highest m' from all neighbors neighbor_el = mesh_ipNeighborhood( 1, n_phasecheck, ip, el )
tmp_acshear = 0.0_pReal !accumulative shear from highest m' neighbor_ip = mesh_ipNeighborhood( 2, n_phasecheck, ip, el )
neighbor_ipc = 1
neighbor_of = phasememberAt( neighbor_ipc, neighbor_ip, neighbor_el )
neighbor_ph = phaseAt( neighbor_ipc, neighbor_ip, neighbor_el )
IF (neighbor_ph == ph) THEN
vld_Nneighbors = vld_Nneighbors + 1_pInt
ENDIF
ENDDO PHASECHECK
!***go through my neighbors to find highest m' !***initialize kappa with 1.0 (assume no push-up)
LOOPNEIGHBORS: DO n=1_pInt,Nneighbors plasticState(ph)%state(index_kappa+1_pInt:index_kappa+ns, of) = 1.0_pReal
neighbor_el = mesh_ipNeighborhood(1,n,ip,el)
neighbor_ip = mesh_ipNeighborhood(2,n,ip,el)
neighbor_n = 1 !It is ipc
neighbor_of = phasememberAt( neighbor_n, neighbor_ip, neighbor_el)
neighbor_ph = phaseAt( neighbor_n, neighbor_ip, neighbor_el)
neighbor_tex = material_texture(1,neighbor_ip,neighbor_el)
neighbor_orientation = orientation(1:4, neighbor_n, neighbor_ip, neighbor_el) !ipc is always 1.
absMisorientation = lattice_qDisorientation(my_orientation, &
neighbor_orientation, &
0_pInt) !no need for explicit calculation of symmetry
!***find the accumulative shear for this neighbor !***only calculate kappa for those inside the main phase
LOOPFINDNEISHEAR: DO ne_slip_ac=1_pInt, ns IF (vld_Nneighbors == Nneighbors) THEN
ne_acshear(ne_slip_ac) = plasticState(ph)%state(offset_acshear_slip+ne_slip_ac, & !******calculate Taylor factor for me
neighbor_of) dF_me = math_mul33x33(Fe_me,Fp_me) - F0_me
ENDDO LOOPFINDNEISHEAR dE_me = 0.5*(math_mul33x33(math_transpose33(dF_me), dF_me) - math_identity2nd(3)) !dE = 0.5(dF^tdF-I)
d_vonstrain = SQRT(2.0_pReal/3.0_pReal * math_mul33xx33(dE_me, dE_me))
sum_gdot = 0.0_pReal
!go through my slip system to find the sum of gamma_dot
j = 0_pInt
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_phenoplus_Nslip(f,instance)
j = j+1_pInt
tau_slip = dot_product(Tstar_v(1:6, ipc, ip, el),lattice_Sslip_v(1:6,1,index_myFamily+i,ph))
sum_gdot = sum_gdot + &
plastic_phenoplus_gdot0_slip(instance)* &
((abs(tau_slip)/(plasticState(ph)%state(j,of))) &
**plastic_phenoplus_n_slip(instance))*sign(1.0_pReal,tau_slip)
ENDDO slipSystems
ENDDO slipFamilies
taylor_me = d_vonstrain/sum_gdot
!***calculate the average accumulative shear and use it as cutoff !***calculate delta_M (Taylor factor) between each neighbor and me
avg_acshear_ne = SUM(ne_acshear)/ns LOOPCALCTAYLOR: DO n_calcTaylor=1_pInt, Nneighbors
!******for each of my neighbor
neighbor_el = mesh_ipNeighborhood( 1, n_calcTaylor, ip, el )
neighbor_ip = mesh_ipNeighborhood( 2, n_calcTaylor, ip, el )
neighbor_ipc = 1 !It is ipc
neighbor_of = phasememberAt( neighbor_ipc, neighbor_ip, neighbor_el )
neighbor_ph = phaseAt( neighbor_ipc, neighbor_ip, neighbor_el )
neighbor_instance = phase_plasticityInstance( neighbor_ph )
neighbor_tex = material_texture( 1,neighbor_ip, neighbor_el )
neighbor_orientation = orientation( 1:4, neighbor_ipc, neighbor_ip, neighbor_el ) !ipc is always 1.
Fe_ne = Fe( 1:3, 1:3, neighbor_ipc, neighbor_ip, neighbor_el )
Fp_ne = Fp( 1:3, 1:3, neighbor_ipc, neighbor_ip, neighbor_el )
F0_ne = F0( 1:3, 1:3, neighbor_ipc, neighbor_ip, neighbor_el )
!******calculate the Taylor factor
dF_ne = math_mul33x33(Fe_ne, Fp_ne) - F0_ne
dE_ne = 0.5*(math_mul33x33(math_transpose33(dF_ne), dF_ne) - math_identity2nd(3)) !dE = 0.5(dF^tdF-I)
d_vonstrain = SQRT(2.0_pReal/3.0_pReal * math_mul33xx33(dE_ne, dE_ne))
sum_gdot = 0.0_pReal
!go through my neighbor slip system to calculate sum_gdot
j = 0_pInt
slipFamiliesNeighbor: DO f_ne = 1_pInt,lattice_maxNslipFamily
index_myFamily = sum(lattice_NslipSystem(1:f_ne-1_pInt,neighbor_ph)) ! at which index starts my family
slipSystemsNeighbor: DO i_ne = 1_pInt,plastic_phenoplus_Nslip(f_ne,neighbor_instance)
j = j+1_pInt
tau_slip = dot_product(Tstar_v(1:6, neighbor_ipc, neighbor_ip, neighbor_el), &
lattice_Sslip_v(1:6,1,index_myFamily+i_ne,neighbor_ph))
sum_gdot = sum_gdot &
+plastic_phenoplus_gdot0_slip(neighbor_instance) &
*((abs(tau_slip)/(plasticState(neighbor_ph)%state(j,neighbor_of))) &
**plastic_phenoplus_n_slip(neighbor_instance))*sign(1.0_pReal,tau_slip)
ENDDO slipSystemsNeighbor
ENDDO slipFamiliesNeighbor
taylor_ne = d_vonstrain / sum_gdot
!******calculate Taylor difference
d_taylors(n_calcTaylor) = taylor_ne - taylor_me
ENDDO LOOPCALCTAYLOR
!*** !***Only perform necessary calculation if high contrast interface is detected
IF (ph==neighbor_ph) THEN IF (maxval(d_taylors) > dtaylor_cut) THEN
!***walk through all the !*****calculate kappa per slip system base
LOOPNEIGHBORSLIP: DO ne_slip=1_pInt,ns LOOPMYSLIP: DO me_slip = 1_pInt, ns
!***only consider slip system that is active (above average accumulative shear) ne_mprimes = 0.0_pReal !initialize max m' to 0 for all neighbors
IF (ne_acshear(ne_slip) > avg_acshear_ne) THEN LOOPMYNEIGHBORS: DO n=1_pInt, Nneighbors
m_primes(ne_slip) = abs(math_mul3x3(slipNormal(1:3,me_slip), & !*******only consider neighbor at the high contrast interface
math_qRot(absMisorientation, slipNormal(1:3,ne_slip)))) & IF (d_taylors(n) > dtaylor_cut) THEN
*abs(math_mul3x3(slipDirect(1:3,me_slip), & neighbor_el = mesh_ipNeighborhood( 1, n_calcTaylor, ip, el )
math_qRot(absMisorientation, slipDirect(1:3,ne_slip)))) neighbor_ip = mesh_ipNeighborhood( 2, n_calcTaylor, ip, el )
!***find the highest m' and corresponding accumulative shear neighbor_ipc = 1 !It is ipc
IF (m_primes(ne_slip) > tmp_mprime) THEN neighbor_of = phasememberAt( neighbor_ipc, neighbor_ip, neighbor_el )
tmp_mprime = m_primes(ne_slip) neighbor_ph = phaseAt( neighbor_ipc, neighbor_ip, neighbor_el )
tmp_acshear = ne_acshear(ne_slip) neighbor_instance = phase_plasticityInstance( neighbor_ph )
ENDIF neighbor_tex = material_texture( 1,neighbor_ip, neighbor_el )
ENDIF neighbor_orientation = orientation( 1:4, neighbor_ipc, neighbor_ip, neighbor_el ) !ipc is always 1.
ENDDO LOOPNEIGHBORSLIP absMisorientation = lattice_qDisorientation( my_orientation, &
neighbor_orientation, &
0_pInt ) !no need for explicit calculation of symmetry
!*********go through neighbor slip system to calculate m'
LOOPNEIGHBORSLIP: DO ne_slip=1_pInt,ns
m_primes(ne_slip) = abs(math_mul3x3(slipNormal(1:3,me_slip), &
math_qRot(absMisorientation, slipNormal(1:3,ne_slip)))) &
*abs(math_mul3x3(slipDirect(1:3,me_slip), &
math_qRot(absMisorientation, slipDirect(1:3,ne_slip))))
ENDDO LOOPNEIGHBORSLIP
ne_mprimes(n) = maxval(m_primes)
ENDIF
ENDDO LOOPMYNEIGHBORS
ELSE plasticState(ph)%state(index_kappa+me_slip, of) = &
ne_mprimes(n) = 0.0_pReal 1.03_pReal + 0.03_pReal*ERF(4.0_pReal * maxval(ne_mprimes) - 4.0_pReal)
vld_Nneighbors = vld_Nneighbors - 1_pInt
ENDIF
ENDDO LOOPNEIGHBORS ENDDO LOOPMYSLIP
ENDIF
!***check if this element close to rim
IF (vld_Nneighbors < Nneighbors) THEN
!***rim voxel, no modification allowed
plasticState(ph)%state(index_kappa+me_slip, of) = 1.0_pReal
ELSE
!***patch voxel, started to calculate push up factor for gamma_dot
IF ((tmp_mprime > mprime_cut) .AND. (tmp_acshear > tmp_myshear_slip)) THEN
plasticState(ph)%state(index_kappa+me_slip, of) = 1.0_pReal / tmp_mprime
ELSE
!***minimum damping factor is 0.5
plasticState(ph)%state(index_kappa+me_slip, of) = 0.5_pReal + tmp_mprime * 0.5_pReal
ENDIF
ENDIF ENDIF
ENDDO LOOPMYSLIP
end subroutine plastic_phenoplus_microstructure end subroutine plastic_phenoplus_microstructure