DAMASK_EICMD/src/thermal_isothermal.f90

52 lines
1.8 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
implicit none
private
public :: &
thermal_isothermal_init
contains
!--------------------------------------------------------------------------------------------------
!> @brief allocates all neccessary fields, reads information from material configuration file
!--------------------------------------------------------------------------------------------------
subroutine thermal_isothermal_init()
use prec, only: &
2019-03-10 15:32:32 +05:30
pReal
2018-12-31 02:24:50 +05:30
use config, only: &
material_Nhomogenization
use material
2019-03-10 15:32:32 +05:30
integer :: &
homog, &
2018-12-31 02:24:50 +05:30
NofMyHomog
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_isothermal_label//' init -+>>>'
2019-03-10 15:32:32 +05:30
initializeInstances: do homog = 1, material_Nhomogenization
2018-12-31 02:24:50 +05:30
if (thermal_type(homog) /= THERMAL_isothermal_ID) cycle
2019-03-10 15:32:32 +05:30
NofMyHomog = count(material_homogenizationAt == homog)
thermalState(homog)%sizeState = 0
thermalState(homog)%sizePostResults = 0
allocate(thermalState(homog)%state0 (0,NofMyHomog), source=0.0_pReal)
allocate(thermalState(homog)%subState0(0,NofMyHomog), source=0.0_pReal)
allocate(thermalState(homog)%state (0,NofMyHomog), source=0.0_pReal)
2018-12-31 02:24:50 +05:30
deallocate(temperature (homog)%p)
allocate (temperature (homog)%p(1), source=thermal_initialT(homog))
deallocate(temperatureRate(homog)%p)
allocate (temperatureRate(homog)%p(1), source=0.0_pReal)
enddo initializeInstances
end subroutine thermal_isothermal_init
end module thermal_isothermal