prepared for using new state structure in homogenization
This commit is contained in:
parent
f64418f29a
commit
4bbd6583a0
|
@ -165,17 +165,15 @@ module material
|
||||||
|
|
||||||
integer(pInt), dimension(:,:,:), allocatable, public :: &
|
integer(pInt), dimension(:,:,:), allocatable, public :: &
|
||||||
material_phase !< phase (index) of each grain,IP,element
|
material_phase !< phase (index) of each grain,IP,element
|
||||||
#ifdef NEWSTATE
|
|
||||||
integer(pInt), dimension(:,:), allocatable, public :: &
|
integer(pInt), dimension(:,:), allocatable, public :: &
|
||||||
material_homog !< homogenization (index) of each IP,element
|
material_homog !< homogenization (index) of each IP,element
|
||||||
#endif
|
|
||||||
type(tState), allocatable, dimension(:), public :: &
|
type(tState), allocatable, dimension(:), public :: &
|
||||||
plasticState, &
|
plasticState, &
|
||||||
damageState, &
|
damageState, &
|
||||||
thermalState
|
thermalState,&
|
||||||
#ifdef NEWSTATE
|
|
||||||
type(hState), allocatable, dimension(:), public :: &
|
|
||||||
homogState
|
homogState
|
||||||
|
|
||||||
|
#ifdef NEWSTATE
|
||||||
type(fState), allocatable, dimension(:), public :: &
|
type(fState), allocatable, dimension(:), public :: &
|
||||||
fieldDamage
|
fieldDamage
|
||||||
type(fState), allocatable, dimension(:), public :: &
|
type(fState), allocatable, dimension(:), public :: &
|
||||||
|
@ -236,14 +234,11 @@ module material
|
||||||
|
|
||||||
integer(pInt), dimension(:,:,:,:), allocatable, public, protected :: mappingConstitutive
|
integer(pInt), dimension(:,:,:,:), allocatable, public, protected :: mappingConstitutive
|
||||||
integer(pInt), dimension(:,:,:), allocatable, public, protected :: mappingCrystallite
|
integer(pInt), dimension(:,:,:), allocatable, public, protected :: mappingCrystallite
|
||||||
#ifdef NEWSTATE
|
|
||||||
integer(pInt), dimension(:,:,:), allocatable, public, protected :: mappingHomogenization
|
integer(pInt), dimension(:,:,:), allocatable, public, protected :: mappingHomogenization
|
||||||
#endif
|
|
||||||
integer(pInt), dimension(:), allocatable :: ConstitutivePosition
|
integer(pInt), dimension(:), allocatable :: ConstitutivePosition
|
||||||
integer(pInt), dimension(:), allocatable :: CrystallitePosition
|
integer(pInt), dimension(:), allocatable :: CrystallitePosition
|
||||||
#ifdef NEWSTATE
|
|
||||||
integer(pInt), dimension(:), allocatable :: HomogenizationPosition
|
integer(pInt), dimension(:), allocatable :: HomogenizationPosition
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
public :: &
|
public :: &
|
||||||
|
@ -348,8 +343,8 @@ subroutine material_init
|
||||||
allocate(plasticState(material_Nphase))
|
allocate(plasticState(material_Nphase))
|
||||||
allocate(damageState (material_Nphase))
|
allocate(damageState (material_Nphase))
|
||||||
allocate(thermalState(material_Nphase))
|
allocate(thermalState(material_Nphase))
|
||||||
#ifdef NEWSTATE
|
|
||||||
allocate(homogState (material_Nhomogenization))
|
allocate(homogState (material_Nhomogenization))
|
||||||
|
#ifdef NEWSTATE
|
||||||
allocate(fieldDamage (material_Nhomogenization))
|
allocate(fieldDamage (material_Nhomogenization))
|
||||||
allocate(fieldThermal(material_Nhomogenization))
|
allocate(fieldThermal(material_Nhomogenization))
|
||||||
#endif
|
#endif
|
||||||
|
@ -392,22 +387,19 @@ subroutine material_init
|
||||||
call material_populateGrains
|
call material_populateGrains
|
||||||
|
|
||||||
allocate(mappingConstitutive(2,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(mappingConstitutive(2,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
#ifdef NEWSTATE
|
|
||||||
allocate(mappingHomogenization(2,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
allocate(mappingHomogenization(2,mesh_maxNips,mesh_NcpElems),source=0_pInt)
|
||||||
#endif
|
|
||||||
allocate(mappingCrystallite (2,homogenization_maxNgrains,mesh_NcpElems),source=0_pInt)
|
allocate(mappingCrystallite (2,homogenization_maxNgrains,mesh_NcpElems),source=0_pInt)
|
||||||
allocate(ConstitutivePosition(material_Nphase),source=0_pInt)
|
allocate(ConstitutivePosition(material_Nphase),source=0_pInt)
|
||||||
#ifdef NEWSTATE
|
|
||||||
allocate(HomogenizationPosition(material_Nhomogenization),source=0_pInt)
|
allocate(HomogenizationPosition(material_Nhomogenization),source=0_pInt)
|
||||||
#endif
|
|
||||||
allocate(CrystallitePosition(material_Nphase),source=0_pInt)
|
allocate(CrystallitePosition(material_Nphase),source=0_pInt)
|
||||||
|
|
||||||
ElemLoop:do e = 1_pInt,mesh_NcpElems ! loop over elements
|
ElemLoop:do e = 1_pInt,mesh_NcpElems ! loop over elements
|
||||||
myHomog = mesh_element(3,e)
|
myHomog = mesh_element(3,e)
|
||||||
IPloop:do i = 1_pInt,FE_Nips(FE_geomtype(mesh_element(2,e))) ! loop over IPs
|
IPloop:do i = 1_pInt,FE_Nips(FE_geomtype(mesh_element(2,e))) ! loop over IPs
|
||||||
#ifdef NEWSTATE
|
HomogenizationPosition(myHomog) = HomogenizationPosition(myHomog) + 1_pInt
|
||||||
HomogenizationPosition(myHomog) = HomogenizationPosition(myHomog) + 1_pInt
|
mappingHomogenization(1:2,i,e) = [HomogenizationPosition(myHomog),myHomog]
|
||||||
mappingHomogenization(1:2,i,e) = [HomogenizationPosition(myHomog),myHomog]
|
|
||||||
#endif
|
|
||||||
GrainLoop:do g = 1_pInt,homogenization_Ngrains(mesh_element(3,e)) ! loop over grains
|
GrainLoop:do g = 1_pInt,homogenization_Ngrains(mesh_element(3,e)) ! loop over grains
|
||||||
phase = material_phase(g,i,e)
|
phase = material_phase(g,i,e)
|
||||||
ConstitutivePosition(phase) = ConstitutivePosition(phase)+1_pInt ! not distinguishing between instances of same phase
|
ConstitutivePosition(phase) = ConstitutivePosition(phase)+1_pInt ! not distinguishing between instances of same phase
|
||||||
|
@ -1090,23 +1082,19 @@ subroutine material_populateGrains
|
||||||
|
|
||||||
allocate(material_volume(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
allocate(material_volume(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0.0_pReal)
|
||||||
allocate(material_phase(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
allocate(material_phase(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
||||||
#ifdef NEWSTATE
|
|
||||||
allocate(material_homog(mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
allocate(material_homog(mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
||||||
#endif
|
|
||||||
allocate(material_texture(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
allocate(material_texture(homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems), source=0_pInt)
|
||||||
allocate(material_EulerAngles(3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0.0_pReal)
|
allocate(material_EulerAngles(3,homogenization_maxNgrains,mesh_maxNips,mesh_NcpElems),source=0.0_pReal)
|
||||||
|
|
||||||
allocate(Ngrains(material_Nhomogenization,material_Nmicrostructure), source=0_pInt)
|
allocate(Ngrains(material_Nhomogenization,material_Nmicrostructure), source=0_pInt)
|
||||||
allocate(Nelems(material_Nhomogenization,material_Nmicrostructure), source=0_pInt)
|
allocate(Nelems(material_Nhomogenization,material_Nmicrostructure), source=0_pInt)
|
||||||
|
|
||||||
#ifdef NEWSTATE
|
|
||||||
! populating homogenization schemes in each
|
! populating homogenization schemes in each
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
do e = 1_pInt, mesh_NcpElems
|
do e = 1_pInt, mesh_NcpElems
|
||||||
material_homog(1_pInt:FE_Nips(FE_geomtype(mesh_element(2,e))),e) = mesh_element(3,e)
|
material_homog(1_pInt:FE_Nips(FE_geomtype(mesh_element(2,e))),e) = mesh_element(3,e)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
#endif
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! precounting of elements for each homog/micro pair
|
! precounting of elements for each homog/micro pair
|
||||||
do e = 1_pInt, mesh_NcpElems
|
do e = 1_pInt, mesh_NcpElems
|
||||||
|
|
Loading…
Reference in New Issue