using names from DAMASK paper
This commit is contained in:
parent
3700bacccc
commit
daab9263d3
|
@ -22,25 +22,25 @@ module plastic_isotropic
|
||||||
enum, bind(c)
|
enum, bind(c)
|
||||||
enumerator :: &
|
enumerator :: &
|
||||||
undefined_ID, &
|
undefined_ID, &
|
||||||
flowstress_ID, &
|
xi_ID, &
|
||||||
strainrate_ID
|
strainrate_ID
|
||||||
end enum
|
end enum
|
||||||
|
|
||||||
type, private :: tParameters
|
type, private :: tParameters
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
fTaylor, & !< Taylor factor
|
M, & !< Taylor factor
|
||||||
tau0, & !< initial critical stress
|
xi_0, & !< initial critical stress
|
||||||
gdot0, & !< reference strain rate
|
gdot0, & !< reference strain rate
|
||||||
n, & !< stress exponent
|
n, & !< stress exponent
|
||||||
h0, &
|
h0, &
|
||||||
h0_slopeLnRate, &
|
h0_slopeLnRate, &
|
||||||
tausat, & !< maximum critical stress
|
xi_inf, & !< maximum critical stress
|
||||||
a, &
|
a, &
|
||||||
tausat_SinhFitA, &
|
c_1, &
|
||||||
tausat_SinhFitB, &
|
c_4, &
|
||||||
tausat_SinhFitC, &
|
c_3, &
|
||||||
tausat_SinhFitD, &
|
c_2, &
|
||||||
aTolFlowstress, &
|
aTol_xi, &
|
||||||
aTolShear
|
aTolShear
|
||||||
integer :: &
|
integer :: &
|
||||||
of_debug = 0
|
of_debug = 0
|
||||||
|
@ -52,7 +52,7 @@ module plastic_isotropic
|
||||||
|
|
||||||
type, private :: tIsotropicState
|
type, private :: tIsotropicState
|
||||||
real(pReal), pointer, dimension(:) :: &
|
real(pReal), pointer, dimension(:) :: &
|
||||||
flowstress, &
|
xi, &
|
||||||
accumulatedShear
|
accumulatedShear
|
||||||
end type tIsotropicState
|
end type tIsotropicState
|
||||||
|
|
||||||
|
@ -154,19 +154,19 @@ subroutine plastic_isotropic_init
|
||||||
prm%of_debug = phasememberAt(debug_g,debug_i,debug_e)
|
prm%of_debug = phasememberAt(debug_g,debug_i,debug_e)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
prm%tau0 = config%getFloat('tau0')
|
prm%xi_0 = config%getFloat('tau0')
|
||||||
prm%tausat = config%getFloat('tausat')
|
prm%xi_inf = config%getFloat('tausat')
|
||||||
prm%gdot0 = config%getFloat('gdot0')
|
prm%gdot0 = config%getFloat('gdot0')
|
||||||
prm%n = config%getFloat('n')
|
prm%n = config%getFloat('n')
|
||||||
prm%h0 = config%getFloat('h0')
|
prm%h0 = config%getFloat('h0')
|
||||||
prm%fTaylor = config%getFloat('m')
|
prm%M = config%getFloat('m')
|
||||||
prm%h0_slopeLnRate = config%getFloat('h0_slopelnrate', defaultVal=0.0_pReal)
|
prm%h0_slopeLnRate = config%getFloat('h0_slopelnrate', defaultVal=0.0_pReal)
|
||||||
prm%tausat_SinhFitA = config%getFloat('tausat_sinhfita',defaultVal=0.0_pReal)
|
prm%c_1 = config%getFloat('tausat_sinhfita',defaultVal=0.0_pReal)
|
||||||
prm%tausat_SinhFitB = config%getFloat('tausat_sinhfitb',defaultVal=0.0_pReal)
|
prm%c_4 = config%getFloat('tausat_sinhfitb',defaultVal=0.0_pReal)
|
||||||
prm%tausat_SinhFitC = config%getFloat('tausat_sinhfitc',defaultVal=0.0_pReal)
|
prm%c_3 = config%getFloat('tausat_sinhfitc',defaultVal=0.0_pReal)
|
||||||
prm%tausat_SinhFitD = config%getFloat('tausat_sinhfitd',defaultVal=0.0_pReal)
|
prm%c_2 = config%getFloat('tausat_sinhfitd',defaultVal=0.0_pReal)
|
||||||
prm%a = config%getFloat('a')
|
prm%a = config%getFloat('a')
|
||||||
prm%aTolFlowStress = config%getFloat('atol_flowstress',defaultVal=1.0_pReal)
|
prm%aTol_xi = config%getFloat('atol_flowstress',defaultVal=1.0_pReal)
|
||||||
prm%aTolShear = config%getFloat('atol_shear', defaultVal=1.0e-6_pReal)
|
prm%aTolShear = config%getFloat('atol_shear', defaultVal=1.0e-6_pReal)
|
||||||
|
|
||||||
prm%dilatation = config%keyExists('/dilatation/')
|
prm%dilatation = config%keyExists('/dilatation/')
|
||||||
|
@ -175,13 +175,12 @@ subroutine plastic_isotropic_init
|
||||||
! sanity checks
|
! sanity checks
|
||||||
extmsg = ''
|
extmsg = ''
|
||||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' aTolShear'
|
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' aTolShear'
|
||||||
if (prm%tau0 < 0.0_pReal) extmsg = trim(extmsg)//' tau0'
|
if (prm%xi_0 < 0.0_pReal) extmsg = trim(extmsg)//' xi_0'
|
||||||
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
||||||
if (prm%n <= 0.0_pReal) extmsg = trim(extmsg)//' n'
|
if (prm%n <= 0.0_pReal) extmsg = trim(extmsg)//' n'
|
||||||
if (prm%tausat <= prm%tau0) extmsg = trim(extmsg)//' tausat'
|
|
||||||
if (prm%a <= 0.0_pReal) extmsg = trim(extmsg)//' a'
|
if (prm%a <= 0.0_pReal) extmsg = trim(extmsg)//' a'
|
||||||
if (prm%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//' m'
|
if (prm%M <= 0.0_pReal) extmsg = trim(extmsg)//' m'
|
||||||
if (prm%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//' atol_flowstress'
|
if (prm%aTol_xi <= 0.0_pReal) extmsg = trim(extmsg)//' atol_xi'
|
||||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' atol_shear'
|
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' atol_shear'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -197,8 +196,8 @@ subroutine plastic_isotropic_init
|
||||||
outputID = undefined_ID
|
outputID = undefined_ID
|
||||||
select case(outputs(i))
|
select case(outputs(i))
|
||||||
|
|
||||||
case ('flowstress')
|
case ('xi')
|
||||||
outputID = flowstress_ID
|
outputID = xi_ID
|
||||||
case ('strainrate')
|
case ('strainrate')
|
||||||
outputID = strainrate_ID
|
outputID = strainrate_ID
|
||||||
|
|
||||||
|
@ -215,7 +214,7 @@ subroutine plastic_isotropic_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! allocate state arrays
|
! allocate state arrays
|
||||||
NipcMyPhase = count(material_phase == p)
|
NipcMyPhase = count(material_phase == p)
|
||||||
sizeDotState = size(['flowstress ','accumulated_shear'])
|
sizeDotState = size(['xi ','accumulated_shear'])
|
||||||
sizeState = sizeDotState
|
sizeState = sizeDotState
|
||||||
|
|
||||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0, &
|
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0, &
|
||||||
|
@ -224,10 +223,10 @@ subroutine plastic_isotropic_init
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! locally defined state aliases and initialization of state0 and aTolState
|
! locally defined state aliases and initialization of state0 and aTolState
|
||||||
stt%flowstress => plasticState(p)%state (1,:)
|
stt%xi => plasticState(p)%state (1,:)
|
||||||
stt%flowstress = prm%tau0
|
stt%xi = prm%xi_0
|
||||||
dot%flowstress => plasticState(p)%dotState(1,:)
|
dot%xi => plasticState(p)%dotState(1,:)
|
||||||
plasticState(p)%aTolState(1) = prm%aTolFlowstress
|
plasticState(p)%aTolState(1) = prm%aTol_xi
|
||||||
|
|
||||||
stt%accumulatedShear => plasticState(p)%state (2,:)
|
stt%accumulatedShear => plasticState(p)%state (2,:)
|
||||||
dot%accumulatedShear => plasticState(p)%dotState(2,:)
|
dot%accumulatedShear => plasticState(p)%dotState(2,:)
|
||||||
|
@ -288,9 +287,9 @@ subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
||||||
norm_Mp_dev = sqrt(squarenorm_Mp_dev)
|
norm_Mp_dev = sqrt(squarenorm_Mp_dev)
|
||||||
|
|
||||||
if (norm_Mp_dev > 0.0_pReal) then
|
if (norm_Mp_dev > 0.0_pReal) then
|
||||||
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Mp_dev/(prm%fTaylor*stt%flowstress(of))) **prm%n
|
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Mp_dev/(prm%M*stt%xi(of))) **prm%n
|
||||||
|
|
||||||
Lp = Mp_dev/norm_Mp_dev * gamma_dot/prm%fTaylor
|
Lp = Mp_dev/norm_Mp_dev * gamma_dot/prm%M
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (iand(debug_level(debug_constitutive), debug_levelExtensive) /= 0 &
|
if (iand(debug_level(debug_constitutive), debug_levelExtensive) /= 0 &
|
||||||
.and. (of == prm%of_debug .or. .not. iand(debug_level(debug_constitutive),debug_levelSelective) /= 0)) then
|
.and. (of == prm%of_debug .or. .not. iand(debug_level(debug_constitutive),debug_levelSelective) /= 0)) then
|
||||||
|
@ -306,7 +305,7 @@ subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
||||||
dLp_dMp(k,l,k,l) = dLp_dMp(k,l,k,l) + 1.0_pReal
|
dLp_dMp(k,l,k,l) = dLp_dMp(k,l,k,l) + 1.0_pReal
|
||||||
forall (k=1:3,m=1:3) &
|
forall (k=1:3,m=1:3) &
|
||||||
dLp_dMp(k,k,m,m) = dLp_dMp(k,k,m,m) - 1.0_pReal/3.0_pReal
|
dLp_dMp(k,k,m,m) = dLp_dMp(k,k,m,m) - 1.0_pReal/3.0_pReal
|
||||||
dLp_dMp = gamma_dot / prm%fTaylor * dLp_dMp / norm_Mp_dev
|
dLp_dMp = gamma_dot / prm%M * dLp_dMp / norm_Mp_dev
|
||||||
else
|
else
|
||||||
Lp = 0.0_pReal
|
Lp = 0.0_pReal
|
||||||
dLp_dMp = 0.0_pReal
|
dLp_dMp = 0.0_pReal
|
||||||
|
@ -354,15 +353,15 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
|
||||||
norm_Tstar_sph = sqrt(squarenorm_Tstar_sph)
|
norm_Tstar_sph = sqrt(squarenorm_Tstar_sph)
|
||||||
|
|
||||||
if (prm%dilatation .and. norm_Tstar_sph > 0.0_pReal) then ! no stress or J2 plastitiy --> Li and its derivative are zero
|
if (prm%dilatation .and. norm_Tstar_sph > 0.0_pReal) then ! no stress or J2 plastitiy --> Li and its derivative are zero
|
||||||
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Tstar_sph /(prm%fTaylor*stt%flowstress(of))) **prm%n
|
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Tstar_sph /(prm%M*stt%xi(of))) **prm%n
|
||||||
|
|
||||||
Li = Tstar_sph/norm_Tstar_sph * gamma_dot/prm%fTaylor
|
Li = Tstar_sph/norm_Tstar_sph * gamma_dot/prm%M
|
||||||
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
forall (k=1:3,l=1:3,m=1:3,n=1:3) &
|
||||||
dLi_dTstar(k,l,m,n) = (prm%n-1.0_pReal) * Tstar_sph(k,l)*Tstar_sph(m,n) / squarenorm_Tstar_sph
|
dLi_dTstar(k,l,m,n) = (prm%n-1.0_pReal) * Tstar_sph(k,l)*Tstar_sph(m,n) / squarenorm_Tstar_sph
|
||||||
forall (k=1:3,l=1:3) &
|
forall (k=1:3,l=1:3) &
|
||||||
dLi_dTstar(k,l,k,l) = dLi_dTstar(k,l,k,l) + 1.0_pReal
|
dLi_dTstar(k,l,k,l) = dLi_dTstar(k,l,k,l) + 1.0_pReal
|
||||||
|
|
||||||
dLi_dTstar = gamma_dot / prm%fTaylor * dLi_dTstar / norm_Tstar_sph
|
dLi_dTstar = gamma_dot / prm%M * dLi_dTstar / norm_Tstar_sph
|
||||||
else
|
else
|
||||||
Li = 0.0_pReal
|
Li = 0.0_pReal
|
||||||
dLi_dTstar = 0.0_pReal
|
dLi_dTstar = 0.0_pReal
|
||||||
|
@ -393,7 +392,7 @@ subroutine plastic_isotropic_dotState(Mp,instance,of)
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
gamma_dot, & !< strainrate
|
gamma_dot, & !< strainrate
|
||||||
hardening, & !< hardening coefficient
|
hardening, & !< hardening coefficient
|
||||||
saturation, & !< saturation flowstress
|
xi_inf_star, & !< saturation xi
|
||||||
norm_Mp !< norm of the (deviatoric) Mandel stress
|
norm_Mp !< norm of the (deviatoric) Mandel stress
|
||||||
|
|
||||||
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
||||||
|
@ -404,25 +403,25 @@ subroutine plastic_isotropic_dotState(Mp,instance,of)
|
||||||
norm_Mp = sqrt(math_mul33xx33(math_deviatoric33(Mp),math_deviatoric33(Mp)))
|
norm_Mp = sqrt(math_mul33xx33(math_deviatoric33(Mp),math_deviatoric33(Mp)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Mp /(prm%fTaylor*stt%flowstress(of))) **prm%n
|
gamma_dot = prm%gdot0 * (sqrt(1.5_pReal) * norm_Mp /(prm%M*stt%xi(of))) **prm%n
|
||||||
|
|
||||||
if (abs(gamma_dot) > 1e-12_pReal) then
|
if (abs(gamma_dot) > 1e-12_pReal) then
|
||||||
if (dEq0(prm%tausat_SinhFitA)) then
|
if (dEq0(prm%c_1)) then
|
||||||
saturation = prm%tausat
|
xi_inf_star = prm%xi_inf
|
||||||
else
|
else
|
||||||
saturation = prm%tausat &
|
xi_inf_star = prm%xi_inf &
|
||||||
+ asinh( (gamma_dot / prm%tausat_SinhFitA)**(1.0_pReal / prm%tausat_SinhFitD) &
|
+ asinh( (gamma_dot / prm%c_1)**(1.0_pReal / prm%c_2) &
|
||||||
)**(1.0_pReal / prm%tausat_SinhFitC) &
|
)**(1.0_pReal / prm%c_3) &
|
||||||
/ prm%tausat_SinhFitB * (gamma_dot / prm%gdot0)**(1.0_pReal / prm%n)
|
/ prm%c_4 * (gamma_dot / prm%gdot0)**(1.0_pReal / prm%n)
|
||||||
endif
|
endif
|
||||||
hardening = ( prm%h0 + prm%h0_slopeLnRate * log(gamma_dot) ) &
|
hardening = ( prm%h0 + prm%h0_slopeLnRate * log(gamma_dot) ) &
|
||||||
* abs( 1.0_pReal - stt%flowstress(of)/saturation )**prm%a &
|
* abs( 1.0_pReal - stt%xi(of)/xi_inf_star )**prm%a &
|
||||||
* sign(1.0_pReal, 1.0_pReal - stt%flowstress(of)/saturation)
|
* sign(1.0_pReal, 1.0_pReal - stt%xi(of)/xi_inf_star)
|
||||||
else
|
else
|
||||||
hardening = 0.0_pReal
|
hardening = 0.0_pReal
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dot%flowstress (of) = hardening * gamma_dot
|
dot%xi (of) = hardening * gamma_dot
|
||||||
dot%accumulatedShear(of) = gamma_dot
|
dot%accumulatedShear(of) = gamma_dot
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
@ -466,12 +465,12 @@ function plastic_isotropic_postResults(Mp,instance,of) result(postResults)
|
||||||
outputsLoop: do o = 1,size(prm%outputID)
|
outputsLoop: do o = 1,size(prm%outputID)
|
||||||
select case(prm%outputID(o))
|
select case(prm%outputID(o))
|
||||||
|
|
||||||
case (flowstress_ID)
|
case (xi_ID)
|
||||||
postResults(c+1) = stt%flowstress(of)
|
postResults(c+1) = stt%xi(of)
|
||||||
c = c + 1
|
c = c + 1
|
||||||
case (strainrate_ID)
|
case (strainrate_ID)
|
||||||
postResults(c+1) = prm%gdot0 &
|
postResults(c+1) = prm%gdot0 &
|
||||||
* (sqrt(1.5_pReal) * norm_Mp /(prm%fTaylor * stt%flowstress(of)))**prm%n
|
* (sqrt(1.5_pReal) * norm_Mp /(prm%M * stt%xi(of)))**prm%n
|
||||||
c = c + 1
|
c = c + 1
|
||||||
|
|
||||||
end select
|
end select
|
||||||
|
|
Loading…
Reference in New Issue