subStep ---> step
This commit is contained in:
parent
59ae287564
commit
33e0048010
|
@ -65,10 +65,10 @@ module phase
|
||||||
nState, & !< state loop limit
|
nState, & !< state loop limit
|
||||||
nStress !< stress loop limit
|
nStress !< stress loop limit
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
subStepMinCryst, & !< minimum (relative) size of sub-step allowed during cutback
|
stepMinCryst, & !< minimum (relative) size of sub-step allowed during cutback
|
||||||
subStepSizeCryst, & !< size of first substep when cutback
|
stepSizeCryst, & !< size of first substep when cutback
|
||||||
subStepSizeLp, & !< size of first substep when cutback in Lp calculation
|
stepSizeLp, & !< size of first substep when cutback in Lp calculation
|
||||||
subStepSizeLi, & !< size of first substep when cutback in Li calculation
|
stepSizeLi, & !< size of first substep when cutback in Li calculation
|
||||||
stepIncreaseCryst, & !< increase of next substep size when previous substep converged
|
stepIncreaseCryst, & !< increase of next substep size when previous substep converged
|
||||||
rtol_crystalliteState, &
|
rtol_crystalliteState, &
|
||||||
rtol_Lp, & !< relative tolerance in stress loop for Lp
|
rtol_Lp, & !< relative tolerance in stress loop for Lp
|
||||||
|
|
|
@ -295,27 +295,27 @@ module subroutine mechanical_init(phases, num_mech)
|
||||||
num_mech_plastic => num_mech%get_dict('plastic', defaultVal=emptyDict)
|
num_mech_plastic => num_mech%get_dict('plastic', defaultVal=emptyDict)
|
||||||
num_mech_eigen => num_mech%get_dict('eigen', defaultVal=emptyDict)
|
num_mech_eigen => num_mech%get_dict('eigen', defaultVal=emptyDict)
|
||||||
|
|
||||||
num%subStepMinCryst = num_mech%get_asReal ('sub_step_min', defaultVal=1.0e-3_pREAL)
|
num%stepMinCryst = num_mech%get_asReal ('step_min', defaultVal=1.0e-3_pREAL)
|
||||||
num%subStepSizeCryst = num_mech%get_asReal ('sub_step_size', defaultVal=0.25_pREAL)
|
num%stepSizeCryst = num_mech%get_asReal ('step_size', defaultVal=0.25_pREAL)
|
||||||
num%stepIncreaseCryst = num_mech%get_asReal ('step_increase', defaultVal=1.5_pREAL)
|
num%stepIncreaseCryst = num_mech%get_asReal ('step_increase', defaultVal=1.5_pREAL)
|
||||||
num%rtol_crystalliteState = num_mech%get_asReal ('eps_rel_state', defaultVal=1.0e-6_pREAL)
|
num%rtol_crystalliteState = num_mech%get_asReal ('eps_rel_state', defaultVal=1.0e-6_pREAL)
|
||||||
num%nState = num_mech%get_asInt ('N_iter_state_max', defaultVal=20)
|
num%nState = num_mech%get_asInt ('N_iter_state_max', defaultVal=20)
|
||||||
num%nStress = num_mech%get_asInt ('N_iter_stress_max', defaultVal=40)
|
num%nStress = num_mech%get_asInt ('N_iter_stress_max', defaultVal=40)
|
||||||
num%subStepSizeLp = num_mech_plastic%get_asReal ('sub_step_size_Lp', defaultVal=0.5_pREAL)
|
num%stepSizeLp = num_mech_plastic%get_asReal ('step_size_Lp', defaultVal=0.5_pREAL)
|
||||||
num%rtol_Lp = num_mech_plastic%get_asReal ('eps_rel_Lp', defaultVal=1.0e-6_pREAL)
|
num%rtol_Lp = num_mech_plastic%get_asReal ('eps_rel_Lp', defaultVal=1.0e-6_pREAL)
|
||||||
num%atol_Lp = num_mech_plastic%get_asReal ('eps_abs_Lp', defaultVal=1.0e-8_pREAL)
|
num%atol_Lp = num_mech_plastic%get_asReal ('eps_abs_Lp', defaultVal=1.0e-8_pREAL)
|
||||||
num%iJacoLpresiduum = num_mech_plastic%get_asInt ('f_update_jacobi_Lp', defaultVal=1)
|
num%iJacoLpresiduum = num_mech_plastic%get_asInt ('f_update_jacobi_Lp', defaultVal=1)
|
||||||
num%subStepSizeLi = num_mech_eigen%get_asReal ('sub_step_size_Li', defaultVal=0.5_pREAL)
|
num%stepSizeLi = num_mech_eigen%get_asReal ('step_size_Li', defaultVal=0.5_pREAL)
|
||||||
num%rtol_Li = num_mech_eigen%get_asReal ('eps_rel_Li', defaultVal=num%rtol_Lp)
|
num%rtol_Li = num_mech_eigen%get_asReal ('eps_rel_Li', defaultVal=num%rtol_Lp)
|
||||||
num%atol_Li = num_mech_eigen%get_asReal ('eps_abs_Li', defaultVal=num%atol_Lp)
|
num%atol_Li = num_mech_eigen%get_asReal ('eps_abs_Li', defaultVal=num%atol_Lp)
|
||||||
num%iJacoLiresiduum = num_mech_eigen%get_asInt ('f_update_jacobi_Li', defaultVal=num%iJacoLpresiduum)
|
num%iJacoLiresiduum = num_mech_eigen%get_asInt ('f_update_jacobi_Li', defaultVal=num%iJacoLpresiduum)
|
||||||
|
|
||||||
extmsg = ''
|
extmsg = ''
|
||||||
if (num%subStepMinCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_min'
|
if (num%stepMinCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_min'
|
||||||
if (num%subStepSizeCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size'
|
if (num%stepSizeCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size'
|
||||||
if (num%stepIncreaseCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' step_increase'
|
if (num%stepIncreaseCryst <= 0.0_pREAL) extmsg = trim(extmsg)//' step_increase'
|
||||||
if (num%subStepSizeLp <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size_Lp'
|
if (num%stepSizeLp <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size_Lp'
|
||||||
if (num%subStepSizeLi <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size_Li'
|
if (num%stepSizeLi <= 0.0_pREAL) extmsg = trim(extmsg)//' sub_step_size_Li'
|
||||||
if (num%rtol_Lp <= 0.0_pREAL) extmsg = trim(extmsg)//' epl_rel_Lp'
|
if (num%rtol_Lp <= 0.0_pREAL) extmsg = trim(extmsg)//' epl_rel_Lp'
|
||||||
if (num%atol_Lp <= 0.0_pREAL) extmsg = trim(extmsg)//' eps_abs_Lp'
|
if (num%atol_Lp <= 0.0_pREAL) extmsg = trim(extmsg)//' eps_abs_Lp'
|
||||||
if (num%rtol_Li <= 0.0_pREAL) extmsg = trim(extmsg)//' eps_rel_Li'
|
if (num%rtol_Li <= 0.0_pREAL) extmsg = trim(extmsg)//' eps_rel_Li'
|
||||||
|
@ -507,7 +507,7 @@ function integrateStress(F,subFp0,subFi0,Delta_t,ph,en) result(broken)
|
||||||
Lpguess_old = Lpguess
|
Lpguess_old = Lpguess
|
||||||
steplengthLp = 1.0_pREAL ! ...proceed with normal step length (calculate new search direction)
|
steplengthLp = 1.0_pREAL ! ...proceed with normal step length (calculate new search direction)
|
||||||
else ! not converged and residuum not improved...
|
else ! not converged and residuum not improved...
|
||||||
steplengthLp = num%subStepSizeLp * steplengthLp ! ...try with smaller step length in same direction
|
steplengthLp = num%stepSizeLp * steplengthLp ! ...try with smaller step length in same direction
|
||||||
Lpguess = Lpguess_old &
|
Lpguess = Lpguess_old &
|
||||||
+ deltaLp * stepLengthLp
|
+ deltaLp * stepLengthLp
|
||||||
cycle LpLoop
|
cycle LpLoop
|
||||||
|
@ -547,7 +547,7 @@ function integrateStress(F,subFp0,subFi0,Delta_t,ph,en) result(broken)
|
||||||
Liguess_old = Liguess
|
Liguess_old = Liguess
|
||||||
steplengthLi = 1.0_pREAL ! ...proceed with normal step length (calculate new search direction)
|
steplengthLi = 1.0_pREAL ! ...proceed with normal step length (calculate new search direction)
|
||||||
else ! not converged and residuum not improved...
|
else ! not converged and residuum not improved...
|
||||||
steplengthLi = num%subStepSizeLi * steplengthLi ! ...try with smaller step length in same direction
|
steplengthLi = num%stepSizeLi * steplengthLi ! ...try with smaller step length in same direction
|
||||||
Liguess = Liguess_old &
|
Liguess = Liguess_old &
|
||||||
+ deltaLi * steplengthLi
|
+ deltaLi * steplengthLi
|
||||||
cycle LiLoop
|
cycle LiLoop
|
||||||
|
@ -1029,11 +1029,11 @@ module function phase_mechanical_constitutive(Delta_t,co,ce) result(converged_)
|
||||||
logical :: converged_
|
logical :: converged_
|
||||||
|
|
||||||
real(pREAL) :: &
|
real(pREAL) :: &
|
||||||
formerSubStep
|
formerStep
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, en, sizeDotState
|
ph, en, sizeDotState
|
||||||
logical :: todo
|
logical :: todo
|
||||||
real(pREAL) :: subFrac,subStep
|
real(pREAL) :: stepFrac,step
|
||||||
real(pREAL), dimension(3,3) :: &
|
real(pREAL), dimension(3,3) :: &
|
||||||
subFp0, &
|
subFp0, &
|
||||||
subFi0, &
|
subFi0, &
|
||||||
|
@ -1053,20 +1053,20 @@ module function phase_mechanical_constitutive(Delta_t,co,ce) result(converged_)
|
||||||
subFp0 = phase_mechanical_Fp0(ph)%data(1:3,1:3,en)
|
subFp0 = phase_mechanical_Fp0(ph)%data(1:3,1:3,en)
|
||||||
subFi0 = phase_mechanical_Fi0(ph)%data(1:3,1:3,en)
|
subFi0 = phase_mechanical_Fi0(ph)%data(1:3,1:3,en)
|
||||||
subF0 = phase_mechanical_F0(ph)%data(1:3,1:3,en)
|
subF0 = phase_mechanical_F0(ph)%data(1:3,1:3,en)
|
||||||
subFrac = 0.0_pREAL
|
stepFrac = 0.0_pREAL
|
||||||
todo = .true.
|
todo = .true.
|
||||||
subStep = 1.0_pREAL/num%subStepSizeCryst
|
step = 1.0_pREAL/num%stepSizeCryst
|
||||||
converged_ = .false. ! pretend failed step of 1/subStepSizeCryst
|
converged_ = .false. ! pretend failed step of 1/stepSizeCryst
|
||||||
|
|
||||||
todo = .true.
|
todo = .true.
|
||||||
cutbackLooping: do while (todo)
|
cutbackLooping: do while (todo)
|
||||||
|
|
||||||
if (converged_) then
|
if (converged_) then
|
||||||
formerSubStep = subStep
|
formerStep = step
|
||||||
subFrac = subFrac + subStep
|
stepFrac = stepFrac + step
|
||||||
subStep = min(1.0_pREAL - subFrac, num%stepIncreaseCryst * subStep)
|
step = min(1.0_pREAL - stepFrac, num%stepIncreaseCryst * step)
|
||||||
|
|
||||||
todo = subStep > 0.0_pREAL ! still time left to integrate on?
|
todo = step > 0.0_pREAL ! still time left to integrate on?
|
||||||
|
|
||||||
if (todo) then
|
if (todo) then
|
||||||
subF0 = subF
|
subF0 = subF
|
||||||
|
@ -1079,16 +1079,16 @@ module function phase_mechanical_constitutive(Delta_t,co,ce) result(converged_)
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! cut back (reduced time and restore)
|
! cut back (reduced time and restore)
|
||||||
else
|
else
|
||||||
subStep = num%subStepSizeCryst * subStep
|
step = num%stepSizeCryst * step
|
||||||
phase_mechanical_Fp(ph)%data(1:3,1:3,en) = subFp0
|
phase_mechanical_Fp(ph)%data(1:3,1:3,en) = subFp0
|
||||||
phase_mechanical_Fi(ph)%data(1:3,1:3,en) = subFi0
|
phase_mechanical_Fi(ph)%data(1:3,1:3,en) = subFi0
|
||||||
phase_mechanical_S(ph)%data(1:3,1:3,en) = phase_mechanical_S0(ph)%data(1:3,1:3,en)
|
phase_mechanical_S(ph)%data(1:3,1:3,en) = phase_mechanical_S0(ph)%data(1:3,1:3,en)
|
||||||
if (subStep < 1.0_pREAL) then ! actual (not initial) cutback
|
if (step < 1.0_pREAL) then ! actual (not initial) cutback
|
||||||
phase_mechanical_Lp(ph)%data(1:3,1:3,en) = subLp0
|
phase_mechanical_Lp(ph)%data(1:3,1:3,en) = subLp0
|
||||||
phase_mechanical_Li(ph)%data(1:3,1:3,en) = subLi0
|
phase_mechanical_Li(ph)%data(1:3,1:3,en) = subLi0
|
||||||
end if
|
end if
|
||||||
plasticState(ph)%state(:,en) = subState0
|
plasticState(ph)%state(:,en) = subState0
|
||||||
todo = subStep > num%subStepMinCryst ! still on track or already done (beyond repair)
|
todo = step > num%stepMinCryst ! still on track or already done (beyond repair)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -1096,8 +1096,8 @@ module function phase_mechanical_constitutive(Delta_t,co,ce) result(converged_)
|
||||||
if (todo) then
|
if (todo) then
|
||||||
sizeDotState = plasticState(ph)%sizeDotState
|
sizeDotState = plasticState(ph)%sizeDotState
|
||||||
subF = subF0 &
|
subF = subF0 &
|
||||||
+ subStep * (phase_mechanical_F(ph)%data(1:3,1:3,en) - phase_mechanical_F0(ph)%data(1:3,1:3,en))
|
+ step * (phase_mechanical_F(ph)%data(1:3,1:3,en) - phase_mechanical_F0(ph)%data(1:3,1:3,en))
|
||||||
converged_ = .not. integrateState(subF0,subF,subFp0,subFi0,subState0(1:sizeDotState),subStep * Delta_t,ph,en)
|
converged_ = .not. integrateState(subF0,subF,subFp0,subFi0,subState0(1:sizeDotState),step * Delta_t,ph,en)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end do cutbackLooping
|
end do cutbackLooping
|
||||||
|
|
Loading…
Reference in New Issue