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
|
2023-02-13 22:29:22 +05:30
|
|
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
2015-05-28 22:32:23 +05:30
|
|
|
!> @brief material subroutine for thermal source due to plastic dissipation
|
|
|
|
!> @details to be done
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2023-07-18 07:42:57 +05:30
|
|
|
submodule(phase:thermal) source_dissipation
|
2019-05-28 15:36:21 +05:30
|
|
|
|
|
|
|
type :: tParameters !< container type for internal constitutive parameters
|
2023-06-04 10:52:25 +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
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2023-07-23 00:34:11 +05:30
|
|
|
module function source_dissipation_init(maxNsources) result(isMySource)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2023-07-23 00:34:11 +05:30
|
|
|
integer, intent(in) :: maxNsources
|
|
|
|
logical, dimension(:,:), allocatable :: isMySource
|
2020-08-15 19:32:10 +05:30
|
|
|
|
2022-10-25 21:39:36 +05:30
|
|
|
type(tDict), pointer :: &
|
2020-08-15 19:32:10 +05:30
|
|
|
phases, &
|
|
|
|
phase, &
|
2022-10-25 21:39:36 +05:30
|
|
|
thermal, &
|
2021-01-08 12:07:51 +05:30
|
|
|
src
|
2022-10-25 21:39:36 +05:30
|
|
|
class(tList), pointer :: &
|
|
|
|
sources
|
2023-03-01 01:27:44 +05:30
|
|
|
character(len=:), allocatable :: refs
|
2023-07-23 00:47:30 +05:30
|
|
|
integer :: ph,Nmembers,so,Nsources
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2021-01-08 12:07:51 +05:30
|
|
|
|
2023-07-23 00:34:11 +05:30
|
|
|
isMySource = thermal_active('dissipation',maxNsources)
|
|
|
|
if (count(isMySource) == 0) return
|
2023-01-18 23:20:01 +05:30
|
|
|
|
2023-07-18 07:42:57 +05:30
|
|
|
print'(/,1x,a)', '<<<+- phase:thermal:source_dissipation init -+>>>'
|
2023-07-23 00:34:11 +05:30
|
|
|
print'(/,a,i2)', ' # phases: ',count(isMySource); flush(IO_STDOUT)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
|
2022-10-25 21:39:36 +05:30
|
|
|
phases => config_material%get_dict('phase')
|
2021-01-27 04:14:11 +05:30
|
|
|
allocate(param(phases%length))
|
|
|
|
|
|
|
|
do ph = 1, phases%length
|
2023-07-23 00:47:30 +05:30
|
|
|
Nsources = count(isMySource(:,ph))
|
|
|
|
if (Nsources == 0) cycle
|
|
|
|
if (Nsources > 1) call IO_error(600,ext_msg='dissipation')
|
2023-07-22 23:31:53 +05:30
|
|
|
Nmembers = count(material_ID_phase == ph)
|
|
|
|
phase => phases%get_dict(ph)
|
2022-10-25 21:39:36 +05:30
|
|
|
thermal => phase%get_dict('thermal')
|
|
|
|
sources => thermal%get_list('source')
|
2021-01-27 04:14:11 +05:30
|
|
|
do so = 1, sources%length
|
2023-07-23 00:34:11 +05:30
|
|
|
if (isMySource(so,ph)) then
|
2021-01-27 04:14:11 +05:30
|
|
|
associate(prm => param(ph))
|
2022-10-25 21:39:36 +05:30
|
|
|
src => sources%get_dict(so)
|
2023-03-01 01:27:44 +05:30
|
|
|
print'(1x,a,i0,a,i0)', 'phase ',ph,' source ',so
|
|
|
|
refs = config_listReferences(src,indent=3)
|
|
|
|
if (len(refs) > 0) print'(/,1x,a)', refs
|
2020-02-29 12:28:33 +05:30
|
|
|
|
2023-06-03 20:36:32 +05:30
|
|
|
prm%kappa = src%get_asReal('kappa')
|
2021-03-05 01:46:36 +05:30
|
|
|
call phase_allocateState(thermalState(ph)%p(so),Nmembers,0,0,0)
|
2020-08-15 19:32:10 +05:30
|
|
|
end associate
|
2023-07-23 00:47:30 +05:30
|
|
|
exit
|
2021-11-15 23:05:44 +05:30
|
|
|
end if
|
|
|
|
end do
|
|
|
|
end do
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-08-15 19:32:10 +05:30
|
|
|
|
2023-07-18 07:42:57 +05:30
|
|
|
end function source_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
|
|
|
!--------------------------------------------------------------------------------------------------
|
2023-07-18 07:42:57 +05:30
|
|
|
module function source_dissipation_f_T(ph,en) result(f_T)
|
2020-02-29 19:04:19 +05:30
|
|
|
|
2021-04-25 11:36:52 +05:30
|
|
|
integer, intent(in) :: ph, en
|
2023-06-04 10:52:25 +05:30
|
|
|
real(pREAL) :: &
|
2021-04-08 02:11:49 +05:30
|
|
|
f_T
|
2023-06-04 10:52:25 +05:30
|
|
|
real(pREAL), dimension(3,3) :: &
|
2023-02-13 22:29:22 +05:30
|
|
|
Mp !< Mandel stress work conjugate with Lp
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2023-02-13 22:29:22 +05:30
|
|
|
Mp = matmul(matmul(transpose(mechanical_F_i(ph,en)),mechanical_F_i(ph,en)),mechanical_S(ph,en))
|
2021-01-27 04:14:11 +05:30
|
|
|
|
|
|
|
associate(prm => param(ph))
|
2023-02-13 22:29:22 +05:30
|
|
|
f_T = prm%kappa*sum(abs(Mp*mechanical_L_p(ph,en)))
|
2020-02-29 12:28:33 +05:30
|
|
|
end associate
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2023-07-18 07:42:57 +05:30
|
|
|
end function source_dissipation_f_T
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2023-07-18 07:42:57 +05:30
|
|
|
end submodule source_dissipation
|