microstructure --> material
This commit is contained in:
parent
65fe3f821a
commit
776901cb81
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
||||||
Subproject commit 25ce39dd0f5bf49dc5c2bec20767d93d2b76d353
|
Subproject commit 8f27fc91ca757a1dfdfd04892708af7e94941ef9
|
|
@ -1,107 +1,109 @@
|
||||||
homogenization:
|
homogenization:
|
||||||
SX:
|
SX:
|
||||||
mech: {type: none}
|
mech: {type: none}
|
||||||
microstructure:
|
|
||||||
- constituents:
|
material:
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [1.0, 0.0, 0.0, 0.0]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [1.0, 0.0, 0.0, 0.0]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.7936696712125002, -0.28765777461664166, -0.3436487135089419, 0.4113964260949434]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.7936696712125002, -0.28765777461664166, -0.3436487135089419, 0.4113964260949434]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.3986143167493579, -0.7014883552495493, 0.2154871765709027, 0.5500781677772945]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.3986143167493579, -0.7014883552495493, 0.2154871765709027, 0.5500781677772945]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.28645844315788244, -0.022571491243423537, -0.467933059311115, -0.8357456192708106]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.28645844315788244, -0.022571491243423537, -0.467933059311115, -0.8357456192708106]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.33012772942625784, -0.6781865350268957, 0.6494525351030648, 0.09638521992649676]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.33012772942625784, -0.6781865350268957, 0.6494525351030648, 0.09638521992649676]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.43596817439583935, -0.5982537129781701, 0.046599032277502436, 0.6707106499919265]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.43596817439583935, -0.5982537129781701, 0.046599032277502436, 0.6707106499919265]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.169734823419553, -0.699615227367322, -0.6059581215838098, -0.33844257746495854]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.169734823419553, -0.699615227367322, -0.6059581215838098, -0.33844257746495854]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.9698864809294915, 0.1729052643205874, -0.15948307917616958, 0.06315956884687175]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.9698864809294915, 0.1729052643205874, -0.15948307917616958, 0.06315956884687175]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.46205660912967883, 0.3105054068891252, -0.617849551030653, 0.555294529545738]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.46205660912967883, 0.3105054068891252, -0.617849551030653, 0.555294529545738]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.4512443497461787, -0.7636045534540555, -0.04739348426715133, -0.45939142396805815]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.4512443497461787, -0.7636045534540555, -0.04739348426715133, -0.45939142396805815]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.2161856212656443, -0.6581450184826598, -0.5498086209601588, 0.4667112513346289]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.2161856212656443, -0.6581450184826598, -0.5498086209601588, 0.4667112513346289]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.8753220715350803, -0.4561599367657419, -0.13298279533852678, -0.08969369719975541]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.8753220715350803, -0.4561599367657419, -0.13298279533852678, -0.08969369719975541]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.11908260752431069, 0.18266024809834172, -0.7144822594012615, -0.664807992845101]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.11908260752431069, 0.18266024809834172, -0.7144822594012615, -0.664807992845101]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.751104669484278, 0.5585633382623958, -0.34579336397009175, 0.06538900566860861]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.751104669484278, 0.5585633382623958, -0.34579336397009175, 0.06538900566860861]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.08740438971703973, 0.8991264096610437, -0.4156704205935976, 0.10559485570696363]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.08740438971703973, 0.8991264096610437, -0.4156704205935976, 0.10559485570696363]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.5584325870096193, 0.6016408353068798, -0.14280340445801173, 0.5529814994483859]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.5584325870096193, 0.6016408353068798, -0.14280340445801173, 0.5529814994483859]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.4052725440888093, 0.25253073423599154, 0.5693263597910454, -0.669215876471182]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.4052725440888093, 0.25253073423599154, 0.5693263597910454, -0.669215876471182]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.7570164606888676, 0.15265448024694664, -0.5998021466848317, 0.20942796551297105]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.7570164606888676, 0.15265448024694664, -0.5998021466848317, 0.20942796551297105]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.6987659297138081, -0.132172211261028, -0.19693254724422338, 0.6748883269678543]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.6987659297138081, -0.132172211261028, -0.19693254724422338, 0.6748883269678543]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
- constituents:
|
homogenization: SX
|
||||||
- fraction: 1.0
|
- constituents:
|
||||||
orientation: [0.7729330445886478, 0.21682179052722322, -0.5207379472917645, 0.2905078484066341]
|
- fraction: 1.0
|
||||||
phase: Aluminum
|
orientation: [0.7729330445886478, 0.21682179052722322, -0.5207379472917645, 0.2905078484066341]
|
||||||
homogenization: SX
|
phase: Aluminum
|
||||||
|
homogenization: SX
|
||||||
|
|
||||||
phase:
|
phase:
|
||||||
Aluminum:
|
Aluminum:
|
||||||
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
|
elasticity: {C_11: 106.75e9, C_12: 60.41e9, C_44: 28.34e9, type: hooke}
|
||||||
|
@ -117,7 +119,6 @@ phase:
|
||||||
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4]
|
h_sl_sl: [1, 1, 1.4, 1.4, 1.4, 1.4]
|
||||||
n_sl: 20
|
n_sl: 20
|
||||||
output: [xi_sl]
|
output: [xi_sl]
|
||||||
|
type: phenopowerlaw
|
||||||
xi_0_sl: [31e6]
|
xi_0_sl: [31e6]
|
||||||
xi_inf_sl: [63e6]
|
xi_inf_sl: [63e6]
|
||||||
type: phenopowerlaw
|
|
||||||
|
|
||||||
|
|
10
src/IO.f90
10
src/IO.f90
|
@ -427,20 +427,20 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
case (146)
|
case (146)
|
||||||
msg = 'number of values does not match'
|
msg = 'number of values does not match'
|
||||||
case (148)
|
case (148)
|
||||||
msg = 'Nconstituents mismatch between homogenization and microstructure'
|
msg = 'Nconstituents mismatch between homogenization and material'
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
! material error messages and related messages in mesh
|
! material error messages and related messages in mesh
|
||||||
case (150)
|
case (150)
|
||||||
msg = 'index out of bounds'
|
msg = 'index out of bounds'
|
||||||
case (151)
|
case (151)
|
||||||
msg = 'microstructure has no constituents'
|
msg = 'material has no constituents'
|
||||||
case (153)
|
case (153)
|
||||||
msg = 'sum of phase fractions differs from 1'
|
msg = 'sum of phase fractions differs from 1'
|
||||||
case (155)
|
case (155)
|
||||||
msg = 'microstructure index out of bounds'
|
msg = 'material index out of bounds'
|
||||||
case (180)
|
case (180)
|
||||||
msg = 'missing/invalid microstructure definition via State Variable 2'
|
msg = 'missing/invalid material definition via State Variable 2'
|
||||||
case (190)
|
case (190)
|
||||||
msg = 'unknown element type:'
|
msg = 'unknown element type:'
|
||||||
case (191)
|
case (191)
|
||||||
|
@ -526,7 +526,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
||||||
case (842)
|
case (842)
|
||||||
msg = 'incomplete information in grid mesh header'
|
msg = 'incomplete information in grid mesh header'
|
||||||
case (843)
|
case (843)
|
||||||
msg = 'microstructure count mismatch'
|
msg = 'material count mismatch'
|
||||||
case (844)
|
case (844)
|
||||||
msg = 'invalid VTR file'
|
msg = 'invalid VTR file'
|
||||||
case (846)
|
case (846)
|
||||||
|
|
|
@ -15,7 +15,7 @@ module discretization
|
||||||
discretization_nElem
|
discretization_nElem
|
||||||
|
|
||||||
integer, public, protected, dimension(:), allocatable :: &
|
integer, public, protected, dimension(:), allocatable :: &
|
||||||
discretization_microstructureAt
|
discretization_materialAt
|
||||||
|
|
||||||
real(pReal), public, protected, dimension(:,:), allocatable :: &
|
real(pReal), public, protected, dimension(:,:), allocatable :: &
|
||||||
discretization_IPcoords0, &
|
discretization_IPcoords0, &
|
||||||
|
@ -37,12 +37,12 @@ contains
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief stores the relevant information in globally accesible variables
|
!> @brief stores the relevant information in globally accesible variables
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine discretization_init(microstructureAt,&
|
subroutine discretization_init(materialAt,&
|
||||||
IPcoords0,NodeCoords0,&
|
IPcoords0,NodeCoords0,&
|
||||||
sharedNodesBegin)
|
sharedNodesBegin)
|
||||||
|
|
||||||
integer, dimension(:), intent(in) :: &
|
integer, dimension(:), intent(in) :: &
|
||||||
microstructureAt
|
materialAt
|
||||||
real(pReal), dimension(:,:), intent(in) :: &
|
real(pReal), dimension(:,:), intent(in) :: &
|
||||||
IPcoords0, &
|
IPcoords0, &
|
||||||
NodeCoords0
|
NodeCoords0
|
||||||
|
@ -51,10 +51,10 @@ subroutine discretization_init(microstructureAt,&
|
||||||
|
|
||||||
print'(/,a)', ' <<<+- discretization init -+>>>'; flush(6)
|
print'(/,a)', ' <<<+- discretization init -+>>>'; flush(6)
|
||||||
|
|
||||||
discretization_nElem = size(microstructureAt,1)
|
discretization_nElem = size(materialAt,1)
|
||||||
discretization_nIP = size(IPcoords0,2)/discretization_nElem
|
discretization_nIP = size(IPcoords0,2)/discretization_nElem
|
||||||
|
|
||||||
discretization_microstructureAt = microstructureAt
|
discretization_materialAt = materialAt
|
||||||
|
|
||||||
discretization_IPcoords0 = IPcoords0
|
discretization_IPcoords0 = IPcoords0
|
||||||
discretization_IPcoords = IPcoords0
|
discretization_IPcoords = IPcoords0
|
||||||
|
|
|
@ -97,7 +97,7 @@ module material
|
||||||
material_orientation0 !< initial orientation of each grain,IP,element
|
material_orientation0 !< initial orientation of each grain,IP,element
|
||||||
|
|
||||||
integer, dimension(:), allocatable, private :: &
|
integer, dimension(:), allocatable, private :: &
|
||||||
microstructure_Nconstituents !< number of constituents in each microstructure
|
material_Nconstituents !< number of constituents in each material
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -317,12 +317,12 @@ end subroutine material_parseHomogenization
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief parses the microstructure part in the material configuration file
|
!> @brief parses the material part in the material configuration file
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
subroutine material_parseMicrostructure
|
subroutine material_parseMicrostructure
|
||||||
|
|
||||||
class(tNode), pointer :: microstructures, & !> list of microstructures
|
class(tNode), pointer :: materials, & !> list of materials
|
||||||
microstructure, & !> microstructure definition
|
material, & !> material definition
|
||||||
constituents, & !> list of constituents
|
constituents, & !> list of constituents
|
||||||
constituent, & !> constituent definition
|
constituent, & !> constituent definition
|
||||||
phases, &
|
phases, &
|
||||||
|
@ -341,17 +341,17 @@ subroutine material_parseMicrostructure
|
||||||
c, &
|
c, &
|
||||||
maxNconstituents
|
maxNconstituents
|
||||||
|
|
||||||
microstructures => config_material%get('microstructure')
|
materials => config_material%get('material')
|
||||||
if(any(discretization_microstructureAt > microstructures%length)) &
|
if(any(discretization_materialAt > materials%length)) &
|
||||||
call IO_error(155,ext_msg='More microstructures requested than found in material.yaml')
|
call IO_error(155,ext_msg='More materials requested than found in material.yaml')
|
||||||
|
|
||||||
allocate(microstructure_Nconstituents(microstructures%length),source=0)
|
allocate(material_Nconstituents(materials%length),source=0)
|
||||||
do m = 1, microstructures%length
|
do m = 1, materials%length
|
||||||
microstructure => microstructures%get(m)
|
material => materials%get(m)
|
||||||
constituents => microstructure%get('constituents')
|
constituents => material%get('constituents')
|
||||||
microstructure_Nconstituents(m) = constituents%length
|
material_Nconstituents(m) = constituents%length
|
||||||
enddo
|
enddo
|
||||||
maxNconstituents = maxval(microstructure_Nconstituents)
|
maxNconstituents = maxval(material_Nconstituents)
|
||||||
|
|
||||||
allocate(material_homogenizationAt(discretization_nElem),source=0)
|
allocate(material_homogenizationAt(discretization_nElem),source=0)
|
||||||
allocate(material_homogenizationMemberAt(discretization_nIP,discretization_nElem),source=0)
|
allocate(material_homogenizationMemberAt(discretization_nIP,discretization_nElem),source=0)
|
||||||
|
@ -366,10 +366,10 @@ subroutine material_parseMicrostructure
|
||||||
allocate(counterHomogenization(homogenization%length),source=0)
|
allocate(counterHomogenization(homogenization%length),source=0)
|
||||||
|
|
||||||
do e = 1, discretization_nElem
|
do e = 1, discretization_nElem
|
||||||
microstructure => microstructures%get(discretization_microstructureAt(e))
|
material => materials%get(discretization_materialAt(e))
|
||||||
constituents => microstructure%get('constituents')
|
constituents => material%get('constituents')
|
||||||
|
|
||||||
material_homogenizationAt(e) = homogenization%getIndex(microstructure%get_asString('homogenization'))
|
material_homogenizationAt(e) = homogenization%getIndex(material%get_asString('homogenization'))
|
||||||
do i = 1, discretization_nIP
|
do i = 1, discretization_nIP
|
||||||
counterHomogenization(material_homogenizationAt(e)) = counterHomogenization(material_homogenizationAt(e)) + 1
|
counterHomogenization(material_homogenizationAt(e)) = counterHomogenization(material_homogenizationAt(e)) + 1
|
||||||
material_homogenizationMemberAt(i,e) = counterHomogenization(material_homogenizationAt(e))
|
material_homogenizationMemberAt(i,e) = counterHomogenization(material_homogenizationAt(e))
|
||||||
|
|
|
@ -78,7 +78,7 @@ subroutine discretization_mesh_init(restart)
|
||||||
IS :: faceSetIS
|
IS :: faceSetIS
|
||||||
PetscErrorCode :: ierr
|
PetscErrorCode :: ierr
|
||||||
integer, dimension(:), allocatable :: &
|
integer, dimension(:), allocatable :: &
|
||||||
microstructureAt
|
materialAt
|
||||||
class(tNode), pointer :: &
|
class(tNode), pointer :: &
|
||||||
num_mesh
|
num_mesh
|
||||||
integer :: integrationOrder !< order of quadrature rule required
|
integer :: integrationOrder !< order of quadrature rule required
|
||||||
|
@ -164,9 +164,9 @@ subroutine discretization_mesh_init(restart)
|
||||||
call mesh_FEM_build_ipCoordinates(dimPlex,FEM_quadrature_points(dimPlex,integrationOrder)%p)
|
call mesh_FEM_build_ipCoordinates(dimPlex,FEM_quadrature_points(dimPlex,integrationOrder)%p)
|
||||||
call mesh_FEM_build_ipVolumes(dimPlex)
|
call mesh_FEM_build_ipVolumes(dimPlex)
|
||||||
|
|
||||||
allocate(microstructureAt(mesh_NcpElems))
|
allocate(materialAt(mesh_NcpElems))
|
||||||
do j = 1, mesh_NcpElems
|
do j = 1, mesh_NcpElems
|
||||||
call DMGetLabelValue(geomMesh,'material',j-1,microstructureAt(j),ierr)
|
call DMGetLabelValue(geomMesh,'material',j-1,materialAt(j),ierr)
|
||||||
CHKERRQ(ierr)
|
CHKERRQ(ierr)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ subroutine discretization_mesh_init(restart)
|
||||||
|
|
||||||
allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal)
|
allocate(mesh_node0(3,mesh_Nnodes),source=0.0_pReal)
|
||||||
|
|
||||||
call discretization_init(microstructureAt,&
|
call discretization_init(materialAt,&
|
||||||
reshape(mesh_ipCoordinates,[3,mesh_maxNips*mesh_NcpElems]), &
|
reshape(mesh_ipCoordinates,[3,mesh_maxNips*mesh_NcpElems]), &
|
||||||
mesh_node0)
|
mesh_node0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue