rewrite kinematicdeltafp subro
This commit is contained in:
parent
1aa66b98ac
commit
c7d6e78dc0
|
@ -440,3 +440,5 @@ function plastic_active(plastic_label) result(active_plastic)
|
||||||
end function plastic_active
|
end function plastic_active
|
||||||
|
|
||||||
end submodule plastic
|
end submodule plastic
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -380,140 +380,44 @@ module function phenopowerlaw_dotState(Mp,ph,en) result(dotState)
|
||||||
|
|
||||||
end function phenopowerlaw_dotState
|
end function phenopowerlaw_dotState
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculates instantaneous incremental change of kinematics and associated jump state
|
!> @brief calculates instantaneous incremental change of kinematics and associated jump state
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine plastic_kinematic_deltaFp(twinJump,deltaFp,ipc, ip, el)
|
module subroutine plastic_kinematic_deltaFp(twinJump,deltaFp,Mp,ph,en)
|
||||||
use prec, only: &
|
|
||||||
dNeq, &
|
|
||||||
dEq0
|
|
||||||
! #ifdef DEBUG
|
|
||||||
! use debug, only: &
|
|
||||||
! debug_level, &
|
|
||||||
! debug_constitutive,&
|
|
||||||
! debug_levelExtensive, &
|
|
||||||
! debug_levelSelective
|
|
||||||
! #endif
|
|
||||||
|
|
||||||
use geometry_plastic_nonlocal, only: &
|
|
||||||
nIPneighbors => geometry_plastic_nonlocal_nIPneighbors, &
|
|
||||||
IPneighborhood => geometry_plastic_nonlocal_IPneighborhood, &
|
|
||||||
IPvolume => geometry_plastic_nonlocal_IPvolume0, &
|
|
||||||
IParea => geometry_plastic_nonlocal_IParea0, &
|
|
||||||
IPareaNormal => geometry_plastic_nonlocal_IPareaNormal0
|
|
||||||
|
|
||||||
|
|
||||||
!use mesh, only: &
|
|
||||||
! mesh_element, & !name changed
|
|
||||||
! mesh_ipNeighborhood, &
|
|
||||||
! mesh_ipCoordinates, &
|
|
||||||
! mesh_ipVolume, &
|
|
||||||
! mesh_ipAreaNormal, &
|
|
||||||
! mesh_ipArea, &
|
|
||||||
! FE_NipNeighbors, &
|
|
||||||
! mesh_maxNipNeighbors, &
|
|
||||||
! FE_geomtype, &
|
|
||||||
! FE_celltype
|
|
||||||
|
|
||||||
use lattice
|
|
||||||
use math, only: &
|
use math, only: &
|
||||||
math_I3
|
math_I3
|
||||||
|
|
||||||
! use material, only: &
|
|
||||||
! phaseAt, phasememberAt, & !name changed
|
|
||||||
! phase_plasticityInstance
|
|
||||||
|
|
||||||
implicit none
|
|
||||||
integer :: &
|
|
||||||
ph, en, instance, & !< 'en' is size of FFT grid 8*8*8 or 16*16*16.
|
|
||||||
neighbor_el, & !< element number of neighboring material point
|
|
||||||
neighbor_ip, & !< integration point of neighboring material point
|
|
||||||
np, & !< neighbor phase
|
|
||||||
no, n !< nieghbor offset and index for loop at neighbor
|
|
||||||
|
|
||||||
logical , intent(out) :: &
|
logical , intent(out) :: &
|
||||||
twinJump
|
twinJump
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
deltaFp
|
deltaFp
|
||||||
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
|
Mp
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ipc, & !< element index
|
ph, &
|
||||||
ip, & !< integration point index
|
en
|
||||||
el !< grain index @ for identifying grain boundary
|
|
||||||
! ! real(pReal), dimension(3,3,param(instance)%totalNslip) :: &
|
|
||||||
! ! CorrespondanceMatrix
|
|
||||||
integer, dimension(52) :: &
|
|
||||||
twin_el_incl
|
|
||||||
real(pReal), dimension(6) :: &
|
|
||||||
neighbor_stt
|
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
random, random1
|
random
|
||||||
integer :: &
|
integer :: &
|
||||||
i,j,var_growth,var_nucl
|
twin_var
|
||||||
var_growth = 0
|
real(pReal), dimension(param(ph)%sum_N_tw) :: &
|
||||||
var_nucl = 0
|
dot_gamma_tw
|
||||||
!ph = phaseAt(ipc, ip, el)
|
|
||||||
!of = phasememberAt(ipc, ip, el)
|
|
||||||
!instance = phase_plasticityInstance(ph)
|
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance), dlt => deltaState(instance))
|
|
||||||
|
|
||||||
twinJump = .false.
|
twinJump = .false.
|
||||||
deltaFp = math_I3
|
deltaFp = math_I3
|
||||||
|
call kinetics_tw(Mp,ph,en,dot_gamma_tw)
|
||||||
|
twin_var = maxloc(dot_gamma_tw(param(:)%sum_N_tw),dim=1)
|
||||||
|
|
||||||
|
write(6,*)'twin var',twin_var
|
||||||
|
|
||||||
call RANDOM_NUMBER(random)
|
call RANDOM_NUMBER(random)
|
||||||
!call RANDOM_NUMBER(random1)
|
|
||||||
|
|
||||||
Success_Growth: if (random <= sum(state(ph)%gamma_tw(:,en)/param(ph)%gamma_char)) then
|
Success_Growth: if (random <= sum(state(ph)%gamma_tw(:,en)/param(ph)%gamma_char)) then
|
||||||
twinJump = .true.
|
twinJump = .true.
|
||||||
deltaFp = prm%CorrespondanceMatrix(:,:,var_growth)
|
deltaFp = param(ph)%CorrespondanceMatrix(:,:,twin_var)
|
||||||
|
|
||||||
end if Success_Growth
|
end if Success_Growth
|
||||||
! ! Sampling: if (var_growth > 0_pInt) then
|
|
||||||
! ! ! write(6,*)'I am sampling for growth with variant',var_growth
|
|
||||||
! ! Ability_Growth: if (stt%f_twin_grow(var_growth,of) > stt%fmc_twin_grow(var_growth,of) &
|
|
||||||
! ! + prm%checkstep_grow) then
|
|
||||||
! ! stt%fmc_twin_grow(var_growth,of) = stt%fmc_twin_grow(var_growth,of) &
|
|
||||||
! ! + prm%checkstep_grow
|
|
||||||
! ! Success_Growth: if (random <= stt%f_twin_grow(var_growth,of) .or. ALL(neighbor_stt > 0_pReal)) then
|
|
||||||
! ! write(6,*)'growth sampling is successful for elem',el
|
|
||||||
! ! twinJump = .true.
|
|
||||||
! ! deltaFp = prm%CorrespondanceMatrix(:,:,var_growth)
|
|
||||||
! ! dlt%f_twin_grow(:,of) = 0.0_pReal - stt%f_twin_grow(:,of)
|
|
||||||
! ! dlt%f_twin_nucl(:,of) = 0.0_pReal - stt%f_twin_nucl(:,of)
|
|
||||||
! ! dlt%fmc_twin_grow(:,of) = 0.0_pReal - stt%fmc_twin_grow(:,of)
|
|
||||||
! ! dlt%fmc_twin_nucl(:,of) = 0.0_pReal - stt%fmc_twin_nucl(:,of)
|
|
||||||
! ! dlt%frozen(of) = 1.0_pReal - stt%frozen(of)
|
|
||||||
! ! dlt%variant_twin(of) = var_growth - stt%variant_twin(of)
|
|
||||||
! ! endif Success_Growth
|
|
||||||
! ! endif Ability_Growth
|
|
||||||
|
|
||||||
! ! elseif (var_growth == 0_pInt .and. prm%checkgrowth_twin > 0_pReal ) then
|
|
||||||
! if (var_growth == 0_pInt .and. prm%checkgrowth_twin > 0_pReal ) then
|
|
||||||
! var_nucl = maxloc(stt%f_twin_nucl(:,of), dim=1)
|
|
||||||
! ! write(6,*)'I am sampling for nucleation with variant',var_nucl,stt%f_twin_nucl(var_nucl,of)
|
|
||||||
! Ability_Nucleation: if (stt%f_twin_nucl(var_nucl,of) > stt%fmc_twin_nucl(var_nucl,of) &
|
|
||||||
! + prm%checkstep_nucl) then
|
|
||||||
! stt%fmc_twin_nucl(var_nucl,of) = stt%fmc_twin_nucl(var_nucl,of) &
|
|
||||||
! + prm%checkstep_nucl
|
|
||||||
! Success_Nucleation: if (random <= stt%f_twin_nucl(var_nucl,of) &
|
|
||||||
! .and. random1 <= 0.20) then
|
|
||||||
! write(6,*)'nucleation sampling is successful for elem',el
|
|
||||||
! twinJump = .true.
|
|
||||||
! deltaFp = prm%CorrespondanceMatrix(:,:,var_nucl)
|
|
||||||
! dlt%f_twin_nucl(:,of) = 0.0_pReal - stt%f_twin_nucl(:,of)
|
|
||||||
! dlt%f_twin_grow(:,of) = 0.0_pReal - stt%f_twin_grow(:,of)
|
|
||||||
! dlt%fmc_twin_nucl(:,of) = 0.0_pReal - stt%fmc_twin_nucl(:,of)
|
|
||||||
! dlt%fmc_twin_grow(:,of) = 0.0_pReal - stt%fmc_twin_grow(:,of)
|
|
||||||
! dlt%frozen(of) = 1.0_pReal - stt%frozen(of)
|
|
||||||
! dlt%variant_twin(of) = var_nucl - stt%variant_twin(of)
|
|
||||||
! endif Success_Nucleation
|
|
||||||
! endif Ability_Nucleation
|
|
||||||
! endif
|
|
||||||
! ! endif Sampling
|
|
||||||
end associate
|
|
||||||
|
|
||||||
end subroutine plastic_kinematic_deltaFp
|
end subroutine plastic_kinematic_deltaFp
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue