From c7a746ddc14a23b8bdcf8321cd7403142071394b Mon Sep 17 00:00:00 2001
From: Pratheek Shanthraj
Date: Fri, 26 Sep 2014 20:49:25 +0000
Subject: [PATCH] constitutive dot state now takes Lp which is needed to the
thermal dot state. thermal problems should be working now
---
code/constitutive.f90 | 6 ++++--
code/crystallite.f90 | 27 ++++++++++++++++++---------
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/code/constitutive.f90 b/code/constitutive.f90
index 73c966e1c..ea65bed28 100644
--- a/code/constitutive.f90
+++ b/code/constitutive.f90
@@ -632,7 +632,7 @@ end subroutine constitutive_hooke_TandItsTangent
!--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the rate of change of microstructure
!--------------------------------------------------------------------------------------------------
-subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, Temperature, subdt, subfracArray,&
+subroutine constitutive_collectDotState(Tstar_v, Lp, FeArray, FpArray, Temperature, subdt, subfracArray,&
ipc, ip, el)
use prec, only: &
pReal, &
@@ -696,6 +696,8 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, Temperature,
FpArray !< plastic deformation gradient
real(pReal), intent(in), dimension(6) :: &
Tstar_v !< 2nd Piola Kirchhoff stress tensor (Mandel)
+ real(pReal), intent(in), dimension(3,3) :: &
+ Lp !< plastic velocity gradient
integer(pLongInt) :: &
tick, tock, &
tickrate, &
@@ -730,7 +732,7 @@ subroutine constitutive_collectDotState(Tstar_v, FeArray, FpArray, Temperature,
select case (phase_thermal(material_phase(ipc,ip,el)))
case (LOCAL_THERMAL_HEATGEN_ID)
- !call thermal_heatGen_dotState(Tstar_v, Lp, ipc, ip, el)
+ call thermal_heatGen_dotState(Tstar_v, Lp, ipc, ip, el)
end select
if (iand(debug_level(debug_constitutive), debug_levelBasic) /= 0_pInt) then
diff --git a/code/crystallite.f90 b/code/crystallite.f90
index efa526196..3cbcaa40a 100644
--- a/code/crystallite.f90
+++ b/code/crystallite.f90
@@ -1464,7 +1464,8 @@ subroutine crystallite_integrateStateRK4()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -1604,7 +1605,8 @@ subroutine crystallite_integrateStateRK4()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
timeStepFraction(n)*crystallite_subdt(g,i,e), & ! fraction of original timestep
crystallite_subFrac, g,i,e)
@@ -1775,7 +1777,8 @@ subroutine crystallite_integrateStateRKCK45()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -1922,7 +1925,8 @@ subroutine crystallite_integrateStateRKCK45()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
C(stage)*crystallite_subdt(g,i,e), & ! fraction of original timestep
crystallite_subFrac, g,i,e)
@@ -2286,7 +2290,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -2405,7 +2410,8 @@ subroutine crystallite_integrateStateAdaptiveEuler()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -2617,7 +2623,8 @@ eIter = FEsolving_execElem(1:2)
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -2884,7 +2891,8 @@ subroutine crystallite_integrateStateFPI()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo
@@ -2996,7 +3004,8 @@ subroutine crystallite_integrateStateFPI()
!$OMP DO
do e = eIter(1),eIter(2); do i = iIter(1,e),iIter(2,e); do g = gIter(1,e),gIter(2,e) ! iterate over elements, ips and grains
if (crystallite_todo(g,i,e) .and. .not. crystallite_converged(g,i,e)) &
- call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Fe, &
+ call constitutive_collectDotState(crystallite_Tstar_v(1:6,g,i,e), crystallite_Lp(1:3,1:3,g,i,e), &
+ crystallite_Fe, &
crystallite_Fp, crystallite_temperature(i,e), &
crystallite_subdt(g,i,e), crystallite_subFrac, g,i,e)
enddo; enddo; enddo