write temperature to DADF5

This commit is contained in:
Martin Diehl 2019-12-10 20:25:19 +01:00
parent e142d00d02
commit 8fb8e9be6e
3 changed files with 60 additions and 0 deletions

View File

@ -779,6 +779,13 @@ subroutine homogenization_results
group = trim(group_base)//'/thermal' group = trim(group_base)//'/thermal'
call results_closeGroup(results_addGroup(group)) call results_closeGroup(results_addGroup(group))
select case(thermal_type(p))
case(THERMAL_ADIABATIC_ID)
call thermal_adiabatic_results(p,group)
case(THERMAL_CONDUCTION_ID)
call thermal_conduction_results(p,group)
end select
enddo enddo

View File

@ -7,6 +7,7 @@ module thermal_adiabatic
use config use config
use numerics use numerics
use material use material
use results
use source_thermal_dissipation use source_thermal_dissipation
use source_thermal_externalheat use source_thermal_externalheat
use crystallite use crystallite
@ -37,6 +38,7 @@ module thermal_adiabatic
thermal_adiabatic_getSourceAndItsTangent, & thermal_adiabatic_getSourceAndItsTangent, &
thermal_adiabatic_getSpecificHeat, & thermal_adiabatic_getSpecificHeat, &
thermal_adiabatic_getMassDensity, & thermal_adiabatic_getMassDensity, &
thermal_adiabatic_results, &
thermal_adiabatic_postResults thermal_adiabatic_postResults
contains contains
@ -251,6 +253,30 @@ function thermal_adiabatic_getMassDensity(ip,el)
end function thermal_adiabatic_getMassDensity end function thermal_adiabatic_getMassDensity
!--------------------------------------------------------------------------------------------------
!> @brief writes results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine thermal_adiabatic_results(homog,group)
integer, intent(in) :: homog
character(len=*), intent(in) :: group
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: o, instance
instance = thermal_typeInstance(homog)
outputsLoop: do o = 1,thermal_adiabatic_Noutput(instance)
select case(thermal_adiabatic_outputID(o,instance))
case (temperature_ID)
call results_writeDataset(group,temperature(homog)%p,'T',&
'temperature','K')
end select
enddo outputsLoop
#endif
end subroutine thermal_adiabatic_results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of thermal results !> @brief return array of thermal results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -7,6 +7,7 @@ module thermal_conduction
use material use material
use config use config
use lattice use lattice
use results
use crystallite use crystallite
use source_thermal_dissipation use source_thermal_dissipation
use source_thermal_externalheat use source_thermal_externalheat
@ -37,6 +38,7 @@ module thermal_conduction
thermal_conduction_getSpecificHeat, & thermal_conduction_getSpecificHeat, &
thermal_conduction_getMassDensity, & thermal_conduction_getMassDensity, &
thermal_conduction_putTemperatureAndItsRate, & thermal_conduction_putTemperatureAndItsRate, &
thermal_conduction_results, &
thermal_conduction_postResults thermal_conduction_postResults
contains contains
@ -263,6 +265,31 @@ subroutine thermal_conduction_putTemperatureAndItsRate(T,Tdot,ip,el)
end subroutine thermal_conduction_putTemperatureAndItsRate end subroutine thermal_conduction_putTemperatureAndItsRate
!--------------------------------------------------------------------------------------------------
!> @brief writes results to HDF5 output file
!--------------------------------------------------------------------------------------------------
subroutine thermal_conduction_results(homog,group)
integer, intent(in) :: homog
character(len=*), intent(in) :: group
#if defined(PETSc) || defined(DAMASK_HDF5)
integer :: o, instance
instance = thermal_typeInstance(homog)
outputsLoop: do o = 1,thermal_conduction_Noutput(instance)
select case(thermal_conduction_outputID(o,instance))
case (temperature_ID)
call results_writeDataset(group,temperature(homog)%p,'T',&
'temperature','K')
end select
enddo outputsLoop
#endif
end subroutine thermal_conduction_results
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief return array of thermal results !> @brief return array of thermal results