simplified state initialization
- not needed for damage (is an intial value problem, will trickle down) - plastic initializes state, copy to state0 (centrally)
This commit is contained in:
parent
2aa78a710b
commit
801e9f512b
|
@ -67,10 +67,6 @@ module phase
|
||||||
damageState
|
damageState
|
||||||
|
|
||||||
|
|
||||||
integer, public, protected :: &
|
|
||||||
phase_plasticity_maxSizeDotState, &
|
|
||||||
phase_damage_maxSizeDotState
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
! == cleaned:begin =================================================================================
|
! == cleaned:begin =================================================================================
|
||||||
|
@ -377,19 +373,6 @@ subroutine phase_init
|
||||||
call damage_init
|
call damage_init
|
||||||
call thermal_init(phases)
|
call thermal_init(phases)
|
||||||
|
|
||||||
|
|
||||||
phase_damage_maxSizeDotState = 0
|
|
||||||
PhaseLoop2:do ph = 1,phases%length
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! partition and initialize state
|
|
||||||
plasticState(ph)%state = plasticState(ph)%state0
|
|
||||||
if(damageState(ph)%sizeState > 0) &
|
|
||||||
damageState(ph)%state = damageState(ph)%state0
|
|
||||||
enddo PhaseLoop2
|
|
||||||
|
|
||||||
phase_damage_maxSizeDotState = maxval(damageState%sizeDotState)
|
|
||||||
phase_plasticity_maxSizeDotState = maxval(plasticState%sizeDotState)
|
|
||||||
|
|
||||||
end subroutine phase_init
|
end subroutine phase_init
|
||||||
|
|
||||||
|
|
||||||
|
@ -545,8 +528,7 @@ subroutine crystallite_init()
|
||||||
phases => config_material%get('phase')
|
phases => config_material%get('phase')
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
if (damageState(ph)%sizeState > 0) &
|
if (damageState(ph)%sizeState > 0) allocate(damageState(ph)%subState0,source=damageState(ph)%state0) ! ToDo: hack
|
||||||
allocate(damageState(ph)%subState0,source=damageState(ph)%state0) ! ToDo: hack
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
print'(a42,1x,i10)', ' # of elements: ', eMax
|
print'(a42,1x,i10)', ' # of elements: ', eMax
|
||||||
|
|
|
@ -15,6 +15,8 @@ submodule(phase) damage
|
||||||
DAMAGE_ANISOBRITTLE_ID
|
DAMAGE_ANISOBRITTLE_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
|
integer :: phase_damage_maxSizeDotState
|
||||||
|
|
||||||
|
|
||||||
type :: tDataContainer
|
type :: tDataContainer
|
||||||
real(pReal), dimension(:), allocatable :: phi, d_phi_d_dot_phi
|
real(pReal), dimension(:), allocatable :: phi, d_phi_d_dot_phi
|
||||||
|
@ -134,6 +136,8 @@ module subroutine damage_init
|
||||||
where(anisobrittle_init()) phase_damage = DAMAGE_ANISOBRITTLE_ID
|
where(anisobrittle_init()) phase_damage = DAMAGE_ANISOBRITTLE_ID
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
phase_damage_maxSizeDotState = maxval(damageState%sizeDotState)
|
||||||
|
|
||||||
end subroutine damage_init
|
end subroutine damage_init
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ submodule(phase) mechanical
|
||||||
integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: &
|
integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: &
|
||||||
phase_plasticity !< plasticity of each phase
|
phase_plasticity !< plasticity of each phase
|
||||||
|
|
||||||
|
integer :: phase_plasticity_maxSizeDotState
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
@ -294,6 +295,11 @@ module subroutine mechanical_init(materials,phases)
|
||||||
|
|
||||||
call plastic_init()
|
call plastic_init()
|
||||||
|
|
||||||
|
do ph = 1,phases%length
|
||||||
|
plasticState(ph)%state0 = plasticState(ph)%state
|
||||||
|
enddo
|
||||||
|
phase_plasticity_maxSizeDotState = maxval(plasticState%sizeDotState)
|
||||||
|
|
||||||
|
|
||||||
num_crystallite => config_numerics%get('crystallite',defaultVal=emptyDict)
|
num_crystallite => config_numerics%get('crystallite',defaultVal=emptyDict)
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,6 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
allocate(dst%Lambda_sl(prm%sum_N_sl,Nmembers), source=0.0_pReal)
|
allocate(dst%Lambda_sl(prm%sum_N_sl,Nmembers), source=0.0_pReal)
|
||||||
allocate(dst%threshold_stress(prm%sum_N_sl,Nmembers), source=0.0_pReal)
|
allocate(dst%threshold_stress(prm%sum_N_sl,Nmembers), source=0.0_pReal)
|
||||||
|
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -467,8 +467,6 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
allocate(dst%tau_r_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
allocate(dst%tau_r_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%V_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
allocate(dst%V_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
||||||
|
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -140,8 +140,6 @@ module function plastic_isotropic_init() result(myPlasticity)
|
||||||
! global alias
|
! global alias
|
||||||
plasticState(ph)%slipRate => plasticState(ph)%dotState(2:2,:)
|
plasticState(ph)%slipRate => plasticState(ph)%dotState(2:2,:)
|
||||||
|
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -213,8 +213,6 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
stt%gamma0 => plasticState(ph)%state (startIndex :endIndex ,:)
|
stt%gamma0 => plasticState(ph)%state (startIndex :endIndex ,:)
|
||||||
dlt%gamma0 => plasticState(ph)%deltaState(startIndex-o:endIndex-o,:)
|
dlt%gamma0 => plasticState(ph)%deltaState(startIndex-o:endIndex-o,:)
|
||||||
|
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -265,8 +265,6 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_gamma',defaultVal=1.0e-6_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_gamma',defaultVal=1.0e-6_pReal)
|
||||||
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_gamma'
|
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_gamma'
|
||||||
|
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue