From f2704a00384f0ceb44e5491cdfe43b22f8c57e38 Mon Sep 17 00:00:00 2001 From: Achal H P Date: Fri, 19 Jan 2024 18:20:31 +0530 Subject: [PATCH] Jan 19_2 --- src/phase_mechanical_plastic.f90 | 6 +++--- src/phase_mechanical_plastic_phenopowerlaw.f90 | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/phase_mechanical_plastic.f90 b/src/phase_mechanical_plastic.f90 index 0179f5791..17bea1311 100644 --- a/src/phase_mechanical_plastic.f90 +++ b/src/phase_mechanical_plastic.f90 @@ -404,7 +404,7 @@ module function plastic_deltaState(ph, en) result(broken) broken = .false. select case (phase_plasticity(ph)) - case (PLASTIC_NONLOCAL_ID,PLASTIC_KINEHARDENING_ID, PLASTIC_PHENOPOWERLAW_ID) !> Achal + case (PLASTIC_NONLOCAL_ID,PLASTIC_KINEHARDENING_ID)!, PLASTIC_PHENOPOWERLAW_ID) !> Achal Mp = matmul(matmul(transpose(phase_mechanical_Fi(ph)%data(1:3,1:3,en)),& phase_mechanical_Fi(ph)%data(1:3,1:3,en)),& @@ -418,8 +418,8 @@ module function plastic_deltaState(ph, en) result(broken) case (PLASTIC_NONLOCAL_ID) plasticType call plastic_nonlocal_deltaState(Mp,ph,en) - case (PLASTIC_PHENOPOWERLAW_ID) plasticType !> Achal - call plastic_phenopowerlaw_deltaState(ph,en) !> Achal + !case (PLASTIC_PHENOPOWERLAW_ID) plasticType !> Achal + ! call plastic_phenopowerlaw_deltaState(ph,en) !> Achal end select plasticType diff --git a/src/phase_mechanical_plastic_phenopowerlaw.f90 b/src/phase_mechanical_plastic_phenopowerlaw.f90 index f74344a0b..c6d71c772 100644 --- a/src/phase_mechanical_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanical_plastic_phenopowerlaw.f90 @@ -381,10 +381,11 @@ associate(prm => param(ph), stt => state(ph), & call kinetics_sl(Mp,ph,en,dot_gamma_sl_pos,dot_gamma_sl_neg) dot_gamma_sl = abs(dot_gamma_sl_pos+dot_gamma_sl_neg) call kinetics_tw(Mp,ph,en,dot_gamma_tw) - if(en==1) call plastic_kinematic_deltaFp(Mp,ph,en,twinJump,deltaFp) ! delete this + if(en==1) call plastic_kinematic_deltaFp(Mp,ph,en,twinJump,deltaFp) ! delete this ! delete this !write(6,*)'deltaFp', deltaFp ! delete this !write(6,*)'characteristicShearTwin', prm%gamma_char !write(6,*)'Schmid_twin',prm%P_sl + if(en==1) write(6,*)'maxF',maxval(stt%gamma_tw(:,en)/prm%gamma_char) sumF = sum(stt%gamma_tw(:,en)/prm%gamma_char) xi_sl_sat_offset = prm%f_sat_sl_tw*sqrt(sumF) @@ -434,7 +435,7 @@ twinJump = .false. deltaFp = math_I3 tau_tw = [(math_tensordot(Mp,param(ph)%P_tw(1:3,1:3,i)),i=1,param(ph)%sum_N_tw)] -twin_var = maxloc((0.05_pReal*(abs(tau_tw)/state(ph)%xi_tw(:,en))**param(ph)%n_tw)/param(ph)%gamma_char,dim=1) ! This prints values from 1 to 6 +twin_var = maxloc((0.05_pReal*(abs(tau_tw)/state(ph)%xi_tw(:,en))**param(ph)%n_tw)/param(ph)%gamma_char,dim=1) ! This prints values from 1 to 6, fdot0_twin is taken as 0.05 fdot_twin = (0.05_pReal*(abs(tau_tw)/state(ph)%xi_tw(:,en))**param(ph)%n_tw)/param(ph)%gamma_char ! This is sometimes >1 !write(6,*) 'twin_var', twin_var !delete this @@ -445,7 +446,8 @@ call RANDOM_NUMBER(random) !write(6,*)'random',random !delete this -Success_Growth: if (random*0.0000000000000000000000001_pReal <= sum(state(ph)%gamma_tw(:,en)/param(ph)%gamma_char)) then ! Instead of sum take max +Success_Growth: if (random*0.0000000000000000000000001_pReal <= maxval((0.05_pReal*(abs(tau_tw) & + /state(ph)%xi_tw(:,en))**param(ph)%n_tw)/param(ph)%gamma_char)) then ! Instead of sum take max twinJump = .true. deltaFp = param(ph)%CorrespondanceMatrix(:,:,twin_var) deltastate(ph)%f_twin(:,en) = 0.0_pReal - state(ph)%f_twin(:,en)