simplifying

This commit is contained in:
Martin Diehl 2018-12-30 15:14:43 +01:00
parent e217ce3a25
commit 311b8be715
3 changed files with 26 additions and 48 deletions

View File

@ -861,7 +861,7 @@ subroutine constitutive_collectDotState(S6, FeArray, Fi, FpArray, subdt, subfrac
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el))) plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_ISOTROPIC_ID) plasticityType case (PLASTICITY_ISOTROPIC_ID) plasticityType
call plastic_isotropic_dotState (Mp,ipc,ip,el) call plastic_isotropic_dotState (Mp,instance,of)
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)
@ -1073,8 +1073,10 @@ function constitutive_postResults(S6, Fi, FeArray, ipc, ip, el)
plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el))) plasticityType: select case (phase_plasticity(material_phase(ipc,ip,el)))
case (PLASTICITY_ISOTROPIC_ID) plasticityType case (PLASTICITY_ISOTROPIC_ID) plasticityType
of = phasememberAt(ipc,ip,el)
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
constitutive_postResults(startPos:endPos) = & constitutive_postResults(startPos:endPos) = &
plastic_isotropic_postResults(Mp,ipc,ip,el) plastic_isotropic_postResults(Mp,instance,of)
case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType case (PLASTICITY_PHENOPOWERLAW_ID) plasticityType
of = phasememberAt(ipc,ip,el) of = phasememberAt(ipc,ip,el)

View File

@ -374,35 +374,27 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief calculates the rate of change of microstructure !> @brief calculates the rate of change of microstructure
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine plastic_isotropic_dotState(Mp,ipc,ip,el) subroutine plastic_isotropic_dotState(Mp,instance,of)
use prec, only: & use prec, only: &
dEq0 dEq0
use math, only: & use math, only: &
math_mul33xx33, & math_mul33xx33, &
math_deviatoric33 math_deviatoric33
use material, only: &
phasememberAt, &
material_phase, &
phase_plasticityInstance
implicit none implicit none
real(pReal), dimension(3,3), intent(in) :: & real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress Mp !< Mandel stress
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point instance, &
ip, & !< integration point of
el !< element
real(pReal) :: & real(pReal) :: &
gamma_dot, & !< strainrate gamma_dot, & !< strainrate
hardening, & !< hardening coefficient hardening, & !< hardening coefficient
saturation, & !< saturation flowstress saturation, & !< saturation flowstress
norm_Mp !< norm of the Mandel stress norm_Mp !< norm of the Mandel stress
integer(pInt) :: &
instance, &
of !< shortcut notation for offset position in state array
of = phasememberAt(ipc,ip,el) ! phasememberAt should be tackled by material and be renamed to material_phasemember
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
associate(prm => param(instance), stt => state(instance), dot => dotState(instance)) associate(prm => param(instance), stt => state(instance), dot => dotState(instance))
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
@ -444,39 +436,27 @@ end subroutine plastic_isotropic_dotState
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of constitutive results !> @brief return array of constitutive results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function plastic_isotropic_postResults(Mp,ipc,ip,el) function plastic_isotropic_postResults(Mp,instance,of) result(postResults)
use math, only: & use math, only: &
math_mul33xx33, & math_mul33xx33, &
math_deviatoric33 math_deviatoric33
use material, only: &
plasticState, &
material_phase, &
phasememberAt, &
phase_plasticityInstance
implicit none implicit none
real(pReal), dimension(3,3), intent(in) :: & real(pReal), dimension(3,3), intent(in) :: &
Mp !< Mandel stress Mp !< Mandel stress
integer(pInt), intent(in) :: & integer(pInt), intent(in) :: &
ipc, & !< component-ID of integration point instance, &
ip, & !< integration point of
el !< element
real(pReal), dimension(sum(plastic_isotropic_sizePostResult(:,phase_plasticityInstance(material_phase(ipc,ip,el))))) :: &
plastic_isotropic_postResults
real(pReal), dimension(sum(plastic_isotropic_sizePostResult(:,instance))) :: &
postResults
real(pReal) :: & real(pReal) :: &
norm_Mp !< norm of the Mandel stress norm_Mp !< norm of the Mandel stress
integer(pInt) :: & integer(pInt) :: &
instance, & !< instance of my instance (unique number of my constitutive model) o,c
of, & !< shortcut notation for offset position in state array
c, &
o
of = phasememberAt(ipc,ip,el) ! phasememberAt should be tackled by material and be renamed to material_phasemember associate(prm => param(instance), stt => state(instance))
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
associate(prm => param(instance))
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! norm of (deviatoric) Mandel stress ! norm of (deviatoric) Mandel stress
@ -487,18 +467,15 @@ function plastic_isotropic_postResults(Mp,ipc,ip,el)
endif endif
c = 0_pInt c = 0_pInt
plastic_isotropic_postResults = 0.0_pReal
outputsLoop: do o = 1_pInt,size(prm%outputID) outputsLoop: do o = 1_pInt,size(prm%outputID)
select case(prm%outputID(o)) select case(prm%outputID(o))
case (flowstress_ID) case (flowstress_ID)
plastic_isotropic_postResults(c+1_pInt) = state(instance)%flowstress(of) postResults(c+1_pInt) = stt%flowstress(of)
c = c + 1_pInt c = c + 1_pInt
case (strainrate_ID) case (strainrate_ID)
plastic_isotropic_postResults(c+1_pInt) = & postResults(c+1_pInt) = prm%gdot0 &
prm%gdot0 * ( sqrt(1.5_pReal) * norm_Mp & * (sqrt(1.5_pReal) * norm_Mp /(prm%fTaylor * stt%flowstress(of)))**prm%n
/ &!----------------------------------------------------------------------------------
(prm%fTaylor * state(instance)%flowstress(of)) ) ** prm%n
c = c + 1_pInt c = c + 1_pInt
end select end select
enddo outputsLoop enddo outputsLoop

View File

@ -532,7 +532,6 @@ function plastic_phenopowerlaw_postResults(Mp,instance,of) result(postResults)
real(pReal), dimension(param(instance)%totalNslip) :: & real(pReal), dimension(param(instance)%totalNslip) :: &
gdot_slip_pos,gdot_slip_neg gdot_slip_pos,gdot_slip_neg
postResults = 0.0_pReal
c = 0_pInt c = 0_pInt
associate( prm => param(instance), stt => state(instance)) associate( prm => param(instance), stt => state(instance))