easier to understand

This commit is contained in:
Martin Diehl 2023-09-21 22:32:38 +02:00
parent 16b029cf39
commit eeb5de0531
3 changed files with 5 additions and 6 deletions

View File

@ -486,7 +486,7 @@ pure subroutine kinetics(Mp,T,ph,en, &
tau_pos = [(math_tensordot(Mp,prm%P_nS_pos(1:3,1:3,i)),i=1,prm%sum_N_sl)]
tau_neg = [(math_tensordot(Mp,prm%P_nS_neg(1:3,1:3,i)),i=1,prm%sum_N_sl)]
tau_eff = math_clip(merge(tau_pos,tau_neg, tau_pos>tau_neg) - dst%tau_pass(:,en),left = 0.0_pREAL)
tau_eff = math_clip(max(tau_pos,tau_neg) - dst%tau_pass(:,en),left = 0.0_pREAL)
if (present(tau)) tau = tau_eff

View File

@ -336,7 +336,6 @@ module function plastic_kinehardening_dotState(Mp,ph,en) result(dotState)
* exp(-(stt%gamma(:,en)-stt%gamma_flip(:,en))*prm%h_0_chi/(prm%chi_inf+stt%chi_flip(:,en))) &
)
end associate
end function plastic_kinehardening_dotState
@ -457,11 +456,11 @@ pure subroutine kinetics(Mp,ph,en, &
dot_gamma = merge(+1.0_pREAL,-1.0_pREAL, tau_pos>tau_neg) &
* prm%dot_gamma_0 &
* (merge(tau_pos,tau_neg, tau_pos>tau_neg)/stt%xi(:,en))**prm%n
* (max(tau_pos,tau_neg)/stt%xi(:,en))**prm%n
if (present(ddot_gamma_dtau)) then
where(dNeq0(dot_gamma))
ddot_gamma_dtau = dot_gamma*prm%n/merge(tau_pos,tau_neg, tau_pos>tau_neg)
ddot_gamma_dtau = dot_gamma*prm%n/max(tau_pos,tau_neg)
else where
ddot_gamma_dtau = 0.0_pREAL
end where

View File

@ -465,11 +465,11 @@ pure subroutine kinetics_sl(Mp,ph,en, &
dot_gamma_sl = merge(+1.0_pREAL,-1.0_pREAL, tau_sl_pos>tau_sl_neg) &
* prm%dot_gamma_0_sl &
* (merge(tau_sl_pos,tau_sl_neg, tau_sl_pos>tau_sl_neg)/stt%xi_sl(:,en))**prm%n_sl
* (max(tau_sl_pos,tau_sl_neg)/stt%xi_sl(:,en))**prm%n_sl
if (present(ddot_gamma_dtau_sl)) then
where(dNeq0(dot_gamma_sl))
ddot_gamma_dtau_sl = dot_gamma_sl*prm%n_sl/merge(tau_sl_pos,tau_sl_neg, tau_sl_pos>tau_sl_neg)
ddot_gamma_dtau_sl = dot_gamma_sl*prm%n_sl/max(tau_sl_pos,tau_sl_neg)
else where
ddot_gamma_dtau_sl = 0.0_pREAL
end where