cross comparing
This commit is contained in:
parent
e06fc036c5
commit
995122504e
|
@ -77,8 +77,6 @@ module plastic_disloUCLA
|
|||
dipoleformation
|
||||
end type !< container type for internal constitutive parameters
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
|
||||
type, private :: tDisloUCLAState
|
||||
real(pReal), pointer, dimension(:,:) :: &
|
||||
rhoEdge, &
|
||||
|
@ -93,6 +91,8 @@ module plastic_disloUCLA
|
|||
threshold_stress
|
||||
end type tDisloUCLAdependentState
|
||||
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
type(tDisloUCLAState ), allocatable, dimension(:), private :: &
|
||||
dotState, &
|
||||
state
|
||||
|
@ -110,6 +110,7 @@ module plastic_disloUCLA
|
|||
|
||||
contains
|
||||
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief module initialization
|
||||
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
||||
|
@ -152,7 +153,7 @@ subroutine plastic_disloUCLA_init()
|
|||
f,j,k,o, &
|
||||
Ninstance, &
|
||||
p, i, &
|
||||
NipcMyPhase, outputSize, &
|
||||
NipcMyPhase, &
|
||||
sizeState, sizeDotState, &
|
||||
startIndex, endIndex
|
||||
|
||||
|
@ -217,7 +218,7 @@ subroutine plastic_disloUCLA_init()
|
|||
config%getFloat('c/a',defaultVal=0.0_pReal))
|
||||
if(structure=='bcc') then
|
||||
prm%nonSchmidCoeff = config%getFloats('nonschmid_coefficients',&
|
||||
defaultVal = emptyRealArray)
|
||||
defaultVal = emptyRealArray)
|
||||
prm%nonSchmid_pos = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,+1_pInt)
|
||||
prm%nonSchmid_neg = lattice_nonSchmidMatrix(prm%Nslip,prm%nonSchmidCoeff,-1_pInt)
|
||||
else
|
||||
|
@ -272,17 +273,17 @@ subroutine plastic_disloUCLA_init()
|
|||
prm%tau0 = prm%tau_peierls + prm%SolidSolutionStrength
|
||||
|
||||
! sanity checks
|
||||
if (any(prm%rho0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0'
|
||||
if (any(prm%rhoDip0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedgedip0'
|
||||
if (any(prm%v0 < 0.0_pReal)) extmsg = trim(extmsg)//' v0'
|
||||
if (any(prm%burgers <= 0.0_pReal)) extmsg = trim(extmsg)//' slipburgers'
|
||||
if (any(prm%H0kp <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge'
|
||||
if (any(prm%tau_peierls < 0.0_pReal)) extmsg = trim(extmsg)//' tau_peierls'
|
||||
if ( prm%D0 <= 0.0_pReal) extmsg = trim(extmsg)//' d0'
|
||||
if ( prm%Qsd <= 0.0_pReal) extmsg = trim(extmsg)//' qsd'
|
||||
if ( prm%D0 <= 0.0_pReal) extmsg = trim(extmsg)//' d0'
|
||||
if ( prm%Qsd <= 0.0_pReal) extmsg = trim(extmsg)//' qsd'
|
||||
if (any(prm%rho0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedge0'
|
||||
if (any(prm%rhoDip0 < 0.0_pReal)) extmsg = trim(extmsg)//' rhoedgedip0'
|
||||
if (any(prm%v0 < 0.0_pReal)) extmsg = trim(extmsg)//' v0'
|
||||
if (any(prm%burgers <= 0.0_pReal)) extmsg = trim(extmsg)//' slipburgers'
|
||||
if (any(prm%H0kp <= 0.0_pReal)) extmsg = trim(extmsg)//' qedge'
|
||||
if (any(prm%tau_peierls < 0.0_pReal)) extmsg = trim(extmsg)//' tau_peierls'
|
||||
if (any(prm%minDipDistance <= 0.0_pReal)) extmsg = trim(extmsg)//' cedgedipmindistance or slipburgers'
|
||||
if (any(prm%atomicVolume <= 0.0_pReal)) extmsg = trim(extmsg)//' catomicvolume or slipburgers'
|
||||
|
||||
!if (plastic_disloUCLA_CAtomicVolume(instance) <= 0.0_pReal) &
|
||||
! call IO_error(211_pInt,el=instance,ext_msg='cAtomicVolume ('//PLASTICITY_DISLOUCLA_label//')')
|
||||
else slipActive
|
||||
allocate(prm%rho0(0))
|
||||
allocate(prm%rhoDip0(0))
|
||||
|
@ -299,7 +300,6 @@ subroutine plastic_disloUCLA_init()
|
|||
allocate(prm%outputID(0))
|
||||
do i=1_pInt, size(outputs)
|
||||
outputID = undefined_ID
|
||||
outputSize = prm%totalNslip
|
||||
select case(trim(outputs(i)))
|
||||
|
||||
case ('edge_density')
|
||||
|
@ -321,7 +321,7 @@ subroutine plastic_disloUCLA_init()
|
|||
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_disloUCLA_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = outputSize
|
||||
plastic_disloUCLA_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
|
||||
prm%outputID = [prm%outputID, outputID]
|
||||
endif
|
||||
|
||||
|
@ -329,7 +329,7 @@ subroutine plastic_disloUCLA_init()
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! allocate state arrays
|
||||
NipcMyPhase = count(material_phase==p)
|
||||
NipcMyPhase = count(material_phase == p)
|
||||
sizeDotState = int(size(['rhoEdge ','rhoEdgeDip ','accshearslip']),pInt) * prm%totalNslip
|
||||
sizeState = sizeDotState
|
||||
|
||||
|
@ -375,7 +375,7 @@ subroutine plastic_disloUCLA_init()
|
|||
endIndex = endIndex + prm%totalNslip
|
||||
stt%accshear_slip=>plasticState(p)%state(startIndex:endIndex,:)
|
||||
dot%accshear_slip=>plasticState(p)%dotState(startIndex:endIndex,:)
|
||||
plasticState(p)%aTolState(startIndex:endIndex) = 1e6_pReal
|
||||
plasticState(p)%aTolState(startIndex:endIndex) = 1e6_pReal !ToDo: better make optional parameter
|
||||
! global alias
|
||||
plasticState(p)%slipRate => plasticState(p)%dotState(startIndex:endIndex,:)
|
||||
plasticState(p)%accumulatedSlip => plasticState(p)%state(startIndex:endIndex,:)
|
||||
|
@ -415,8 +415,8 @@ pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp,Mp,Temperature,inst
|
|||
integer(pInt) :: &
|
||||
i,k,l,m,n
|
||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
||||
dgdot_dtauslip_pos,dgdot_dtauslip_neg, &
|
||||
gdot_slip_pos,gdot_slip_neg
|
||||
gdot_slip_pos,gdot_slip_neg, &
|
||||
dgdot_dtauslip_pos,dgdot_dtauslip_neg
|
||||
|
||||
Lp = 0.0_pReal
|
||||
dLp_dMp = 0.0_pReal
|
||||
|
@ -424,13 +424,13 @@ pure subroutine plastic_disloUCLA_LpAndItsTangent(Lp,dLp_dMp,Mp,Temperature,inst
|
|||
associate(prm => param(instance))
|
||||
|
||||
call kinetics(Mp,Temperature,instance,of,gdot_slip_pos,gdot_slip_neg,dgdot_dtauslip_pos,dgdot_dtauslip_neg)
|
||||
slipSystems: do i = 1_pInt, prm%totalNslip
|
||||
do i = 1_pInt, prm%totalNslip
|
||||
Lp = Lp + (gdot_slip_pos(i)+gdot_slip_neg(i))*prm%Schmid_slip(1:3,1:3,i)
|
||||
forall (k=1_pInt:3_pInt,l=1_pInt:3_pInt,m=1_pInt:3_pInt,n=1_pInt:3_pInt) &
|
||||
dLp_dMp(k,l,m,n) = dLp_dMp(k,l,m,n) &
|
||||
+ dgdot_dtauslip_pos(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_pos(m,n,i) &
|
||||
+ dgdot_dtauslip_neg(i) * prm%Schmid_slip(k,l,i) * prm%nonSchmid_neg(m,n,i)
|
||||
enddo slipSystems
|
||||
enddo
|
||||
|
||||
end associate
|
||||
|
||||
|
@ -449,12 +449,13 @@ subroutine plastic_disloUCLA_dotState(Mp,Temperature,instance,of)
|
|||
math_clip
|
||||
|
||||
implicit none
|
||||
real(pReal), dimension(3,3), intent(in):: &
|
||||
real(pReal), dimension(3,3), intent(in) :: &
|
||||
Mp !< Mandel stress
|
||||
real(pReal), intent(in) :: &
|
||||
real(pReal), intent(in) :: &
|
||||
temperature !< temperature
|
||||
integer(pInt), intent(in) :: &
|
||||
instance, of
|
||||
integer(pInt), intent(in) :: &
|
||||
instance, &
|
||||
of
|
||||
|
||||
real(pReal) :: &
|
||||
VacancyDiffusion
|
||||
|
@ -507,7 +508,9 @@ end subroutine plastic_disloUCLA_dotState
|
|||
subroutine plastic_disloUCLA_dependentState(instance,of)
|
||||
|
||||
implicit none
|
||||
integer(pInt), intent(in) :: instance, of
|
||||
integer(pInt), intent(in) :: &
|
||||
instance, &
|
||||
of
|
||||
|
||||
integer(pInt) :: &
|
||||
i
|
||||
|
@ -527,7 +530,6 @@ subroutine plastic_disloUCLA_dependentState(instance,of)
|
|||
|
||||
end associate
|
||||
|
||||
|
||||
end subroutine plastic_disloUCLA_dependentState
|
||||
|
||||
|
||||
|
|
|
@ -50,14 +50,14 @@ module plastic_isotropic
|
|||
dilatation
|
||||
end type
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
|
||||
type, private :: tIsotropicState
|
||||
real(pReal), pointer, dimension(:) :: &
|
||||
flowstress, &
|
||||
accumulatedShear
|
||||
end type
|
||||
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
type(tIsotropicState), allocatable, dimension(:), private :: &
|
||||
dotState, &
|
||||
state
|
||||
|
@ -140,8 +140,8 @@ subroutine plastic_isotropic_init()
|
|||
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
||||
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
||||
|
||||
allocate(plastic_isotropic_sizePostResult(maxval(phase_Noutput), Ninstance),source=0_pInt)
|
||||
allocate(plastic_isotropic_output(maxval(phase_Noutput), Ninstance))
|
||||
allocate(plastic_isotropic_sizePostResult(maxval(phase_Noutput),Ninstance),source=0_pInt)
|
||||
allocate(plastic_isotropic_output(maxval(phase_Noutput),Ninstance))
|
||||
plastic_isotropic_output = ''
|
||||
|
||||
allocate(param(Ninstance))
|
||||
|
@ -161,35 +161,35 @@ subroutine plastic_isotropic_init()
|
|||
endif
|
||||
#endif
|
||||
|
||||
prm%tau0 = config%getFloat('tau0')
|
||||
prm%tausat = config%getFloat('tausat')
|
||||
prm%gdot0 = config%getFloat('gdot0')
|
||||
prm%n = config%getFloat('n')
|
||||
prm%h0 = config%getFloat('h0')
|
||||
prm%fTaylor = config%getFloat('m')
|
||||
prm%h0_slopeLnRate = config%getFloat('h0_slopelnrate', defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitA = config%getFloat('tausat_sinhfita',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitB = config%getFloat('tausat_sinhfitb',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitC = config%getFloat('tausat_sinhfitc',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitD = config%getFloat('tausat_sinhfitd',defaultVal=0.0_pReal)
|
||||
prm%a = config%getFloat('a')
|
||||
prm%aTolFlowStress = config%getFloat('atol_flowstress',defaultVal=1.0_pReal)
|
||||
prm%aTolShear = config%getFloat('atol_shear', defaultVal=1.0e-6_pReal)
|
||||
prm%tau0 = config%getFloat('tau0')
|
||||
prm%tausat = config%getFloat('tausat')
|
||||
prm%gdot0 = config%getFloat('gdot0')
|
||||
prm%n = config%getFloat('n')
|
||||
prm%h0 = config%getFloat('h0')
|
||||
prm%fTaylor = config%getFloat('m')
|
||||
prm%h0_slopeLnRate = config%getFloat('h0_slopelnrate', defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitA = config%getFloat('tausat_sinhfita',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitB = config%getFloat('tausat_sinhfitb',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitC = config%getFloat('tausat_sinhfitc',defaultVal=0.0_pReal)
|
||||
prm%tausat_SinhFitD = config%getFloat('tausat_sinhfitd',defaultVal=0.0_pReal)
|
||||
prm%a = config%getFloat('a')
|
||||
prm%aTolFlowStress = config%getFloat('atol_flowstress',defaultVal=1.0_pReal)
|
||||
prm%aTolShear = config%getFloat('atol_shear', defaultVal=1.0e-6_pReal)
|
||||
|
||||
prm%dilatation = config%keyExists('/dilatation/')
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! sanity checks
|
||||
extmsg = ''
|
||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//'aTolShear '
|
||||
if (prm%tau0 < 0.0_pReal) extmsg = trim(extmsg)//'tau0 '
|
||||
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//'gdot0 '
|
||||
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%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//'m '
|
||||
if (prm%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//'atol_flowstress '
|
||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//'atol_shear '
|
||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' aTolShear'
|
||||
if (prm%tau0 < 0.0_pReal) extmsg = trim(extmsg)//' tau0'
|
||||
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
||||
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%fTaylor <= 0.0_pReal) extmsg = trim(extmsg)//' m'
|
||||
if (prm%aTolFlowstress <= 0.0_pReal) extmsg = trim(extmsg)//' atol_flowstress'
|
||||
if (prm%aTolShear <= 0.0_pReal) extmsg = trim(extmsg)//' atol_shear'
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! exit if any parameter is out of range
|
||||
|
@ -231,17 +231,17 @@ subroutine plastic_isotropic_init()
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! locally defined state aliases and initialization of state0 and aTolState
|
||||
stt%flowstress => plasticState(p)%state (1,1:NipcMyPhase)
|
||||
stt%flowstress => plasticState(p)%state (1,:)
|
||||
stt%flowstress = prm%tau0
|
||||
dot%flowstress => plasticState(p)%dotState (1,1:NipcMyPhase)
|
||||
plasticState(p)%aTolState(1) = prm%aTolFlowstress
|
||||
dot%flowstress => plasticState(p)%dotState(1,:)
|
||||
plasticState(p)%aTolState(1) = prm%aTolFlowstress
|
||||
|
||||
stt%accumulatedShear => plasticState(p)%state (2,1:NipcMyPhase)
|
||||
dot%accumulatedShear => plasticState(p)%dotState (2,1:NipcMyPhase)
|
||||
plasticState(p)%aTolState(2) = prm%aTolShear
|
||||
stt%accumulatedShear => plasticState(p)%state (2,:)
|
||||
dot%accumulatedShear => plasticState(p)%dotState(2,:)
|
||||
plasticState(p)%aTolState(2) = prm%aTolShear
|
||||
! global alias
|
||||
plasticState(p)%slipRate => plasticState(p)%dotState(2:2,1:NipcMyPhase)
|
||||
plasticState(p)%accumulatedSlip => plasticState(p)%state (2:2,1:NipcMyPhase)
|
||||
plasticState(p)%slipRate => plasticState(p)%dotState(2:2,:)
|
||||
plasticState(p)%accumulatedSlip => plasticState(p)%state (2:2,:)
|
||||
|
||||
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@ module plastic_kinehardening
|
|||
outputID !< ID of each post result output
|
||||
end type
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
|
||||
type, private :: tKinehardeningState
|
||||
real(pReal), pointer, dimension(:,:) :: & !< vectors along NipcMyInstance
|
||||
crss, & !< critical resolved stress
|
||||
|
@ -73,6 +71,8 @@ module plastic_kinehardening
|
|||
accshear !< accumulated (absolute) shear
|
||||
end type
|
||||
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
type(tKinehardeningState), allocatable, dimension(:), private :: &
|
||||
dotState, &
|
||||
deltaState, &
|
||||
|
@ -87,7 +87,6 @@ module plastic_kinehardening
|
|||
private :: &
|
||||
kinetics
|
||||
|
||||
|
||||
contains
|
||||
|
||||
|
||||
|
@ -140,7 +139,7 @@ subroutine plastic_kinehardening_init
|
|||
integer(pInt) :: &
|
||||
Ninstance, &
|
||||
p, i, o, &
|
||||
NipcMyPhase, outputSize, &
|
||||
NipcMyPhase, &
|
||||
sizeState, sizeDeltaState, sizeDotState, &
|
||||
startIndex, endIndex
|
||||
|
||||
|
@ -243,11 +242,11 @@ subroutine plastic_kinehardening_init
|
|||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! sanity checks
|
||||
if (prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
||||
if (prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
|
||||
if ( prm%gdot0 <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0'
|
||||
if ( prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
|
||||
if (any(prm%crss0 <= 0.0_pReal)) extmsg = trim(extmsg)//' crss0'
|
||||
if (any(prm%tau1 <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1'
|
||||
if (any(prm%tau1_b <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1_b'
|
||||
if (any(prm%tau1 <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1'
|
||||
if (any(prm%tau1_b <= 0.0_pReal)) extmsg = trim(extmsg)//' tau1_b'
|
||||
|
||||
!ToDo: Any sensible checks for theta?
|
||||
|
||||
|
@ -264,41 +263,40 @@ subroutine plastic_kinehardening_init
|
|||
allocate(prm%outputID(0))
|
||||
do i=1_pInt, size(outputs)
|
||||
outputID = undefined_ID
|
||||
outputSize = prm%totalNslip
|
||||
select case(outputs(i))
|
||||
|
||||
case ('resistance')
|
||||
outputID = merge(crss_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('accumulatedshear')
|
||||
outputID = merge(accshear_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('shearrate')
|
||||
outputID = merge(shearrate_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('resolvedstress')
|
||||
outputID = merge(resolvedstress_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('backstress')
|
||||
outputID = merge(crss_back_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('sense')
|
||||
outputID = merge(sense_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('chi0')
|
||||
outputID = merge(chi0_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('gamma0')
|
||||
outputID = merge(gamma0_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('resistance')
|
||||
outputID = merge(crss_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('accumulatedshear')
|
||||
outputID = merge(accshear_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('shearrate')
|
||||
outputID = merge(shearrate_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('resolvedstress')
|
||||
outputID = merge(resolvedstress_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('backstress')
|
||||
outputID = merge(crss_back_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('sense')
|
||||
outputID = merge(sense_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('chi0')
|
||||
outputID = merge(chi0_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
case ('gamma0')
|
||||
outputID = merge(gamma0_ID,undefined_ID,prm%totalNslip>0_pInt)
|
||||
|
||||
end select
|
||||
end select
|
||||
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_kinehardening_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_kinehardening_sizePostResult(i,phase_plasticityInstance(p)) = outputSize
|
||||
prm%outputID = [prm%outputID , outputID]
|
||||
endif
|
||||
if (outputID /= undefined_ID) then
|
||||
plastic_kinehardening_output(i,phase_plasticityInstance(p)) = outputs(i)
|
||||
plastic_kinehardening_sizePostResult(i,phase_plasticityInstance(p)) = prm%totalNslip
|
||||
prm%outputID = [prm%outputID , outputID]
|
||||
endif
|
||||
|
||||
end do
|
||||
enddo
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! allocate state arrays
|
||||
NipcMyPhase = count(material_phase == p)
|
||||
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%TotalNslip
|
||||
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%TotalNslip
|
||||
sizeDotState = size(['crss ','crss_back', 'accshear ']) * prm%totalNslip
|
||||
sizeDeltaState = size(['sense ', 'chi0 ', 'gamma0' ]) * prm%totalNslip
|
||||
sizeState = sizeDotState + sizeDeltaState
|
||||
|
||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,sizeDeltaState, &
|
||||
|
@ -349,6 +347,7 @@ subroutine plastic_kinehardening_init
|
|||
plasticState(p)%state0 = plasticState(p)%state ! ToDo: this could be done centrally
|
||||
|
||||
end associate
|
||||
|
||||
enddo
|
||||
|
||||
end subroutine plastic_kinehardening_init
|
||||
|
@ -380,7 +379,7 @@ pure subroutine plastic_kinehardening_LpAndItsTangent(Lp,dLp_dMp,Mp,instance,of)
|
|||
Lp = 0.0_pReal
|
||||
dLp_dMp = 0.0_pReal
|
||||
|
||||
associate(prm => param(instance), stt => state(instance))
|
||||
associate(prm => param(instance))
|
||||
|
||||
call kinetics(Mp,instance,of,gdot_pos,gdot_neg,dgdot_dtau_pos,dgdot_dtau_neg)
|
||||
|
||||
|
@ -411,10 +410,11 @@ subroutine plastic_kinehardening_dotState(Mp,instance,of)
|
|||
|
||||
integer(pInt) :: &
|
||||
i
|
||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
||||
gdot_pos,gdot_neg
|
||||
real(pReal) :: &
|
||||
sumGamma
|
||||
real(pReal), dimension(param(instance)%totalNslip) :: &
|
||||
gdot_pos,gdot_neg
|
||||
|
||||
|
||||
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
||||
|
||||
|
@ -526,8 +526,6 @@ function plastic_kinehardening_postResults(Mp,instance,of) result(postResults)
|
|||
|
||||
associate(prm => param(instance), stt => state(instance))
|
||||
|
||||
call kinetics(Mp,instance,of,gdot_pos,gdot_neg)
|
||||
|
||||
outputsLoop: do o = 1_pInt,size(prm%outputID)
|
||||
select case(prm%outputID(o))
|
||||
|
||||
|
@ -544,6 +542,7 @@ function plastic_kinehardening_postResults(Mp,instance,of) result(postResults)
|
|||
case (accshear_ID)
|
||||
postResults(c+1_pInt:c+prm%totalNslip) = stt%accshear(:,of)
|
||||
case (shearrate_ID)
|
||||
call kinetics(Mp,instance,of,gdot_pos,gdot_neg)
|
||||
postResults(c+1_pInt:c+prm%totalNslip) = gdot_pos+gdot_neg
|
||||
case (resolvedstress_ID)
|
||||
do i = 1_pInt, prm%totalNslip
|
||||
|
|
|
@ -74,9 +74,6 @@ module plastic_phenopowerlaw
|
|||
outputID !< ID of each post result output
|
||||
end type !< container type for internal constitutive parameters
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
|
||||
|
||||
type, private :: tPhenopowerlawState
|
||||
real(pReal), pointer, dimension(:,:) :: &
|
||||
xi_slip, &
|
||||
|
@ -85,6 +82,8 @@ module plastic_phenopowerlaw
|
|||
gamma_twin
|
||||
end type
|
||||
|
||||
|
||||
type(tParameters), dimension(:), allocatable, private :: param !< containers of constitutive parameters (len Ninstance)
|
||||
type(tPhenopowerlawState), allocatable, dimension(:), private :: &
|
||||
dotState, &
|
||||
state
|
||||
|
@ -233,9 +232,9 @@ subroutine plastic_phenopowerlaw_init
|
|||
prm%H_int = math_expand(prm%H_int, prm%Nslip)
|
||||
|
||||
! sanity checks
|
||||
if (prm%gdot0_slip <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0_slip'
|
||||
if (prm%a_slip <= 0.0_pReal) extmsg = trim(extmsg)//' a_slip'
|
||||
if (prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
|
||||
if ( prm%gdot0_slip <= 0.0_pReal) extmsg = trim(extmsg)//' gdot0_slip'
|
||||
if ( prm%a_slip <= 0.0_pReal) extmsg = trim(extmsg)//' a_slip'
|
||||
if ( prm%n_slip <= 0.0_pReal) extmsg = trim(extmsg)//' n_slip'
|
||||
if (any(prm%xi_slip_0 <= 0.0_pReal)) extmsg = trim(extmsg)//' xi_slip_0'
|
||||
if (any(prm%xi_slip_sat < prm%xi_slip_0)) extmsg = trim(extmsg)//' xi_slip_sat'
|
||||
else slipActive
|
||||
|
@ -342,8 +341,8 @@ subroutine plastic_phenopowerlaw_init
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
! allocate state arrays
|
||||
NipcMyPhase = count(material_phase == p)
|
||||
sizeDotState = size(['tau_slip ','gamma_slip']) * prm%TotalNslip &
|
||||
+ size(['tau_twin ','gamma_twin']) * prm%TotalNtwin
|
||||
sizeDotState = size(['tau_slip ','gamma_slip']) * prm%totalNslip &
|
||||
+ size(['tau_twin ','gamma_twin']) * prm%totalNtwin
|
||||
sizeState = sizeDotState
|
||||
|
||||
call material_allocatePlasticState(p,NipcMyPhase,sizeState,sizeDotState,0_pInt, &
|
||||
|
@ -466,7 +465,7 @@ subroutine plastic_phenopowerlaw_dotState(Mp,instance,of)
|
|||
left_SlipSlip,right_SlipSlip, &
|
||||
gdot_slip_pos,gdot_slip_neg
|
||||
|
||||
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
||||
associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
|
||||
|
||||
sumGamma = sum(stt%gamma_slip(:,of))
|
||||
sumF = sum(stt%gamma_twin(:,of)/prm%gamma_twin_char)
|
||||
|
|
Loading…
Reference in New Issue