using initial temperature from load case file

This commit is contained in:
Martin Diehl 2021-02-28 21:51:07 +01:00
parent 0cde43198f
commit 8af0c8dbc3
5 changed files with 9 additions and 14 deletions

@ -1 +1 @@
Subproject commit 23ef2dcf34729c8b05caba62f648149ca37a68c9
Subproject commit 89eb15f1d771279be8ff444202c32b6797e77bd7

View File

@ -54,7 +54,7 @@ program DAMASK_grid
integer, parameter :: &
subStepFactor = 2 !< for each substep, divide the last time increment by 2.0
real(pReal) :: &
T_0 = 273.0_pReal, &
T_0 = 300.0_pReal, &
time = 0.0_pReal, & !< elapsed time
time0 = 0.0_pReal, & !< begin of interval
timeinc = 1.0_pReal, & !< current time interval
@ -309,11 +309,11 @@ program DAMASK_grid
call mechanical_init
case(FIELD_THERMAL_ID)
if (solver%contains('initial_conditions')) then
initial_conditions => solver%get('initial_conditions')
if (config_load%contains('initial_conditions')) then
initial_conditions => config_load%get('initial_conditions')
if (initial_conditions%contains('thermal')) then
thermal => solver%get('thermal')
T_0 = thermal%get_asFloat('thermal',defaultVal = T_0)
thermal => initial_conditions%get('thermal')
T_0 = thermal%get_asFloat('T',defaultVal = T_0)
endif
endif
call grid_thermal_spectral_init(T_0)

View File

@ -133,9 +133,10 @@ subroutine grid_thermal_spectral_init(T_0)
ce = 0
do k = 1, grid3; do j = 1, grid(2); do i = 1,grid(1)
ce = ce + 1
T_current(i,j,k) = homogenization_thermal_T(ce)
T_current(i,j,k) = T_0
T_lastInc(i,j,k) = T_current(i,j,k)
T_stagInc(i,j,k) = T_current(i,j,k)
call homogenization_thermal_setField(T_0,0.0_pReal,ce)
enddo; enddo; enddo
call DMDAVecGetArrayF90(thermal_grid,solution_vec,x_scal,ierr); CHKERRQ(ierr) !< get the data out of PETSc to work with
x_scal(xstart:xend,ystart:yend,zstart:zend) = T_current

View File

@ -35,10 +35,6 @@ module homogenization
homogState, &
damageState_h
real(pReal), dimension(:), allocatable, public, protected :: &
thermal_initialT
integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: &
thermal_type !< thermal transport model
integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: &
@ -556,7 +552,6 @@ subroutine material_parseHomogenization
allocate(homogenization_type(size(material_name_homogenization)), source=HOMOGENIZATION_undefined_ID)
allocate(thermal_type(size(material_name_homogenization)), source=THERMAL_isothermal_ID)
allocate(damage_type (size(material_name_homogenization)), source=DAMAGE_none_ID)
allocate(thermal_initialT(size(material_name_homogenization)), source=300.0_pReal)
do h=1, size(material_name_homogenization)
homog => material_homogenization%get(h)
@ -575,7 +570,6 @@ subroutine material_parseHomogenization
if(homog%contains('thermal')) then
homogThermal => homog%get('thermal')
thermal_initialT(h) = homogThermal%get_asFloat('T_0',defaultVal=300.0_pReal)
select case (homogThermal%get_asString('type'))
case('pass')

View File

@ -44,7 +44,7 @@ module subroutine thermal_init()
allocate(current(configHomogenizations%length))
do ho = 1, configHomogenizations%length
allocate(current(ho)%T(count(material_homogenizationAt2==ho)), source=thermal_initialT(ho))
allocate(current(ho)%T(count(material_homogenizationAt2==ho)), source=300.0_pReal)
allocate(current(ho)%dot_T(count(material_homogenizationAt2==ho)), source=0.0_pReal)
configHomogenization => configHomogenizations%get(ho)
associate(prm => param(ho))