From 0cde43198f5fdc89bc817dc5243c8cd9d7da669b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 28 Feb 2021 20:49:51 +0100 Subject: [PATCH] modernizing: - 'pass' for dummy thermal homogenization - setting temperature in load case --- PRIVATE | 2 +- src/grid/DAMASK_grid.f90 | 14 ++++++++++++-- src/grid/grid_thermal_spectral.f90 | 4 +++- src/homogenization.f90 | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/PRIVATE b/PRIVATE index 738526ac7..23ef2dcf3 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 738526ac7ae63678c885faba7621782499f2bce9 +Subproject commit 23ef2dcf34729c8b05caba62f648149ca37a68c9 diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 7155a5c80..0461b43d9 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -54,6 +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, & time = 0.0_pReal, & !< elapsed time time0 = 0.0_pReal, & !< begin of interval timeinc = 1.0_pReal, & !< current time interval @@ -102,6 +103,9 @@ program DAMASK_grid load_steps, & load_step, & solver, & + initial_conditions, & + ic_thermal, & + thermal, & step_bc, & step_mech, & step_discretization, & @@ -181,7 +185,6 @@ program DAMASK_grid !-------------------------------------------------------------------------------------------------- - load_steps => config_load%get('loadstep') allocate(loadCases(load_steps%length)) ! array of load cases @@ -306,7 +309,14 @@ program DAMASK_grid call mechanical_init case(FIELD_THERMAL_ID) - call grid_thermal_spectral_init + if (solver%contains('initial_conditions')) then + initial_conditions => solver%get('initial_conditions') + if (initial_conditions%contains('thermal')) then + thermal => solver%get('thermal') + T_0 = thermal%get_asFloat('thermal',defaultVal = T_0) + endif + endif + call grid_thermal_spectral_init(T_0) case(FIELD_DAMAGE_ID) call grid_damage_spectral_init diff --git a/src/grid/grid_thermal_spectral.f90 b/src/grid/grid_thermal_spectral.f90 index 6403ee955..40a84a02e 100644 --- a/src/grid/grid_thermal_spectral.f90 +++ b/src/grid/grid_thermal_spectral.f90 @@ -61,7 +61,9 @@ contains !> @brief allocates all neccessary fields and fills them with data ! ToDo: Restart not implemented !-------------------------------------------------------------------------------------------------- -subroutine grid_thermal_spectral_init +subroutine grid_thermal_spectral_init(T_0) + + real(pReal), intent(in) :: T_0 PetscInt, dimension(0:worldsize-1) :: localK integer :: i, j, k, ce diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 7c0c1531b..1572a0197 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -578,7 +578,7 @@ subroutine material_parseHomogenization thermal_initialT(h) = homogThermal%get_asFloat('T_0',defaultVal=300.0_pReal) select case (homogThermal%get_asString('type')) - case('conduction') + case('pass') thermal_type(h) = THERMAL_conduction_ID case default call IO_error(500,ext_msg=homogThermal%get_asString('type'))