shorthand names improve readability for dotstate and LpAnd...

This commit is contained in:
Martin Diehl 2018-06-30 14:11:05 +02:00
parent 980e34f728
commit c50f32b0d8
1 changed files with 22 additions and 30 deletions

View File

@ -613,15 +613,12 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
use lattice, only: & use lattice, only: &
lattice_Sslip_v, & lattice_Sslip_v, &
lattice_Stwin_v, & lattice_Stwin_v, &
lattice_maxNslipFamily, &
lattice_maxNtwinFamily, &
lattice_NslipSystem, & lattice_NslipSystem, &
lattice_NtwinSystem, & lattice_NtwinSystem, &
lattice_shearTwin lattice_shearTwin
use material, only: & use material, only: &
material_phase, & material_phase, &
phaseAt, phasememberAt, & phasememberAt, &
plasticState, &
phase_plasticityInstance phase_plasticityInstance
implicit none implicit none
@ -633,7 +630,7 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
el !< element !< microstructure state el !< element !< microstructure state
integer(pInt) :: & integer(pInt) :: &
instance,ph, & ph, &
f,i,j,k, & f,i,j,k, &
index_myFamily, & index_myFamily, &
of of
@ -642,21 +639,22 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
ssat_offset, & ssat_offset, &
tau_slip_pos,tau_slip_neg,tau_twin tau_slip_pos,tau_slip_neg,tau_twin
real(pReal), dimension(plasticState(material_phase(ipc,ip,el))%Nslip) :: & real(pReal), dimension(param(phase_plasticityInstance(material_phase(ipc,ip,el)))%totalNslip) :: &
gdot_slip,left_SlipSlip,right_SlipSlip gdot_slip,left_SlipSlip,right_SlipSlip
real(pReal), dimension(plasticState(material_phase(ipc,ip,el))%Ntwin) :: & real(pReal), dimension(param(phase_plasticityInstance(material_phase(ipc,ip,el)))%totalNtwin) :: &
gdot_twin gdot_twin
type(tParameters), pointer :: prm type(tParameters), pointer :: prm
type(tPhenopowerlawState), pointer :: stt type(tPhenopowerlawState), pointer :: dst,stt
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
ph = phaseAt(ipc,ip,el) ph = material_phase(ipc,ip,el)
instance = phase_plasticityInstance(ph)
prm => param(instance)
stt => state(instance)
prm => param(phase_plasticityInstance(ph))
stt => state(phase_plasticityInstance(ph))
dst => dotState(phase_plasticityInstance(ph))
plasticState(ph)%dotState(:,of) = 0.0_pReal dst%whole(:,of) = 0.0_pReal
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! system-independent (nonlinear) prefactors to M_Xx (X influenced by x) matrices ! system-independent (nonlinear) prefactors to M_Xx (X influenced by x) matrices
@ -673,11 +671,8 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
slipSystems1: do i = 1_pInt,prm%Nslip(f) slipSystems1: do i = 1_pInt,prm%Nslip(f)
j = j+1_pInt j = j+1_pInt
left_SlipSlip(j) = 1.0_pReal + prm%H_int(f) ! modified no system-dependent left part left_SlipSlip(j) = 1.0_pReal + prm%H_int(f) ! modified no system-dependent left part
right_SlipSlip(j) = abs(1.0_pReal-stt%s_slip(j,of) / & right_SlipSlip(j) = abs(1.0_pReal-stt%s_slip(j,of) / (prm%tausat_slip(f)+ssat_offset)) **prm%a_slip &
(prm%tausat_slip(f)+ssat_offset)) & * sign(1.0_pReal,1.0_pReal-stt%s_slip(j,of) / (prm%tausat_slip(f)+ssat_offset))
**prm%a_slip&
*sign(1.0_pReal,1.0_pReal-stt%s_slip(j,of) / &
(prm%tausat_slip(f)+ssat_offset))
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! Calculation of dot gamma ! Calculation of dot gamma
@ -695,8 +690,6 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
enddo slipSystems1 enddo slipSystems1
enddo slipFamilies1 enddo slipFamilies1
j = 0_pInt j = 0_pInt
twinFamilies1: do f = 1_pInt,size(prm%Ntwin,1) twinFamilies1: do f = 1_pInt,size(prm%Ntwin,1)
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
@ -716,31 +709,30 @@ subroutine plastic_phenopowerlaw_dotState(Tstar_v,ipc,ip,el)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! calculate the overall hardening based on above ! calculate the overall hardening based on above
do j = 1_pInt,prm%totalNslip do j = 1_pInt,prm%totalNslip
dotState(instance)%s_slip(j,of) = c_SlipSlip * left_SlipSlip(j) * & ! evolution of slip resistance j dst%s_slip(j,of) = c_SlipSlip * left_SlipSlip(j) * & ! evolution of slip resistance j
dot_product(prm%interaction_SlipSlip(j,1:prm%totalNslip),right_SlipSlip*abs(gdot_slip)) + & ! dot gamma_slip modulated by right-side slip factor dot_product(prm%interaction_SlipSlip(j,1:prm%totalNslip),right_SlipSlip*abs(gdot_slip)) + & ! dot gamma_slip modulated by right-side slip factor
dot_product(prm%interaction_SlipTwin(j,1:prm%totalNtwin),gdot_twin) ! dot gamma_twin modulated by right-side twin factor dot_product(prm%interaction_SlipTwin(j,1:prm%totalNtwin),gdot_twin) ! dot gamma_twin modulated by right-side twin factor
enddo enddo
dotState(instance)%sumGamma(of) = dotState(instance)%sumGamma(of) + sum(abs(gdot_slip)) dst%sumGamma(of) = dst%sumGamma(of) + sum(abs(gdot_slip))
dotState(instance)%accshear_slip(1:prm%totalNslip,of) = abs(gdot_slip) dst%accshear_slip(1:prm%totalNslip,of) = abs(gdot_slip)
j = 0_pInt j = 0_pInt
twinFamilies2: do f = 1_pInt,size(prm%Ntwin,1) twinFamilies2: do f = 1_pInt,size(prm%Ntwin,1)
index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family index_myFamily = sum(lattice_NtwinSystem(1:f-1_pInt,ph)) ! at which index starts my family
twinSystems2: do i = 1_pInt,prm%Ntwin(f) twinSystems2: do i = 1_pInt,prm%Ntwin(f)
j = j+1_pInt j = j+1_pInt
dotState(instance)%s_twin(j,of) = & ! evolution of twin resistance j dst%s_twin(j,of) = & ! evolution of twin resistance j
c_TwinSlip * dot_product(prm%interaction_TwinSlip(j,1:prm%totalNslip),abs(gdot_slip)) + & ! dot gamma_slip modulated by right-side slip factor c_TwinSlip * dot_product(prm%interaction_TwinSlip(j,1:prm%totalNslip),abs(gdot_slip)) + & ! dot gamma_slip modulated by right-side slip factor
c_TwinTwin * dot_product(prm%interaction_TwinTwin(j,1:prm%totalNtwin),gdot_twin) ! dot gamma_twin modulated by right-side twin factor c_TwinTwin * dot_product(prm%interaction_TwinTwin(j,1:prm%totalNtwin),gdot_twin) ! dot gamma_twin modulated by right-side twin factor
if (state(instance)%sumF(of) < 0.98_pReal) & ! ensure twin volume fractions stays below 1.0 if (stt%sumF(of) < 0.98_pReal) & ! ensure twin volume fractions stays below 1.0
dotState(instance)%sumF(of) = dotState(instance)%sumF(of) + & dst%sumF(of) = dst%sumF(of) + gdot_twin(j)/lattice_shearTwin(index_myFamily+i,ph)
gdot_twin(j)/lattice_shearTwin(index_myFamily+i,ph) dst%accshear_twin(j,of) = abs(gdot_twin(j))
dotState(instance)%accshear_twin(j,of) = abs(gdot_twin(j))
enddo twinSystems2 enddo twinSystems2
enddo twinFamilies2 enddo twinFamilies2
end subroutine plastic_phenopowerlaw_dotState end subroutine plastic_phenopowerlaw_dotState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------