Cosmetic changes in constitutive_dislobased.f90

- more precise output labels
- do changes into forall
This commit is contained in:
Luc Hantcherli 2009-07-28 10:08:13 +00:00
parent 1cd0b74b08
commit f0729a2e52
1 changed files with 160 additions and 143 deletions

View File

@ -17,16 +17,16 @@
! Nslip 12 ! Nslip 12
! Ntwin 12 ! Ntwin 12
! constitution dislobased ! constitution dislobased
! (output) state_slip ! (output) dislocationdensity
! (output) shearrate_slip ! (output) shearrate_slip
! (output) mfp_slip ! (output) mfp_slip # mean free path
! (output) resolvedstress_slip ! (output) resolvedstress_slip
! (output) resistance_slip ! (output) resistance_slip # passing stress
! (output) state_twin ! (output) volumefraction
! (output) shearrate_twin ! (output) shearrate_twin
! (output) mfp_twin ! (output) mfp_twin # mean free path
! (output) resolvedstress_twin ! (output) resolvedstress_twin
! (output) resistance_twin ! (output) resistance_twin # "nucleation barrier"
! ### dislocation density-based constitutive parameters ### ! ### dislocation density-based constitutive parameters ###
! burgers 2.56e-10 # Burgers vector [m] ! burgers 2.56e-10 # Burgers vector [m]
@ -36,14 +36,14 @@
! interaction_slipslip 1.0 2.2 3.0 1.6 3.8 4.5 # Dislocation interaction coefficients ! interaction_slipslip 1.0 2.2 3.0 1.6 3.8 4.5 # Dislocation interaction coefficients
! interaction_sliptwin 0.0 1.0 # Dislocation interaction coefficients ! interaction_sliptwin 0.0 1.0 # Dislocation interaction coefficients
! interaction_twintwin 0.0 1.0 # Dislocation interaction coefficients ! interaction_twintwin 0.0 1.0 # Dislocation interaction coefficients
! # Playground for dislocation glide ! # dislocation glide
! rho0 2.5e12 # Initial dislocation density [m/m³] ! rho0 2.5e12 # Initial dislocation density [m/m³]
! Cmfpslip 1.0 # Adjustable parameter controlling dislocation mean free path ! Cmfpslip 1.0 # Adjustable parameter controlling dislocation mean free path
! Cactivolume 1.0 # Adjustable parameter controlling activation volume ! Cactivolume 1.0 # Adjustable parameter controlling activation volume
! Cthresholdslip 0.1 # Adjustable parameter controlling threshold stress for dislocation motion ! Cthresholdslip 0.1 # Adjustable parameter controlling threshold stress for dislocation motion
! Cstorage 0.02 # Adjustable parameter controlling dislocation storage ! Cstorage 0.02 # Adjustable parameter controlling dislocation storage
! Carecovery 15.0 # Adjustable parameter controlling athermal recovery ! Carecovery 15.0 # Adjustable parameter controlling athermal recovery
! # Playground for mechanical twinning ! # mechanical twinning
! Ndot0 0.0 # Number of potential twin source per volume per time [1/m³.s] ! Ndot0 0.0 # Number of potential twin source per volume per time [1/m³.s]
! fmax 1.0 # Maximum admissible twin volume fraction ! fmax 1.0 # Maximum admissible twin volume fraction
! Cmfptwin 1.0 # Adjustable parameter controlling twin mean free path ! Cmfptwin 1.0 # Adjustable parameter controlling twin mean free path
@ -65,49 +65,51 @@ MODULE constitutive_dislobased
character(len=64), dimension(:,:), allocatable,target :: constitutive_dislobased_output character(len=64), dimension(:,:), allocatable,target :: constitutive_dislobased_output
character(len=32), dimension(:), allocatable :: constitutive_dislobased_structureName character(len=32), dimension(:), allocatable :: constitutive_dislobased_structureName
integer(pInt), dimension(:), allocatable :: constitutive_dislobased_structure integer(pInt), dimension(:), allocatable :: constitutive_dislobased_structure, &
integer(pInt), dimension(:,:), allocatable :: constitutive_dislobased_Nslip constitutive_dislobased_totalNslip, &
integer(pInt), dimension(:,:), allocatable :: constitutive_dislobased_Ntwin constitutive_dislobased_totalNtwin
integer(pInt), dimension(:), allocatable :: constitutive_dislobased_totalNslip integer(pInt), dimension(:,:), allocatable :: constitutive_dislobased_Nslip, &
integer(pInt), dimension(:), allocatable :: constitutive_dislobased_totalNtwin constitutive_dislobased_Ntwin, &
constitutive_dislobased_slipFamily, &
constitutive_dislobased_twinFamily
real(pReal), dimension(:), allocatable :: constitutive_dislobased_CoverA real(pReal), dimension(:), allocatable :: constitutive_dislobased_CoverA, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_C11 constitutive_dislobased_C11, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_C12 constitutive_dislobased_C12, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_C13 constitutive_dislobased_C13, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_C33 constitutive_dislobased_C33, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_C44 constitutive_dislobased_C44, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Gmod constitutive_dislobased_Gmod
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_Cslip_66 real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_Cslip_66
real(pReal), dimension(:,:,:,:), allocatable :: constitutive_dislobased_Ctwin_66 real(pReal), dimension(:,:,:,:), allocatable :: constitutive_dislobased_Ctwin_66
real(pReal), dimension(:,:,:,:,:), allocatable :: constitutive_dislobased_Cslip_3333 real(pReal), dimension(:,:,:,:,:), allocatable :: constitutive_dislobased_Cslip_3333
real(pReal), dimension(:,:,:,:,:,:), allocatable :: constitutive_dislobased_Ctwin_3333 real(pReal), dimension(:,:,:,:,:,:), allocatable :: constitutive_dislobased_Ctwin_3333
real(pReal), dimension(:,:), allocatable :: constitutive_dislobased_rho0, &
constitutive_dislobased_Burgers, &
constitutive_dislobased_Qedge, &
constitutive_dislobased_stacksize, &
constitutive_dislobased_Ndot0, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_rho0 constitutive_dislobased_interaction_slipslip, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_bg constitutive_dislobased_interaction_sliptwin, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Qedge constitutive_dislobased_interaction_twinslip, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_grainsize constitutive_dislobased_interaction_twintwin
real(pReal), dimension(:), allocatable :: constitutive_dislobased_stacksize real(pReal), dimension(:), allocatable :: constitutive_dislobased_grainsize, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_fmax constitutive_dislobased_fmax, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Ndot0 constitutive_dislobased_Cmfpslip, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cmfpslip constitutive_dislobased_Cmfptwin, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cmfptwin constitutive_dislobased_Cthresholdslip, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cthresholdslip constitutive_dislobased_Cthresholdtwin, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cthresholdtwin constitutive_dislobased_Cactivolume, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cactivolume constitutive_dislobased_Carecovery, &
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Cstorage constitutive_dislobased_Cstorage
real(pReal), dimension(:), allocatable :: constitutive_dislobased_Carecovery
real(pReal), dimension(:,:), allocatable :: constitutive_dislobased_interaction_slipslip
real(pReal), dimension(:,:), allocatable :: constitutive_dislobased_interaction_sliptwin
real(pReal), dimension(:,:), allocatable :: constitutive_dislobased_interaction_twinslip
real(pReal), dimension(:,:), allocatable :: constitutive_dislobased_interaction_twintwin
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_parall_interaction real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_parall_interaction, &
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_forest_interaction constitutive_dislobased_forest_interaction, &
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_hardeningMatrix_sliptwin constitutive_dislobased_hardeningMatrix_sliptwin, &
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_hardeningMatrix_twinslip constitutive_dislobased_hardeningMatrix_twinslip, &
real(pReal), dimension(:,:,:), allocatable :: constitutive_dislobased_hardeningMatrix_twintwin constitutive_dislobased_hardeningMatrix_twintwin
!************************************* !*************************************
!* Definition of material properties * !* Definition of material properties *
@ -119,7 +121,7 @@ real(pReal), parameter :: kB = 1.38e-23_pReal
!* Physical parameter, Avogadro number in 1/mol !* Physical parameter, Avogadro number in 1/mol
real(pReal), parameter :: avogadro = 6.022e23_pReal real(pReal), parameter :: avogadro = 6.022e23_pReal
!* Physical parameter, Gas constant in J.mol/Kelvin !* Physical parameter, Gas constant in J.mol/Kelvin
real(pReal), parameter :: Rgaz = 8.314_pReal real(pReal), parameter :: Rgas = 8.314_pReal
CONTAINS CONTAINS
!**************************************** !****************************************
@ -142,9 +144,8 @@ subroutine constitutive_dislobased_init(file)
use math, only: math_Mandel3333to66,math_Voigt66to3333,math_mul3x3 use math, only: math_Mandel3333to66,math_Voigt66to3333,math_mul3x3
use IO use IO
use material use material
use lattice, only: lattice_initializeStructure,lattice_maxNslipFamily,lattice_maxNtwinFamily,lattice_maxNinteraction,& use lattice
lattice_NslipSystem,lattice_NtwinSystem,lattice_interactionSlipSlip,lattice_interactionSlipTwin,&
lattice_interactionTwinSlip,lattice_interactionTwinTwin,lattice_Qtwin,lattice_sn,lattice_st,lattice_tn
integer(pInt), intent(in) :: file integer(pInt), intent(in) :: file
integer(pInt), parameter :: maxNchunks = 21 integer(pInt), parameter :: maxNchunks = 21
integer(pInt), dimension(1+2*maxNchunks) :: positions integer(pInt), dimension(1+2*maxNchunks) :: positions
@ -175,6 +176,11 @@ subroutine constitutive_dislobased_init(file)
allocate(constitutive_dislobased_Ntwin(lattice_maxNtwinFamily,& allocate(constitutive_dislobased_Ntwin(lattice_maxNtwinFamily,&
maxNinstance)) ; constitutive_dislobased_Ntwin = 0_pInt maxNinstance)) ; constitutive_dislobased_Ntwin = 0_pInt
allocate(constitutive_dislobased_slipFamily(lattice_maxNslip,&
maxNinstance)) ; constitutive_dislobased_slipFamily = 0_pInt
allocate(constitutive_dislobased_twinFamily(lattice_maxNtwin,&
maxNinstance)) ; constitutive_dislobased_twinFamily = 0_pInt
allocate(constitutive_dislobased_totalNslip(maxNinstance)) ; constitutive_dislobased_totalNslip = 0_pInt allocate(constitutive_dislobased_totalNslip(maxNinstance)) ; constitutive_dislobased_totalNslip = 0_pInt
allocate(constitutive_dislobased_totalNtwin(maxNinstance)) ; constitutive_dislobased_totalNtwin = 0_pInt allocate(constitutive_dislobased_totalNtwin(maxNinstance)) ; constitutive_dislobased_totalNtwin = 0_pInt
@ -188,20 +194,25 @@ subroutine constitutive_dislobased_init(file)
allocate(constitutive_dislobased_Cslip_66(6,6,maxNinstance)) ; constitutive_dislobased_Cslip_66 = 0.0_pReal allocate(constitutive_dislobased_Cslip_66(6,6,maxNinstance)) ; constitutive_dislobased_Cslip_66 = 0.0_pReal
allocate(constitutive_dislobased_Cslip_3333(3,3,3,3,maxNinstance)) ; constitutive_dislobased_Cslip_3333 = 0.0_pReal allocate(constitutive_dislobased_Cslip_3333(3,3,3,3,maxNinstance)) ; constitutive_dislobased_Cslip_3333 = 0.0_pReal
allocate(constitutive_dislobased_rho0(maxNinstance)) ; constitutive_dislobased_rho0 = 0.0_pReal allocate(constitutive_dislobased_rho0(lattice_maxNslipFamily, &
allocate(constitutive_dislobased_bg(maxNinstance)) ; constitutive_dislobased_bg = 0.0_pReal maxNinstance)) ; constitutive_dislobased_rho0 = 0.0_pReal
allocate(constitutive_dislobased_Qedge(maxNinstance)) ; constitutive_dislobased_Qedge = 0.0_pReal allocate(constitutive_dislobased_Burgers(lattice_maxNslipFamily, &
maxNinstance)) ; constitutive_dislobased_Burgers = 0.0_pReal
allocate(constitutive_dislobased_Qedge(lattice_maxNslipFamily, &
maxNinstance)) ; constitutive_dislobased_Qedge = 0.0_pReal
allocate(constitutive_dislobased_grainsize(maxNinstance)) ; constitutive_dislobased_grainsize = 0.0_pReal allocate(constitutive_dislobased_grainsize(maxNinstance)) ; constitutive_dislobased_grainsize = 0.0_pReal
allocate(constitutive_dislobased_stacksize(maxNinstance)) ; constitutive_dislobased_stacksize = 0.0_pReal allocate(constitutive_dislobased_stacksize(lattice_maxNtwinFamily, &
maxNinstance)) ; constitutive_dislobased_stacksize = 0.0_pReal
allocate(constitutive_dislobased_fmax(maxNinstance)) ; constitutive_dislobased_fmax = 0.0_pReal allocate(constitutive_dislobased_fmax(maxNinstance)) ; constitutive_dislobased_fmax = 0.0_pReal
allocate(constitutive_dislobased_Ndot0(maxNinstance)) ; constitutive_dislobased_Ndot0 = 0.0_pReal allocate(constitutive_dislobased_Ndot0(lattice_maxNtwinFamily, &
maxNinstance)) ; constitutive_dislobased_Ndot0 = 0.0_pReal
allocate(constitutive_dislobased_Cmfpslip(maxNinstance)) ; constitutive_dislobased_Cmfpslip = 0.0_pReal allocate(constitutive_dislobased_Cmfpslip(maxNinstance)) ; constitutive_dislobased_Cmfpslip = 0.0_pReal
allocate(constitutive_dislobased_Cmfptwin(maxNinstance)) ; constitutive_dislobased_Cmfptwin = 0.0_pReal allocate(constitutive_dislobased_Cmfptwin(maxNinstance)) ; constitutive_dislobased_Cmfptwin = 0.0_pReal
allocate(constitutive_dislobased_Cthresholdslip(maxNinstance)) ; constitutive_dislobased_Cthresholdslip = 0.0_pReal allocate(constitutive_dislobased_Cthresholdslip(maxNinstance)) ; constitutive_dislobased_Cthresholdslip = 0.0_pReal
allocate(constitutive_dislobased_Cthresholdtwin(maxNinstance)) ; constitutive_dislobased_Cthresholdtwin = 0.0_pReal allocate(constitutive_dislobased_Cthresholdtwin(maxNinstance)) ; constitutive_dislobased_Cthresholdtwin = 0.0_pReal
allocate(constitutive_dislobased_Cactivolume(maxNinstance)) ; constitutive_dislobased_Cactivolume = 0.0_pReal allocate(constitutive_dislobased_Cactivolume(maxNinstance)) ; constitutive_dislobased_Cactivolume = 0.0_pReal
allocate(constitutive_dislobased_Cstorage(maxNinstance)) ; constitutive_dislobased_Cstorage = 0.0_pReal
allocate(constitutive_dislobased_Carecovery(maxNinstance)) ; constitutive_dislobased_Carecovery = 0.0_pReal allocate(constitutive_dislobased_Carecovery(maxNinstance)) ; constitutive_dislobased_Carecovery = 0.0_pReal
allocate(constitutive_dislobased_Cstorage(maxNinstance)) ; constitutive_dislobased_Cstorage = 0.0_pReal
allocate(constitutive_dislobased_interaction_slipslip(lattice_maxNinteraction,& allocate(constitutive_dislobased_interaction_slipslip(lattice_maxNinteraction,&
maxNinstance)) ; constitutive_dislobased_interaction_slipslip = 0.0_pReal maxNinstance)) ; constitutive_dislobased_interaction_slipslip = 0.0_pReal
@ -255,19 +266,19 @@ subroutine constitutive_dislobased_init(file)
case ('ntwin') case ('ntwin')
forall (j = 1:lattice_maxNtwinFamily) constitutive_dislobased_Ntwin(j,i) = IO_intValue(line,positions,1+j) forall (j = 1:lattice_maxNtwinFamily) constitutive_dislobased_Ntwin(j,i) = IO_intValue(line,positions,1+j)
case ('rho0') case ('rho0')
constitutive_dislobased_rho0(i) = IO_floatValue(line,positions,2) forall (j = 1:lattice_maxNslipFamily) constitutive_dislobased_rho0(j,i) = IO_floatValue(line,positions,1+j)
case ('burgers') case ('burgers')
constitutive_dislobased_bg(i) = IO_floatValue(line,positions,2) forall (j = 1:lattice_maxNslipFamily) constitutive_dislobased_Burgers(j,i) = IO_floatValue(line,positions,1+j)
case ('qedge') case ('qedge')
constitutive_dislobased_Qedge(i) = IO_floatValue(line,positions,2) forall (j = 1:lattice_maxNslipFamily) constitutive_dislobased_Qedge(j,i) = IO_floatValue(line,positions,1+j)
case ('grainsize') case ('grainsize')
constitutive_dislobased_grainsize(i) = IO_floatValue(line,positions,2) constitutive_dislobased_grainsize(i) = IO_floatValue(line,positions,2)
case ('stacksize') case ('stacksize')
constitutive_dislobased_stacksize(i) = IO_floatValue(line,positions,2) forall (j = 1:lattice_maxNtwinFamily) constitutive_dislobased_stacksize(j,i) = IO_floatValue(line,positions,1+j)
case ('fmax') case ('fmax')
constitutive_dislobased_fmax(i) = IO_floatValue(line,positions,2) constitutive_dislobased_fmax(i) = IO_floatValue(line,positions,2)
case ('ndot0') case ('ndot0')
constitutive_dislobased_Ndot0(i) = IO_floatValue(line,positions,2) forall (j = 1:lattice_maxNtwinFamily) constitutive_dislobased_Ndot0(j,i) = IO_floatValue(line,positions,1+j)
case ('cmfpslip') case ('cmfpslip')
constitutive_dislobased_Cmfpslip(i) = IO_floatValue(line,positions,2) constitutive_dislobased_Cmfpslip(i) = IO_floatValue(line,positions,2)
case ('cmfptwin') case ('cmfptwin')
@ -278,10 +289,10 @@ subroutine constitutive_dislobased_init(file)
constitutive_dislobased_Cthresholdtwin(i) = IO_floatValue(line,positions,2) constitutive_dislobased_Cthresholdtwin(i) = IO_floatValue(line,positions,2)
case ('cactivolume') case ('cactivolume')
constitutive_dislobased_Cactivolume(i) = IO_floatValue(line,positions,2) constitutive_dislobased_Cactivolume(i) = IO_floatValue(line,positions,2)
case ('cstorage')
constitutive_dislobased_Cstorage(i) = IO_floatValue(line,positions,2)
case ('carecovery') case ('carecovery')
constitutive_dislobased_Carecovery(i) = IO_floatValue(line,positions,2) constitutive_dislobased_Carecovery(i) = IO_floatValue(line,positions,2)
case ('cstorage')
constitutive_dislobased_Cstorage(i) = IO_floatValue(line,positions,2)
case ('interaction_slipslip') case ('interaction_slipslip')
forall (j = 1:lattice_maxNinteraction) & forall (j = 1:lattice_maxNinteraction) &
constitutive_dislobased_interaction_slipslip(j,i) = IO_floatValue(line,positions,1+j) constitutive_dislobased_interaction_slipslip(j,i) = IO_floatValue(line,positions,1+j)
@ -312,34 +323,32 @@ subroutine constitutive_dislobased_init(file)
! sanity checks (still under construction) ! sanity checks (still under construction)
if (constitutive_dislobased_structure(i) < 1 .or. & ! sanity checks if (constitutive_dislobased_structure(i) < 1 .or. & ! sanity checks
constitutive_dislobased_structure(i) > 3) call IO_error(205) constitutive_dislobased_structure(i) > 3) call IO_error(205)
if (constitutive_dislobased_rho0(i) < 0.0_pReal) call IO_error(220) if (any(constitutive_dislobased_rho0(:,i) < 0.0_pReal)) call IO_error(220)
if (constitutive_dislobased_bg(i) <= 0.0_pReal) call IO_error(221) if (any(constitutive_dislobased_Burgers(:,i) <= 0.0_pReal .and. &
if (constitutive_dislobased_Qedge(i) <= 0.0_pReal) call IO_error(222) constitutive_dislobased_Nslip(:,i) > 0)) call IO_error(221)
if (any(constitutive_dislobased_Qedge(:,i) <= 0.0_pReal .and. &
constitutive_dislobased_Nslip(:,i) > 0)) call IO_error(222)
enddo enddo
allocate(constitutive_dislobased_parall_interaction(maxval(constitutive_dislobased_totalNslip),& allocate(constitutive_dislobased_parall_interaction(maxval(constitutive_dislobased_totalNslip),&
maxval(constitutive_dislobased_totalNslip),& maxval(constitutive_dislobased_totalNslip),&
maxNinstance)) maxNinstance))
constitutive_dislobased_parall_interaction = 0.0_pReal
allocate(constitutive_dislobased_forest_interaction(maxval(constitutive_dislobased_totalNslip),& allocate(constitutive_dislobased_forest_interaction(maxval(constitutive_dislobased_totalNslip),&
maxval(constitutive_dislobased_totalNslip),& maxval(constitutive_dislobased_totalNslip),&
maxNinstance)) maxNinstance))
constitutive_dislobased_forest_interaction = 0.0_pReal
allocate(constitutive_dislobased_hardeningMatrix_sliptwin(maxval(constitutive_dislobased_totalNslip),& allocate(constitutive_dislobased_hardeningMatrix_sliptwin(maxval(constitutive_dislobased_totalNslip),&
maxval(constitutive_dislobased_totalNtwin),& maxval(constitutive_dislobased_totalNtwin),&
maxNinstance)) maxNinstance))
constitutive_dislobased_hardeningMatrix_sliptwin = 0.0_pReal
allocate(constitutive_dislobased_hardeningMatrix_twinslip(maxval(constitutive_dislobased_totalNtwin),& allocate(constitutive_dislobased_hardeningMatrix_twinslip(maxval(constitutive_dislobased_totalNtwin),&
maxval(constitutive_dislobased_totalNslip),& maxval(constitutive_dislobased_totalNslip),&
maxNinstance)) maxNinstance))
constitutive_dislobased_hardeningMatrix_twinslip = 0.0_pReal
allocate(constitutive_dislobased_hardeningMatrix_twintwin(maxval(constitutive_dislobased_totalNtwin),& allocate(constitutive_dislobased_hardeningMatrix_twintwin(maxval(constitutive_dislobased_totalNtwin),&
maxval(constitutive_dislobased_totalNtwin),& maxval(constitutive_dislobased_totalNtwin),&
maxNinstance)) maxNinstance))
constitutive_dislobased_parall_interaction = 0.0_pReal
constitutive_dislobased_forest_interaction = 0.0_pReal
constitutive_dislobased_hardeningMatrix_sliptwin = 0.0_pReal
constitutive_dislobased_hardeningMatrix_twinslip = 0.0_pReal
constitutive_dislobased_hardeningMatrix_twintwin = 0.0_pReal constitutive_dislobased_hardeningMatrix_twintwin = 0.0_pReal
allocate(constitutive_dislobased_Ctwin_66(6,6,maxval(constitutive_dislobased_totalNtwin),maxNinstance)) allocate(constitutive_dislobased_Ctwin_66(6,6,maxval(constitutive_dislobased_totalNtwin),maxNinstance))
@ -351,31 +360,25 @@ subroutine constitutive_dislobased_init(file)
do i = 1,maxNinstance do i = 1,maxNinstance
do j = 1,maxval(phase_Noutput) do j = 1,maxval(phase_Noutput)
select case(constitutive_dislobased_output(j,i)) select case(constitutive_dislobased_output(j,i))
case('state_slip') case('dislocationdensity', &
'shearrate_slip', &
'mfp_slip', &
'resolvedstress_slip', &
'resistance_slip' &
)
mySize = constitutive_dislobased_totalNslip(i) mySize = constitutive_dislobased_totalNslip(i)
case('shearrate_slip') case('volumefraction', &
mySize = constitutive_dislobased_totalNslip(i) 'shearrate_twin', &
case('mfp_slip') 'mfp_twin', &
mySize = constitutive_dislobased_totalNslip(i) 'resolvedstress_twin', &
case('resolvedstress_slip') 'resistance_twin' &
mySize = constitutive_dislobased_totalNslip(i) )
case('resistance_slip')
mySize = constitutive_dislobased_totalNslip(i)
case('state_twin')
mySize = constitutive_dislobased_totalNtwin(i)
case('shearrate_twin')
mySize = constitutive_dislobased_totalNtwin(i)
case('mfp_twin')
mySize = constitutive_dislobased_totalNtwin(i)
case('resolvedstress_twin')
mySize = constitutive_dislobased_totalNtwin(i)
case('resistance_twin')
mySize = constitutive_dislobased_totalNtwin(i) mySize = constitutive_dislobased_totalNtwin(i)
case default case default
mySize = 0_pInt mySize = 0_pInt
end select end select
if (mySize > 0_pInt) then if (mySize > 0_pInt) then ! any meaningful output found
constitutive_dislobased_sizePostResult(j,i) = mySize constitutive_dislobased_sizePostResult(j,i) = mySize
constitutive_dislobased_sizePostResults(i) = constitutive_dislobased_sizePostResults(i) + mySize constitutive_dislobased_sizePostResults(i) = constitutive_dislobased_sizePostResults(i) + mySize
endif endif
@ -412,6 +415,22 @@ subroutine constitutive_dislobased_init(file)
constitutive_dislobased_Cslip_66(:,:,i) = math_Mandel3333to66(math_Voigt66to3333(constitutive_dislobased_Cslip_66(:,:,i))) constitutive_dislobased_Cslip_66(:,:,i) = math_Mandel3333to66(math_Voigt66to3333(constitutive_dislobased_Cslip_66(:,:,i)))
constitutive_dislobased_Cslip_3333(:,:,:,:,i) = math_Voigt66to3333(constitutive_dislobased_Cslip_66(:,:,i)) constitutive_dislobased_Cslip_3333(:,:,:,:,i) = math_Voigt66to3333(constitutive_dislobased_Cslip_66(:,:,i))
!* Inverse lookup of my slip system family
l = 0_pInt
do j = 1,lattice_maxNslipFamily
do k = 1,constitutive_dislobased_Nslip(j,i)
l = l + 1
constitutive_dislobased_slipFamily(l,i) = j
enddo; enddo
!* Inverse lookup of my twin system family
l = 0_pInt
do j = 1,lattice_maxNtwinFamily
do k = 1,constitutive_dislobased_Ntwin(j,i)
l = l + 1
constitutive_dislobased_twinFamily(l,i) = j
enddo; enddo
!* Construction of the twin elasticity matrices !* Construction of the twin elasticity matrices
do j=1,lattice_maxNtwinFamily do j=1,lattice_maxNtwinFamily
do k=1,constitutive_dislobased_Ntwin(j,i) do k=1,constitutive_dislobased_Ntwin(j,i)
@ -516,7 +535,7 @@ function constitutive_dislobased_stateInit(myInstance)
do i = 1,lattice_maxNslipFamily do i = 1,lattice_maxNslipFamily
constitutive_dislobased_stateInit(1+sum(constitutive_dislobased_Nslip(1:i-1,myInstance)) : & constitutive_dislobased_stateInit(1+sum(constitutive_dislobased_Nslip(1:i-1,myInstance)) : &
sum(constitutive_dislobased_Nslip(1:i ,myInstance))) = & sum(constitutive_dislobased_Nslip(1:i ,myInstance))) = &
constitutive_dislobased_rho0(myInstance) constitutive_dislobased_rho0(i,myInstance)
enddo enddo
return return
@ -549,8 +568,7 @@ function constitutive_dislobased_homogenizedC(state,ipc,ip,el)
nt = constitutive_dislobased_totalNtwin(matID) nt = constitutive_dislobased_totalNtwin(matID)
!* Total twin volume fraction !* Total twin volume fraction
sumf = 0.0_pReal sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt))) ! safe for nt == 0
if (nt > 0_pInt) sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt)))
!* Homogenized elasticity matrix !* Homogenized elasticity matrix
constitutive_dislobased_homogenizedC = (1.0_pReal-sumf)*constitutive_dislobased_Cslip_66(:,:,matID) constitutive_dislobased_homogenizedC = (1.0_pReal-sumf)*constitutive_dislobased_Cslip_66(:,:,matID)
@ -583,6 +601,7 @@ subroutine constitutive_dislobased_microstructure(Temperature,state,ipc,ip,el)
integer(pInt), intent(in) :: ipc,ip,el integer(pInt), intent(in) :: ipc,ip,el
integer(pInt) matID,ns,nt,i integer(pInt) matID,ns,nt,i
real(pReal) Temperature,sumf real(pReal) Temperature,sumf
real(pReal), dimension(constitutive_dislobased_totalNtwin(phase_constitutionInstance(material_phase(ipc,ip,el)))) :: fOverStacksize
type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: state type(p_vec), dimension(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems) :: state
!* Shortened notation !* Shortened notation
@ -606,8 +625,11 @@ subroutine constitutive_dislobased_microstructure(Temperature,state,ipc,ip,el)
!* State: 9*ns+5*nt+1 : 10*ns+5*nt initial shear rate !* State: 9*ns+5*nt+1 : 10*ns+5*nt initial shear rate
!* Total twin volume fraction !* Total twin volume fraction
sumf = 0.0_pReal sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt))) ! safe for nt == 0
if (nt > 0_pInt) sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt)))
!* rescaled twin volume fraction for topology
forall (i = 1:nt) &
fOverStacksize(i) = state(ipc,ip,el)%p(ns+i)/constitutive_dislobased_stacksize(constitutive_dislobased_twinFamily(i,matID),matID)
!* Forest and parallel dislocation densities !* Forest and parallel dislocation densities
!$OMP CRITICAL (evilmatmul) !$OMP CRITICAL (evilmatmul)
@ -618,23 +640,21 @@ subroutine constitutive_dislobased_microstructure(Temperature,state,ipc,ip,el)
!$OMP END CRITICAL (evilmatmul) !$OMP END CRITICAL (evilmatmul)
!* 1/mean free distance between 2 forest dislocations seen by a moving dislocation !* 1/mean free distance between 2 forest dislocations seen by a moving dislocation
do i=1,ns forall (i=1:ns) state(ipc,ip,el)%p(3*ns+nt+i) = sqrt(state(ipc,ip,el)%p(ns+nt+i))
state(ipc,ip,el)%p(3*ns+nt+i) = sqrt(state(ipc,ip,el)%p(ns+nt+i))
enddo
!* 1/mean free distance between 2 twin stacks from different systems seen by a moving dislocation !* 1/mean free distance between 2 twin stacks from different systems seen by a moving dislocation
!$OMP CRITICAL (evilmatmul) !$OMP CRITICAL (evilmatmul)
state(ipc,ip,el)%p((4*ns+nt+1):(5*ns+nt)) = 0.0_pReal state(ipc,ip,el)%p((4*ns+nt+1):(5*ns+nt)) = 0.0_pReal
if (nt > 0_pInt) state(ipc,ip,el)%p((4*ns+nt+1):(5*ns+nt)) = & if (nt > 0_pInt) state(ipc,ip,el)%p((4*ns+nt+1):(5*ns+nt)) = &
matmul(constitutive_dislobased_hardeningMatrix_sliptwin(1:ns,1:nt,matID),state(ipc,ip,el)%p((ns+1):(ns+nt)))/& matmul(constitutive_dislobased_hardeningMatrix_sliptwin(1:ns,1:nt,matID),fOverStacksize(1:nt))/&
(2.0_pReal*constitutive_dislobased_stacksize(matID)*(1.0_pReal-sumf)) (2.0_pReal*(1.0_pReal-sumf))
!$OMP END CRITICAL (evilmatmul) !$OMP END CRITICAL (evilmatmul)
!* 1/mean free distance between 2 twin stacks from different systems seen by a growing twin !* 1/mean free distance between 2 twin stacks from different systems seen by a growing twin
!$OMP CRITICAL (evilmatmul) !$OMP CRITICAL (evilmatmul)
if (nt > 0_pInt) state(ipc,ip,el)%p((5*ns+nt+1):(5*ns+2*nt)) = & if (nt > 0_pInt) state(ipc,ip,el)%p((5*ns+nt+1):(5*ns+2*nt)) = &
matmul(constitutive_dislobased_hardeningMatrix_twintwin(1:nt,1:nt,matID),state(ipc,ip,el)%p((ns+1):(ns+nt)))/& matmul(constitutive_dislobased_hardeningMatrix_twintwin(1:nt,1:nt,matID),fOverStacksize(1:nt))/&
(2.0_pReal*constitutive_dislobased_stacksize(matID)*(1.0_pReal-sumf)) (2.0_pReal*(1.0_pReal-sumf))
!$OMP END CRITICAL (evilmatmul) !$OMP END CRITICAL (evilmatmul)
!* mean free path between 2 obstacles seen by a moving dislocation !* mean free path between 2 obstacles seen by a moving dislocation
@ -650,47 +670,47 @@ subroutine constitutive_dislobased_microstructure(Temperature,state,ipc,ip,el)
enddo enddo
!* mean free path between 2 obstacles seen by a growing twin !* mean free path between 2 obstacles seen by a growing twin
do i=1,nt forall (i=1:nt) &
state(ipc,ip,el)%p(6*ns+2*nt+i) = (constitutive_dislobased_Cmfptwin(matID)*constitutive_dislobased_grainsize(matID))/& state(ipc,ip,el)%p(6*ns+2*nt+i) = (constitutive_dislobased_Cmfptwin(matID)*constitutive_dislobased_grainsize(matID))/&
(1.0_pReal+constitutive_dislobased_grainsize(matID)*state(ipc,ip,el)%p(5*ns+nt+i)) (1.0_pReal+constitutive_dislobased_grainsize(matID)*state(ipc,ip,el)%p(5*ns+nt+i))
enddo
!* threshold stress for dislocation motion !* threshold stress for dislocation motion
do i=1,ns forall (i=1:ns) &
state(ipc,ip,el)%p(6*ns+3*nt+i) = constitutive_dislobased_Cthresholdslip(matID)*& state(ipc,ip,el)%p(6*ns+3*nt+i) = constitutive_dislobased_Cthresholdslip(matID)*&
constitutive_dislobased_bg(matID)*constitutive_dislobased_Gmod(matID)*sqrt(state(ipc,ip,el)%p(2*ns+nt+i)) constitutive_dislobased_Burgers(constitutive_dislobased_slipFamily(i,matID),matID)*&
enddo constitutive_dislobased_Gmod(matID)*sqrt(state(ipc,ip,el)%p(2*ns+nt+i))
!* threshold stress for growing twin !* threshold stress for growing twin
do i=1,nt forall (i=1:nt) &
state(ipc,ip,el)%p(7*ns+3*nt+i) = constitutive_dislobased_Cthresholdtwin(matID)*(sqrt(3.0_pReal)/3.0_pReal)*(& state(ipc,ip,el)%p(7*ns+3*nt+i) = constitutive_dislobased_Cthresholdtwin(matID)*(sqrt(3.0_pReal)/3.0_pReal)*(&
(0.0002_pReal*Temperature-0.0396_pReal)/constitutive_dislobased_bg(matID)+& (0.0002_pReal*Temperature-0.0396_pReal)/constitutive_dislobased_Burgers(constitutive_dislobased_slipFamily(i,matID),matID)+&
(constitutive_dislobased_bg(matID)*constitutive_dislobased_Gmod(matID))/state(ipc,ip,el)%p(5*ns+2*nt+i)) (constitutive_dislobased_Burgers(constitutive_dislobased_slipFamily(i,matID),matID)*&
enddo constitutive_dislobased_Gmod(matID))/state(ipc,ip,el)%p(5*ns+2*nt+i))
!* activation volume for dislocation glide !* activation volume for dislocation glide
do i=1,ns forall (i=1:ns) &
state(ipc,ip,el)%p(7*ns+4*nt+i) = constitutive_dislobased_Cactivolume(matID)*& state(ipc,ip,el)%p(7*ns+4*nt+i) = constitutive_dislobased_Cactivolume(matID)*&
constitutive_dislobased_bg(matID)*constitutive_dislobased_bg(matID)*state(ipc,ip,el)%p(5*ns+2*nt+i) constitutive_dislobased_Burgers(constitutive_dislobased_slipFamily(i,matID),matID)**2*state(ipc,ip,el)%p(5*ns+2*nt+i)
enddo
!* final twin volume after growth !* final twin volume after growth
do i=1,nt forall (i=1:nt) &
state(ipc,ip,el)%p(8*ns+4*nt+i) = (pi/6.0_pReal)*constitutive_dislobased_stacksize(matID)*& state(ipc,ip,el)%p(8*ns+4*nt+i) = (pi/6.0_pReal)*&
constitutive_dislobased_stacksize(constitutive_dislobased_twinFamily(i,matID),matID)*&
state(ipc,ip,el)%p(6*ns+2*nt+i)*state(ipc,ip,el)%p(6*ns+2*nt+i) state(ipc,ip,el)%p(6*ns+2*nt+i)*state(ipc,ip,el)%p(6*ns+2*nt+i)
enddo
!* mobile dislocation densities !* mobile dislocation densities
do i=1,ns forall (i=1:ns) &
state(ipc,ip,el)%p(8*ns+5*nt+i) = (2.0_pReal*kB*Temperature*state(ipc,ip,el)%p(2*ns+nt+i))/& state(ipc,ip,el)%p(8*ns+5*nt+i) = (2.0_pReal*kB*Temperature*state(ipc,ip,el)%p(2*ns+nt+i))/&
(state(ipc,ip,el)%p(6*ns+3*nt+i)*state(ipc,ip,el)%p(7*ns+4*nt+i)) (state(ipc,ip,el)%p(6*ns+3*nt+i)*state(ipc,ip,el)%p(7*ns+4*nt+i))
enddo
!* initial shear rate for slip !* initial shear rate for slip
do i=1,ns forall (i=1:ns) &
state(ipc,ip,el)%p(9*ns+5*nt+i) = state(ipc,ip,el)%p(8*ns+5*nt+i)*constitutive_dislobased_bg(matID)*attack_frequency*& state(ipc,ip,el)%p(9*ns+5*nt+i) = state(ipc,ip,el)%p(8*ns+5*nt+i)*&
state(ipc,ip,el)%p(5*ns+2*nt+i)*exp(-constitutive_dislobased_Qedge(matID)/(kB*Temperature)) constitutive_dislobased_Burgers(constitutive_dislobased_slipFamily(i,matID),matID)*&
enddo attack_frequency*state(ipc,ip,el)%p(5*ns+2*nt+i)*&
exp(-constitutive_dislobased_Qedge(constitutive_dislobased_slipFamily(i,matID),matID)/&
! --------------------
(kB*Temperature))
end subroutine end subroutine
@ -739,8 +759,7 @@ subroutine constitutive_dislobased_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v,Tempera
nt = constitutive_dislobased_totalNtwin(matID) nt = constitutive_dislobased_totalNtwin(matID)
!* Total twin volume fraction !* Total twin volume fraction
sumf = 0.0_pReal sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt))) ! safe for nt == 0
if (nt > 0_pInt) sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt)))
Lp = 0.0_pReal Lp = 0.0_pReal
dLp_dTstar3333 = 0.0_pReal dLp_dTstar3333 = 0.0_pReal
@ -789,7 +808,7 @@ subroutine constitutive_dislobased_LpAndItsTangent(Lp,dLp_dTstar,Tstar_v,Tempera
if ( tau_twin(j) > 0.0_pReal ) then if ( tau_twin(j) > 0.0_pReal ) then
gdot_twin(j) = (constitutive_dislobased_fmax(matID) - sumf)*lattice_shearTwin(index_myFamily+i,structID)*& gdot_twin(j) = (constitutive_dislobased_fmax(matID) - sumf)*lattice_shearTwin(index_myFamily+i,structID)*&
state(ipc,ip,el)%p(8*ns+4*nt+j)*constitutive_dislobased_Ndot0(matID)*& state(ipc,ip,el)%p(8*ns+4*nt+j)*constitutive_dislobased_Ndot0(f,matID)*&
exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau_twin(j))**10.0_pReal) exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau_twin(j))**10.0_pReal)
dgdot_dtautwin(j) = (gdot_twin(j)*10.0_pReal*state(ipc,ip,el)%p(7*ns+3*nt+j)**10.0_pReal)/(tau_twin(j)**11.0_pReal) dgdot_dtautwin(j) = (gdot_twin(j)*10.0_pReal*state(ipc,ip,el)%p(7*ns+3*nt+j)**10.0_pReal)/(tau_twin(j)**11.0_pReal)
@ -850,8 +869,7 @@ function constitutive_dislobased_dotState(Tstar_v,Temperature,state,ipc,ip,el)
nt = constitutive_dislobased_totalNtwin(matID) nt = constitutive_dislobased_totalNtwin(matID)
!* Total twin volume fraction !* Total twin volume fraction
sumf = 0.0_pReal sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt))) ! safe for nt == 0
if (nt > 0_pInt) sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt)))
constitutive_dislobased_dotState = 0.0_pReal constitutive_dislobased_dotState = 0.0_pReal
@ -871,7 +889,7 @@ function constitutive_dislobased_dotState(Tstar_v,Temperature,state,ipc,ip,el)
sinh(((abs(tau_slip(j))-state(ipc,ip,el)%p(6*ns+3*nt+j))*state(ipc,ip,el)%p(7*ns+4*nt+j))/(kB*Temperature)) sinh(((abs(tau_slip(j))-state(ipc,ip,el)%p(6*ns+3*nt+j))*state(ipc,ip,el)%p(7*ns+4*nt+j))/(kB*Temperature))
storage(j) = (constitutive_dislobased_Cstorage(matID)*abs(gdot_slip(j)))/& storage(j) = (constitutive_dislobased_Cstorage(matID)*abs(gdot_slip(j)))/&
(constitutive_dislobased_bg(matID)*state(ipc,ip,el)%p(5*ns+2*nt+j)) (constitutive_dislobased_Burgers(f,matID)*state(ipc,ip,el)%p(5*ns+2*nt+j))
arecovery(j) = constitutive_dislobased_Carecovery(matID)*state(ipc,ip,el)%p(j)*abs(gdot_slip(j)) arecovery(j) = constitutive_dislobased_Carecovery(matID)*state(ipc,ip,el)%p(j)*abs(gdot_slip(j))
@ -893,7 +911,7 @@ function constitutive_dislobased_dotState(Tstar_v,Temperature,state,ipc,ip,el)
tau_twin(j) = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,structID)) tau_twin(j) = dot_product(Tstar_v,lattice_Stwin_v(:,index_myFamily+i,structID))
if ( tau_twin(j) > 0.0_pReal ) & if ( tau_twin(j) > 0.0_pReal ) &
constitutive_dislobased_dotState(ns+j) = (constitutive_dislobased_fmax(matID) - sumf)* & constitutive_dislobased_dotState(ns+j) = (constitutive_dislobased_fmax(matID) - sumf)* &
lattice_shearTwin(index_myFamily+i,structID)*state(ipc,ip,el)%p(8*ns+4*nt+j)*constitutive_dislobased_Ndot0(matID)*& lattice_shearTwin(index_myFamily+i,structID)*state(ipc,ip,el)%p(8*ns+4*nt+j)*constitutive_dislobased_Ndot0(f,matID)*&
exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau_twin(j))**10.0_pReal) exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau_twin(j))**10.0_pReal)
enddo enddo
enddo enddo
@ -967,8 +985,7 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
nt = constitutive_dislobased_totalNtwin(matID) nt = constitutive_dislobased_totalNtwin(matID)
!* Total twin volume fraction !* Total twin volume fraction
sumf = 0.0_pReal sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt))) ! safe for nt == 0
if (nt > 0_pInt) sumf = sum(state(ipc,ip,el)%p((ns+1):(ns+nt)))
!* Required output !* Required output
c = 0_pInt c = 0_pInt
@ -977,7 +994,7 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
do o = 1,phase_Noutput(material_phase(ipc,ip,el)) do o = 1,phase_Noutput(material_phase(ipc,ip,el))
select case(constitutive_dislobased_output(o,matID)) select case(constitutive_dislobased_output(o,matID))
case ('state_slip') case ('dislocationdensity')
constitutive_dislobased_postResults(c+1:c+ns) = state(ipc,ip,el)%p(1:ns) constitutive_dislobased_postResults(c+1:c+ns) = state(ipc,ip,el)%p(1:ns)
c = c + ns c = c + ns
@ -1015,8 +1032,8 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
constitutive_dislobased_postResults(c+1:c+ns) = state(ipc,ip,el)%p((6*ns+3*nt+1):(7*ns+3*nt)) constitutive_dislobased_postResults(c+1:c+ns) = state(ipc,ip,el)%p((6*ns+3*nt+1):(7*ns+3*nt))
c = c + ns c = c + ns
case ('state_twin') case ('volumefraction')
if (nt > 0_pInt) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((ns+1):(ns+nt)) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((ns+1):(ns+nt))
c = c + nt c = c + nt
case ('shearrate_twin') case ('shearrate_twin')
@ -1030,7 +1047,7 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
if ( tau > 0.0_pReal ) then if ( tau > 0.0_pReal ) then
constitutive_dislobased_postResults(c+j) = (constitutive_dislobased_fmax(matID) - sumf)* & constitutive_dislobased_postResults(c+j) = (constitutive_dislobased_fmax(matID) - sumf)* &
lattice_shearTwin(index_myFamily+i,structID)*state(ipc,ip,el)%p(8*ns+4*nt+j)* & lattice_shearTwin(index_myFamily+i,structID)*state(ipc,ip,el)%p(8*ns+4*nt+j)* &
constitutive_dislobased_Ndot0(matID)*exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau)**10.0_pReal) constitutive_dislobased_Ndot0(f,matID)*exp(-(state(ipc,ip,el)%p(7*ns+3*nt+j)/tau)**10.0_pReal)
else else
constitutive_dislobased_postResults(c+j) = 0.0_pReal constitutive_dislobased_postResults(c+j) = 0.0_pReal
endif endif
@ -1039,7 +1056,7 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
c = c + nt c = c + nt
case ('mfp_twin') case ('mfp_twin')
if (nt > 0_pInt) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((6*ns+2*nt+1):(6*ns+3*nt)) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((6*ns+2*nt+1):(6*ns+3*nt))
c = c + nt c = c + nt
case ('resolvedstress_twin') case ('resolvedstress_twin')
@ -1055,7 +1072,7 @@ pure function constitutive_dislobased_postResults(Tstar_v,Temperature,dt,state,i
c = c + nt c = c + nt
case ('resistance_twin') case ('resistance_twin')
if (nt > 0_pInt) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((7*ns+3*nt+1):(7*ns+4*nt)) constitutive_dislobased_postResults(c+1:c+nt) = state(ipc,ip,el)%p((7*ns+3*nt+1):(7*ns+4*nt))
c = c + nt c = c + nt
end select end select