diff --git a/src/phase.f90 b/src/phase.f90 index e8cddfb25..65fb7a859 100644 --- a/src/phase.f90 +++ b/src/phase.f90 @@ -313,12 +313,12 @@ module constitutive dLi_dTstar !< derivative of Li with respect to Tstar (4th-order tensor defined to be zero) end subroutine kinematics_thermal_expansion_LiAndItsTangent - module subroutine constitutive_plastic_dependentState(co,ip,el) + module subroutine plastic_dependentState(co,ip,el) integer, intent(in) :: & co, & !< component-ID of integration point ip, & !< integration point el !< element - end subroutine constitutive_plastic_dependentState + end subroutine plastic_dependentState end interface @@ -630,7 +630,7 @@ subroutine crystallite_init() ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) call crystallite_orientations(co,ip,el) - call constitutive_plastic_dependentState(co,ip,el) ! update dependent state variables to be consistent with basic states + call plastic_dependentState(co,ip,el) ! update dependent state variables to be consistent with basic states enddo enddo enddo diff --git a/src/phase_mechanics.f90 b/src/phase_mechanics.f90 index cfc211cc0..e37712e40 100644 --- a/src/phase_mechanics.f90 +++ b/src/phase_mechanics.f90 @@ -83,7 +83,7 @@ submodule(constitutive) constitutive_mech myPlasticity end function plastic_nonlocal_init - module function mech_collectDotState(subdt,co,ip,el,ph,me) result(broken) + module function plastic_dotState(subdt,co,ip,el,ph,me) result(broken) integer, intent(in) :: & co, & !< component-ID of integration point @@ -94,9 +94,9 @@ submodule(constitutive) constitutive_mech real(pReal), intent(in) :: & subdt !< timestep logical :: broken - end function mech_collectDotState + end function plastic_dotState - module function constitutive_deltaState(co, ip, el, ph, of) result(broken) + module function plastic_deltaState(co, ip, el, ph, of) result(broken) integer, intent(in) :: & co, & !< component-ID of integration point @@ -107,7 +107,7 @@ submodule(constitutive) constitutive_mech logical :: & broken - end function constitutive_deltaState + end function plastic_deltaState module subroutine plastic_LpAndItsTangents(Lp, dLp_dS, dLp_dFi, & @@ -445,17 +445,6 @@ subroutine constitutive_hooke_SandItsTangents(S, dS_dFe, dS_dFi, & end subroutine constitutive_hooke_SandItsTangents - - - - - - - - - - - module subroutine mech_results(group,ph) character(len=*), intent(in) :: group @@ -562,7 +551,7 @@ function integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) result(broken) ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) - call constitutive_plastic_dependentState(co,ip,el) + call plastic_dependentState(co,ip,el) Lpguess = constitutive_mech_Lp(ph)%data(1:3,1:3,me) ! take as first guess Liguess = constitutive_mech_Li(ph)%data(1:3,1:3,me) ! take as first guess @@ -738,7 +727,7 @@ function integrateStateFPI(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el) resul ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) - broken = mech_collectDotState(Delta_t, co,ip,el,ph,me) + broken = plastic_dotState(Delta_t, co,ip,el,ph,me) if(broken) return sizeDotState = plasticState(ph)%sizeDotState @@ -754,7 +743,7 @@ function integrateStateFPI(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el) resul broken = integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) if(broken) exit iteration - broken = mech_collectDotState(Delta_t, co,ip,el,ph,me) + broken = plastic_dotState(Delta_t, co,ip,el,ph,me) if(broken) exit iteration zeta = damper(plasticState(ph)%dotState(:,me),dotState(1:sizeDotState,1),& @@ -767,7 +756,7 @@ function integrateStateFPI(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el) resul plasticState(ph)%state(1:sizeDotState,me) = plasticState(ph)%state(1:sizeDotState,me) & - r(1:sizeDotState) if (converged(r(1:sizeDotState),plasticState(ph)%state(1:sizeDotState,me),plasticState(ph)%atol(1:sizeDotState))) then - broken = constitutive_deltaState(co,ip,el,ph,me) + broken = plastic_deltaState(co,ip,el,ph,me) exit iteration endif @@ -823,14 +812,14 @@ function integrateStateEuler(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el) res ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) - broken = mech_collectDotState(Delta_t, co,ip,el,ph,me) + broken = plastic_dotState(Delta_t, co,ip,el,ph,me) if(broken) return sizeDotState = plasticState(ph)%sizeDotState plasticState(ph)%state(1:sizeDotState,me) = subState0 & + plasticState(ph)%dotState(1:sizeDotState,me) * Delta_t - broken = constitutive_deltaState(co,ip,el,ph,me) + broken = plastic_deltaState(co,ip,el,ph,me) if(broken) return broken = integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) @@ -863,7 +852,7 @@ function integrateStateAdaptiveEuler(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) - broken = mech_collectDotState(Delta_t, co,ip,el,ph,me) + broken = plastic_dotState(Delta_t, co,ip,el,ph,me) if(broken) return sizeDotState = plasticState(ph)%sizeDotState @@ -872,13 +861,13 @@ function integrateStateAdaptiveEuler(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip plasticState(ph)%state(1:sizeDotState,me) = subState0 & + plasticState(ph)%dotstate(1:sizeDotState,me) * Delta_t - broken = constitutive_deltaState(co,ip,el,ph,me) + broken = plastic_deltaState(co,ip,el,ph,me) if(broken) return broken = integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) if(broken) return - broken = mech_collectDotState(Delta_t, co,ip,el,ph,me) + broken = plastic_dotState(Delta_t, co,ip,el,ph,me) if(broken) return broken = .not. converged(residuum_plastic(1:sizeDotState) + 0.5_pReal * plasticState(ph)%dotState(:,me) * Delta_t, & @@ -981,7 +970,7 @@ function integrateStateRK(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el,A,B,C,D ph = material_phaseAt(co,el) me = material_phaseMemberAt(co,ip,el) - broken = mech_collectDotState(Delta_t,co,ip,el,ph,me) + broken = plastic_dotState(Delta_t,co,ip,el,ph,me) if(broken) return sizeDotState = plasticState(ph)%sizeDotState @@ -1002,7 +991,7 @@ function integrateStateRK(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el,A,B,C,D broken = integrateStress(F_0 + (F - F_0) * Delta_t * C(stage),subFp0,subFi0,Delta_t * C(stage),co,ip,el) if(broken) exit - broken = mech_collectDotState(Delta_t*C(stage),co,ip,el,ph,me) + broken = plastic_dotState(Delta_t*C(stage),co,ip,el,ph,me) if(broken) exit enddo @@ -1021,7 +1010,7 @@ function integrateStateRK(F_0,F,subFp0,subFi0,subState0,Delta_t,co,ip,el,A,B,C,D if(broken) return - broken = constitutive_deltaState(co,ip,el,ph,me) + broken = plastic_deltaState(co,ip,el,ph,me) if(broken) return broken = integrateStress(F,subFp0,subFi0,Delta_t,co,ip,el) diff --git a/src/phase_mechanics_plastic.f90 b/src/phase_mechanics_plastic.f90 index ef8c356e5..a8ebe9ea2 100644 --- a/src/phase_mechanics_plastic.f90 +++ b/src/phase_mechanics_plastic.f90 @@ -87,21 +87,21 @@ submodule(constitutive:constitutive_mech) plastic end subroutine nonlocal_LpAndItsTangent - module subroutine plastic_isotropic_dotState(Mp,instance,me) + module subroutine isotropic_dotState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress integer, intent(in) :: & instance, & me - end subroutine plastic_isotropic_dotState + end subroutine isotropic_dotState - module subroutine plastic_phenopowerlaw_dotState(Mp,instance,me) + module subroutine phenopowerlaw_dotState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress integer, intent(in) :: & instance, & me - end subroutine plastic_phenopowerlaw_dotState + end subroutine phenopowerlaw_dotState module subroutine plastic_kinehardening_dotState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & @@ -111,7 +111,7 @@ submodule(constitutive:constitutive_mech) plastic me end subroutine plastic_kinehardening_dotState - module subroutine plastic_dislotwin_dotState(Mp,T,instance,me) + module subroutine dislotwin_dotState(Mp,T,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress real(pReal), intent(in) :: & @@ -119,9 +119,9 @@ submodule(constitutive:constitutive_mech) plastic integer, intent(in) :: & instance, & me - end subroutine plastic_dislotwin_dotState + end subroutine dislotwin_dotState - module subroutine plastic_disloTungsten_dotState(Mp,T,instance,me) + module subroutine dislotungsten_dotState(Mp,T,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress real(pReal), intent(in) :: & @@ -129,9 +129,9 @@ submodule(constitutive:constitutive_mech) plastic integer, intent(in) :: & instance, & me - end subroutine plastic_disloTungsten_dotState + end subroutine dislotungsten_dotState - module subroutine plastic_nonlocal_dotState(Mp,Temperature,timestep,instance,me,ip,el) + module subroutine nonlocal_dotState(Mp,Temperature,timestep,instance,me,ip,el) real(pReal), dimension(3,3), intent(in) :: & Mp !< MandelStress real(pReal), intent(in) :: & @@ -142,29 +142,29 @@ submodule(constitutive:constitutive_mech) plastic me, & ip, & !< current integration point el !< current element number - end subroutine plastic_nonlocal_dotState + end subroutine nonlocal_dotState - module subroutine plastic_dislotwin_dependentState(T,instance,me) + module subroutine dislotwin_dependentState(T,instance,me) integer, intent(in) :: & instance, & me real(pReal), intent(in) :: & T - end subroutine plastic_dislotwin_dependentState + end subroutine dislotwin_dependentState - module subroutine plastic_dislotungsten_dependentState(instance,me) + module subroutine dislotungsten_dependentState(instance,me) integer, intent(in) :: & instance, & me - end subroutine plastic_dislotungsten_dependentState + end subroutine dislotungsten_dependentState - module subroutine plastic_nonlocal_dependentState(instance, me, ip, el) + module subroutine nonlocal_dependentState(instance, me, ip, el) integer, intent(in) :: & instance, & me, & ip, & !< current integration point el !< current element number - end subroutine plastic_nonlocal_dependentState + end subroutine nonlocal_dependentState module subroutine plastic_kinehardening_deltaState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & @@ -259,7 +259,7 @@ end subroutine plastic_LpAndItsTangents !-------------------------------------------------------------------------------------------------- !> @brief contains the constitutive equation for calculating the rate of change of microstructure !-------------------------------------------------------------------------------------------------- -module function mech_collectDotState(subdt,co,ip,el,ph,me) result(broken) +module function plastic_dotState(subdt,co,ip,el,ph,me) result(broken) integer, intent(in) :: & co, & !< component-ID of integration point @@ -284,33 +284,33 @@ module function mech_collectDotState(subdt,co,ip,el,ph,me) result(broken) plasticityType: select case (phase_plasticity(ph)) case (PLASTICITY_ISOTROPIC_ID) plasticityType - call plastic_isotropic_dotState(Mp,instance,me) + call isotropic_dotState(Mp,instance,me) case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType - call plastic_phenopowerlaw_dotState(Mp,instance,me) + call phenopowerlaw_dotState(Mp,instance,me) case (PLASTICITY_KINEHARDENING_ID) plasticityType call plastic_kinehardening_dotState(Mp,instance,me) case (PLASTICITY_DISLOTWIN_ID) plasticityType - call plastic_dislotwin_dotState(Mp,thermal_T(ph,me),instance,me) + call dislotwin_dotState(Mp,thermal_T(ph,me),instance,me) case (PLASTICITY_DISLOTUNGSTEN_ID) plasticityType - call plastic_disloTungsten_dotState(Mp,thermal_T(ph,me),instance,me) + call dislotungsten_dotState(Mp,thermal_T(ph,me),instance,me) case (PLASTICITY_NONLOCAL_ID) plasticityType - call plastic_nonlocal_dotState(Mp,thermal_T(ph,me),subdt,instance,me,ip,el) + call nonlocal_dotState(Mp,thermal_T(ph,me),subdt,instance,me,ip,el) end select plasticityType broken = any(IEEE_is_NaN(plasticState(ph)%dotState(:,me))) -end function mech_collectDotState +end function plastic_dotState !-------------------------------------------------------------------------------------------------- !> @brief calls microstructure function of the different plasticity constitutive models !-------------------------------------------------------------------------------------------------- -module subroutine constitutive_plastic_dependentState(co, ip, el) +module subroutine plastic_dependentState(co, ip, el) integer, intent(in) :: & co, & !< component-ID of integration point @@ -329,24 +329,24 @@ module subroutine constitutive_plastic_dependentState(co, ip, el) plasticityType: select case (phase_plasticity(material_phaseAt(co,el))) case (PLASTICITY_DISLOTWIN_ID) plasticityType - call plastic_dislotwin_dependentState(thermal_T(ph,me),instance,me) + call dislotwin_dependentState(thermal_T(ph,me),instance,me) case (PLASTICITY_DISLOTUNGSTEN_ID) plasticityType - call plastic_dislotungsten_dependentState(instance,me) + call dislotungsten_dependentState(instance,me) case (PLASTICITY_NONLOCAL_ID) plasticityType - call plastic_nonlocal_dependentState(instance,me,ip,el) + call nonlocal_dependentState(instance,me,ip,el) end select plasticityType -end subroutine constitutive_plastic_dependentState +end subroutine plastic_dependentState !-------------------------------------------------------------------------------------------------- !> @brief for constitutive models having an instantaneous change of state !> will return false if delta state is not needed/supported by the constitutive model !-------------------------------------------------------------------------------------------------- -module function constitutive_deltaState(co, ip, el, ph, of) result(broken) +module function plastic_deltaState(co, ip, el, ph, of) result(broken) integer, intent(in) :: & co, & !< component-ID of integration point @@ -395,6 +395,6 @@ module function constitutive_deltaState(co, ip, el, ph, of) result(broken) end select endif -end function constitutive_deltaState +end function plastic_deltaState end submodule plastic diff --git a/src/phase_mechanics_plastic_dislotungsten.f90 b/src/phase_mechanics_plastic_dislotungsten.f90 index c85a86b65..33379aae2 100644 --- a/src/phase_mechanics_plastic_dislotungsten.f90 +++ b/src/phase_mechanics_plastic_dislotungsten.f90 @@ -315,7 +315,7 @@ end subroutine dislotungsten_LpAndItsTangent !-------------------------------------------------------------------------------------------------- !> @brief Calculate the rate of change of microstructure. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_dislotungsten_dotState(Mp,T,instance,me) +module subroutine dislotungsten_dotState(Mp,T,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress @@ -369,13 +369,13 @@ module subroutine plastic_dislotungsten_dotState(Mp,T,instance,me) end associate -end subroutine plastic_dislotungsten_dotState +end subroutine dislotungsten_dotState !-------------------------------------------------------------------------------------------------- !> @brief Calculate derived quantities from state. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_dislotungsten_dependentState(instance,me) +module subroutine dislotungsten_dependentState(instance,me) integer, intent(in) :: & instance, & @@ -394,7 +394,7 @@ module subroutine plastic_dislotungsten_dependentState(instance,me) end associate -end subroutine plastic_dislotungsten_dependentState +end subroutine dislotungsten_dependentState !-------------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanics_plastic_dislotwin.f90 b/src/phase_mechanics_plastic_dislotwin.f90 index 55827ae51..db15e73b0 100644 --- a/src/phase_mechanics_plastic_dislotwin.f90 +++ b/src/phase_mechanics_plastic_dislotwin.f90 @@ -634,7 +634,7 @@ end subroutine dislotwin_LpAndItsTangent !-------------------------------------------------------------------------------------------------- !> @brief Calculate the rate of change of microstructure. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_dislotwin_dotState(Mp,T,instance,me) +module subroutine dislotwin_dotState(Mp,T,instance,me) real(pReal), dimension(3,3), intent(in):: & Mp !< Mandel stress @@ -729,13 +729,13 @@ module subroutine plastic_dislotwin_dotState(Mp,T,instance,me) end associate -end subroutine plastic_dislotwin_dotState +end subroutine dislotwin_dotState !-------------------------------------------------------------------------------------------------- !> @brief Calculate derived quantities from state. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_dislotwin_dependentState(T,instance,me) +module subroutine dislotwin_dependentState(T,instance,me) integer, intent(in) :: & instance, & @@ -821,7 +821,7 @@ module subroutine plastic_dislotwin_dependentState(T,instance,me) end associate -end subroutine plastic_dislotwin_dependentState +end subroutine dislotwin_dependentState !-------------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanics_plastic_isotropic.f90 b/src/phase_mechanics_plastic_isotropic.f90 index 7508f172c..b79c14607 100644 --- a/src/phase_mechanics_plastic_isotropic.f90 +++ b/src/phase_mechanics_plastic_isotropic.f90 @@ -262,7 +262,7 @@ module subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dMi,Mi,instance,me) !-------------------------------------------------------------------------------------------------- !> @brief Calculate the rate of change of microstructure. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_isotropic_dotState(Mp,instance,me) +module subroutine isotropic_dotState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress @@ -305,7 +305,7 @@ module subroutine plastic_isotropic_dotState(Mp,instance,me) end associate -end subroutine plastic_isotropic_dotState +end subroutine isotropic_dotState !-------------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanics_plastic_nonlocal.f90 b/src/phase_mechanics_plastic_nonlocal.f90 index 4d952dfd4..4b44ee019 100644 --- a/src/phase_mechanics_plastic_nonlocal.f90 +++ b/src/phase_mechanics_plastic_nonlocal.f90 @@ -552,7 +552,7 @@ end function plastic_nonlocal_init !-------------------------------------------------------------------------------------------------- !> @brief calculates quantities characterizing the microstructure !-------------------------------------------------------------------------------------------------- -module subroutine plastic_nonlocal_dependentState(instance, me, ip, el) +module subroutine nonlocal_dependentState(instance, me, ip, el) integer, intent(in) :: & instance, & @@ -751,7 +751,7 @@ module subroutine plastic_nonlocal_dependentState(instance, me, ip, el) end associate -end subroutine plastic_nonlocal_dependentState +end subroutine nonlocal_dependentState !-------------------------------------------------------------------------------------------------- @@ -972,7 +972,7 @@ end subroutine plastic_nonlocal_deltaState !--------------------------------------------------------------------------------------------------- !> @brief calculates the rate of change of microstructure !--------------------------------------------------------------------------------------------------- -module subroutine plastic_nonlocal_dotState(Mp, Temperature,timestep, & +module subroutine nonlocal_dotState(Mp, Temperature,timestep, & instance,me,ip,el) real(pReal), dimension(3,3), intent(in) :: & @@ -1166,7 +1166,7 @@ module subroutine plastic_nonlocal_dotState(Mp, Temperature,timestep, & end associate -end subroutine plastic_nonlocal_dotState +end subroutine nonlocal_dotState !--------------------------------------------------------------------------------------------------- diff --git a/src/phase_mechanics_plastic_phenopowerlaw.f90 b/src/phase_mechanics_plastic_phenopowerlaw.f90 index 05cdf48ef..a0318d266 100644 --- a/src/phase_mechanics_plastic_phenopowerlaw.f90 +++ b/src/phase_mechanics_plastic_phenopowerlaw.f90 @@ -336,7 +336,7 @@ end subroutine phenopowerlaw_LpAndItsTangent !-------------------------------------------------------------------------------------------------- !> @brief Calculate the rate of change of microstructure. !-------------------------------------------------------------------------------------------------- -module subroutine plastic_phenopowerlaw_dotState(Mp,instance,me) +module subroutine phenopowerlaw_dotState(Mp,instance,me) real(pReal), dimension(3,3), intent(in) :: & Mp !< Mandel stress @@ -386,7 +386,7 @@ module subroutine plastic_phenopowerlaw_dotState(Mp,instance,me) + c_TwinTwin * matmul(prm%h_tw_tw,dot%gamma_twin(:,me)) end associate -end subroutine plastic_phenopowerlaw_dotState +end subroutine phenopowerlaw_dotState !--------------------------------------------------------------------------------------------------