new style configuration for damage

This commit is contained in:
Martin Diehl 2021-03-01 06:16:16 +01:00
parent 8af0c8dbc3
commit 2f68c43755
5 changed files with 13 additions and 18 deletions

@ -1 +1 @@
Subproject commit 89eb15f1d771279be8ff444202c32b6797e77bd7 Subproject commit 08e226ec735589123dd67f3e0a5bc447c3dda812

View File

@ -168,7 +168,7 @@ program DAMASK_grid
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! initialize field solver information ! initialize field solver information
if (solver%get_asString('thermal',defaultVal = 'n/a') == 'spectral') 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 if (solver%get_asString('damage', defaultVal = 'n/a') == 'spectral') nActiveFields = nActiveFields + 1
allocate(solres(nActiveFields)) allocate(solres(nActiveFields))
allocate(ID(nActiveFields)) allocate(ID(nActiveFields))
@ -178,7 +178,7 @@ program DAMASK_grid
field = field + 1 field = field + 1
ID(field) = FIELD_THERMAL_ID ID(field) = FIELD_THERMAL_ID
endif thermalActive endif thermalActive
damageActive: if (any(damage_type == DAMAGE_nonlocal_ID)) then damageActive: if (solver%get_asString('damage',defaultVal = 'n/a') == 'spectral') then
field = field + 1 field = field + 1
ID(field) = FIELD_DAMAGE_ID ID(field) = FIELD_DAMAGE_ID
endif damageActive endif damageActive

View File

@ -37,7 +37,7 @@ module homogenization
integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: & integer(kind(THERMAL_isothermal_ID)), dimension(:), allocatable :: &
thermal_type !< thermal transport model thermal_type !< thermal transport model
integer(kind(DAMAGE_none_ID)), dimension(:), allocatable, public, protected :: & integer(kind(DAMAGE_none_ID)), dimension(:), allocatable :: &
damage_type !< nonlocal damage model damage_type !< nonlocal damage model
integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: & integer(kind(HOMOGENIZATION_undefined_ID)), dimension(:), allocatable :: &
homogenization_type !< type of each homogenization homogenization_type !< type of each homogenization
@ -582,9 +582,7 @@ subroutine material_parseHomogenization
if(homog%contains('damage')) then if(homog%contains('damage')) then
homogDamage => homog%get('damage') homogDamage => homog%get('damage')
select case (homogDamage%get_asString('type')) select case (homogDamage%get_asString('type'))
case('none') case('pass')
damage_type(h) = DAMAGE_none_ID
case('nonlocal')
damage_type(h) = DAMAGE_nonlocal_ID damage_type(h) = DAMAGE_nonlocal_ID
case default case default
call IO_error(500,ext_msg=homogDamage%get_asString('type')) call IO_error(500,ext_msg=homogDamage%get_asString('type'))

View File

@ -30,7 +30,7 @@ module material
material_homogenizationAt, & !< homogenization ID of each element material_homogenizationAt, & !< homogenization ID of each element
material_homogenizationAt2, & !< per cell material_homogenizationAt2, & !< per cell
material_homogenizationMemberAt2 !< cell material_homogenizationMemberAt2 !< cell
integer, dimension(:,:), allocatable, public, protected :: & ! (ip,elem) integer, dimension(:,:), allocatable :: & ! (ip,elem)
material_homogenizationMemberAt !< position of the element within its homogenization instance material_homogenizationMemberAt !< position of the element within its homogenization instance
integer, dimension(:,:), allocatable, public, protected :: & ! (constituent,elem) integer, dimension(:,:), allocatable, public, protected :: & ! (constituent,elem)
material_phaseAt, & !< phase ID of each element material_phaseAt, & !< phase ID of each element

View File

@ -1822,16 +1822,13 @@ subroutine storeGeometry(ph)
integer, intent(in) :: ph integer, intent(in) :: ph
integer :: ip, el, ce, co integer :: ip, el, ce, co
real(pReal), dimension(:), allocatable :: V
ce = 0
do el = 1, size(material_homogenizationMemberAt,2) V = reshape(IPvolume,[product(shape(IPvolume))])
do ip = 1, size(material_homogenizationMemberAt,1) do ce = 1, size(material_homogenizationMemberAt2,1)
ce = ce + 1
do co = 1, homogenization_maxNconstituents do co = 1, homogenization_maxNconstituents
if(material_phaseAt2(co,ce) == ph) then if(material_phaseAt2(co,ce) == ph) geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = V(ce)
geom(ph)%V_0(material_phaseMemberAt2(co,ce)) = IPvolume(ip,el)
endif
enddo
enddo enddo
enddo enddo