same names for same variables
This commit is contained in:
parent
fed778974d
commit
9f8fbaa9f7
|
@ -37,16 +37,14 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine damage_local_init
|
subroutine damage_local_init
|
||||||
|
|
||||||
integer :: maxNinstance,NofMyHomog,h
|
integer :: Ninstance,NofMyHomog,h
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_local_label//' init -+>>>'; flush(6)
|
write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_local_label//' init -+>>>'; flush(6)
|
||||||
|
|
||||||
maxNinstance = count(damage_type == DAMAGE_local_ID)
|
Ninstance = count(damage_type == DAMAGE_local_ID)
|
||||||
if (maxNinstance == 0) return
|
allocate(param(Ninstance))
|
||||||
|
|
||||||
allocate(param(maxNinstance))
|
do h = 1, size(config_homogenization)
|
||||||
|
|
||||||
do h = 1, size(damage_type)
|
|
||||||
if (damage_type(h) /= DAMAGE_LOCAL_ID) cycle
|
if (damage_type(h) /= DAMAGE_LOCAL_ID) cycle
|
||||||
associate(prm => param(damage_typeInstance(h)),config => config_homogenization(h))
|
associate(prm => param(damage_typeInstance(h)),config => config_homogenization(h))
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ module damage_none
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
public
|
public
|
||||||
|
|
||||||
contains
|
contains
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
|
@ -28,10 +28,10 @@ subroutine damage_none_init
|
||||||
allocate(damageState(h)%state0 (0,NofMyHomog))
|
allocate(damageState(h)%state0 (0,NofMyHomog))
|
||||||
allocate(damageState(h)%subState0(0,NofMyHomog))
|
allocate(damageState(h)%subState0(0,NofMyHomog))
|
||||||
allocate(damageState(h)%state (0,NofMyHomog))
|
allocate(damageState(h)%state (0,NofMyHomog))
|
||||||
|
|
||||||
deallocate(damage(h)%p)
|
deallocate(damage(h)%p)
|
||||||
allocate (damage(h)%p(1), source=damage_initialPhi(h))
|
allocate (damage(h)%p(1), source=damage_initialPhi(h))
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end subroutine damage_none_init
|
end subroutine damage_none_init
|
||||||
|
|
|
@ -42,16 +42,14 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine damage_nonlocal_init
|
subroutine damage_nonlocal_init
|
||||||
|
|
||||||
integer :: maxNinstance,NofMyHomog,h
|
integer :: Ninstance,NofMyHomog,h
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_nonlocal_label//' init -+>>>'; flush(6)
|
write(6,'(/,a)') ' <<<+- damage_'//DAMAGE_nonlocal_label//' init -+>>>'; flush(6)
|
||||||
|
|
||||||
maxNinstance = count(damage_type == DAMAGE_nonlocal_ID)
|
Ninstance = count(damage_type == DAMAGE_nonlocal_ID)
|
||||||
if (maxNinstance == 0) return
|
allocate(param(Ninstance))
|
||||||
|
|
||||||
allocate(param(maxNinstance))
|
do h = 1, size(config_homogenization)
|
||||||
|
|
||||||
do h = 1, size(damage_type)
|
|
||||||
if (damage_type(h) /= DAMAGE_NONLOCAL_ID) cycle
|
if (damage_type(h) /= DAMAGE_NONLOCAL_ID) cycle
|
||||||
associate(prm => param(damage_typeInstance(h)),config => config_homogenization(h))
|
associate(prm => param(damage_typeInstance(h)),config => config_homogenization(h))
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ module thermal_conduction
|
||||||
use crystallite
|
use crystallite
|
||||||
use source_thermal_dissipation
|
use source_thermal_dissipation
|
||||||
use source_thermal_externalheat
|
use source_thermal_externalheat
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
private
|
private
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ module thermal_conduction
|
||||||
character(len=pStringLen), allocatable, dimension(:) :: &
|
character(len=pStringLen), allocatable, dimension(:) :: &
|
||||||
output
|
output
|
||||||
end type tParameters
|
end type tParameters
|
||||||
|
|
||||||
type(tparameters), dimension(:), allocatable :: &
|
type(tparameters), dimension(:), allocatable :: &
|
||||||
param
|
param
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
thermal_conduction_init, &
|
thermal_conduction_init, &
|
||||||
thermal_conduction_getSourceAndItsTangent, &
|
thermal_conduction_getSourceAndItsTangent, &
|
||||||
|
@ -41,37 +41,34 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine thermal_conduction_init
|
subroutine thermal_conduction_init
|
||||||
|
|
||||||
|
integer :: Ninstance,NofMyHomog,h
|
||||||
integer :: maxNinstance,NofMyHomog,h
|
|
||||||
|
|
||||||
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_CONDUCTION_label//' init -+>>>'; flush(6)
|
write(6,'(/,a)') ' <<<+- thermal_'//THERMAL_CONDUCTION_label//' init -+>>>'; flush(6)
|
||||||
|
|
||||||
maxNinstance = count(thermal_type == THERMAL_conduction_ID)
|
Ninstance = count(thermal_type == THERMAL_conduction_ID)
|
||||||
if (maxNinstance == 0) return
|
allocate(param(Ninstance))
|
||||||
|
|
||||||
allocate(param(maxNinstance))
|
do h = 1, size(config_homogenization)
|
||||||
|
|
||||||
do h = 1, size(thermal_type)
|
|
||||||
if (thermal_type(h) /= THERMAL_conduction_ID) cycle
|
if (thermal_type(h) /= THERMAL_conduction_ID) cycle
|
||||||
associate(prm => param(thermal_typeInstance(h)),config => config_homogenization(h))
|
associate(prm => param(thermal_typeInstance(h)),config => config_homogenization(h))
|
||||||
|
|
||||||
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
|
prm%output = config%getStrings('(output)',defaultVal=emptyStringArray)
|
||||||
|
|
||||||
NofMyHomog=count(material_homogenizationAt==h)
|
NofMyHomog=count(material_homogenizationAt==h)
|
||||||
thermalState(h)%sizeState = 0
|
thermalState(h)%sizeState = 0
|
||||||
allocate(thermalState(h)%state0 (0,NofMyHomog))
|
allocate(thermalState(h)%state0 (0,NofMyHomog))
|
||||||
allocate(thermalState(h)%subState0(0,NofMyHomog))
|
allocate(thermalState(h)%subState0(0,NofMyHomog))
|
||||||
allocate(thermalState(h)%state (0,NofMyHomog))
|
allocate(thermalState(h)%state (0,NofMyHomog))
|
||||||
|
|
||||||
thermalMapping(h)%p => material_homogenizationMemberAt
|
thermalMapping(h)%p => material_homogenizationMemberAt
|
||||||
deallocate(temperature (h)%p)
|
deallocate(temperature (h)%p)
|
||||||
allocate (temperature (h)%p(NofMyHomog), source=thermal_initialT(h))
|
allocate (temperature (h)%p(NofMyHomog), source=thermal_initialT(h))
|
||||||
deallocate(temperatureRate(h)%p)
|
deallocate(temperatureRate(h)%p)
|
||||||
allocate (temperatureRate(h)%p(NofMyHomog), source=0.0_pReal)
|
allocate (temperatureRate(h)%p(NofMyHomog), source=0.0_pReal)
|
||||||
|
|
||||||
end associate
|
end associate
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
end subroutine thermal_conduction_init
|
end subroutine thermal_conduction_init
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,7 +76,7 @@ end subroutine thermal_conduction_init
|
||||||
!> @brief returns heat generation rate
|
!> @brief returns heat generation rate
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
el !< element number
|
el !< element number
|
||||||
|
@ -97,48 +94,48 @@ subroutine thermal_conduction_getSourceAndItsTangent(Tdot, dTdot_dT, T, ip, el)
|
||||||
grain, &
|
grain, &
|
||||||
source, &
|
source, &
|
||||||
constituent
|
constituent
|
||||||
|
|
||||||
homog = material_homogenizationAt(el)
|
homog = material_homogenizationAt(el)
|
||||||
offset = material_homogenizationMemberAt(ip,el)
|
offset = material_homogenizationMemberAt(ip,el)
|
||||||
instance = thermal_typeInstance(homog)
|
instance = thermal_typeInstance(homog)
|
||||||
|
|
||||||
Tdot = 0.0_pReal
|
Tdot = 0.0_pReal
|
||||||
dTdot_dT = 0.0_pReal
|
dTdot_dT = 0.0_pReal
|
||||||
do grain = 1, homogenization_Ngrains(homog)
|
do grain = 1, homogenization_Ngrains(homog)
|
||||||
phase = material_phaseAt(grain,el)
|
phase = material_phaseAt(grain,el)
|
||||||
constituent = material_phasememberAt(grain,ip,el)
|
constituent = material_phasememberAt(grain,ip,el)
|
||||||
do source = 1, phase_Nsources(phase)
|
do source = 1, phase_Nsources(phase)
|
||||||
select case(phase_source(source,phase))
|
select case(phase_source(source,phase))
|
||||||
case (SOURCE_thermal_dissipation_ID)
|
case (SOURCE_thermal_dissipation_ID)
|
||||||
call source_thermal_dissipation_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
call source_thermal_dissipation_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
||||||
crystallite_S(1:3,1:3,grain,ip,el), &
|
crystallite_S(1:3,1:3,grain,ip,el), &
|
||||||
crystallite_Lp(1:3,1:3,grain,ip,el), &
|
crystallite_Lp(1:3,1:3,grain,ip,el), &
|
||||||
phase)
|
phase)
|
||||||
|
|
||||||
case (SOURCE_thermal_externalheat_ID)
|
case (SOURCE_thermal_externalheat_ID)
|
||||||
call source_thermal_externalheat_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
call source_thermal_externalheat_getRateAndItsTangent(my_Tdot, my_dTdot_dT, &
|
||||||
phase, constituent)
|
phase, constituent)
|
||||||
case default
|
case default
|
||||||
my_Tdot = 0.0_pReal
|
my_Tdot = 0.0_pReal
|
||||||
my_dTdot_dT = 0.0_pReal
|
my_dTdot_dT = 0.0_pReal
|
||||||
|
|
||||||
end select
|
end select
|
||||||
Tdot = Tdot + my_Tdot
|
Tdot = Tdot + my_Tdot
|
||||||
dTdot_dT = dTdot_dT + my_dTdot_dT
|
dTdot_dT = dTdot_dT + my_dTdot_dT
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
Tdot = Tdot/real(homogenization_Ngrains(homog),pReal)
|
Tdot = Tdot/real(homogenization_Ngrains(homog),pReal)
|
||||||
dTdot_dT = dTdot_dT/real(homogenization_Ngrains(homog),pReal)
|
dTdot_dT = dTdot_dT/real(homogenization_Ngrains(homog),pReal)
|
||||||
|
|
||||||
end subroutine thermal_conduction_getSourceAndItsTangent
|
end subroutine thermal_conduction_getSourceAndItsTangent
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns homogenized thermal conductivity in reference configuration
|
!> @brief returns homogenized thermal conductivity in reference configuration
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function thermal_conduction_getConductivity(ip,el)
|
function thermal_conduction_getConductivity(ip,el)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
el !< element number
|
el !< element number
|
||||||
|
@ -146,17 +143,17 @@ function thermal_conduction_getConductivity(ip,el)
|
||||||
thermal_conduction_getConductivity
|
thermal_conduction_getConductivity
|
||||||
integer :: &
|
integer :: &
|
||||||
grain
|
grain
|
||||||
|
|
||||||
|
|
||||||
thermal_conduction_getConductivity = 0.0_pReal
|
thermal_conduction_getConductivity = 0.0_pReal
|
||||||
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
||||||
thermal_conduction_getConductivity = thermal_conduction_getConductivity + &
|
thermal_conduction_getConductivity = thermal_conduction_getConductivity + &
|
||||||
crystallite_push33ToRef(grain,ip,el,lattice_thermalConductivity(:,:,material_phaseAt(grain,el)))
|
crystallite_push33ToRef(grain,ip,el,lattice_thermalConductivity(:,:,material_phaseAt(grain,el)))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
thermal_conduction_getConductivity = thermal_conduction_getConductivity &
|
thermal_conduction_getConductivity = thermal_conduction_getConductivity &
|
||||||
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
||||||
|
|
||||||
end function thermal_conduction_getConductivity
|
end function thermal_conduction_getConductivity
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +161,7 @@ end function thermal_conduction_getConductivity
|
||||||
!> @brief returns homogenized specific heat capacity
|
!> @brief returns homogenized specific heat capacity
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function thermal_conduction_getSpecificHeat(ip,el)
|
function thermal_conduction_getSpecificHeat(ip,el)
|
||||||
|
|
||||||
integer, intent(in) :: &
|
integer, intent(in) :: &
|
||||||
ip, & !< integration point number
|
ip, & !< integration point number
|
||||||
el !< element number
|
el !< element number
|
||||||
|
@ -172,17 +169,17 @@ function thermal_conduction_getSpecificHeat(ip,el)
|
||||||
thermal_conduction_getSpecificHeat
|
thermal_conduction_getSpecificHeat
|
||||||
integer :: &
|
integer :: &
|
||||||
grain
|
grain
|
||||||
|
|
||||||
thermal_conduction_getSpecificHeat = 0.0_pReal
|
thermal_conduction_getSpecificHeat = 0.0_pReal
|
||||||
|
|
||||||
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
||||||
thermal_conduction_getSpecificHeat = thermal_conduction_getSpecificHeat &
|
thermal_conduction_getSpecificHeat = thermal_conduction_getSpecificHeat &
|
||||||
+ lattice_specificHeat(material_phaseAt(grain,el))
|
+ lattice_specificHeat(material_phaseAt(grain,el))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
thermal_conduction_getSpecificHeat = thermal_conduction_getSpecificHeat &
|
thermal_conduction_getSpecificHeat = thermal_conduction_getSpecificHeat &
|
||||||
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
||||||
|
|
||||||
end function thermal_conduction_getSpecificHeat
|
end function thermal_conduction_getSpecificHeat
|
||||||
|
|
||||||
|
|
||||||
|
@ -198,18 +195,18 @@ function thermal_conduction_getMassDensity(ip,el)
|
||||||
thermal_conduction_getMassDensity
|
thermal_conduction_getMassDensity
|
||||||
integer :: &
|
integer :: &
|
||||||
grain
|
grain
|
||||||
|
|
||||||
thermal_conduction_getMassDensity = 0.0_pReal
|
thermal_conduction_getMassDensity = 0.0_pReal
|
||||||
|
|
||||||
|
|
||||||
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
do grain = 1, homogenization_Ngrains(material_homogenizationAt(el))
|
||||||
thermal_conduction_getMassDensity = thermal_conduction_getMassDensity &
|
thermal_conduction_getMassDensity = thermal_conduction_getMassDensity &
|
||||||
+ lattice_massDensity(material_phaseAt(grain,el))
|
+ lattice_massDensity(material_phaseAt(grain,el))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
thermal_conduction_getMassDensity = thermal_conduction_getMassDensity &
|
thermal_conduction_getMassDensity = thermal_conduction_getMassDensity &
|
||||||
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
/ real(homogenization_Ngrains(material_homogenizationAt(el)),pReal)
|
||||||
|
|
||||||
end function thermal_conduction_getMassDensity
|
end function thermal_conduction_getMassDensity
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,15 +223,15 @@ subroutine thermal_conduction_putTemperatureAndItsRate(T,Tdot,ip,el)
|
||||||
Tdot
|
Tdot
|
||||||
integer :: &
|
integer :: &
|
||||||
homog, &
|
homog, &
|
||||||
offset
|
offset
|
||||||
|
|
||||||
homog = material_homogenizationAt(el)
|
homog = material_homogenizationAt(el)
|
||||||
offset = thermalMapping(homog)%p(ip,el)
|
offset = thermalMapping(homog)%p(ip,el)
|
||||||
temperature (homog)%p(offset) = T
|
temperature (homog)%p(offset) = T
|
||||||
temperatureRate(homog)%p(offset) = Tdot
|
temperatureRate(homog)%p(offset) = Tdot
|
||||||
|
|
||||||
end subroutine thermal_conduction_putTemperatureAndItsRate
|
end subroutine thermal_conduction_putTemperatureAndItsRate
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief writes results to HDF5 output file
|
!> @brief writes results to HDF5 output file
|
||||||
|
@ -245,7 +242,7 @@ subroutine thermal_conduction_results(homog,group)
|
||||||
character(len=*), intent(in) :: group
|
character(len=*), intent(in) :: group
|
||||||
|
|
||||||
integer :: o
|
integer :: o
|
||||||
|
|
||||||
associate(prm => param(damage_typeInstance(homog)))
|
associate(prm => param(damage_typeInstance(homog)))
|
||||||
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)))
|
||||||
|
|
Loading…
Reference in New Issue