Merge branch 'thermal-isotropic-test' into 'development'

Thermal isotropic test

See merge request damask/DAMASK!608
This commit is contained in:
Martin Diehl 2022-06-27 05:22:20 +00:00
commit c8d40184bc
6 changed files with 32 additions and 33 deletions

@ -1 +1 @@
Subproject commit b14f78e96a8e2986aaf6845b98ea77fec92bc997 Subproject commit 646039bcf85760e92112eccb60b92b4125a28ed2

View File

@ -3,8 +3,6 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
submodule(homogenization) damage submodule(homogenization) damage
use lattice
interface interface
module subroutine pass_init module subroutine pass_init
@ -79,8 +77,9 @@ end subroutine damage_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module subroutine damage_partition(ce) module subroutine damage_partition(ce)
integer, intent(in) :: ce
real(pReal) :: phi real(pReal) :: phi
integer, intent(in) :: ce
if(damageState_h(material_homogenizationID(ce))%sizeState < 1) return if(damageState_h(material_homogenizationID(ce))%sizeState < 1) return
@ -91,7 +90,7 @@ end subroutine damage_partition
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized damage viscosity. !> @brief Homogenize damage viscosity.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_mu_phi(ce) result(mu) module function homogenization_mu_phi(ce) result(mu)
@ -105,7 +104,7 @@ end function homogenization_mu_phi
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized damage conductivity/diffusivity in reference configuration. !> @brief Homogenize damage conductivity.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_K_phi(ce) result(K) module function homogenization_K_phi(ce) result(K)
@ -119,13 +118,12 @@ end function homogenization_K_phi
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized damage driving force. !> @brief Homogenize damage driving force.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_f_phi(phi,ce) result(f) module function homogenization_f_phi(phi,ce) result(f)
integer, intent(in) :: ce integer, intent(in) :: ce
real(pReal), intent(in) :: & real(pReal), intent(in) :: phi
phi
real(pReal) :: f real(pReal) :: f
@ -140,8 +138,7 @@ end function homogenization_f_phi
module subroutine homogenization_set_phi(phi,ce) module subroutine homogenization_set_phi(phi,ce)
integer, intent(in) :: ce integer, intent(in) :: ce
real(pReal), intent(in) :: & real(pReal), intent(in) :: phi
phi
integer :: & integer :: &
ho, & ho, &

View File

@ -3,8 +3,6 @@
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
submodule(homogenization) thermal submodule(homogenization) thermal
use lattice
interface interface
module subroutine pass_init module subroutine pass_init
@ -89,7 +87,7 @@ end subroutine thermal_init
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module subroutine thermal_partition(ce) module subroutine thermal_partition(ce)
integer, intent(in) :: ce integer, intent(in) :: ce
real(pReal) :: T, dot_T real(pReal) :: T, dot_T
integer :: co integer :: co
@ -105,7 +103,7 @@ end subroutine thermal_partition
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized thermal viscosity. !> @brief Homogenize thermal viscosity.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_mu_T(ce) result(mu) module function homogenization_mu_T(ce) result(mu)
@ -124,7 +122,7 @@ end function homogenization_mu_T
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized thermal conductivity in reference configuration. !> @brief Homogenize thermal conductivity.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_K_T(ce) result(K) module function homogenization_K_T(ce) result(K)
@ -143,7 +141,7 @@ end function homogenization_K_T
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Homogenized heat generation rate. !> @brief Homogenize heat generation rate.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function homogenization_f_T(ce) result(f) module function homogenization_f_T(ce) result(f)
@ -167,7 +165,7 @@ end function homogenization_f_T
module subroutine homogenization_thermal_setField(T,dot_T, ce) module subroutine homogenization_thermal_setField(T,dot_T, ce)
integer, intent(in) :: ce integer, intent(in) :: ce
real(pReal), intent(in) :: T, dot_T real(pReal), intent(in) :: T, dot_T
current(material_homogenizationID(ce))%T(material_homogenizationEntry(ce)) = T current(material_homogenizationID(ce))%T(material_homogenizationEntry(ce)) = T
@ -187,6 +185,7 @@ module subroutine thermal_results(ho,group)
integer :: o integer :: o
associate(prm => param(ho)) associate(prm => param(ho))
outputsLoop: do o = 1,size(prm%output) outputsLoop: do o = 1,size(prm%output)
select case(trim(prm%output(o))) select case(trim(prm%output(o)))

View File

@ -626,9 +626,10 @@ function crystallite_push33ToRef(co,ce, tensor33)
ce ce
real(pReal), dimension(3,3) :: crystallite_push33ToRef real(pReal), dimension(3,3) :: crystallite_push33ToRef
real(pReal), dimension(3,3) :: T real(pReal), dimension(3,3) :: T
integer :: ph, en integer :: ph, en
ph = material_phaseID(co,ce) ph = material_phaseID(co,ce)
en = material_phaseEntry(co,ce) en = material_phaseEntry(co,ce)
T = matmul(phase_O_0(ph)%data(en)%asMatrix(),transpose(math_inv33(phase_F(co,ce)))) ! ToDo: initial orientation correct? T = matmul(phase_O_0(ph)%data(en)%asMatrix(),transpose(math_inv33(phase_F(co,ce)))) ! ToDo: initial orientation correct?

View File

@ -4,8 +4,9 @@
submodule(phase) damage submodule(phase) damage
type :: tDamageParameters type :: tDamageParameters
real(pReal) :: mu = 0.0_pReal !< viscosity real(pReal) :: &
real(pReal), dimension(3,3) :: D = 0.0_pReal !< conductivity/diffusivity mu = 0.0_pReal, & !< viscosity
l_c = 0.0_pReal !< characteristic length
end type tDamageParameters end type tDamageParameters
enum, bind(c); enumerator :: & enum, bind(c); enumerator :: &
@ -104,8 +105,8 @@ module subroutine damage_init
if (sources%length == 1) then if (sources%length == 1) then
damage_active = .true. damage_active = .true.
source => sources%get(1) source => sources%get(1)
param(ph)%mu = source%get_asFloat('mu') param(ph)%mu = source%get_asFloat('mu')
param(ph)%D = math_I3 * source%get_asFloat('l_c')**2 param(ph)%l_c = source%get_asFloat('l_c')
end if end if
end do end do
@ -117,7 +118,7 @@ module subroutine damage_init
where(anisobrittle_init()) phase_damage = DAMAGE_ANISOBRITTLE_ID where(anisobrittle_init()) phase_damage = DAMAGE_ANISOBRITTLE_ID
end if end if
phase_damage_maxSizeDotState = maxval(damageState%sizeDotState) phase_damage_maxSizeDotState = maxval(damageState%sizeDotState)
end subroutine damage_init end subroutine damage_init
@ -157,9 +158,9 @@ module function phase_damage_C66(C66,ph,en) result(C66_degraded)
damageType: select case (phase_damage(ph)) damageType: select case (phase_damage(ph))
case (DAMAGE_ISOBRITTLE_ID) damageType case (DAMAGE_ISOBRITTLE_ID) damageType
C66_degraded = C66 * damage_phi(ph,en)**2 C66_degraded = C66 * damage_phi(ph,en)**2
case default damageType case default damageType
C66_degraded = C66 C66_degraded = C66
end select damageType end select damageType
end function phase_damage_C66 end function phase_damage_C66
@ -385,7 +386,7 @@ module function phase_K_phi(co,ce) result(K)
real(pReal), dimension(3,3) :: K real(pReal), dimension(3,3) :: K
K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%D) K = crystallite_push33ToRef(co,ce,param(material_phaseID(co,ce))%l_c**2*math_I3)
end function phase_K_phi end function phase_K_phi

View File

@ -4,8 +4,8 @@
submodule(phase) thermal 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 character(len=pStringLen), allocatable, dimension(:) :: output
end type tThermalParameters end type tThermalParameters
@ -72,7 +72,7 @@ submodule(phase) thermal
contains contains
!---------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------
!< @brief initializes thermal sources and kinematics mechanism !< @brief Initializes thermal sources and kinematics mechanism.
!---------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------
module subroutine thermal_init(phases) module subroutine thermal_init(phases)
@ -146,7 +146,7 @@ end subroutine thermal_init
!---------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------
!< @brief calculates thermal dissipation rate !< @brief Calculate thermal source.
!---------------------------------------------------------------------------------------------- !----------------------------------------------------------------------------------------------
module function phase_f_T(ph,en) result(f) module function phase_f_T(ph,en) result(f)
@ -176,7 +176,7 @@ end function phase_f_T
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief contains the constitutive equation for calculating the rate of change of microstructure !> @brief tbd.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function phase_thermal_collectDotState(ph,en) result(broken) function phase_thermal_collectDotState(ph,en) result(broken)
@ -216,7 +216,7 @@ end function phase_mu_T
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
!> @brief Thermal conductivity/diffusivity in reference configuration. !> @brief Thermal conductivity in reference configuration.
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
module function phase_K_T(co,ce) result(K) module function phase_K_T(co,ce) result(K)
@ -255,6 +255,7 @@ function integrateThermalState(Delta_t, ph,en) result(broken)
so, & so, &
sizeDotState sizeDotState
broken = phase_thermal_collectDotState(ph,en) broken = phase_thermal_collectDotState(ph,en)
if (broken) return if (broken) return