This commit is contained in:
Martin Diehl 2021-01-27 08:45:54 +01:00
parent 4f4adf7d68
commit 52d7d37401
3 changed files with 21 additions and 38 deletions

View File

@ -19,13 +19,6 @@ module phase
implicit none implicit none
private private
enum, bind(c); enumerator :: &
KINEMATICS_UNDEFINED_ID ,&
KINEMATICS_CLEAVAGE_OPENING_ID, &
KINEMATICS_SLIPPLANE_OPENING_ID, &
KINEMATICS_THERMAL_EXPANSION_ID
end enum
type(rotation), dimension(:,:,:), allocatable :: & type(rotation), dimension(:,:,:), allocatable :: &
crystallite_orientation !< current orientation crystallite_orientation !< current orientation
@ -64,10 +57,6 @@ module phase
type(tDebugOptions) :: debugCrystallite type(tDebugOptions) :: debugCrystallite
integer(kind(KINEMATICS_UNDEFINED_ID)), dimension(:,:), allocatable :: &
phase_kinematics !< active kinematic mechanisms of each phase
integer, dimension(:), allocatable, public :: & !< ToDo: should be protected (bug in Intel compiler) integer, dimension(:), allocatable, public :: & !< ToDo: should be protected (bug in Intel compiler)
thermal_Nsources, & thermal_Nsources, &
phase_Nsources, & !< number of source mechanisms active in each phase phase_Nsources, & !< number of source mechanisms active in each phase
@ -317,15 +306,10 @@ module phase
constitutive_mech_getP, & constitutive_mech_getP, &
constitutive_mech_setF, & constitutive_mech_setF, &
constitutive_mech_getF, & constitutive_mech_getF, &
constitutive_windForward, & constitutive_windForward
KINEMATICS_UNDEFINED_ID ,&
KINEMATICS_CLEAVAGE_OPENING_ID, &
KINEMATICS_SLIPPLANE_OPENING_ID, &
KINEMATICS_THERMAL_EXPANSION_ID
contains contains
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Initialze constitutive models for individual physics !> @brief Initialze constitutive models for individual physics
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -15,9 +15,15 @@ submodule(phase) mechanics
PLASTICITY_KINEHARDENING_ID, & PLASTICITY_KINEHARDENING_ID, &
PLASTICITY_DISLOTWIN_ID, & PLASTICITY_DISLOTWIN_ID, &
PLASTICITY_DISLOTUNGSTEN_ID, & PLASTICITY_DISLOTUNGSTEN_ID, &
PLASTICITY_NONLOCAL_ID PLASTICITY_NONLOCAL_ID, &
KINEMATICS_UNDEFINED_ID, &
KINEMATICS_CLEAVAGE_OPENING_ID, &
KINEMATICS_SLIPPLANE_OPENING_ID, &
KINEMATICS_THERMAL_EXPANSION_ID
end enum end enum
integer(kind(KINEMATICS_UNDEFINED_ID)), dimension(:,:), allocatable :: &
phase_kinematics
integer(kind(ELASTICITY_UNDEFINED_ID)), dimension(:), allocatable :: & integer(kind(ELASTICITY_UNDEFINED_ID)), dimension(:), allocatable :: &
phase_elasticity !< elasticity of each phase phase_elasticity !< elasticity of each phase
integer(kind(STIFFNESS_DEGRADATION_UNDEFINED_ID)), dimension(:,:), allocatable :: & integer(kind(STIFFNESS_DEGRADATION_UNDEFINED_ID)), dimension(:,:), allocatable :: &
@ -53,8 +59,6 @@ submodule(phase) mechanics
end subroutine eigendeformation_init end subroutine eigendeformation_init
module subroutine plastic_init module subroutine plastic_init
end subroutine plastic_init end subroutine plastic_init
module subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dMi,Mi,instance,me) module subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dMi,Mi,instance,me)
@ -82,17 +86,15 @@ submodule(phase) mechanics
logical :: broken logical :: broken
end function plastic_dotState end function plastic_dotState
module function plastic_deltaState(co, ip, el, ph, of) result(broken) module function plastic_deltaState(co, ip, el, ph, me) result(broken)
integer, intent(in) :: & integer, intent(in) :: &
co, & !< component-ID of integration point co, & !< component-ID of integration point
ip, & !< integration point ip, & !< integration point
el, & !< element el, & !< element
ph, & ph, &
of me
logical :: & logical :: &
broken broken
end function plastic_deltaState end function plastic_deltaState
module subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, & module subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, &
@ -346,9 +348,6 @@ module subroutine mech_init(phases)
end subroutine mech_init end subroutine mech_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to !> @brief returns the 2nd Piola-Kirchhoff stress tensor and its tangent with respect to
!> the elastic and intermediate deformation gradients using Hooke's law !> the elastic and intermediate deformation gradients using Hooke's law

View File

@ -388,14 +388,14 @@ end subroutine plastic_dependentState
!> @brief for constitutive models having an instantaneous change of state !> @brief for constitutive models having an instantaneous change of state
!> will return false if delta state is not needed/supported by the constitutive model !> will return false if delta state is not needed/supported by the constitutive model
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function plastic_deltaState(co, ip, el, ph, of) result(broken) module function plastic_deltaState(co, ip, el, ph, me) result(broken)
integer, intent(in) :: & integer, intent(in) :: &
co, & !< component-ID of integration point co, & !< component-ID of integration point
ip, & !< integration point ip, & !< integration point
el, & !< element el, & !< element
ph, & ph, &
of me
logical :: & logical :: &
broken broken
@ -407,19 +407,19 @@ module function plastic_deltaState(co, ip, el, ph, of) result(broken)
mySize mySize
Mp = matmul(matmul(transpose(constitutive_mech_Fi(ph)%data(1:3,1:3,of)),& Mp = matmul(matmul(transpose(constitutive_mech_Fi(ph)%data(1:3,1:3,me)),&
constitutive_mech_Fi(ph)%data(1:3,1:3,of)),constitutive_mech_S(ph)%data(1:3,1:3,of)) constitutive_mech_Fi(ph)%data(1:3,1:3,me)),constitutive_mech_S(ph)%data(1:3,1:3,me))
instance = phase_plasticityInstance(ph) instance = phase_plasticityInstance(ph)
plasticityType: select case (phase_plasticity(ph)) plasticityType: select case (phase_plasticity(ph))
case (PLASTICITY_KINEHARDENING_ID) plasticityType case (PLASTICITY_KINEHARDENING_ID) plasticityType
call plastic_kinehardening_deltaState(Mp,instance,of) call plastic_kinehardening_deltaState(Mp,instance,me)
broken = any(IEEE_is_NaN(plasticState(ph)%deltaState(:,of))) broken = any(IEEE_is_NaN(plasticState(ph)%deltaState(:,me)))
case (PLASTICITY_NONLOCAL_ID) plasticityType case (PLASTICITY_NONLOCAL_ID) plasticityType
call plastic_nonlocal_deltaState(Mp,instance,of,ip,el) call plastic_nonlocal_deltaState(Mp,instance,me,ip,el)
broken = any(IEEE_is_NaN(plasticState(ph)%deltaState(:,of))) broken = any(IEEE_is_NaN(plasticState(ph)%deltaState(:,me)))
case default case default
broken = .false. broken = .false.
@ -432,8 +432,8 @@ module function plastic_deltaState(co, ip, el, ph, of) result(broken)
myOffset = plasticState(ph)%offsetDeltaState myOffset = plasticState(ph)%offsetDeltaState
mySize = plasticState(ph)%sizeDeltaState mySize = plasticState(ph)%sizeDeltaState
plasticState(ph)%state(myOffset + 1:myOffset + mySize,of) = & plasticState(ph)%state(myOffset + 1:myOffset + mySize,me) = &
plasticState(ph)%state(myOffset + 1:myOffset + mySize,of) + plasticState(ph)%deltaState(1:mySize,of) plasticState(ph)%state(myOffset + 1:myOffset + mySize,me) + plasticState(ph)%deltaState(1:mySize,me)
end select end select
endif endif