2014-06-25 04:29:16 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
2014-09-26 21:37:26 +05:30
|
|
|
! $Id: thermal_isothermal.f90 3148 2014-05-27 14:46:03Z MPIE\m.diehl $
|
2014-06-25 04:29:16 +05:30
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @author Franz Roters, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @author Philip Eisenlohr, Max-Planck-Institut für Eisenforschung GmbH
|
|
|
|
!> @brief material subroutine for purely elastic material
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2014-09-26 21:37:26 +05:30
|
|
|
module thermal_isothermal
|
2014-06-25 04:29:16 +05:30
|
|
|
use prec, only: &
|
|
|
|
pInt
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
private
|
|
|
|
integer(pInt), dimension(:), allocatable, public, protected :: &
|
2014-09-26 21:37:26 +05:30
|
|
|
thermal_isothermal_sizePostResults
|
2014-06-25 04:29:16 +05:30
|
|
|
|
|
|
|
integer(pInt), dimension(:,:), allocatable, target, public :: &
|
2014-09-26 21:37:26 +05:30
|
|
|
thermal_isothermal_sizePostResult !< size of each post result output
|
2014-06-25 04:29:16 +05:30
|
|
|
|
|
|
|
public :: &
|
2014-09-26 21:37:26 +05:30
|
|
|
thermal_isothermal_init
|
2014-06-25 04:29:16 +05:30
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
|
|
|
!> @brief module initialization
|
|
|
|
!> @details reads in material parameters, allocates arrays, and does sanity checks
|
|
|
|
!--------------------------------------------------------------------------------------------------
|
2014-09-26 21:37:26 +05:30
|
|
|
subroutine thermal_isothermal_init(fileUnit)
|
2014-06-25 04:29:16 +05:30
|
|
|
use, intrinsic :: iso_fortran_env ! to get compiler_version and compiler_options (at least for gfortran 4.6 at the moment)
|
|
|
|
use debug, only: &
|
|
|
|
debug_level, &
|
|
|
|
debug_constitutive, &
|
|
|
|
debug_levelBasic
|
|
|
|
use IO, only: &
|
|
|
|
IO_timeStamp
|
|
|
|
use numerics, only: &
|
2014-10-10 01:53:06 +05:30
|
|
|
#ifdef FEM
|
|
|
|
worldrank, &
|
|
|
|
#endif
|
2014-06-25 04:29:16 +05:30
|
|
|
numerics_integrator
|
|
|
|
use material, only: &
|
|
|
|
phase_thermal, &
|
|
|
|
phase_Noutput, &
|
2014-09-26 21:37:26 +05:30
|
|
|
LOCAL_THERMAL_ISOTHERMAL_label, &
|
|
|
|
LOCAL_THERMAL_ISOTHERMAL_ID, &
|
2014-06-25 04:29:16 +05:30
|
|
|
material_phase, &
|
|
|
|
thermalState, &
|
|
|
|
MATERIAL_partPhase
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
integer(pInt), intent(in) :: fileUnit
|
|
|
|
integer(pInt) :: &
|
|
|
|
maxNinstance, &
|
|
|
|
phase, &
|
|
|
|
NofMyPhase, &
|
|
|
|
sizeState, &
|
|
|
|
sizeDotState
|
2014-09-22 23:45:19 +05:30
|
|
|
|
2014-10-10 01:53:06 +05:30
|
|
|
#ifdef FEM
|
|
|
|
if (worldrank == 0) then
|
|
|
|
#endif
|
2014-09-26 21:37:26 +05:30
|
|
|
write(6,'(/,a)') ' <<<+- thermal_'//LOCAL_THERMAL_ISOTHERMAL_label//' init -+>>>'
|
|
|
|
write(6,'(a)') ' $Id: thermal_isothermal.f90 3148 2014-05-27 14:46:03Z MPIE\m.diehl $'
|
2014-06-25 04:29:16 +05:30
|
|
|
write(6,'(a15,a)') ' Current time: ',IO_timeStamp()
|
|
|
|
#include "compilation_info.f90"
|
2014-10-10 01:53:06 +05:30
|
|
|
#ifdef FEM
|
|
|
|
endif
|
|
|
|
#endif
|
2014-09-03 22:42:06 +05:30
|
|
|
|
2014-09-26 21:37:26 +05:30
|
|
|
maxNinstance = int(count(phase_thermal == LOCAL_THERMAL_ISOTHERMAL_ID),pInt)
|
2014-06-25 04:29:16 +05:30
|
|
|
if (maxNinstance == 0_pInt) return
|
|
|
|
|
|
|
|
if (iand(debug_level(debug_constitutive),debug_levelBasic) /= 0_pInt) &
|
|
|
|
write(6,'(a16,1x,i5,/)') '# instances:',maxNinstance
|
2014-07-02 17:57:39 +05:30
|
|
|
|
2014-06-25 04:29:16 +05:30
|
|
|
initializeInstances: do phase = 1_pInt, size(phase_thermal)
|
|
|
|
NofMyPhase=count(material_phase==phase)
|
2014-09-03 22:42:06 +05:30
|
|
|
|
2014-09-26 21:37:26 +05:30
|
|
|
if (phase_thermal(phase) == LOCAL_THERMAL_ISOTHERMAL_ID) then
|
2014-06-25 04:29:16 +05:30
|
|
|
sizeState = 0_pInt
|
|
|
|
thermalState(phase)%sizeState = sizeState
|
|
|
|
sizeDotState = sizeState
|
|
|
|
thermalState(phase)%sizeDotState = sizeDotState
|
2014-07-04 14:52:57 +05:30
|
|
|
thermalState(phase)%sizePostResults = 0_pInt
|
2014-06-25 04:29:16 +05:30
|
|
|
allocate(thermalState(phase)%state0 (sizeState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%partionedState0(sizeState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%subState0 (sizeState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%state (sizeState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%state_backup (sizeState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%aTolState (NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%dotState (sizeDotState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%dotState_backup(sizeDotState,NofMyPhase))
|
|
|
|
if (any(numerics_integrator == 1_pInt)) then
|
|
|
|
allocate(thermalState(phase)%previousDotState (sizeDotState,NofMyPhase))
|
|
|
|
allocate(thermalState(phase)%previousDotState2 (sizeDotState,NofMyPhase))
|
|
|
|
endif
|
|
|
|
if (any(numerics_integrator == 4_pInt)) &
|
|
|
|
allocate(thermalState(phase)%RK4dotState (sizeDotState,NofMyPhase))
|
|
|
|
if (any(numerics_integrator == 5_pInt)) &
|
|
|
|
allocate(thermalState(phase)%RKCK45dotState (6,sizeDotState,NofMyPhase))
|
|
|
|
endif
|
|
|
|
enddo initializeInstances
|
2014-09-26 21:37:26 +05:30
|
|
|
allocate(thermal_isothermal_sizePostResults(maxNinstance), source=0_pInt)
|
2014-06-25 04:29:16 +05:30
|
|
|
|
2014-09-26 21:37:26 +05:30
|
|
|
end subroutine thermal_isothermal_init
|
2014-06-25 04:29:16 +05:30
|
|
|
|
2014-09-26 21:37:26 +05:30
|
|
|
end module thermal_isothermal
|