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
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
module source_thermal_dissipation
|
2019-05-28 15:36:21 +05:30
|
|
|
use prec
|
|
|
|
use debug
|
2019-06-14 13:35:39 +05:30
|
|
|
use discretization
|
2019-05-28 15:36:21 +05:30
|
|
|
use material
|
|
|
|
use config
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
implicit none
|
|
|
|
private
|
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) :: &
|
|
|
|
kappa
|
|
|
|
end type tParameters
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2019-05-28 15:36:21 +05:30
|
|
|
type(tParameters), dimension(:), allocatable :: param !< containers of constitutive parameters (len Ninstance)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
public :: &
|
|
|
|
source_thermal_dissipation_init, &
|
|
|
|
source_thermal_dissipation_getRateAndItsTangent
|
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
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2019-02-22 20:07:42 +05:30
|
|
|
subroutine source_thermal_dissipation_init
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-02-29 12:28:33 +05:30
|
|
|
integer :: Ninstance,source,sourceOffset,NofMyPhase,p
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
write(6,'(/,a)') ' <<<+- source_'//SOURCE_thermal_dissipation_label//' init -+>>>'; flush(6)
|
|
|
|
|
|
|
|
Ninstance = count(phase_source == SOURCE_THERMAL_DISSIPATION_ID)
|
2019-03-24 15:31:27 +05:30
|
|
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0) &
|
|
|
|
write(6,'(a16,1x,i5,/)') '# instances:',Ninstance
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
allocate(source_thermal_dissipation_offset (size(config_phase)), source=0)
|
|
|
|
allocate(source_thermal_dissipation_instance(size(config_phase)), source=0)
|
2019-03-24 15:31:27 +05:30
|
|
|
allocate(param(Ninstance))
|
2020-02-26 23:07:17 +05:30
|
|
|
|
|
|
|
do p = 1, size(config_phase)
|
|
|
|
source_thermal_dissipation_instance(p) = count(phase_source(:,1:p) == SOURCE_THERMAL_DISSIPATION_ID)
|
2019-03-24 15:31:27 +05:30
|
|
|
do source = 1, phase_Nsources(p)
|
2020-02-26 23:07:17 +05:30
|
|
|
if (phase_source(source,p) == SOURCE_THERMAL_DISSIPATION_ID) &
|
2019-03-24 15:31:27 +05:30
|
|
|
source_thermal_dissipation_offset(p) = source
|
2020-02-26 23:07:17 +05:30
|
|
|
enddo
|
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
if (all(phase_source(:,p) /= SOURCE_THERMAL_DISSIPATION_ID)) cycle
|
2020-02-29 12:28:33 +05:30
|
|
|
associate(prm => param(source_thermal_dissipation_instance(p)), &
|
|
|
|
config => config_phase(p))
|
|
|
|
|
|
|
|
prm%kappa = config%getFloat('dissipation_coldworkcoeff')
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2019-06-14 13:35:39 +05:30
|
|
|
NofMyPhase = count(material_phaseAt==p) * discretization_nIP
|
2019-03-24 15:31:27 +05:30
|
|
|
sourceOffset = source_thermal_dissipation_offset(p)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2019-03-24 15:31:27 +05:30
|
|
|
call material_allocateSourceState(p,sourceOffset,NofMyPhase,0,0,0)
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2020-02-28 14:55:07 +05:30
|
|
|
end associate
|
2019-03-24 15:31:27 +05:30
|
|
|
enddo
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
end subroutine source_thermal_dissipation_init
|
|
|
|
|
2019-02-22 20:07:42 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-26 23:07:17 +05:30
|
|
|
!> @brief Ninstances dissipation rate
|
2015-05-28 22:32:23 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2020-02-28 14:55:07 +05:30
|
|
|
subroutine source_thermal_dissipation_getRateAndItsTangent(TDot, dTDot_dT, 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
|
|
|
|
real(pReal), intent(out) :: &
|
|
|
|
TDot, &
|
2020-02-28 14:55:07 +05:30
|
|
|
dTDot_dT
|
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))
|
2020-02-28 14:55:07 +05:30
|
|
|
dTDot_dT = 0.0_pReal
|
2020-02-29 12:28:33 +05:30
|
|
|
end associate
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
end subroutine source_thermal_dissipation_getRateAndItsTangent
|
2020-02-26 23:07:17 +05:30
|
|
|
|
2015-05-28 22:32:23 +05:30
|
|
|
end module source_thermal_dissipation
|