solver should not solve for field if homogenization description is absent
This commit is contained in:
parent
e1f6195276
commit
5c221e16e1
|
@ -479,6 +479,8 @@ subroutine IO_error(error_ID,ext_msg,label1,ID1,label2,ID2)
|
||||||
! homogenization errors
|
! homogenization errors
|
||||||
case (500)
|
case (500)
|
||||||
msg = 'unknown homogenization specified'
|
msg = 'unknown homogenization specified'
|
||||||
|
case (501)
|
||||||
|
msg = 'homogenization description absent'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! user errors
|
! user errors
|
||||||
|
|
|
@ -92,6 +92,8 @@ subroutine grid_damage_spectral_init()
|
||||||
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
||||||
print'( 1x,a)', 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
print'( 1x,a)', 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
||||||
|
|
||||||
|
if (.not. homogenization_damage_active()) call IO_error(501,ext_msg='damage')
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! read numerical parameters and do sanity checks
|
! read numerical parameters and do sanity checks
|
||||||
num_grid => config_numerics%get_dict('grid',defaultVal=emptyDict)
|
num_grid => config_numerics%get_dict('grid',defaultVal=emptyDict)
|
||||||
|
|
|
@ -87,6 +87,8 @@ subroutine grid_thermal_spectral_init()
|
||||||
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
print'(/,1x,a)', 'P. Shanthraj et al., Handbook of Mechanics of Materials, 2019'
|
||||||
print'( 1x,a)', 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
print'( 1x,a)', 'https://doi.org/10.1007/978-981-10-6855-3_80'
|
||||||
|
|
||||||
|
if (.not. homogenization_thermal_active()) call IO_error(501,ext_msg='thermal')
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! read numerical parameters and do sanity checks
|
! read numerical parameters and do sanity checks
|
||||||
num_grid => config_numerics%get_dict('grid',defaultVal=emptyDict)
|
num_grid => config_numerics%get_dict('grid',defaultVal=emptyDict)
|
||||||
|
|
|
@ -126,6 +126,10 @@ module homogenization
|
||||||
logical, dimension(2) :: doneAndHappy
|
logical, dimension(2) :: doneAndHappy
|
||||||
end function mechanical_updateState
|
end function mechanical_updateState
|
||||||
|
|
||||||
|
module function homogenization_thermal_active() result(active)
|
||||||
|
logical :: active
|
||||||
|
end function homogenization_thermal_active
|
||||||
|
|
||||||
module function homogenization_mu_T(ce) result(mu)
|
module function homogenization_mu_T(ce) result(mu)
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
real(pReal) :: mu
|
real(pReal) :: mu
|
||||||
|
@ -146,6 +150,10 @@ module homogenization
|
||||||
real(pReal), intent(in) :: T, dot_T
|
real(pReal), intent(in) :: T, dot_T
|
||||||
end subroutine homogenization_thermal_setField
|
end subroutine homogenization_thermal_setField
|
||||||
|
|
||||||
|
module function homogenization_damage_active() result(active)
|
||||||
|
logical :: active
|
||||||
|
end function homogenization_damage_active
|
||||||
|
|
||||||
module function homogenization_mu_phi(ce) result(mu)
|
module function homogenization_mu_phi(ce) result(mu)
|
||||||
integer, intent(in) :: ce
|
integer, intent(in) :: ce
|
||||||
real(pReal) :: mu
|
real(pReal) :: mu
|
||||||
|
@ -175,10 +183,12 @@ module homogenization
|
||||||
homogenization_mechanical_response, &
|
homogenization_mechanical_response, &
|
||||||
homogenization_mechanical_response2, &
|
homogenization_mechanical_response2, &
|
||||||
homogenization_thermal_response, &
|
homogenization_thermal_response, &
|
||||||
|
homogenization_thermal_active, &
|
||||||
homogenization_mu_T, &
|
homogenization_mu_T, &
|
||||||
homogenization_K_T, &
|
homogenization_K_T, &
|
||||||
homogenization_f_T, &
|
homogenization_f_T, &
|
||||||
homogenization_thermal_setfield, &
|
homogenization_thermal_setfield, &
|
||||||
|
homogenization_damage_active, &
|
||||||
homogenization_mu_phi, &
|
homogenization_mu_phi, &
|
||||||
homogenization_K_phi, &
|
homogenization_K_phi, &
|
||||||
homogenization_f_phi, &
|
homogenization_f_phi, &
|
||||||
|
|
|
@ -72,6 +72,18 @@ module subroutine damage_init()
|
||||||
end subroutine damage_init
|
end subroutine damage_init
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief Check if damage homogemization description is present in the configuration file
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
module function homogenization_damage_active() result(active)
|
||||||
|
|
||||||
|
logical :: active
|
||||||
|
|
||||||
|
active = any(damage_active(:))
|
||||||
|
|
||||||
|
end function homogenization_damage_active
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Partition temperature onto the individual constituents.
|
!> @brief Partition temperature onto the individual constituents.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -78,10 +78,21 @@ module subroutine thermal_init()
|
||||||
end associate
|
end associate
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
|
||||||
end subroutine thermal_init
|
end subroutine thermal_init
|
||||||
|
|
||||||
|
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
!> @brief Check if thermal homogemization description is present in the configuration file
|
||||||
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
module function homogenization_thermal_active() result(active)
|
||||||
|
|
||||||
|
logical :: active
|
||||||
|
|
||||||
|
active = any(thermal_active(:))
|
||||||
|
|
||||||
|
end function homogenization_thermal_active
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Partition temperature onto the individual constituents.
|
!> @brief Partition temperature onto the individual constituents.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue