preparing for non-global variables
This commit is contained in:
parent
1b85dbea80
commit
7992ef474e
|
@ -235,15 +235,12 @@ module constitutive
|
|||
dPhiDot_dPhi
|
||||
end subroutine constitutive_damage_getRateAndItsTangents
|
||||
|
||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, S, Lp, ip, el)
|
||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
||||
integer, intent(in) :: &
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
real(pReal), intent(in) :: &
|
||||
T
|
||||
real(pReal), intent(in), dimension(:,:,:,:,:) :: &
|
||||
S, & !< current 2nd Piola Kitchoff stress vector
|
||||
Lp !< plastic velocity gradient
|
||||
real(pReal), intent(inout) :: &
|
||||
TDot, &
|
||||
dTDot_dT
|
||||
|
@ -392,6 +389,8 @@ module constitutive
|
|||
crystallite_push33ToRef, &
|
||||
crystallite_restartWrite, &
|
||||
integrateSourceState, &
|
||||
constitutive_mech_getLp, &
|
||||
constitutive_mech_getS, &
|
||||
crystallite_restartRead, &
|
||||
constitutive_initializeRestorationPoints, &
|
||||
constitutive_windForward, &
|
||||
|
@ -1427,4 +1426,24 @@ subroutine crystallite_restartRead
|
|||
end subroutine crystallite_restartRead
|
||||
|
||||
|
||||
! getter for non-mech (e.g. thermal)
|
||||
function constitutive_mech_getS(co,ip,el) result(S)
|
||||
|
||||
integer, intent(in) :: co, ip, el
|
||||
real(pReal), dimension(3,3) :: S
|
||||
|
||||
S = crystallite_S(1:3,1:3,co,ip,el)
|
||||
|
||||
end function constitutive_mech_getS
|
||||
|
||||
! getter for non-mech (e.g. thermal)
|
||||
function constitutive_mech_getLp(co,ip,el) result(Lp)
|
||||
|
||||
integer, intent(in) :: co, ip, el
|
||||
real(pReal), dimension(3,3) :: Lp
|
||||
|
||||
Lp = crystallite_S(1:3,1:3,co,ip,el)
|
||||
|
||||
end function constitutive_mech_getLp
|
||||
|
||||
end module constitutive
|
||||
|
|
|
@ -68,15 +68,13 @@ end subroutine thermal_init
|
|||
!----------------------------------------------------------------------------------------------
|
||||
!< @brief calculates thermal dissipation rate
|
||||
!----------------------------------------------------------------------------------------------
|
||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, S, Lp, ip, el)
|
||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
||||
|
||||
integer, intent(in) :: &
|
||||
ip, & !< integration point number
|
||||
el !< element number
|
||||
real(pReal), intent(in) :: &
|
||||
T
|
||||
real(pReal), intent(in), dimension(:,:,:,:,:) :: &
|
||||
S, & !< current 2nd Piola Kirchhoff stress
|
||||
Lp !< plastic velocity gradient
|
||||
T !< plastic velocity gradient
|
||||
real(pReal), intent(inout) :: &
|
||||
TDot, &
|
||||
dTDot_dT
|
||||
|
@ -84,6 +82,7 @@ module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T,
|
|||
real(pReal) :: &
|
||||
my_Tdot, &
|
||||
my_dTdot_dT
|
||||
real(pReal), dimension(3,3) :: Lp, S
|
||||
integer :: &
|
||||
phase, &
|
||||
homog, &
|
||||
|
@ -101,10 +100,10 @@ module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T,
|
|||
do source = 1, phase_Nsources(phase)
|
||||
select case(phase_source(source,phase))
|
||||
case (SOURCE_thermal_dissipation_ID)
|
||||
Lp = constitutive_mech_getLp(grain,ip,el)
|
||||
S = constitutive_mech_getS(grain,ip,el)
|
||||
call source_thermal_dissipation_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
||||
S(1:3,1:3,grain,ip,el), &
|
||||
Lp(1:3,1:3,grain,ip,el), &
|
||||
phase)
|
||||
S, Lp, phase)
|
||||
|
||||
case (SOURCE_thermal_externalheat_ID)
|
||||
call source_thermal_externalheat_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
||||
|
|
|
@ -94,7 +94,7 @@ subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
|||
dTdot_dT = 0.0_pReal
|
||||
|
||||
homog = material_homogenizationAt(el)
|
||||
call constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, crystallite_S,crystallite_Lp ,ip, el)
|
||||
call constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
||||
|
||||
Tdot = Tdot/real(homogenization_Nconstituents(homog),pReal)
|
||||
dTdot_dT = dTdot_dT/real(homogenization_Nconstituents(homog),pReal)
|
||||
|
|
Loading…
Reference in New Issue