enable output of temperature per phase
This commit is contained in:
parent
968e55b0bc
commit
dce8f9e635
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 0f9076b0b589f5134b0304f6676e0076b99d887f
|
Subproject commit 0ef96051aa5bda4f8e3c22d6a2e0be3853e4ca7d
|
|
@ -466,7 +466,7 @@ subroutine parseHomogenization
|
||||||
if (homog%contains('thermal')) then
|
if (homog%contains('thermal')) then
|
||||||
homogThermal => homog%get('thermal')
|
homogThermal => homog%get('thermal')
|
||||||
select case (homogThermal%get_asString('type'))
|
select case (homogThermal%get_asString('type'))
|
||||||
case('pass')
|
case('pass','isotemperature')
|
||||||
thermal_type(h) = THERMAL_conduction_ID
|
thermal_type(h) = THERMAL_conduction_ID
|
||||||
case default
|
case default
|
||||||
call IO_error(500,ext_msg=homogThermal%get_asString('type'))
|
call IO_error(500,ext_msg=homogThermal%get_asString('type'))
|
||||||
|
|
|
@ -56,6 +56,7 @@ module subroutine thermal_init()
|
||||||
allocate(current(ho)%dot_T(count(material_homogenizationID==ho)), source=0.0_pReal)
|
allocate(current(ho)%dot_T(count(material_homogenizationID==ho)), source=0.0_pReal)
|
||||||
configHomogenization => configHomogenizations%get(ho)
|
configHomogenization => configHomogenizations%get(ho)
|
||||||
associate(prm => param(ho))
|
associate(prm => param(ho))
|
||||||
|
|
||||||
if (configHomogenization%contains('thermal')) then
|
if (configHomogenization%contains('thermal')) then
|
||||||
configHomogenizationThermal => configHomogenization%get('thermal')
|
configHomogenizationThermal => configHomogenization%get('thermal')
|
||||||
#if defined (__GFORTRAN__)
|
#if defined (__GFORTRAN__)
|
||||||
|
@ -63,13 +64,22 @@ module subroutine thermal_init()
|
||||||
#else
|
#else
|
||||||
prm%output = configHomogenizationThermal%get_as1dString('output',defaultVal=emptyStringArray)
|
prm%output = configHomogenizationThermal%get_as1dString('output',defaultVal=emptyStringArray)
|
||||||
#endif
|
#endif
|
||||||
|
select case (configHomogenizationThermal%get_asString('type'))
|
||||||
|
|
||||||
|
case ('pass')
|
||||||
|
call pass_init()
|
||||||
|
|
||||||
|
case ('isothermal')
|
||||||
|
call isotemperature_init()
|
||||||
|
|
||||||
|
end select
|
||||||
else
|
else
|
||||||
prm%output = emptyStringArray
|
prm%output = emptyStringArray
|
||||||
end if
|
end if
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
end do
|
end do
|
||||||
|
|
||||||
call pass_init()
|
|
||||||
|
|
||||||
end subroutine thermal_init
|
end subroutine thermal_init
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @author Martin Diehl, KU Leuven
|
!> @author Martin Diehl, KU Leuven
|
||||||
!> @brief Dummy homogenization scheme for 1 constituent per material point
|
!> @brief Isotemperature homogenization
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
submodule(homogenization:thermal) isotemperature
|
submodule(homogenization:thermal) isotemperature
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
module subroutine isotemperature_init
|
module subroutine isotemperature_init()
|
||||||
|
|
||||||
|
print'(/,1x,a)', '<<<+- homogenization:thermal:isotemperature init -+>>>'
|
||||||
|
|
||||||
end subroutine isotemperature_init
|
end subroutine isotemperature_init
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ module subroutine pass_init()
|
||||||
|
|
||||||
print'(/,1x,a)', '<<<+- homogenization:thermal:pass init -+>>>'
|
print'(/,1x,a)', '<<<+- homogenization:thermal:pass init -+>>>'
|
||||||
|
|
||||||
|
if (homogenization_Nconstituents(1) /= 1) &
|
||||||
|
call IO_error(211,ext_msg='N_constituents (pass)')
|
||||||
|
|
||||||
end subroutine pass_init
|
end subroutine pass_init
|
||||||
|
|
||||||
end submodule thermal_pass
|
end submodule thermal_pass
|
||||||
|
|
|
@ -91,6 +91,11 @@ module phase
|
||||||
integer, intent(in) :: ph
|
integer, intent(in) :: ph
|
||||||
end subroutine damage_results
|
end subroutine damage_results
|
||||||
|
|
||||||
|
module subroutine thermal_results(group,ph)
|
||||||
|
character(len=*), intent(in) :: group
|
||||||
|
integer, intent(in) :: ph
|
||||||
|
end subroutine thermal_results
|
||||||
|
|
||||||
module subroutine mechanical_forward()
|
module subroutine mechanical_forward()
|
||||||
end subroutine mechanical_forward
|
end subroutine mechanical_forward
|
||||||
|
|
||||||
|
@ -487,6 +492,7 @@ subroutine phase_results()
|
||||||
|
|
||||||
call mechanical_results(group,ph)
|
call mechanical_results(group,ph)
|
||||||
call damage_results(group,ph)
|
call damage_results(group,ph)
|
||||||
|
call thermal_results(group,ph)
|
||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ end subroutine damage_results
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief contains the constitutive equation for calculating the rate of change of microstructure
|
!> @brief Constitutive equation for calculating the rate of change of microstructure.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function phase_damage_collectDotState(ph,en) result(broken)
|
function phase_damage_collectDotState(ph,en) result(broken)
|
||||||
|
|
||||||
|
|
|
@ -880,7 +880,7 @@ end function integrateStateRK
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief writes crystallite results to HDF5 output file
|
!> @brief Write mechanical results to HDF5 output file.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine results(group,ph)
|
subroutine results(group,ph)
|
||||||
|
|
||||||
|
@ -1336,5 +1336,4 @@ module subroutine phase_set_F(F,co,ce)
|
||||||
|
|
||||||
end subroutine phase_set_F
|
end subroutine phase_set_F
|
||||||
|
|
||||||
|
|
||||||
end submodule mechanical
|
end submodule mechanical
|
||||||
|
|
|
@ -6,6 +6,7 @@ submodule(phase) thermal
|
||||||
type :: tThermalParameters
|
type :: tThermalParameters
|
||||||
real(pReal) :: C_p = 0.0_pReal !< heat capacity
|
real(pReal) :: C_p = 0.0_pReal !< heat capacity
|
||||||
real(pReal), dimension(3,3) :: K = 0.0_pReal !< thermal conductivity
|
real(pReal), dimension(3,3) :: K = 0.0_pReal !< thermal conductivity
|
||||||
|
character(len=pStringLen), allocatable, dimension(:) :: output
|
||||||
end type tThermalParameters
|
end type tThermalParameters
|
||||||
|
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
|
@ -108,6 +109,11 @@ module subroutine thermal_init(phases)
|
||||||
if (any(phase_lattice(ph) == ['hP','tI'])) param(ph)%K(3,3) = thermal%get_asFloat('K_33')
|
if (any(phase_lattice(ph) == ['hP','tI'])) param(ph)%K(3,3) = thermal%get_asFloat('K_33')
|
||||||
param(ph)%K = lattice_symmetrize_33(param(ph)%K,phase_lattice(ph))
|
param(ph)%K = lattice_symmetrize_33(param(ph)%K,phase_lattice(ph))
|
||||||
|
|
||||||
|
#if defined(__GFORTRAN__)
|
||||||
|
param(ph)%output = output_as1dString(thermal)
|
||||||
|
#else
|
||||||
|
param(ph)%output = thermal%get_as1dString('output',defaultVal=emptyStringArray)
|
||||||
|
#endif
|
||||||
sources => thermal%get('source',defaultVal=emptyList)
|
sources => thermal%get('source',defaultVal=emptyList)
|
||||||
thermal_Nsources(ph) = sources%length
|
thermal_Nsources(ph) = sources%length
|
||||||
else
|
else
|
||||||
|
@ -381,4 +387,35 @@ function thermal_active(source_label,src_length) result(active_source)
|
||||||
end function thermal_active
|
end function thermal_active
|
||||||
|
|
||||||
|
|
||||||
|
!----------------------------------------------------------------------------------------------
|
||||||
|
!< @brief writes damage sources results to HDF5 output file
|
||||||
|
!----------------------------------------------------------------------------------------------
|
||||||
|
module subroutine thermal_results(group,ph)
|
||||||
|
|
||||||
|
character(len=*), intent(in) :: group
|
||||||
|
integer, intent(in) :: ph
|
||||||
|
|
||||||
|
|
||||||
|
integer :: ou
|
||||||
|
|
||||||
|
if (allocated(param(ph)%output)) then
|
||||||
|
call results_closeGroup(results_addGroup(group//'thermal'))
|
||||||
|
else
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
do ou = 1, size(param(ph)%output)
|
||||||
|
|
||||||
|
select case(trim(param(ph)%output(ou)))
|
||||||
|
|
||||||
|
case ('T')
|
||||||
|
call results_writeDataset(current(ph)%T,group//'thermal','T', 'temperature','T')
|
||||||
|
|
||||||
|
end select
|
||||||
|
|
||||||
|
end do
|
||||||
|
|
||||||
|
end subroutine thermal_results
|
||||||
|
|
||||||
|
|
||||||
end submodule thermal
|
end submodule thermal
|
||||||
|
|
Loading…
Reference in New Issue