2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-02-23 01:07:41 +05:30
|
|
|
!> @author Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH
|
2015-05-28 22:32:23 +05:30
|
|
|
!> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief material subroutine for thermal source due to plastic dissipation
|
|
|
|
!> @details to be done
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-01-26 05:50:45 +05:30
|
|
|
submodule(constitutive:thermal) dissipation
|
2019-05-28 15:36:21 +05:30
|
|
|
|
2019-12-21 12:25:42 +05:30
|
|
|
integer, dimension(:), allocatable :: &
|
2019-05-28 15:36:21 +05:30
|
|
|
source_thermal_dissipation_offset, & !< which source is my current thermal dissipation mechanism?
|
|
|
|
source_thermal_dissipation_instance !< instance of thermal dissipation source mechanism
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2019-05-28 15:36:21 +05:30
|
|
|
type :: tParameters !< container type for internal constitutive parameters
|
2019-03-24 15:31:27 +05:30
|
|
|
real(pReal) :: &
|
2020-08-15 19:32:10 +05:30
|
|
|
kappa !< TAYLOR-QUINNEY factor
|
2019-03-24 15:31:27 +05:30
|
|
|
end type tParameters
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-10-28 02:03:30 +05:30
|
|
|
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstances)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief module initialization
|
|
|
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-08-15 19:32:10 +05:30
|
|
|
module function source_thermal_dissipation_init(source_length) result(mySources)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2021-01-08 12:07:51 +05:30
|
|
|
integer, intent(in) :: source_length
|
2020-08-15 19:32:10 +05:30
|
|
|
logical, dimension(:,:), allocatable :: mySources
|
|
|
|
|
|
|
|
class(tNode), pointer :: &
|
|
|
|
phases, &
|
|
|
|
phase, &
|
2021-01-08 12:07:51 +05:30
|
|
|
sources, thermal, &
|
|
|
|
src
|
2020-10-28 02:03:30 +05:30
|
|
|
integer :: Ninstances,sourceOffset,Nconstituents,p
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2021-01-09 21:49:48 +05:30
|
|
|
print'(/,a)', ' <<<+- thermal_dissipation init -+>>>'
|
2021-01-08 12:07:51 +05:30
|
|
|
|
|
|
|
mySources = thermal_active('dissipation',source_length)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-10-28 02:03:30 +05:30
|
|
|
Ninstances = count(mySources)
|
|
|
|
print'(a,i2)', ' # instances: ',Ninstances; flush(IO_STDOUT)
|
|
|
|
if(Ninstances == 0) return
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-09-13 14:09:17 +05:30
|
|
|
phases => config_material%get('phase')
|
2020-10-28 02:03:30 +05:30
|
|
|
allocate(param(Ninstances))
|
2020-08-15 19:32:10 +05:30
|
|
|
allocate(source_thermal_dissipation_offset (phases%length), source=0)
|
|
|
|
allocate(source_thermal_dissipation_instance(phases%length), source=0)
|
|
|
|
|
|
|
|
do p = 1, phases%length
|
2021-01-08 12:07:51 +05:30
|
|
|
phase => phases%get(p)
|
2020-08-15 19:32:10 +05:30
|
|
|
if(any(mySources(:,p))) source_thermal_dissipation_instance(p) = count(mySources(:,1:p))
|
2021-01-08 12:07:51 +05:30
|
|
|
if(count(mySources(:,p)) == 0) cycle
|
|
|
|
thermal => phase%get('thermal')
|
|
|
|
sources => thermal%get('source')
|
2020-08-15 19:32:10 +05:30
|
|
|
do sourceOffset = 1, sources%length
|
|
|
|
if(mySources(sourceOffset,p)) then
|
2020-02-29 12:33:06 +05:30
|
|
|
source_thermal_dissipation_offset(p) = sourceOffset
|
2020-08-15 19:32:10 +05:30
|
|
|
associate(prm => param(source_thermal_dissipation_instance(p)))
|
2021-01-08 12:07:51 +05:30
|
|
|
src => sources%get(sourceOffset)
|
2020-02-29 12:28:33 +05:30
|
|
|
|
2020-08-15 19:32:10 +05:30
|
|
|
prm%kappa = src%get_asFloat('kappa')
|
2020-10-28 02:03:30 +05:30
|
|
|
Nconstituents = count(material_phaseAt==p) * discretization_nIPs
|
2021-01-08 02:45:18 +05:30
|
|
|
call constitutive_allocateState(thermalState(p)%p(sourceOffset),Nconstituents,0,0,0)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-08-15 19:32:10 +05:30
|
|
|
end associate
|
|
|
|
endif
|
|
|
|
enddo
|
2019-03-24 15:31:27 +05:30
|
|
|
enddo
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-08-15 19:32:10 +05:30
|
|
|
|
|
|
|
end function source_thermal_dissipation_init
|
2015-05-28 22:32:23 +05:30
|
|
|
|
2019-02-22 20:07:42 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-10-28 02:03:30 +05:30
|
|
|
!> @brief Ninstancess dissipation rate
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2021-01-11 20:43:59 +05:30
|
|
|
module subroutine thermal_dissipation_getRate(TDot, Tstar, Lp, phase)
|
2015-05-28 22:32:23 +05:30
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
integer, intent(in) :: &
|
|
|
|
phase
|
|
|
|
real(pReal), intent(in), dimension(3,3) :: &
|
|
|
|
Tstar
|
|
|
|
real(pReal), intent(in), dimension(3,3) :: &
|
|
|
|
Lp
|
2020-02-29 19:04:19 +05:30
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
real(pReal), intent(out) :: &
|
2021-01-08 13:27:30 +05:30
|
|
|
TDot
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-02-29 12:28:33 +05:30
|
|
|
associate(prm => param(source_thermal_dissipation_instance(phase)))
|
|
|
|
TDot = prm%kappa*sum(abs(Tstar*Lp))
|
|
|
|
end associate
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2021-01-11 20:43:59 +05:30
|
|
|
end subroutine thermal_dissipation_getRate
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2021-01-26 05:50:45 +05:30
|
|
|
end submodule dissipation
|