basic functionality for thermal homogenization
This commit is contained in:
parent
0dac5f84ef
commit
bc12ac44c3
|
@ -112,13 +112,15 @@ module constitutive
|
||||||
interface
|
interface
|
||||||
|
|
||||||
! == cleaned:begin =================================================================================
|
! == cleaned:begin =================================================================================
|
||||||
module subroutine mech_init
|
module subroutine mech_init(phases)
|
||||||
|
class(tNode), pointer :: phases
|
||||||
end subroutine mech_init
|
end subroutine mech_init
|
||||||
|
|
||||||
module subroutine damage_init
|
module subroutine damage_init
|
||||||
end subroutine damage_init
|
end subroutine damage_init
|
||||||
|
|
||||||
module subroutine thermal_init
|
module subroutine thermal_init(phases)
|
||||||
|
class(tNode), pointer :: phases
|
||||||
end subroutine thermal_init
|
end subroutine thermal_init
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,10 +199,10 @@ module constitutive
|
||||||
real(pReal), dimension(3,3) :: P
|
real(pReal), dimension(3,3) :: P
|
||||||
end function constitutive_mech_getP
|
end function constitutive_mech_getP
|
||||||
|
|
||||||
module function constitutive_thermal_T(co,ip,el) result(T)
|
module function thermal_T(ph,me) result(T)
|
||||||
integer, intent(in) :: co, ip, el
|
integer, intent(in) :: ph,me
|
||||||
real(pReal) :: T
|
real(pReal) :: T
|
||||||
end function constitutive_thermal_T
|
end function thermal_T
|
||||||
|
|
||||||
|
|
||||||
module subroutine constitutive_mech_setF(F,co,ip,el)
|
module subroutine constitutive_mech_setF(F,co,ip,el)
|
||||||
|
@ -463,6 +465,8 @@ subroutine constitutive_init
|
||||||
phases
|
phases
|
||||||
|
|
||||||
|
|
||||||
|
print'(/,a)', ' <<<+- constitutive init -+>>>'; flush(IO_STDOUT)
|
||||||
|
|
||||||
debug_constitutive => config_debug%get('constitutive', defaultVal=emptyList)
|
debug_constitutive => config_debug%get('constitutive', defaultVal=emptyList)
|
||||||
debugConstitutive%basic = debug_constitutive%contains('basic')
|
debugConstitutive%basic = debug_constitutive%contains('basic')
|
||||||
debugConstitutive%extensive = debug_constitutive%contains('extensive')
|
debugConstitutive%extensive = debug_constitutive%contains('extensive')
|
||||||
|
@ -471,15 +475,14 @@ subroutine constitutive_init
|
||||||
debugConstitutive%ip = config_debug%get_asInt('integrationpoint',defaultVal = 1)
|
debugConstitutive%ip = config_debug%get_asInt('integrationpoint',defaultVal = 1)
|
||||||
debugConstitutive%grain = config_debug%get_asInt('grain',defaultVal = 1)
|
debugConstitutive%grain = config_debug%get_asInt('grain',defaultVal = 1)
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
|
||||||
! initialize constitutive laws
|
|
||||||
print'(/,a)', ' <<<+- constitutive init -+>>>'; flush(IO_STDOUT)
|
|
||||||
call mech_init
|
|
||||||
call damage_init
|
|
||||||
call thermal_init
|
|
||||||
|
|
||||||
|
|
||||||
phases => config_material%get('phase')
|
phases => config_material%get('phase')
|
||||||
|
|
||||||
|
call mech_init(phases)
|
||||||
|
call damage_init
|
||||||
|
call thermal_init(phases)
|
||||||
|
|
||||||
|
|
||||||
constitutive_source_maxSizeDotState = 0
|
constitutive_source_maxSizeDotState = 0
|
||||||
PhaseLoop2:do ph = 1,phases%length
|
PhaseLoop2:do ph = 1,phases%length
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -319,7 +319,10 @@ contains
|
||||||
!> @brief Initialize mechanical field related constitutive models
|
!> @brief Initialize mechanical field related constitutive models
|
||||||
!> @details Initialize elasticity, plasticity and stiffness degradation models.
|
!> @details Initialize elasticity, plasticity and stiffness degradation models.
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module subroutine mech_init
|
module subroutine mech_init(phases)
|
||||||
|
|
||||||
|
class(tNode), pointer :: &
|
||||||
|
phases
|
||||||
|
|
||||||
integer :: &
|
integer :: &
|
||||||
el, &
|
el, &
|
||||||
|
@ -331,7 +334,6 @@ module subroutine mech_init
|
||||||
Nconstituents
|
Nconstituents
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
num_crystallite, &
|
num_crystallite, &
|
||||||
phases, &
|
|
||||||
phase, &
|
phase, &
|
||||||
mech, &
|
mech, &
|
||||||
elastic, &
|
elastic, &
|
||||||
|
@ -341,7 +343,6 @@ module subroutine mech_init
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC?
|
! initialize elasticity (hooke) !ToDO: Maybe move to elastic submodule along with function homogenizedC?
|
||||||
phases => config_material%get('phase')
|
|
||||||
allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID)
|
allocate(phase_elasticity(phases%length), source = ELASTICITY_undefined_ID)
|
||||||
allocate(phase_elasticityInstance(phases%length), source = 0)
|
allocate(phase_elasticityInstance(phases%length), source = 0)
|
||||||
allocate(phase_NstiffnessDegradations(phases%length),source=0)
|
allocate(phase_NstiffnessDegradations(phases%length),source=0)
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
!----------------------------------------------------------------------------------------------------
|
!----------------------------------------------------------------------------------------------------
|
||||||
submodule(constitutive) constitutive_thermal
|
submodule(constitutive) constitutive_thermal
|
||||||
|
|
||||||
|
type :: tDataContainer
|
||||||
|
real(pReal), dimension(:), allocatable :: T
|
||||||
|
end type tDataContainer
|
||||||
|
|
||||||
|
type(tDataContainer), dimension(:), allocatable :: current
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
module function source_thermal_dissipation_init(source_length) result(mySources)
|
module function source_thermal_dissipation_init(source_length) result(mySources)
|
||||||
|
@ -49,7 +55,28 @@ contains
|
||||||
!----------------------------------------------------------------------------------------------
|
!----------------------------------------------------------------------------------------------
|
||||||
!< @brief initializes thermal sources and kinematics mechanism
|
!< @brief initializes thermal sources and kinematics mechanism
|
||||||
!----------------------------------------------------------------------------------------------
|
!----------------------------------------------------------------------------------------------
|
||||||
module subroutine thermal_init
|
module subroutine thermal_init(phases)
|
||||||
|
|
||||||
|
class(tNode), pointer :: &
|
||||||
|
phases
|
||||||
|
|
||||||
|
integer :: &
|
||||||
|
ph, &
|
||||||
|
Nconstituents
|
||||||
|
|
||||||
|
|
||||||
|
print'(/,a)', ' <<<+- constitutive_mech init -+>>>'
|
||||||
|
|
||||||
|
allocate(current(phases%length))
|
||||||
|
|
||||||
|
|
||||||
|
do ph = 1, phases%length
|
||||||
|
|
||||||
|
Nconstituents = count(material_phaseAt == ph) * discretization_nIPs
|
||||||
|
|
||||||
|
allocate(current(ph)%T(Nconstituents))
|
||||||
|
|
||||||
|
enddo
|
||||||
|
|
||||||
! initialize source mechanisms
|
! initialize source mechanisms
|
||||||
if(maxval(phase_Nsources) /= 0) then
|
if(maxval(phase_Nsources) /= 0) then
|
||||||
|
@ -122,21 +149,16 @@ end subroutine constitutive_thermal_getRateAndItsTangents
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
! getter for non-thermal (e.g. mech)
|
! getter for non-thermal (e.g. mech)
|
||||||
module function constitutive_thermal_T(co,ip,el) result(T)
|
module function thermal_T(ph,me) result(T)
|
||||||
|
|
||||||
integer, intent(in) :: co, ip, el
|
integer, intent(in) :: ph, me
|
||||||
real(pReal) :: T
|
real(pReal) :: T
|
||||||
|
|
||||||
integer :: ho, tme
|
|
||||||
|
|
||||||
ho = material_homogenizationAt(el)
|
T = current(ph)%T(me)
|
||||||
tme = material_homogenizationMemberAt(ip,el)
|
|
||||||
|
|
||||||
T = temperature(ho)%p(tme)
|
end function thermal_T
|
||||||
|
|
||||||
end function constitutive_thermal_T
|
|
||||||
|
|
||||||
|
|
||||||
! setter for homogenization
|
! setter for homogenization
|
||||||
|
|
Loading…
Reference in New Issue