From 5f0ff712369eebdc327af1ff40eaa66f737cfa00 Mon Sep 17 00:00:00 2001 From: achalhp Date: Sun, 17 Mar 2024 09:13:32 +0530 Subject: [PATCH] Growth criteria --- src/phase_mechanical.f90 | 4 ++-- ...phase_mechanical_plastic_phenopowerlaw.f90 | 23 ++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/phase_mechanical.f90 b/src/phase_mechanical.f90 index 4ca464ad9..3001caa64 100644 --- a/src/phase_mechanical.f90 +++ b/src/phase_mechanical.f90 @@ -1054,8 +1054,8 @@ module function phase_mechanical_constitutive(Delta_t,co,ce) result(status) !if(.not. FpJumped .and. NiterationStressLp>1) then !Achal: Reason for this if statement? call plastic_KinematicJump(ph, en, twinJump, deltaFp) if(twinJump) then - write(6,*) 'element jumped', deltaFp - write(6,*)'element',en + write(6,*) 'delta', deltaFp + write(6,*)'element jumped',en Fp0 = matmul(deltaFp,phase_mechanical_Fp0(ph)%data(1:3,1:3,en)) o = plasticState(ph)%offsetDeltaState diff --git a/src/phase_mechanical_plastic_phenopowerlaw.f90 b/src/phase_mechanical_plastic_phenopowerlaw.f90 index 4d148c3d6..37d29a83e 100644 --- a/src/phase_mechanical_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanical_plastic_phenopowerlaw.f90 @@ -533,7 +533,7 @@ module subroutine plastic_kinematic_deltaFp(ph,en,twinJump,deltaFp) random, & nRealNeighbors integer :: & - twin_var + twin_var, var_growth real(pREAL), dimension(param(ph)%sum_N_tw) :: & fdot_twin real(pREAL), dimension(param(ph)%sum_N_tw) :: & @@ -588,6 +588,27 @@ module subroutine plastic_kinematic_deltaFp(ph,en,twinJump,deltaFp) end do + NeighborLoop: do n = 1, ncellneighbors + neighbor_e = geom(ph)%IPneighborhood(1,n,en) + + if(stt%variant_twin(neighbor_e)>0) then + var_growth = stt%variant_twin(neighbor_e) + !write(6,*)'var_growth',var_growth,en + exit NeighborLoop + endif + + enddo NeighborLoop + + Growth_Criteria: if(var_growth>0) then + Ability_Growth: if(stt%f_twin(twin_var,en)>(stt%fmc_twin(twin_var,en)+prm%checkstep(twin_var))) then + stt%fmc_twin(twin_var,en) = stt%fmc_twin(twin_var,en)+prm%checkstep(twin_var) + Success_Growth: if (random <= stt%f_twin(twin_var,en)) then + twinJump = .true. + deltaFp = prm%CorrespondenceMatrix(:,:,twin_var) + endif Success_Growth + endif Ability_Growth + endif Growth_Criteria + end associate end subroutine plastic_kinematic_deltaFp