too much whitespace

This commit is contained in:
Martin Diehl 2018-09-01 11:08:38 +02:00
parent e9f738fade
commit 4fbe5811a3
1 changed files with 165 additions and 214 deletions

View File

@ -1593,10 +1593,9 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
associate(prm => param(phase_plasticityInstance(material_phase(ipc,ip,el))), & associate(prm => param(phase_plasticityInstance(material_phase(ipc,ip,el))), &
stt => state(phase_plasticityInstance(material_phase(ipc,ip,el)))) stt => state(phase_plasticityInstance(material_phase(ipc,ip,el))))
!* Total twin volume fraction
sumf = sum(stt%twinFraction(1_pInt:prm%totalNtwin,of)) ! safe for prm%totalNtwin == 0 sumf = sum(stt%twinFraction(1_pInt:prm%totalNtwin,of)) ! safe for prm%totalNtwin == 0
!* Required output
c = 0_pInt c = 0_pInt
postResults = 0.0_pReal postResults = 0.0_pReal
do o = 1_pInt,size(prm%outputID) do o = 1_pInt,size(prm%outputID)
@ -1610,37 +1609,29 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
c = c + prm%totalNslip c = c + prm%totalNslip
case (shear_rate_slip_ID) case (shear_rate_slip_ID)
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
!* Resolved shear stress on slip system
tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j)) tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j))
!* Stress ratios
if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then
!* Stress ratios
stressRatio = ((abs(tau)-stt%threshold_stress_slip(j,of))/& stressRatio = ((abs(tau)-stt%threshold_stress_slip(j,of))/&
(prm%SolidSolutionStrength+& (prm%SolidSolutionStrength+&
prm%tau_peierls(j))) prm%tau_peierls(j)))
StressRatio_p = stressRatio** prm%p(j) StressRatio_p = stressRatio** prm%p(j)
StressRatio_pminus1 = stressRatio**(prm%p(j)-1.0_pReal) StressRatio_pminus1 = stressRatio**(prm%p(j)-1.0_pReal)
!* Boltzmann ratio
BoltzmannRatio = prm%Qedge(j)/(kB*Temperature) BoltzmannRatio = prm%Qedge(j)/(kB*Temperature)
!* Initial shear rates
DotGamma0 = stt%rhoEdge(j,of)*prm%burgers_slip(j)* prm%v0(j) DotGamma0 = stt%rhoEdge(j,of)*prm%burgers_slip(j)* prm%v0(j)
!* Shear rates due to slip
postResults(c+j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**& postResults(c+j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**&
prm%q(j))*sign(1.0_pReal,tau) prm%q(j))*sign(1.0_pReal,tau)
else else
postResults(c+j) = 0.0_pReal postResults(c+j) = 0.0_pReal
endif endif
enddo enddo
c = c + prm%totalNslip c = c + prm%totalNslip
case (accumulated_shear_slip_ID) case (accumulated_shear_slip_ID)
postResults(c+1_pInt:c+prm%totalNslip) = & postResults(c+1_pInt:c+prm%totalNslip) = stt%accshear_slip(1_pInt:prm%totalNslip,of)
stt%accshear_slip(1_pInt:prm%totalNslip,of)
c = c + prm%totalNslip c = c + prm%totalNslip
case (mfp_slip_ID) case (mfp_slip_ID)
postResults(c+1_pInt:c+prm%totalNslip) =& postResults(c+1_pInt:c+prm%totalNslip) = stt%mfp_slip(1_pInt:prm%totalNslip,of)
stt%mfp_slip(1_pInt:prm%totalNslip,of)
c = c + prm%totalNslip c = c + prm%totalNslip
case (resolved_stress_slip_ID) case (resolved_stress_slip_ID)
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
@ -1648,14 +1639,12 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
enddo enddo
c = c + prm%totalNslip c = c + prm%totalNslip
case (threshold_stress_slip_ID) case (threshold_stress_slip_ID)
postResults(c+1_pInt:c+prm%totalNslip) = & postResults(c+1_pInt:c+prm%totalNslip) = stt%threshold_stress_slip(1_pInt:prm%totalNslip,of)
stt%threshold_stress_slip(1_pInt:prm%totalNslip,of)
c = c + prm%totalNslip c = c + prm%totalNslip
case (edge_dipole_distance_ID) case (edge_dipole_distance_ID)
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
postResults(c+j) = & postResults(c+j) = (3.0_pReal*lattice_mu(ph)*prm%burgers_slip(j)) &
(3.0_pReal*lattice_mu(ph)*prm%burgers_slip(j))/& / (16.0_pReal*PI*abs(math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j))))
(16.0_pReal*PI*abs(math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j))))
postResults(c+j)=min(postResults(c+j),stt%mfp_slip(j,of)) postResults(c+j)=min(postResults(c+j),stt%mfp_slip(j,of))
! postResults(c+j)=max(postResults(c+j),& ! postResults(c+j)=max(postResults(c+j),&
! plasticState(ph)%state(4*ns+2*nt+2*nr+j, of)) ! plasticState(ph)%state(4*ns+2*nt+2*nr+j, of))
@ -1668,23 +1657,16 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
c = c + 6_pInt c = c + 6_pInt
case (shear_rate_shearband_ID) case (shear_rate_shearband_ID)
do j = 1_pInt,6_pInt ! loop over all shearbands do j = 1_pInt,6_pInt ! loop over all shearbands
!* Resolved shear stress on shearband system
tau = dot_product(Tstar_v,sbSv(1:6,j,ipc,ip,el)) tau = dot_product(Tstar_v,sbSv(1:6,j,ipc,ip,el))
!* Stress ratios
if (abs(tau) < tol_math_check) then if (abs(tau) < tol_math_check) then
StressRatio_p = 0.0_pReal StressRatio_p = 0.0_pReal
StressRatio_pminus1 = 0.0_pReal StressRatio_pminus1 = 0.0_pReal
else else
StressRatio_p = (abs(tau)/prm%sbResistance)**& StressRatio_p = (abs(tau)/prm%sbResistance)**prm%pShearBand
prm%pShearBand StressRatio_pminus1 = (abs(tau)/prm%sbResistance)**(prm%pShearBand-1.0_pReal)
StressRatio_pminus1 = (abs(tau)/prm%sbResistance)**&
(prm%pShearBand-1.0_pReal)
endif endif
!* Boltzmann ratio
BoltzmannRatio = prm%sbQedge/(kB*Temperature) BoltzmannRatio = prm%sbQedge/(kB*Temperature)
!* Initial shear rates
DotGamma0 = prm%sbVelocity DotGamma0 = prm%sbVelocity
! Shear rate due to shear band
postResults(c+j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**prm%qShearBand)*& postResults(c+j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**prm%qShearBand)*&
sign(1.0_pReal,tau) sign(1.0_pReal,tau)
enddo enddo
@ -1694,12 +1676,8 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
c = c + prm%totalNtwin c = c + prm%totalNtwin
case (shear_rate_twin_ID) case (shear_rate_twin_ID)
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
!* Resolved shear stress on slip system
tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j)) tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j))
!* Stress ratios
if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then
!* Stress ratios
StressRatio_p = ((abs(tau)-stt%threshold_stress_slip(j,of))/& StressRatio_p = ((abs(tau)-stt%threshold_stress_slip(j,of))/&
(prm%SolidSolutionStrength+& (prm%SolidSolutionStrength+&
prm%tau_peierls(j)))& prm%tau_peierls(j)))&
@ -1708,14 +1686,9 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
(prm%SolidSolutionStrength+& (prm%SolidSolutionStrength+&
prm%tau_peierls(j)))& prm%tau_peierls(j)))&
**(prm%p(j)-1.0_pReal) **(prm%p(j)-1.0_pReal)
!* Boltzmann ratio
BoltzmannRatio = prm%Qedge(j)/(kB*Temperature) BoltzmannRatio = prm%Qedge(j)/(kB*Temperature)
!* Initial shear rates DotGamma0 = stt%rhoEdge(j,of)*prm%burgers_slip(j)* prm%v0(j)
DotGamma0 = &
stt%rhoEdge(j,of)*prm%burgers_slip(j)* &
prm%v0(j)
!* Shear rates due to slip
gdot_slip(j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**& gdot_slip(j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**&
prm%q(j))*sign(1.0_pReal,tau) prm%q(j))*sign(1.0_pReal,tau)
else else
@ -1724,7 +1697,6 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
enddo enddo
do j = 1_pInt, prm%totalNtwin do j = 1_pInt, prm%totalNtwin
tau = math_mul33xx33(S,prm%Schmid_twin(1:3,1:3,j)) tau = math_mul33xx33(S,prm%Schmid_twin(1:3,1:3,j))
if ( tau > 0.0_pReal ) then if ( tau > 0.0_pReal ) then
@ -1735,22 +1707,18 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
if (tau < tau_r_twin(j,instance)) then if (tau < tau_r_twin(j,instance)) then
Ndot0_twin=(abs(gdot_slip(s1))*(stt%rhoEdge(s2,of)+stt%rhoEdgeDip(s2,of))+& Ndot0_twin=(abs(gdot_slip(s1))*(stt%rhoEdge(s2,of)+stt%rhoEdgeDip(s2,of))+&
abs(gdot_slip(s2))*(stt%rhoEdge(s1,of)+stt%rhoEdgeDip(s1,of)))/& abs(gdot_slip(s2))*(stt%rhoEdge(s1,of)+stt%rhoEdgeDip(s1,of)))/&
(prm%L0_twin*& (prm%L0_twin* prm%burgers_slip(j))*&
prm%burgers_slip(j))*& (1.0_pReal-exp(-prm%VcrossSlip/(kB*Temperature)* (tau_r_twin(j,instance)-tau)))
(1.0_pReal-exp(-prm%VcrossSlip/(kB*Temperature)*&
(tau_r_twin(j,instance)-tau)))
else else
Ndot0_twin=0.0_pReal Ndot0_twin=0.0_pReal
end if end if
case default case default
Ndot0_twin=prm%Ndot0_twin(j) Ndot0_twin=prm%Ndot0_twin(j)
end select end select
StressRatio_r = (stt%threshold_stress_twin(j,of)/tau) & StressRatio_r = (stt%threshold_stress_twin(j,of)/tau) **prm%r(j)
**prm%r(j) postResults(c+j) = (prm%MaxTwinFraction-sumf)*prm%shear_twin(j) &
postResults(c+j) = (prm%MaxTwinFraction-sumf)*prm%shear_twin(j) * & * stt%twinVolume(j,of)*Ndot0_twin*exp(-StressRatio_r)
stt%twinVolume(j,of)*Ndot0_twin*exp(-StressRatio_r)
endif endif
enddo enddo
c = c + prm%totalNtwin c = c + prm%totalNtwin
case (accumulated_shear_twin_ID) case (accumulated_shear_twin_ID)
@ -1769,10 +1737,8 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
c = c + prm%totalNtwin c = c + prm%totalNtwin
case (stress_exponent_ID) case (stress_exponent_ID)
do j = 1_pInt, prm%totalNslip do j = 1_pInt, prm%totalNslip
tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j)) tau = math_mul33xx33(S,prm%Schmid_slip(1:3,1:3,j))
if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then if((abs(tau)-stt%threshold_stress_slip(j,of)) > tol_math_check) then
!* Stress ratios
StressRatio_p = ((abs(tau)-stt%threshold_stress_slip(j,of))/& StressRatio_p = ((abs(tau)-stt%threshold_stress_slip(j,of))/&
(prm%SolidSolutionStrength+& (prm%SolidSolutionStrength+&
prm%tau_peierls(j)))& prm%tau_peierls(j)))&
@ -1781,47 +1747,32 @@ function plastic_dislotwin_postResults(Tstar_v,Temperature,ipc,ip,el) result(pos
(prm%SolidSolutionStrength+& (prm%SolidSolutionStrength+&
prm%tau_peierls(j)))& prm%tau_peierls(j)))&
**(prm%p(j)-1.0_pReal) **(prm%p(j)-1.0_pReal)
!* Boltzmann ratio
BoltzmannRatio = prm%Qedge(j)/(kB*Temperature) BoltzmannRatio = prm%Qedge(j)/(kB*Temperature)
!* Initial shear rates DotGamma0 = stt%rhoEdge(j,of)*prm%burgers_slip(j)* prm%v0(j)
DotGamma0 = &
stt%rhoEdge(j,of)*prm%burgers_slip(j)* &
prm%v0(j)
!* Shear rates due to slip
gdot_slip(j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**& gdot_slip(j) = DotGamma0*exp(-BoltzmannRatio*(1_pInt-StressRatio_p)**&
prm%q(j))*sign(1.0_pReal,tau) prm%q(j))*sign(1.0_pReal,tau)
!* Derivatives of shear rates dgdot_dtauslip = abs(gdot_slip(j))*BoltzmannRatio*prm%p(j) *prm%q(j)/&
dgdot_dtauslip = & (prm%SolidSolutionStrength+ prm%tau_peierls(j))*&
abs(gdot_slip(j))*BoltzmannRatio*prm%p(j)&
*prm%q(j)/&
(prm%SolidSolutionStrength+&
prm%tau_peierls(j))*&
StressRatio_pminus1*(1-StressRatio_p)**(prm%q(j)-1.0_pReal) StressRatio_pminus1*(1-StressRatio_p)**(prm%q(j)-1.0_pReal)
else else
gdot_slip(j) = 0.0_pReal gdot_slip(j) = 0.0_pReal
dgdot_dtauslip = 0.0_pReal dgdot_dtauslip = 0.0_pReal
endif endif
!* Stress exponent
postResults(c+j) = merge(0.0_pReal,(tau/gdot_slip(j))*dgdot_dtauslip,dEq0(gdot_slip(j))) postResults(c+j) = merge(0.0_pReal,(tau/gdot_slip(j))*dgdot_dtauslip,dEq0(gdot_slip(j)))
enddo enddo
c = c + prm%totalNslip c = c + prm%totalNslip
case (stress_trans_fraction_ID) case (stress_trans_fraction_ID)
postResults(c+1_pInt:c+prm%totalNtrans) = & postResults(c+1_pInt:c+prm%totalNtrans) = &
stt%stressTransFraction(1_pInt:prm%totalNtrans,of) stt%stressTransFraction(1_pInt:prm%totalNtrans,of)
c = c + prm%totalNtrans c = c + prm%totalNtrans
case (strain_trans_fraction_ID) case (strain_trans_fraction_ID)
postResults(c+1_pInt:c+prm%totalNtrans) = & postResults(c+1_pInt:c+prm%totalNtrans) = stt%strainTransFraction(1_pInt:prm%totalNtrans,of)
stt%strainTransFraction(1_pInt:prm%totalNtrans,of)
c = c + prm%totalNtrans c = c + prm%totalNtrans
case (trans_fraction_ID) case (trans_fraction_ID) !ToDo: deprecated
postResults(c+1_pInt:c+prm%totalNtrans) = & postResults(c+1_pInt:c+prm%totalNtrans) = stt%stressTransFraction(1_pInt:prm%totalNtrans,of) &
stt%stressTransFraction(1_pInt:prm%totalNtrans,of) + & + stt%strainTransFraction(1_pInt:prm%totalNtrans,of)
stt%strainTransFraction(1_pInt:prm%totalNtrans,of)
c = c + prm%totalNtrans c = c + prm%totalNtrans
end select end select
enddo enddo