From ef543a5b4970d7fd49b26a3bed72939bed393936 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 28 Feb 2021 20:06:31 +0100 Subject: [PATCH] thermal solver is defined in load case not in numerics.yaml --- src/CPFEM.f90 | 10 +++++----- src/grid/DAMASK_grid.f90 | 4 ++-- src/homogenization.f90 | 14 ++++++-------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/CPFEM.f90 b/src/CPFEM.f90 index f0e510433..01b4c034d 100644 --- a/src/CPFEM.f90 +++ b/src/CPFEM.f90 @@ -178,11 +178,11 @@ subroutine CPFEM_general(mode, ffn, ffn1, temperature_inp, dt, elFE, ip, cauchyS if (iand(mode, CPFEM_AGERESULTS) /= 0_pInt) call CPFEM_forward - chosenThermal1: select case (thermal_type(material_homogenizationAt(elCP))) - !case (THERMAL_conduction_ID) chosenThermal1 - ! temperature(material_homogenizationAt(elCP))%p(material_homogenizationMemberAt(ip,elCP)) = & - ! temperature_inp - end select chosenThermal1 + !chosenThermal1: select case (thermal_type(material_homogenizationAt(elCP))) + ! case (THERMAL_conduction_ID) chosenThermal1 + ! temperature(material_homogenizationAt(elCP))%p(material_homogenizationMemberAt(ip,elCP)) = & + ! temperature_inp + !end select chosenThermal1 homogenization_F0(1:3,1:3,ma) = ffn homogenization_F(1:3,1:3,ma) = ffn1 diff --git a/src/grid/DAMASK_grid.f90 b/src/grid/DAMASK_grid.f90 index 36ebf51a3..7155a5c80 100644 --- a/src/grid/DAMASK_grid.f90 +++ b/src/grid/DAMASK_grid.f90 @@ -163,14 +163,14 @@ program DAMASK_grid !-------------------------------------------------------------------------------------------------- ! initialize field solver information - if (any(thermal_type == THERMAL_conduction_ID )) nActiveFields = nActiveFields + 1 + if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1 if (any(damage_type == DAMAGE_nonlocal_ID )) nActiveFields = nActiveFields + 1 allocate(solres(nActiveFields)) allocate(ID(nActiveFields)) field = 1 ID(field) = FIELD_MECH_ID ! mechanical active by default - thermalActive: if (any(thermal_type == THERMAL_conduction_ID)) then + thermalActive: if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') then field = field + 1 ID(field) = FIELD_THERMAL_ID endif thermalActive diff --git a/src/homogenization.f90 b/src/homogenization.f90 index 52e90a857..7c0c1531b 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -39,11 +39,11 @@ module homogenization real(pReal), dimension(:), allocatable, public, protected :: & thermal_initialT - integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable, public, protected :: & + integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: & thermal_type !< thermal transport model integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: & damage_type !< nonlocal damage model - integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable, public, protected :: & + integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: & homogenization_type !< type of each homogenization type, private :: tNumerics_damage @@ -553,10 +553,10 @@ subroutine material_parseHomogenization material_homogenization => config_material%get('homogenization') - 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) + 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) @@ -578,8 +578,6 @@ subroutine material_parseHomogenization thermal_initialT(h) = homogThermal%get_asFloat('T_0',defaultVal=300.0_pReal) select case (homogThermal%get_asString('type')) - case('isothermal') - thermal_type(h) = THERMAL_isothermal_ID case('conduction') thermal_type(h) = THERMAL_conduction_ID case default