rename Nconstituents --> Nmembers
This commit is contained in:
parent
e1f0d2e0a3
commit
a7e2ed40dd
|
@ -133,7 +133,7 @@ module subroutine damage_init
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, & !< counter in phase loop
|
ph, & !< counter in phase loop
|
||||||
Nconstituents
|
Nmembers
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
phases, &
|
phases, &
|
||||||
phase, &
|
phase, &
|
||||||
|
@ -151,10 +151,10 @@ module subroutine damage_init
|
||||||
|
|
||||||
do ph = 1,phases%length
|
do ph = 1,phases%length
|
||||||
|
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
|
|
||||||
allocate(current(ph)%phi(Nconstituents),source=1.0_pReal)
|
allocate(current(ph)%phi(Nmembers),source=1.0_pReal)
|
||||||
allocate(current(ph)%d_phi_d_dot_phi(Nconstituents),source=0.0_pReal)
|
allocate(current(ph)%d_phi_d_dot_phi(Nmembers),source=0.0_pReal)
|
||||||
|
|
||||||
phase => phases%get(ph)
|
phase => phases%get(ph)
|
||||||
sources => phase%get('damage',defaultVal=emptyList)
|
sources => phase%get('damage',defaultVal=emptyList)
|
||||||
|
@ -199,7 +199,7 @@ module subroutine phase_damage_getRateAndItsTangents(phiDot, dPhiDot_dPhi, phi,
|
||||||
phiDot = 0.0_pReal
|
phiDot = 0.0_pReal
|
||||||
dPhiDot_dPhi = 0.0_pReal
|
dPhiDot_dPhi = 0.0_pReal
|
||||||
|
|
||||||
do co = 1, homogenization_Nconstituents(material_homogenizationAt2(ce))
|
do co = 1, homogenization_Nmembers(material_homogenizationAt2(ce))
|
||||||
ph = material_phaseAt2(co,ce)
|
ph = material_phaseAt2(co,ce)
|
||||||
me = material_phasememberAt2(co,ce)
|
me = material_phasememberAt2(co,ce)
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ module function anisobrittle_init() result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
sources, &
|
sources, &
|
||||||
src
|
src
|
||||||
integer :: Nconstituents,p
|
integer :: Nmembers,p
|
||||||
integer, dimension(:), allocatable :: N_cl
|
integer, dimension(:), allocatable :: N_cl
|
||||||
character(len=pStringLen) :: extmsg = ''
|
character(len=pStringLen) :: extmsg = ''
|
||||||
|
|
||||||
|
@ -92,8 +92,8 @@ module function anisobrittle_init() result(mySources)
|
||||||
if (any(prm%g_crit < 0.0_pReal)) extmsg = trim(extmsg)//' g_crit'
|
if (any(prm%g_crit < 0.0_pReal)) extmsg = trim(extmsg)//' g_crit'
|
||||||
if (any(prm%s_crit < 0.0_pReal)) extmsg = trim(extmsg)//' s_crit'
|
if (any(prm%s_crit < 0.0_pReal)) extmsg = trim(extmsg)//' s_crit'
|
||||||
|
|
||||||
Nconstituents = count(material_phaseAt==p) * discretization_nIPs
|
Nmembers = count(material_phaseAt==p) * discretization_nIPs
|
||||||
call phase_allocateState(damageState(p),Nconstituents,1,1,0)
|
call phase_allocateState(damageState(p),Nmembers,1,1,0)
|
||||||
damageState(p)%atol = src%get_asFloat('anisobrittle_atol',defaultVal=1.0e-3_pReal)
|
damageState(p)%atol = src%get_asFloat('anisobrittle_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_atol'
|
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisobrittle_atol'
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ module function anisoductile_init() result(mySources)
|
||||||
pl, &
|
pl, &
|
||||||
sources, &
|
sources, &
|
||||||
src
|
src
|
||||||
integer :: Ninstances,Nconstituents,p
|
integer :: Ninstances,Nmembers,p
|
||||||
integer, dimension(:), allocatable :: N_sl
|
integer, dimension(:), allocatable :: N_sl
|
||||||
character(len=pStringLen) :: extmsg = ''
|
character(len=pStringLen) :: extmsg = ''
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ module function anisoductile_init() result(mySources)
|
||||||
if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q'
|
if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q'
|
||||||
if (any(prm%gamma_crit < 0.0_pReal)) extmsg = trim(extmsg)//' gamma_crit'
|
if (any(prm%gamma_crit < 0.0_pReal)) extmsg = trim(extmsg)//' gamma_crit'
|
||||||
|
|
||||||
Nconstituents=count(material_phaseAt2==p)
|
Nmembers=count(material_phaseAt2==p)
|
||||||
call phase_allocateState(damageState(p),Nconstituents,1,1,0)
|
call phase_allocateState(damageState(p),Nmembers,1,1,0)
|
||||||
damageState(p)%atol = src%get_asFloat('anisoDuctile_atol',defaultVal=1.0e-3_pReal)
|
damageState(p)%atol = src%get_asFloat('anisoDuctile_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_atol'
|
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' anisoductile_atol'
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ module function isobrittle_init() result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
sources, &
|
sources, &
|
||||||
src
|
src
|
||||||
integer :: Nconstituents,p
|
integer :: Nmembers,p
|
||||||
character(len=pStringLen) :: extmsg = ''
|
character(len=pStringLen) :: extmsg = ''
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ module function isobrittle_init() result(mySources)
|
||||||
! sanity checks
|
! sanity checks
|
||||||
if (prm%W_crit <= 0.0_pReal) extmsg = trim(extmsg)//' W_crit'
|
if (prm%W_crit <= 0.0_pReal) extmsg = trim(extmsg)//' W_crit'
|
||||||
|
|
||||||
Nconstituents = count(material_phaseAt2==p)
|
Nmembers = count(material_phaseAt2==p)
|
||||||
call phase_allocateState(damageState(p),Nconstituents,1,1,1)
|
call phase_allocateState(damageState(p),Nmembers,1,1,1)
|
||||||
damageState(p)%atol = src%get_asFloat('isoBrittle_atol',defaultVal=1.0e-3_pReal)
|
damageState(p)%atol = src%get_asFloat('isoBrittle_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isobrittle_atol'
|
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isobrittle_atol'
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ module function isoductile_init() result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
sources, &
|
sources, &
|
||||||
src
|
src
|
||||||
integer :: Ninstances,Nconstituents,p
|
integer :: Ninstances,Nmembers,p
|
||||||
character(len=pStringLen) :: extmsg = ''
|
character(len=pStringLen) :: extmsg = ''
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,8 +68,8 @@ module function isoductile_init() result(mySources)
|
||||||
if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q'
|
if (prm%q <= 0.0_pReal) extmsg = trim(extmsg)//' q'
|
||||||
if (prm%gamma_crit <= 0.0_pReal) extmsg = trim(extmsg)//' gamma_crit'
|
if (prm%gamma_crit <= 0.0_pReal) extmsg = trim(extmsg)//' gamma_crit'
|
||||||
|
|
||||||
Nconstituents=count(material_phaseAt2==p)
|
Nmembers=count(material_phaseAt2==p)
|
||||||
call phase_allocateState(damageState(p),Nconstituents,1,1,0)
|
call phase_allocateState(damageState(p),Nmembers,1,1,0)
|
||||||
damageState(p)%atol = src%get_asFloat('isoDuctile_atol',defaultVal=1.0e-3_pReal)
|
damageState(p)%atol = src%get_asFloat('isoDuctile_atol',defaultVal=1.0e-3_pReal)
|
||||||
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isoductile_atol'
|
if(any(damageState(p)%atol < 0.0_pReal)) extmsg = trim(extmsg)//' isoductile_atol'
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ module subroutine mechanical_init(materials,phases)
|
||||||
ph, &
|
ph, &
|
||||||
me, &
|
me, &
|
||||||
stiffDegradationCtr, &
|
stiffDegradationCtr, &
|
||||||
Nconstituents
|
Nmembers
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
num_crystallite, &
|
num_crystallite, &
|
||||||
material, &
|
material, &
|
||||||
|
@ -229,22 +229,22 @@ module subroutine mechanical_init(materials,phases)
|
||||||
allocate(material_orientation0(homogenization_maxNconstituents,phases%length,maxVal(material_phaseMemberAt)))
|
allocate(material_orientation0(homogenization_maxNconstituents,phases%length,maxVal(material_phaseMemberAt)))
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
Nconstituents = count(material_phaseAt == ph) * discretization_nIPs
|
Nmembers = count(material_phaseAt == ph) * discretization_nIPs
|
||||||
|
|
||||||
allocate(phase_mechanical_Fi(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Fi(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Fe(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Fe(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Fi0(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Fi0(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Fp(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Fp(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Fp0(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Fp0(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Li(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Li(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Li0(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Li0(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Lp0(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Lp0(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_Lp(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_Lp(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_S(ph)%data(3,3,Nconstituents),source=0.0_pReal)
|
allocate(phase_mechanical_S(ph)%data(3,3,Nmembers),source=0.0_pReal)
|
||||||
allocate(phase_mechanical_P(ph)%data(3,3,Nconstituents),source=0.0_pReal)
|
allocate(phase_mechanical_P(ph)%data(3,3,Nmembers),source=0.0_pReal)
|
||||||
allocate(phase_mechanical_S0(ph)%data(3,3,Nconstituents),source=0.0_pReal)
|
allocate(phase_mechanical_S0(ph)%data(3,3,Nmembers),source=0.0_pReal)
|
||||||
allocate(phase_mechanical_F(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_F(ph)%data(3,3,Nmembers))
|
||||||
allocate(phase_mechanical_F0(ph)%data(3,3,Nconstituents))
|
allocate(phase_mechanical_F0(ph)%data(3,3,Nmembers))
|
||||||
|
|
||||||
phase => phases%get(ph)
|
phase => phases%get(ph)
|
||||||
mech => phase%get('mechanics')
|
mech => phase%get('mechanics')
|
||||||
|
@ -280,7 +280,7 @@ module subroutine mechanical_init(materials,phases)
|
||||||
|
|
||||||
|
|
||||||
do el = 1, size(material_phaseMemberAt,3); do ip = 1, size(material_phaseMemberAt,2)
|
do el = 1, size(material_phaseMemberAt,3); do ip = 1, size(material_phaseMemberAt,2)
|
||||||
do co = 1, homogenization_Nconstituents(material_homogenizationAt(el))
|
do co = 1, homogenization_Nmembers(material_homogenizationAt(el))
|
||||||
material => materials%get(discretization_materialAt(el))
|
material => materials%get(discretization_materialAt(el))
|
||||||
constituents => material%get('constituents')
|
constituents => material%get('constituents')
|
||||||
constituent => constituents%get(co)
|
constituent => constituents%get(co)
|
||||||
|
@ -1238,7 +1238,7 @@ module subroutine mechanical_restore(ce,includeL)
|
||||||
co, ph, me
|
co, ph, me
|
||||||
|
|
||||||
|
|
||||||
do co = 1,homogenization_Nconstituents(material_homogenizationAt2(ce))
|
do co = 1,homogenization_Nmembers(material_homogenizationAt2(ce))
|
||||||
ph = material_phaseAt2(co,ce)
|
ph = material_phaseAt2(co,ce)
|
||||||
me = material_phaseMemberAt2(co,ce)
|
me = material_phaseMemberAt2(co,ce)
|
||||||
if (includeL) then
|
if (includeL) then
|
||||||
|
|
|
@ -79,7 +79,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, i, &
|
ph, i, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState, &
|
sizeState, sizeDotState, &
|
||||||
startIndex, endIndex
|
startIndex, endIndex
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
|
@ -220,18 +220,18 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl
|
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,0)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
startIndex = 1
|
startIndex = 1
|
||||||
endIndex = prm%sum_N_sl
|
endIndex = prm%sum_N_sl
|
||||||
stt%rho_mob => plasticState(ph)%state(startIndex:endIndex,:)
|
stt%rho_mob => plasticState(ph)%state(startIndex:endIndex,:)
|
||||||
stt%rho_mob = spread(rho_mob_0,2,Nconstituents)
|
stt%rho_mob = spread(rho_mob_0,2,Nmembers)
|
||||||
dot%rho_mob => plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%rho_mob => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
||||||
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho'
|
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho'
|
||||||
|
@ -239,7 +239,7 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
startIndex = endIndex + 1
|
startIndex = endIndex + 1
|
||||||
endIndex = endIndex + prm%sum_N_sl
|
endIndex = endIndex + prm%sum_N_sl
|
||||||
stt%rho_dip => plasticState(ph)%state(startIndex:endIndex,:)
|
stt%rho_dip => plasticState(ph)%state(startIndex:endIndex,:)
|
||||||
stt%rho_dip = spread(rho_dip_0,2,Nconstituents)
|
stt%rho_dip = spread(rho_dip_0,2,Nmembers)
|
||||||
dot%rho_dip => plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%rho_dip => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
||||||
|
|
||||||
|
@ -251,8 +251,8 @@ module function plastic_dislotungsten_init() result(myPlasticity)
|
||||||
! global alias
|
! global alias
|
||||||
plasticState(ph)%slipRate => plasticState(ph)%dotState(startIndex:endIndex,:)
|
plasticState(ph)%slipRate => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
|
|
||||||
allocate(dst%Lambda_sl(prm%sum_N_sl,Nconstituents), 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,Nconstituents), 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
|
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, i, &
|
ph, i, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState, &
|
sizeState, sizeDotState, &
|
||||||
startIndex, endIndex
|
startIndex, endIndex
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
|
@ -406,21 +406,21 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl &
|
sizeDotState = size(['rho_mob ','rho_dip ','gamma_sl']) * prm%sum_N_sl &
|
||||||
+ size(['f_tw']) * prm%sum_N_tw &
|
+ size(['f_tw']) * prm%sum_N_tw &
|
||||||
+ size(['f_tr']) * prm%sum_N_tr
|
+ size(['f_tr']) * prm%sum_N_tr
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,0)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! locally defined state aliases and initialization of state0 and atol
|
! locally defined state aliases and initialization of state0 and atol
|
||||||
startIndex = 1
|
startIndex = 1
|
||||||
endIndex = prm%sum_N_sl
|
endIndex = prm%sum_N_sl
|
||||||
stt%rho_mob=>plasticState(ph)%state(startIndex:endIndex,:)
|
stt%rho_mob=>plasticState(ph)%state(startIndex:endIndex,:)
|
||||||
stt%rho_mob= spread(rho_mob_0,2,Nconstituents)
|
stt%rho_mob= spread(rho_mob_0,2,Nmembers)
|
||||||
dot%rho_mob=>plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%rho_mob=>plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
||||||
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho'
|
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_rho'
|
||||||
|
@ -428,7 +428,7 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
startIndex = endIndex + 1
|
startIndex = endIndex + 1
|
||||||
endIndex = endIndex + prm%sum_N_sl
|
endIndex = endIndex + prm%sum_N_sl
|
||||||
stt%rho_dip=>plasticState(ph)%state(startIndex:endIndex,:)
|
stt%rho_dip=>plasticState(ph)%state(startIndex:endIndex,:)
|
||||||
stt%rho_dip= spread(rho_dip_0,2,Nconstituents)
|
stt%rho_dip= spread(rho_dip_0,2,Nmembers)
|
||||||
dot%rho_dip=>plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%rho_dip=>plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_rho',defaultVal=1.0_pReal)
|
||||||
|
|
||||||
|
@ -454,18 +454,18 @@ module function plastic_dislotwin_init() result(myPlasticity)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_f_tr',defaultVal=1.0e-6_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_f_tr',defaultVal=1.0e-6_pReal)
|
||||||
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_f_tr'
|
if (any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_f_tr'
|
||||||
|
|
||||||
allocate(dst%Lambda_sl (prm%sum_N_sl,Nconstituents),source=0.0_pReal)
|
allocate(dst%Lambda_sl (prm%sum_N_sl,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_pass (prm%sum_N_sl,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_pass (prm%sum_N_sl,Nmembers),source=0.0_pReal)
|
||||||
|
|
||||||
allocate(dst%Lambda_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal)
|
allocate(dst%Lambda_tw (prm%sum_N_tw,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_hat_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_hat_tw (prm%sum_N_tw,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_r_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_r_tw (prm%sum_N_tw,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%V_tw (prm%sum_N_tw,Nconstituents),source=0.0_pReal)
|
allocate(dst%V_tw (prm%sum_N_tw,Nmembers),source=0.0_pReal)
|
||||||
|
|
||||||
allocate(dst%Lambda_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal)
|
allocate(dst%Lambda_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_hat_tr (prm%sum_N_tr,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_hat_tr (prm%sum_N_tr,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_r_tr (prm%sum_N_tr,Nconstituents),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,Nconstituents),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
|
plasticState(ph)%state0 = plasticState(ph)%state ! ToDo: this could be done centrally
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ module function plastic_isotropic_init() result(myPlasticity)
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, &
|
ph, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState
|
sizeState, sizeDotState
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
xi_0 !< initial critical stress
|
xi_0 !< initial critical stress
|
||||||
|
@ -119,11 +119,11 @@ module function plastic_isotropic_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size(['xi ','gamma'])
|
sizeDotState = size(['xi ','gamma'])
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,0)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
|
|
|
@ -62,7 +62,7 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, o, &
|
ph, o, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDeltaState, sizeDotState, &
|
sizeState, sizeDeltaState, sizeDotState, &
|
||||||
startIndex, endIndex
|
startIndex, endIndex
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
|
@ -165,19 +165,19 @@ module function plastic_kinehardening_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%sum_N_sl !ToDo: adjust names like in material.yaml
|
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%sum_N_sl !ToDo: adjust names like in material.yaml
|
||||||
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl !ToDo: adjust names like in material.yaml
|
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%sum_N_sl !ToDo: adjust names like in material.yaml
|
||||||
sizeState = sizeDotState + sizeDeltaState
|
sizeState = sizeDotState + sizeDeltaState
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,sizeDeltaState)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,sizeDeltaState)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
startIndex = 1
|
startIndex = 1
|
||||||
endIndex = prm%sum_N_sl
|
endIndex = prm%sum_N_sl
|
||||||
stt%crss => plasticState(ph)%state (startIndex:endIndex,:)
|
stt%crss => plasticState(ph)%state (startIndex:endIndex,:)
|
||||||
stt%crss = spread(xi_0, 2, Nconstituents)
|
stt%crss = spread(xi_0, 2, Nmembers)
|
||||||
dot%crss => plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%crss => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
||||||
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
||||||
|
|
|
@ -177,7 +177,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
integer :: &
|
integer :: &
|
||||||
Ninstances, &
|
Ninstances, &
|
||||||
ph, &
|
ph, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState, sizeDependentState, sizeDeltaState, &
|
sizeState, sizeDotState, sizeDependentState, sizeDeltaState, &
|
||||||
s1, s2, &
|
s1, s2, &
|
||||||
s, t, l
|
s, t, l
|
||||||
|
@ -398,7 +398,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size([ 'rhoSglEdgePosMobile ','rhoSglEdgeNegMobile ', &
|
sizeDotState = size([ 'rhoSglEdgePosMobile ','rhoSglEdgeNegMobile ', &
|
||||||
'rhoSglScrewPosMobile ','rhoSglScrewNegMobile ', &
|
'rhoSglScrewPosMobile ','rhoSglScrewNegMobile ', &
|
||||||
'rhoSglEdgePosImmobile ','rhoSglEdgeNegImmobile ', &
|
'rhoSglEdgePosImmobile ','rhoSglEdgeNegImmobile ', &
|
||||||
|
@ -412,9 +412,9 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
'maxDipoleHeightEdge ','maxDipoleHeightScrew' ]) * prm%sum_N_sl !< other dependent state variables that are not updated by microstructure
|
'maxDipoleHeightEdge ','maxDipoleHeightScrew' ]) * prm%sum_N_sl !< other dependent state variables that are not updated by microstructure
|
||||||
sizeDeltaState = sizeDotState
|
sizeDeltaState = sizeDotState
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,sizeDeltaState)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,sizeDeltaState)
|
||||||
|
|
||||||
allocate(geom(ph)%V_0(Nconstituents))
|
allocate(geom(ph)%V_0(Nmembers))
|
||||||
call storeGeometry(ph)
|
call storeGeometry(ph)
|
||||||
|
|
||||||
plasticState(ph)%nonlocal = pl%get_asBool('nonlocal')
|
plasticState(ph)%nonlocal = pl%get_asBool('nonlocal')
|
||||||
|
@ -486,26 +486,26 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
dot%rho_dip_scr => plasticState(ph)%dotState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:)
|
dot%rho_dip_scr => plasticState(ph)%dotState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:)
|
||||||
del%rho_dip_scr => plasticState(ph)%deltaState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:)
|
del%rho_dip_scr => plasticState(ph)%deltaState (9*prm%sum_N_sl+1:10*prm%sum_N_sl,:)
|
||||||
|
|
||||||
stt%gamma => plasticState(ph)%state (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents)
|
stt%gamma => plasticState(ph)%state (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nmembers)
|
||||||
dot%gamma => plasticState(ph)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents)
|
dot%gamma => plasticState(ph)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nmembers)
|
||||||
del%gamma => plasticState(ph)%deltaState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents)
|
del%gamma => plasticState(ph)%deltaState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nmembers)
|
||||||
plasticState(ph)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl ) = pl%get_asFloat('atol_gamma', defaultVal = 1.0e-2_pReal)
|
plasticState(ph)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl ) = pl%get_asFloat('atol_gamma', defaultVal = 1.0e-2_pReal)
|
||||||
if(any(plasticState(ph)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl) < 0.0_pReal)) &
|
if(any(plasticState(ph)%atol(10*prm%sum_N_sl+1:11*prm%sum_N_sl) < 0.0_pReal)) &
|
||||||
extmsg = trim(extmsg)//' atol_gamma'
|
extmsg = trim(extmsg)//' atol_gamma'
|
||||||
plasticState(ph)%slipRate => plasticState(ph)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nconstituents)
|
plasticState(ph)%slipRate => plasticState(ph)%dotState (10*prm%sum_N_sl + 1:11*prm%sum_N_sl,1:Nmembers)
|
||||||
|
|
||||||
stt%rho_forest => plasticState(ph)%state (11*prm%sum_N_sl + 1:12*prm%sum_N_sl,1:Nconstituents)
|
stt%rho_forest => plasticState(ph)%state (11*prm%sum_N_sl + 1:12*prm%sum_N_sl,1:Nmembers)
|
||||||
stt%v => plasticState(ph)%state (12*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nconstituents)
|
stt%v => plasticState(ph)%state (12*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nmembers)
|
||||||
stt%v_edg_pos => plasticState(ph)%state (12*prm%sum_N_sl + 1:13*prm%sum_N_sl,1:Nconstituents)
|
stt%v_edg_pos => plasticState(ph)%state (12*prm%sum_N_sl + 1:13*prm%sum_N_sl,1:Nmembers)
|
||||||
stt%v_edg_neg => plasticState(ph)%state (13*prm%sum_N_sl + 1:14*prm%sum_N_sl,1:Nconstituents)
|
stt%v_edg_neg => plasticState(ph)%state (13*prm%sum_N_sl + 1:14*prm%sum_N_sl,1:Nmembers)
|
||||||
stt%v_scr_pos => plasticState(ph)%state (14*prm%sum_N_sl + 1:15*prm%sum_N_sl,1:Nconstituents)
|
stt%v_scr_pos => plasticState(ph)%state (14*prm%sum_N_sl + 1:15*prm%sum_N_sl,1:Nmembers)
|
||||||
stt%v_scr_neg => plasticState(ph)%state (15*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nconstituents)
|
stt%v_scr_neg => plasticState(ph)%state (15*prm%sum_N_sl + 1:16*prm%sum_N_sl,1:Nmembers)
|
||||||
|
|
||||||
allocate(dst%tau_pass(prm%sum_N_sl,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_pass(prm%sum_N_sl,Nmembers),source=0.0_pReal)
|
||||||
allocate(dst%tau_back(prm%sum_N_sl,Nconstituents),source=0.0_pReal)
|
allocate(dst%tau_back(prm%sum_N_sl,Nmembers),source=0.0_pReal)
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
if (Nconstituents > 0) call stateInit(ini,ph,Nconstituents)
|
if (Nmembers > 0) call stateInit(ini,ph,Nmembers)
|
||||||
plasticState(ph)%state0 = plasticState(ph)%state
|
plasticState(ph)%state0 = plasticState(ph)%state
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -527,7 +527,7 @@ module function plastic_nonlocal_init() result(myPlasticity)
|
||||||
if(.not. myPlasticity(ph)) cycle
|
if(.not. myPlasticity(ph)) cycle
|
||||||
|
|
||||||
phase => phases%get(ph)
|
phase => phases%get(ph)
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
l = 0
|
l = 0
|
||||||
do t = 1,4
|
do t = 1,4
|
||||||
do s = 1,param(ph)%sum_N_sl
|
do s = 1,param(ph)%sum_N_sl
|
||||||
|
@ -1579,13 +1579,13 @@ end subroutine plastic_nonlocal_results
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief populates the initial dislocation density
|
!> @brief populates the initial dislocation density
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine stateInit(ini,phase,Nconstituents)
|
subroutine stateInit(ini,phase,Nmembers)
|
||||||
|
|
||||||
type(tInitialParameters) :: &
|
type(tInitialParameters) :: &
|
||||||
ini
|
ini
|
||||||
integer,intent(in) :: &
|
integer,intent(in) :: &
|
||||||
phase, &
|
phase, &
|
||||||
Nconstituents
|
Nmembers
|
||||||
integer :: &
|
integer :: &
|
||||||
i, &
|
i, &
|
||||||
e, &
|
e, &
|
||||||
|
@ -1602,7 +1602,7 @@ subroutine stateInit(ini,phase,Nconstituents)
|
||||||
totalVolume, &
|
totalVolume, &
|
||||||
densityBinning, &
|
densityBinning, &
|
||||||
minimumIpVolume
|
minimumIpVolume
|
||||||
real(pReal), dimension(Nconstituents) :: &
|
real(pReal), dimension(Nmembers) :: &
|
||||||
volume
|
volume
|
||||||
|
|
||||||
|
|
||||||
|
@ -1622,13 +1622,13 @@ subroutine stateInit(ini,phase,Nconstituents)
|
||||||
meanDensity = 0.0_pReal
|
meanDensity = 0.0_pReal
|
||||||
do while(meanDensity < ini%random_rho_u)
|
do while(meanDensity < ini%random_rho_u)
|
||||||
call random_number(rnd)
|
call random_number(rnd)
|
||||||
phasemember = nint(rnd(1)*real(Nconstituents,pReal) + 0.5_pReal)
|
phasemember = nint(rnd(1)*real(Nmembers,pReal) + 0.5_pReal)
|
||||||
s = nint(rnd(2)*real(sum(ini%N_sl),pReal)*4.0_pReal + 0.5_pReal)
|
s = nint(rnd(2)*real(sum(ini%N_sl),pReal)*4.0_pReal + 0.5_pReal)
|
||||||
meanDensity = meanDensity + densityBinning * volume(phasemember) / totalVolume
|
meanDensity = meanDensity + densityBinning * volume(phasemember) / totalVolume
|
||||||
stt%rhoSglMobile(s,phasemember) = densityBinning
|
stt%rhoSglMobile(s,phasemember) = densityBinning
|
||||||
enddo
|
enddo
|
||||||
else ! homogeneous distribution with noise
|
else ! homogeneous distribution with noise
|
||||||
do e = 1, Nconstituents
|
do e = 1, Nmembers
|
||||||
do f = 1,size(ini%N_sl,1)
|
do f = 1,size(ini%N_sl,1)
|
||||||
from = 1 + sum(ini%N_sl(1:f-1))
|
from = 1 + sum(ini%N_sl(1:f-1))
|
||||||
upto = sum(ini%N_sl(1:f))
|
upto = sum(ini%N_sl(1:f))
|
||||||
|
@ -1809,7 +1809,7 @@ pure function getRho0(ph,me)
|
||||||
getRho0(:,mob) = max(getRho0(:,mob),0.0_pReal)
|
getRho0(:,mob) = max(getRho0(:,mob),0.0_pReal)
|
||||||
getRho0(:,dip) = max(getRho0(:,dip),0.0_pReal)
|
getRho0(:,dip) = max(getRho0(:,dip),0.0_pReal)
|
||||||
|
|
||||||
where(abs(getRho0) < max(prm%rho_min/geom(ph)%V_0(me)**(2.0_pReal/3.0_pReal),prm%rho_significant)) &
|
where (abs(getRho0) < max(prm%rho_min/geom(ph)%V_0(me)**(2.0_pReal/3.0_pReal),prm%rho_significant)) &
|
||||||
getRho0 = 0.0_pReal
|
getRho0 = 0.0_pReal
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
@ -1828,7 +1828,7 @@ subroutine storeGeometry(ph)
|
||||||
V = reshape(IPvolume,[product(shape(IPvolume))])
|
V = reshape(IPvolume,[product(shape(IPvolume))])
|
||||||
do ce = 1, size(material_homogenizationMemberAt2,1)
|
do ce = 1, size(material_homogenizationMemberAt2,1)
|
||||||
do co = 1, homogenization_maxNconstituents
|
do co = 1, homogenization_maxNconstituents
|
||||||
if(material_phaseAt2(co,ce) == ph) geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = V(ce)
|
if (material_phaseAt2(co,ce) == ph) geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = V(ce)
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
logical, dimension(:), allocatable :: myPlasticity
|
logical, dimension(:), allocatable :: myPlasticity
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, i, &
|
ph, i, &
|
||||||
Nconstituents, &
|
Nmembers, &
|
||||||
sizeState, sizeDotState, &
|
sizeState, sizeDotState, &
|
||||||
startIndex, endIndex
|
startIndex, endIndex
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
|
@ -223,20 +223,20 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
sizeDotState = size(['xi_sl ','gamma_sl']) * prm%sum_N_sl &
|
sizeDotState = size(['xi_sl ','gamma_sl']) * prm%sum_N_sl &
|
||||||
+ size(['xi_tw ','gamma_tw']) * prm%sum_N_tw
|
+ size(['xi_tw ','gamma_tw']) * prm%sum_N_tw
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
|
|
||||||
call phase_allocateState(plasticState(ph),Nconstituents,sizeState,sizeDotState,0)
|
call phase_allocateState(plasticState(ph),Nmembers,sizeState,sizeDotState,0)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! state aliases and initialization
|
! state aliases and initialization
|
||||||
startIndex = 1
|
startIndex = 1
|
||||||
endIndex = prm%sum_N_sl
|
endIndex = prm%sum_N_sl
|
||||||
stt%xi_slip => plasticState(ph)%state (startIndex:endIndex,:)
|
stt%xi_slip => plasticState(ph)%state (startIndex:endIndex,:)
|
||||||
stt%xi_slip = spread(xi_0_sl, 2, Nconstituents)
|
stt%xi_slip = spread(xi_0_sl, 2, Nmembers)
|
||||||
dot%xi_slip => plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%xi_slip => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
||||||
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
||||||
|
@ -244,7 +244,7 @@ module function plastic_phenopowerlaw_init() result(myPlasticity)
|
||||||
startIndex = endIndex + 1
|
startIndex = endIndex + 1
|
||||||
endIndex = endIndex + prm%sum_N_tw
|
endIndex = endIndex + prm%sum_N_tw
|
||||||
stt%xi_twin => plasticState(ph)%state (startIndex:endIndex,:)
|
stt%xi_twin => plasticState(ph)%state (startIndex:endIndex,:)
|
||||||
stt%xi_twin = spread(xi_0_tw, 2, Nconstituents)
|
stt%xi_twin = spread(xi_0_tw, 2, Nmembers)
|
||||||
dot%xi_twin => plasticState(ph)%dotState(startIndex:endIndex,:)
|
dot%xi_twin => plasticState(ph)%dotState(startIndex:endIndex,:)
|
||||||
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
plasticState(ph)%atol(startIndex:endIndex) = pl%get_asFloat('atol_xi',defaultVal=1.0_pReal)
|
||||||
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
if(any(plasticState(ph)%atol(startIndex:endIndex) < 0.0_pReal)) extmsg = trim(extmsg)//' atol_xi'
|
||||||
|
|
|
@ -15,13 +15,13 @@ submodule(phase) thermal
|
||||||
THERMAL_EXTERNALHEAT_ID
|
THERMAL_EXTERNALHEAT_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type :: tDataContainer
|
type :: tDataContainer ! ?? not very telling name. Better: "fieldQuantities" ??
|
||||||
real(pReal), dimension(:), allocatable :: T, dot_T
|
real(pReal), dimension(:), allocatable :: T, dot_T
|
||||||
end type tDataContainer
|
end type tDataContainer
|
||||||
integer(kind(THERMAL_UNDEFINED_ID)), dimension(:,:), allocatable :: &
|
integer(kind(THERMAL_UNDEFINED_ID)), dimension(:,:), allocatable :: &
|
||||||
thermal_source
|
thermal_source
|
||||||
|
|
||||||
type(tDataContainer), dimension(:), allocatable :: current
|
type(tDataContainer), dimension(:), allocatable :: current ! ?? not very telling name. Better: "field" ??
|
||||||
|
|
||||||
integer :: thermal_source_maxSizeDotState
|
integer :: thermal_source_maxSizeDotState
|
||||||
|
|
||||||
|
@ -78,41 +78,36 @@ module subroutine thermal_init(phases)
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, so, &
|
ph, so, &
|
||||||
Nconstituents
|
Nmembers
|
||||||
|
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- phase:thermal init -+>>>'
|
print'(/,a)', ' <<<+- phase:thermal init -+>>>'
|
||||||
|
|
||||||
allocate(current(phases%length))
|
allocate(current(phases%length))
|
||||||
|
|
||||||
allocate(thermalState (phases%length))
|
allocate(thermalState(phases%length))
|
||||||
allocate(thermal_Nsources(phases%length),source = 0)
|
allocate(thermal_Nsources(phases%length),source = 0)
|
||||||
|
|
||||||
do ph = 1, phases%length
|
do ph = 1, phases%length
|
||||||
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
allocate(current(ph)%T(Nmembers),source=300.0_pReal)
|
||||||
|
allocate(current(ph)%dot_T(Nmembers),source=0.0_pReal)
|
||||||
allocate(current(ph)%T(Nconstituents),source=300.0_pReal)
|
|
||||||
allocate(current(ph)%dot_T(Nconstituents),source=0.0_pReal)
|
|
||||||
phase => phases%get(ph)
|
phase => phases%get(ph)
|
||||||
if(phase%contains('thermal')) then
|
thermal => phase%get('thermal',defaultVal=emptyDict)
|
||||||
thermal => phase%get('thermal')
|
sources => thermal%get('source',defaultVal=emptyList)
|
||||||
sources => thermal%get('source',defaultVal=emptyList)
|
thermal_Nsources(ph) = sources%length
|
||||||
|
|
||||||
thermal_Nsources(ph) = sources%length
|
|
||||||
endif
|
|
||||||
allocate(thermalstate(ph)%p(thermal_Nsources(ph)))
|
allocate(thermalstate(ph)%p(thermal_Nsources(ph)))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
allocate(thermal_source(maxval(thermal_Nsources),phases%length), source = THERMAL_UNDEFINED_ID)
|
allocate(thermal_source(maxval(thermal_Nsources),phases%length), source = THERMAL_UNDEFINED_ID)
|
||||||
|
|
||||||
if(maxval(thermal_Nsources) /= 0) then
|
if (maxval(thermal_Nsources) /= 0) then
|
||||||
where(dissipation_init (maxval(thermal_Nsources))) thermal_source = THERMAL_DISSIPATION_ID
|
where(dissipation_init (maxval(thermal_Nsources))) thermal_source = THERMAL_DISSIPATION_ID
|
||||||
where(externalheat_init(maxval(thermal_Nsources))) thermal_source = THERMAL_EXTERNALHEAT_ID
|
where(externalheat_init(maxval(thermal_Nsources))) thermal_source = THERMAL_EXTERNALHEAT_ID
|
||||||
endif
|
endif
|
||||||
|
|
||||||
thermal_source_maxSizeDotState = 0
|
thermal_source_maxSizeDotState = 0
|
||||||
PhaseLoop2:do ph = 1,phases%length
|
do ph = 1,phases%length
|
||||||
|
|
||||||
do so = 1,thermal_Nsources(ph)
|
do so = 1,thermal_Nsources(ph)
|
||||||
thermalState(ph)%p(so)%state = thermalState(ph)%p(so)%state0
|
thermalState(ph)%p(so)%state = thermalState(ph)%p(so)%state0
|
||||||
|
@ -120,7 +115,7 @@ module subroutine thermal_init(phases)
|
||||||
|
|
||||||
thermal_source_maxSizeDotState = max(thermal_source_maxSizeDotState, &
|
thermal_source_maxSizeDotState = max(thermal_source_maxSizeDotState, &
|
||||||
maxval(thermalState(ph)%p%sizeDotState))
|
maxval(thermalState(ph)%p%sizeDotState))
|
||||||
enddo PhaseLoop2
|
enddo
|
||||||
|
|
||||||
end subroutine thermal_init
|
end subroutine thermal_init
|
||||||
|
|
||||||
|
@ -145,18 +140,17 @@ module subroutine phase_thermal_getRate(TDot, ph,me)
|
||||||
do so = 1, thermal_Nsources(ph)
|
do so = 1, thermal_Nsources(ph)
|
||||||
select case(thermal_source(so,ph))
|
select case(thermal_source(so,ph))
|
||||||
case (THERMAL_DISSIPATION_ID)
|
case (THERMAL_DISSIPATION_ID)
|
||||||
call dissipation_getRate(my_Tdot, ph,me)
|
call dissipation_getRate(my_Tdot, ph,me)
|
||||||
|
|
||||||
case (THERMAL_EXTERNALHEAT_ID)
|
case (THERMAL_EXTERNALHEAT_ID)
|
||||||
call externalheat_getRate(my_Tdot, ph,me)
|
call externalheat_getRate(my_Tdot, ph,me)
|
||||||
|
|
||||||
case default
|
case default
|
||||||
my_Tdot = 0.0_pReal
|
my_Tdot = 0.0_pReal
|
||||||
end select
|
end select
|
||||||
Tdot = Tdot + my_Tdot
|
Tdot = Tdot + my_Tdot
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
end subroutine phase_thermal_getRate
|
end subroutine phase_thermal_getRate
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,7 +179,7 @@ function phase_thermal_collectDotState(ph,me) result(broken)
|
||||||
end function phase_thermal_collectDotState
|
end function phase_thermal_collectDotState
|
||||||
|
|
||||||
|
|
||||||
module function thermal_stress(Delta_t,ph,me) result(converged_)
|
module function thermal_stress(Delta_t,ph,me) result(converged_) ! ?? why is this called "stress" when it seems closer to "updateState" ??
|
||||||
|
|
||||||
real(pReal), intent(in) :: Delta_t
|
real(pReal), intent(in) :: Delta_t
|
||||||
integer, intent(in) :: ph, me
|
integer, intent(in) :: ph, me
|
||||||
|
@ -212,7 +206,7 @@ function integrateThermalState(Delta_t, ph,me) result(broken)
|
||||||
sizeDotState
|
sizeDotState
|
||||||
|
|
||||||
broken = phase_thermal_collectDotState(ph,me)
|
broken = phase_thermal_collectDotState(ph,me)
|
||||||
if(broken) return
|
if (broken) return
|
||||||
|
|
||||||
do so = 1, thermal_Nsources(ph)
|
do so = 1, thermal_Nsources(ph)
|
||||||
sizeDotState = thermalState(ph)%p(so)%sizeDotState
|
sizeDotState = thermalState(ph)%p(so)%sizeDotState
|
||||||
|
@ -301,14 +295,12 @@ function thermal_active(source_label,src_length) result(active_source)
|
||||||
allocate(active_source(src_length,phases%length), source = .false. )
|
allocate(active_source(src_length,phases%length), source = .false. )
|
||||||
do p = 1, phases%length
|
do p = 1, phases%length
|
||||||
phase => phases%get(p)
|
phase => phases%get(p)
|
||||||
if (phase%contains('thermal')) then
|
thermal => phase%get('thermal',defaultVal=emptyDict)
|
||||||
thermal => phase%get('thermal',defaultVal=emptyList)
|
sources => thermal%get('source',defaultVal=emptyList)
|
||||||
sources => thermal%get('source',defaultVal=emptyList)
|
do s = 1, sources%length
|
||||||
do s = 1, sources%length
|
src => sources%get(s)
|
||||||
src => sources%get(s)
|
active_source(s,p) = src%get_asString('type') == source_label
|
||||||
if(src%get_asString('type') == source_label) active_source(s,p) = .true.
|
enddo
|
||||||
enddo
|
|
||||||
endif
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ module function dissipation_init(source_length) result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
sources, thermal, &
|
sources, thermal, &
|
||||||
src
|
src
|
||||||
integer :: so,Nconstituents,ph
|
integer :: so,Nmembers,ph
|
||||||
|
|
||||||
|
|
||||||
mySources = thermal_active('dissipation',source_length)
|
mySources = thermal_active('dissipation',source_length)
|
||||||
|
@ -54,8 +54,8 @@ module function dissipation_init(source_length) result(mySources)
|
||||||
src => sources%get(so)
|
src => sources%get(so)
|
||||||
|
|
||||||
prm%kappa = src%get_asFloat('kappa')
|
prm%kappa = src%get_asFloat('kappa')
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
call phase_allocateState(thermalState(ph)%p(so),Nconstituents,0,0,0)
|
call phase_allocateState(thermalState(ph)%p(so),Nmembers,0,0,0)
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -38,7 +38,7 @@ module function externalheat_init(source_length) result(mySources)
|
||||||
phase, &
|
phase, &
|
||||||
sources, thermal, &
|
sources, thermal, &
|
||||||
src
|
src
|
||||||
integer :: so,Nconstituents,ph
|
integer :: so,Nmembers,ph
|
||||||
|
|
||||||
|
|
||||||
mySources = thermal_active('externalheat',source_length)
|
mySources = thermal_active('externalheat',source_length)
|
||||||
|
@ -67,8 +67,8 @@ module function externalheat_init(source_length) result(mySources)
|
||||||
|
|
||||||
prm%f_T = src%get_asFloats('f_T',requiredSize = size(prm%t_n))
|
prm%f_T = src%get_asFloats('f_T',requiredSize = size(prm%t_n))
|
||||||
|
|
||||||
Nconstituents = count(material_phaseAt2 == ph)
|
Nmembers = count(material_phaseAt2 == ph)
|
||||||
call phase_allocateState(thermalState(ph)%p(so),Nconstituents,1,1,0)
|
call phase_allocateState(thermalState(ph)%p(so),Nmembers,1,1,0)
|
||||||
end associate
|
end associate
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
|
|
Loading…
Reference in New Issue