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
|
||||
|
||||
|
||||
integer, public, protected :: &
|
||||
phase_plasticity_maxSizeDotState, &
|
||||
phase_damage_maxSizeDotState
|
||||
|
||||
interface
|
||||
|
||||
! == cleaned:begin =================================================================================
|
||||
|
@ -377,19 +373,6 @@ subroutine phase_init
|
|||
call damage_init
|
||||
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
|
||||
|
||||
|
||||
|
@ -545,8 +528,7 @@ subroutine crystallite_init()
|
|||
phases => config_material%get('phase')
|
||||
|
||||
do ph = 1, phases%length
|
||||
if (damageState(ph)%sizeState > 0) &
|
||||
allocate(damageState(ph)%subState0,source=damageState(ph)%state0) ! ToDo: hack
|
||||
if (damageState(ph)%sizeState > 0) allocate(damageState(ph)%subState0,source=damageState(ph)%state0) ! ToDo: hack
|
||||
enddo
|
||||
|
||||
print'(a42,1x,i10)', ' # of elements: ', eMax
|
||||
|
@ -560,7 +542,7 @@ subroutine crystallite_init()
|
|||
do ip = 1, size(material_phaseMemberAt,2)
|
||||
do co = 1,homogenization_Nconstituents(material_homogenizationAt(el))
|
||||
call crystallite_orientations(co,ip,el)
|
||||
call plastic_dependentState(co,ip,el) ! update dependent state variables to be consistent with basic states
|
||||
call plastic_dependentState(co,ip,el) ! update dependent state variables to be consistent with basic states
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
@ -576,9 +558,9 @@ end subroutine crystallite_init
|
|||
subroutine crystallite_orientations(co,ip,el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
co, & !< counter in integration point component loop
|
||||
ip, & !< counter in integration point loop
|
||||
el !< counter in element loop
|
||||
co, & !< counter in integration point component loop
|
||||
ip, & !< counter in integration point loop
|
||||
el !< counter in element loop
|
||||
|
||||
|
||||
call crystallite_orientation(co,ip,el)%fromMatrix(transpose(math_rotationalPart(&
|
||||
|
|
|
@ -15,6 +15,8 @@ submodule(phase) damage
|
|||
DAMAGE_ANISOBRITTLE_ID
|
||||
end enum
|
||||
|
||||
integer :: phase_damage_maxSizeDotState
|
||||
|
||||
|
||||
type :: tDataContainer
|
||||
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
|
||||
endif
|
||||
|
||||
phase_damage_maxSizeDotState = maxval(damageState%sizeDotState)
|
||||
|
||||
end subroutine damage_init
|
||||
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ submodule(phase) mechanical
|
|||
integer(kind(PLASTICITY_undefined_ID)), dimension(:), allocatable :: &
|
||||
phase_plasticity !< plasticity of each phase
|
||||
|
||||
integer :: phase_plasticity_maxSizeDotState
|
||||
|
||||
interface
|
||||
|
||||
|
@ -294,6 +295,11 @@ module subroutine mechanical_init(materials,phases)
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
@ -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%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
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -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%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
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -140,8 +140,6 @@ module function plastic_isotropic_init() result(myPlasticity)
|
|||
! global alias
|
||||
plasticState(ph)%slipRate => plasticState(ph)%dotState(2:2,:)
|
||||
|
||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
||||
|
||||
end associate
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -213,8 +213,6 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
|||
stt%gamma0 => plasticState(ph)%state (startIndex :endIndex ,:)
|
||||
dlt%gamma0 => plasticState(ph)%deltaState(startIndex-o:endIndex-o,:)
|
||||
|
||||
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue