not needed
This commit is contained in:
parent
d494c2d81e
commit
350466dd5f
|
@ -364,7 +364,8 @@ subroutine flux(f,ts,n,time)
|
||||||
real(pReal), dimension(2), intent(out) :: &
|
real(pReal), dimension(2), intent(out) :: &
|
||||||
f
|
f
|
||||||
|
|
||||||
call thermal_conduction_getSourceAndItsTangent(f(1), f(2), ts(3), n(3),mesh_FEM2DAMASK_elem(n(1)))
|
f(2) = 0.0_pReal
|
||||||
|
call thermal_conduction_getSourceAndItsTangent(f(1), ts(3), n(3),mesh_FEM2DAMASK_elem(n(1)))
|
||||||
|
|
||||||
end subroutine flux
|
end subroutine flux
|
||||||
|
|
||||||
|
|
|
@ -283,15 +283,14 @@ module constitutive
|
||||||
dPhiDot_dPhi
|
dPhiDot_dPhi
|
||||||
end subroutine constitutive_damage_getRateAndItsTangents
|
end subroutine constitutive_damage_getRateAndItsTangents
|
||||||
|
|
||||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, T,ip,el)
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
el !< element number
|
el !< element number
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
T
|
T
|
||||||
real(pReal), intent(inout) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
end subroutine constitutive_thermal_getRateAndItsTangents
|
end subroutine constitutive_thermal_getRateAndItsTangents
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ submodule(constitutive) constitutive_thermal
|
||||||
end function kinematics_thermal_expansion_init
|
end function kinematics_thermal_expansion_init
|
||||||
|
|
||||||
|
|
||||||
module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, dTDot_dT, Tstar, Lp, phase)
|
module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, Tstar,Lp,phase)
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
phase !< phase ID of element
|
phase !< phase ID of element
|
||||||
real(pReal), intent(in), dimension(3,3) :: &
|
real(pReal), intent(in), dimension(3,3) :: &
|
||||||
|
@ -44,17 +44,15 @@ submodule(constitutive) constitutive_thermal
|
||||||
real(pReal), intent(in), dimension(3,3) :: &
|
real(pReal), intent(in), dimension(3,3) :: &
|
||||||
Lp !< plastic velocuty gradient for a given element
|
Lp !< plastic velocuty gradient for a given element
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
end subroutine source_thermal_dissipation_getRateAndItsTangent
|
end subroutine source_thermal_dissipation_getRateAndItsTangent
|
||||||
|
|
||||||
module subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, dTDot_dT, phase, of)
|
module subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, phase,of)
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
phase, &
|
phase, &
|
||||||
of
|
of
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
end subroutine source_thermal_externalheat_getRateAndItsTangent
|
end subroutine source_thermal_externalheat_getRateAndItsTangent
|
||||||
|
|
||||||
end interface
|
end interface
|
||||||
|
@ -129,7 +127,7 @@ end subroutine thermal_init
|
||||||
!----------------------------------------------------------------------------------------------
|
!----------------------------------------------------------------------------------------------
|
||||||
!< @brief calculates thermal dissipation rate
|
!< @brief calculates thermal dissipation rate
|
||||||
!----------------------------------------------------------------------------------------------
|
!----------------------------------------------------------------------------------------------
|
||||||
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
module subroutine constitutive_thermal_getRateAndItsTangents(TDot, T, ip, el)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
|
@ -137,12 +135,10 @@ module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T,
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
T !< plastic velocity gradient
|
T !< plastic velocity gradient
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
|
|
||||||
real(pReal) :: &
|
real(pReal) :: &
|
||||||
my_Tdot, &
|
my_Tdot
|
||||||
my_dTdot_dT
|
|
||||||
integer :: &
|
integer :: &
|
||||||
ph, &
|
ph, &
|
||||||
homog, &
|
homog, &
|
||||||
|
@ -154,25 +150,22 @@ module subroutine constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T,
|
||||||
homog = material_homogenizationAt(el)
|
homog = material_homogenizationAt(el)
|
||||||
instance = thermal_typeInstance(homog)
|
instance = thermal_typeInstance(homog)
|
||||||
|
|
||||||
|
TDot = 0.0_pReal
|
||||||
do co = 1, homogenization_Nconstituents(homog)
|
do co = 1, homogenization_Nconstituents(homog)
|
||||||
ph = material_phaseAt(co,el)
|
ph = material_phaseAt(co,el)
|
||||||
me = material_phasememberAt(co,ip,el)
|
me = material_phasememberAt(co,ip,el)
|
||||||
do so = 1, thermal_Nsources(ph)
|
do so = 1, thermal_Nsources(ph)
|
||||||
select case(thermal_source(so,ph))
|
select case(thermal_source(so,ph))
|
||||||
case (THERMAL_DISSIPATION_ID)
|
case (THERMAL_DISSIPATION_ID)
|
||||||
call source_thermal_dissipation_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
call source_thermal_dissipation_getRateAndItsTangent(my_Tdot, mech_S(ph,me),mech_L_p(ph,me),ph)
|
||||||
mech_S(ph,me),mech_L_p(ph,me), ph)
|
|
||||||
|
|
||||||
case (THERMAL_EXTERNALHEAT_ID)
|
case (THERMAL_EXTERNALHEAT_ID)
|
||||||
call source_thermal_externalheat_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
call source_thermal_externalheat_getRateAndItsTangent(my_Tdot, ph,me)
|
||||||
ph, me)
|
|
||||||
|
|
||||||
case default
|
case default
|
||||||
my_Tdot = 0.0_pReal
|
my_Tdot = 0.0_pReal
|
||||||
my_dTdot_dT = 0.0_pReal
|
|
||||||
end select
|
end select
|
||||||
Tdot = Tdot + my_Tdot
|
Tdot = Tdot + my_Tdot
|
||||||
dTdot_dT = dTdot_dT + my_dTdot_dT
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ end function source_thermal_dissipation_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Ninstancess dissipation rate
|
!> @brief Ninstancess dissipation rate
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, dTDot_dT, Tstar, Lp, phase)
|
module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, Tstar, Lp, phase)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
phase
|
phase
|
||||||
|
@ -88,12 +88,10 @@ module subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, dTDot_dT
|
||||||
Lp
|
Lp
|
||||||
|
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
|
|
||||||
associate(prm => param(source_thermal_dissipation_instance(phase)))
|
associate(prm => param(source_thermal_dissipation_instance(phase)))
|
||||||
TDot = prm%kappa*sum(abs(Tstar*Lp))
|
TDot = prm%kappa*sum(abs(Tstar*Lp))
|
||||||
dTDot_dT = 0.0_pReal
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
end subroutine source_thermal_dissipation_getRateAndItsTangent
|
end subroutine source_thermal_dissipation_getRateAndItsTangent
|
||||||
|
|
|
@ -104,14 +104,13 @@ end subroutine source_thermal_externalheat_dotState
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns local heat generation rate
|
!> @brief returns local heat generation rate
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, dTDot_dT, phase, of)
|
module subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, phase, of)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
phase, &
|
phase, &
|
||||||
of
|
of
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
TDot, &
|
TDot
|
||||||
dTDot_dT
|
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
sourceOffset, interval
|
sourceOffset, interval
|
||||||
|
@ -131,7 +130,6 @@ module subroutine source_thermal_externalheat_getRateAndItsTangent(TDot, dTDot_d
|
||||||
prm%f_T(interval+1) * frac_time ! interpolate heat rate between segment boundaries...
|
prm%f_T(interval+1) * frac_time ! interpolate heat rate between segment boundaries...
|
||||||
! ...or extrapolate if outside of bounds
|
! ...or extrapolate if outside of bounds
|
||||||
enddo
|
enddo
|
||||||
dTDot_dT = 0.0
|
|
||||||
end associate
|
end associate
|
||||||
|
|
||||||
end subroutine source_thermal_externalheat_getRateAndItsTangent
|
end subroutine source_thermal_externalheat_getRateAndItsTangent
|
||||||
|
|
|
@ -256,7 +256,7 @@ subroutine formResidual(in,x_scal,f_scal,dummy,ierr)
|
||||||
PetscObject :: dummy
|
PetscObject :: dummy
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
integer :: i, j, k, cell
|
integer :: i, j, k, cell
|
||||||
real(pReal) :: Tdot, dTdot_dT
|
real(pReal) :: Tdot
|
||||||
|
|
||||||
T_current = x_scal
|
T_current = x_scal
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -278,7 +278,7 @@ subroutine formResidual(in,x_scal,f_scal,dummy,ierr)
|
||||||
cell = 0
|
cell = 0
|
||||||
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
|
||||||
cell = cell + 1
|
cell = cell + 1
|
||||||
call thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T_current(i,j,k), 1, cell)
|
call thermal_conduction_getSourceAndItsTangent(Tdot, T_current(i,j,k), 1, cell)
|
||||||
scalarField_real(i,j,k) = params%timeinc*(scalarField_real(i,j,k) + Tdot) &
|
scalarField_real(i,j,k) = params%timeinc*(scalarField_real(i,j,k) + Tdot) &
|
||||||
+ thermal_conduction_getMassDensity (1,cell)* &
|
+ thermal_conduction_getMassDensity (1,cell)* &
|
||||||
thermal_conduction_getSpecificHeat(1,cell)*(T_lastInc(i,j,k) - &
|
thermal_conduction_getSpecificHeat(1,cell)*(T_lastInc(i,j,k) - &
|
||||||
|
|
|
@ -91,7 +91,7 @@ end subroutine thermal_conduction_init
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief return heat generation rate
|
!> @brief return heat generation rate
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
subroutine thermal_conduction_getSourceAndItsTangent(Tdot, T,ip,el)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
|
@ -99,15 +99,15 @@ subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
||||||
real(pReal), intent(in) :: &
|
real(pReal), intent(in) :: &
|
||||||
T
|
T
|
||||||
real(pReal), intent(out) :: &
|
real(pReal), intent(out) :: &
|
||||||
Tdot, dTdot_dT
|
Tdot
|
||||||
integer :: &
|
|
||||||
|
integer :: &
|
||||||
homog
|
homog
|
||||||
|
|
||||||
homog = material_homogenizationAt(el)
|
homog = material_homogenizationAt(el)
|
||||||
call constitutive_thermal_getRateAndItsTangents(TDot, dTDot_dT, T, ip, el)
|
call constitutive_thermal_getRateAndItsTangents(TDot, T,ip,el)
|
||||||
|
|
||||||
Tdot = Tdot/real(homogenization_Nconstituents(homog),pReal)
|
Tdot = Tdot/real(homogenization_Nconstituents(homog),pReal)
|
||||||
dTdot_dT = dTdot_dT/real(homogenization_Nconstituents(homog),pReal)
|
|
||||||
|
|
||||||
end subroutine thermal_conduction_getSourceAndItsTangent
|
end subroutine thermal_conduction_getSourceAndItsTangent
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue