DAMASK_EICMD/src/thermal_isothermal.f90

42 lines
1.5 KiB
Fortran
Raw Normal View History

!--------------------------------------------------------------------------------------------------
!> @author Pratheek Shanthraj, Max-Planck-Institut für Eisenforschung GmbH
!> @brief material subroutine for isothermal temperature field
!--------------------------------------------------------------------------------------------------
module thermal_isothermal
2019-06-11 19:46:10 +05:30
use config
use material
2019-06-11 19:46:10 +05:30
implicit none
public
2019-06-11 19:46:10 +05:30
contains
!--------------------------------------------------------------------------------------------------
!> @brief allocates all neccessary fields, reads information from material configuration file
!--------------------------------------------------------------------------------------------------
2019-06-11 19:46:10 +05:30
subroutine thermal_isothermal_init
2019-12-21 15:25:11 +05:30
integer :: h,NofMyHomog
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'; flush(6)
do h = 1, size(config_homogenization)
if (thermal_type(h) /= THERMAL_isothermal_ID) cycle
NofMyHomog = count(material_homogenizationAt == h)
thermalState(h)%sizeState = 0
allocate(thermalState(h)%state0 (0,NofMyHomog))
allocate(thermalState(h)%subState0(0,NofMyHomog))
allocate(thermalState(h)%state (0,NofMyHomog))
2019-06-11 19:46:10 +05:30
2019-12-21 15:25:11 +05:30
deallocate(temperature (h)%p)
allocate (temperature (h)%p(1), source=thermal_initialT(h))
deallocate(temperatureRate(h)%p)
allocate (temperatureRate(h)%p(1))
2019-06-11 19:46:10 +05:30
2019-12-21 15:25:11 +05:30
enddo
end subroutine thermal_isothermal_init
end module thermal_isothermal