figuring out "instance" and "of" centrally
This commit is contained in:
parent
8f99f1ce61
commit
b53cda6411
|
@ -538,6 +538,9 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, S6, Fi, ipc, ip, e
|
||||||
math_mul33x33, &
|
math_mul33x33, &
|
||||||
math_Mandel6to33
|
math_Mandel6to33
|
||||||
use material, only: &
|
use material, only: &
|
||||||
|
phasememberAt, &
|
||||||
|
phase_plasticity, &
|
||||||
|
phase_plasticityInstance, &
|
||||||
phase_plasticity, &
|
phase_plasticity, &
|
||||||
material_phase, &
|
material_phase, &
|
||||||
phase_kinematics, &
|
phase_kinematics, &
|
||||||
|
@ -569,19 +572,18 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, S6, Fi, ipc, ip, e
|
||||||
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
real(pReal), intent(out), dimension(3,3,3,3) :: &
|
||||||
dLi_dS, & !< derivative of Li with respect to S
|
dLi_dS, & !< derivative of Li with respect to S
|
||||||
dLi_dFi
|
dLi_dFi
|
||||||
|
|
||||||
real(pReal), dimension(3,3) :: &
|
real(pReal), dimension(3,3) :: &
|
||||||
my_Li !< intermediate velocity gradient
|
my_Li, & !< intermediate velocity gradient
|
||||||
real(pReal), dimension(3,3,3,3) :: &
|
|
||||||
my_dLi_dS
|
|
||||||
real(pReal), dimension(3,3) :: &
|
|
||||||
FiInv, &
|
FiInv, &
|
||||||
temp_33
|
temp_33
|
||||||
|
real(pReal), dimension(3,3,3,3) :: &
|
||||||
|
my_dLi_dS
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
detFi
|
detFi
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
k !< counter in kinematics loop
|
k, i, j, &
|
||||||
integer(pInt) :: &
|
instance, of
|
||||||
i, j
|
|
||||||
|
|
||||||
Li = 0.0_pReal
|
Li = 0.0_pReal
|
||||||
dLi_dS = 0.0_pReal
|
dLi_dS = 0.0_pReal
|
||||||
|
@ -589,7 +591,9 @@ subroutine constitutive_LiAndItsTangents(Li, dLi_dS, dLi_dFi, S6, Fi, ipc, ip, e
|
||||||
|
|
||||||
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_LiAndItsTangent(my_Li, my_dLi_dS, math_Mandel6to33(S6), ipc, ip, el)
|
of = phasememberAt(ipc,ip,el)
|
||||||
|
instance = phase_plasticityInstance(material_phase(ipc,ip,el))
|
||||||
|
call plastic_isotropic_LiAndItsTangent(my_Li, my_dLi_dS, math_Mandel6to33(S6),instance,of)
|
||||||
case default plasticityType
|
case default plasticityType
|
||||||
my_Li = 0.0_pReal
|
my_Li = 0.0_pReal
|
||||||
my_dLi_dS = 0.0_pReal
|
my_dLi_dS = 0.0_pReal
|
||||||
|
|
|
@ -314,46 +314,37 @@ subroutine plastic_isotropic_LpAndItsTangent(Lp,dLp_dMp,Mp,ipc,ip,el)
|
||||||
end associate
|
end associate
|
||||||
end subroutine plastic_isotropic_LpAndItsTangent
|
end subroutine plastic_isotropic_LpAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief calculates plastic velocity gradient and its tangent
|
!> @brief calculates plastic velocity gradient and its tangent
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,ipc,ip,el)
|
subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,instance,of)
|
||||||
use math, only: &
|
use math, only: &
|
||||||
math_mul6x6, &
|
|
||||||
math_Mandel6to33, &
|
|
||||||
math_Plain3333to99, &
|
|
||||||
math_spherical33, &
|
math_spherical33, &
|
||||||
math_mul33xx33
|
math_mul33xx33
|
||||||
use material, only: &
|
|
||||||
phasememberAt, &
|
|
||||||
material_phase, &
|
|
||||||
phase_plasticityInstance
|
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
real(pReal), dimension(3,3), intent(out) :: &
|
real(pReal), dimension(3,3), intent(out) :: &
|
||||||
Li !< plastic velocity gradient
|
Li !< inleastic velocity gradient
|
||||||
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
real(pReal), dimension(3,3,3,3), intent(out) :: &
|
||||||
dLi_dTstar !< derivative of Li with respect to Tstar as 4th order tensor
|
dLi_dTstar !< derivative of Li with respect to the Mandel stress
|
||||||
|
|
||||||
real(pReal), dimension(3,3), intent(in) :: &
|
real(pReal), dimension(3,3), intent(in) :: &
|
||||||
Tstar !< 2nd Piola Kirchhoff stress tensor in Mandel notation
|
Tstar !< 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(3,3) :: &
|
real(pReal), dimension(3,3) :: &
|
||||||
Tstar_sph !< sphiatoric part of the 2nd Piola Kirchhoff stress tensor as 2nd order tensor
|
Tstar_sph !< sphiatoric part of the Mandel stress
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
gamma_dot, & !< strainrate
|
gamma_dot, & !< strainrate
|
||||||
norm_Tstar_sph, & !< euclidean norm of Tstar_sph
|
norm_Tstar_sph, & !< euclidean norm of Tstar_sph
|
||||||
squarenorm_Tstar_sph !< square of the euclidean norm of Tstar_sph
|
squarenorm_Tstar_sph !< square of the euclidean norm of Tstar_sph
|
||||||
integer(pInt) :: &
|
integer(pInt) :: &
|
||||||
instance, of, &
|
|
||||||
k, l, m, n
|
k, l, m, n
|
||||||
|
|
||||||
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))
|
|
||||||
|
|
||||||
Tstar_sph = math_spherical33(Tstar)
|
Tstar_sph = math_spherical33(Tstar)
|
||||||
squarenorm_Tstar_sph = math_mul33xx33(Tstar_sph,Tstar_sph)
|
squarenorm_Tstar_sph = math_mul33xx33(Tstar_sph,Tstar_sph)
|
||||||
|
@ -361,8 +352,7 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,ipc,ip,el)
|
||||||
|
|
||||||
if (prm%dilatation .and. norm_Tstar_sph > 0.0_pReal) then ! Tstar == 0 or J2 plascitiy --> both Li and dLi_dTstar are zero
|
if (prm%dilatation .and. norm_Tstar_sph > 0.0_pReal) then ! Tstar == 0 or J2 plascitiy --> both Li and dLi_dTstar are zero
|
||||||
gamma_dot = prm%gdot0 &
|
gamma_dot = prm%gdot0 &
|
||||||
* (sqrt(1.5_pReal) * norm_Tstar_sph / prm%fTaylor / state(instance)%flowstress(of) ) &
|
* (sqrt(1.5_pReal) * norm_Tstar_sph / prm%fTaylor / stt%flowstress(of) ) **prm%n
|
||||||
**prm%n
|
|
||||||
|
|
||||||
Li = Tstar_sph/norm_Tstar_sph * gamma_dot/prm%fTaylor
|
Li = Tstar_sph/norm_Tstar_sph * gamma_dot/prm%fTaylor
|
||||||
|
|
||||||
|
@ -380,6 +370,7 @@ subroutine plastic_isotropic_LiAndItsTangent(Li,dLi_dTstar,Tstar,ipc,ip,el)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
end subroutine plastic_isotropic_LiAndItsTangent
|
end subroutine plastic_isotropic_LiAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue