microstructure --> material
This commit is contained in:
parent
65fe3f821a
commit
776901cb81
2
PRIVATE
2
PRIVATE
|
@ -1 +1 @@
|
|||
Subproject commit 25ce39dd0f5bf49dc5c2bec20767d93d2b76d353
|
||||
Subproject commit 8f27fc91ca757a1dfdfd04892708af7e94941ef9
|
|
@ -1,7 +1,8 @@
|
|||
homogenization:
|
||||
SX:
|
||||
mech: {type: none}
|
||||
microstructure:
|
||||
|
||||
material:
|
||||
- constituents:
|
||||
- fraction: 1.0
|
||||
orientation: [1.0, 0.0, 0.0, 0.0]
|
||||
|
@ -102,6 +103,7 @@ microstructure:
|
|||
orientation: [0.7729330445886478, 0.21682179052722322, -0.5207379472917645, 0.2905078484066341]
|
||||
phase: Aluminum
|
||||
homogenization: SX
|
||||
|
||||
phase:
|
||||
Aluminum:
|
||||
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]
|
||||
n_sl: 20
|
||||
output: [xi_sl]
|
||||
type: phenopowerlaw
|
||||
xi_0_sl: [31e6]
|
||||
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)
|
||||
msg = 'number of values does not match'
|
||||
case (148)
|
||||
msg = 'Nconstituents mismatch between homogenization and microstructure'
|
||||
msg = 'Nconstituents mismatch between homogenization and material'
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! material error messages and related messages in mesh
|
||||
case (150)
|
||||
msg = 'index out of bounds'
|
||||
case (151)
|
||||
msg = 'microstructure has no constituents'
|
||||
msg = 'material has no constituents'
|
||||
case (153)
|
||||
msg = 'sum of phase fractions differs from 1'
|
||||
case (155)
|
||||
msg = 'microstructure index out of bounds'
|
||||
msg = 'material index out of bounds'
|
||||
case (180)
|
||||
msg = 'missing/invalid microstructure definition via State Variable 2'
|
||||
msg = 'missing/invalid material definition via State Variable 2'
|
||||
case (190)
|
||||
msg = 'unknown element type:'
|
||||
case (191)
|
||||
|
@ -526,7 +526,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
|
|||
case (842)
|
||||
msg = 'incomplete information in grid mesh header'
|
||||
case (843)
|
||||
msg = 'microstructure count mismatch'
|
||||
msg = 'material count mismatch'
|
||||
case (844)
|
||||
msg = 'invalid VTR file'
|
||||
case (846)
|
||||
|
|
|
@ -15,7 +15,7 @@ module discretization
|
|||
discretization_nElem
|
||||
|
||||
integer, public, protected, dimension(:), allocatable :: &
|
||||
discretization_microstructureAt
|
||||
discretization_materialAt
|
||||
|
||||
real(pReal), public, protected, dimension(:,:), allocatable :: &
|
||||
discretization_IPcoords0, &
|
||||
|
@ -37,12 +37,12 @@ contains
|
|||
!--------------------------------------------------------------------------------------------------
|
||||
!> @brief stores the relevant information in globally accesible variables
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
subroutine discretization_init(microstructureAt,&
|
||||
subroutine discretization_init(materialAt,&
|
||||
IPcoords0,NodeCoords0,&
|
||||
sharedNodesBegin)
|
||||
|
||||
integer, dimension(:), intent(in) :: &
|
||||
microstructureAt
|
||||
materialAt
|
||||
real(pReal), dimension(:,:), intent(in) :: &
|
||||
IPcoords0, &
|
||||
NodeCoords0
|
||||
|
@ -51,10 +51,10 @@ subroutine discretization_init(microstructureAt,&
|
|||
|
||||
print'(/,a)', ' <<<+- discretization init -+>>>'; flush(6)
|
||||
|
||||
discretization_nElem = size(microstructureAt,1)
|
||||
discretization_nElem = size(materialAt,1)
|
||||
discretization_nIP = size(IPcoords0,2)/discretization_nElem
|
||||
|
||||
discretization_microstructureAt = microstructureAt
|
||||
discretization_materialAt = materialAt
|
||||
|
||||
discretization_IPcoords0 = IPcoords0
|
||||
discretization_IPcoords = IPcoords0
|
||||
|
|
|
@ -97,7 +97,7 @@ module material
|
|||
material_orientation0 !< initial orientation of each grain,IP,element
|
||||
|
||||
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
|
||||
|
||||
class(tNode), pointer :: microstructures, & !> list of microstructures
|
||||
microstructure, & !> microstructure definition
|
||||
class(tNode), pointer :: materials, & !> list of materials
|
||||
material, & !> material definition
|
||||
constituents, & !> list of constituents
|
||||
constituent, & !> constituent definition
|
||||
phases, &
|
||||
|
@ -341,17 +341,17 @@ subroutine material_parseMicrostructure
|
|||
c, &
|
||||
maxNconstituents
|
||||
|
||||
microstructures => config_material%get('microstructure')
|
||||
if(any(discretization_microstructureAt > microstructures%length)) &
|
||||
call IO_error(155,ext_msg='More microstructures requested than found in material.yaml')
|
||||
materials => config_material%get('material')
|
||||
if(any(discretization_materialAt > materials%length)) &
|
||||
call IO_error(155,ext_msg='More materials requested than found in material.yaml')
|
||||
|
||||
allocate(microstructure_Nconstituents(microstructures%length),source=0)
|
||||
do m = 1, microstructures%length
|
||||
microstructure => microstructures%get(m)
|
||||
constituents => microstructure%get('constituents')
|
||||
microstructure_Nconstituents(m) = constituents%length
|
||||
allocate(material_Nconstituents(materials%length),source=0)
|
||||
do m = 1, materials%length
|
||||
material => materials%get(m)
|
||||
constituents => material%get('constituents')
|
||||
material_Nconstituents(m) = constituents%length
|
||||
enddo
|
||||
maxNconstituents = maxval(microstructure_Nconstituents)
|
||||
maxNconstituents = maxval(material_Nconstituents)
|
||||
|
||||
allocate(material_homogenizationAt(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)
|
||||
|
||||
do e = 1, discretization_nElem
|
||||
microstructure => microstructures%get(discretization_microstructureAt(e))
|
||||
constituents => microstructure%get('constituents')
|
||||
material => materials%get(discretization_materialAt(e))
|
||||
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
|
||||
counterHomogenization(material_homogenizationAt(e)) = counterHomogenization(material_homogenizationAt(e)) + 1
|
||||
material_homogenizationMemberAt(i,e) = counterHomogenization(material_homogenizationAt(e))
|
||||
|
|
|
@ -78,7 +78,7 @@ subroutine discretization_mesh_init(restart)
|
|||
IS :: faceSetIS
|
||||
PetscErrorCode :: ierr
|
||||
integer, dimension(:), allocatable :: &
|
||||
microstructureAt
|
||||
materialAt
|
||||
class(tNode), pointer :: &
|
||||
num_mesh
|
||||
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_ipVolumes(dimPlex)
|
||||
|
||||
allocate(microstructureAt(mesh_NcpElems))
|
||||
allocate(materialAt(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)
|
||||
end do
|
||||
|
||||
|
@ -178,7 +178,7 @@ subroutine discretization_mesh_init(restart)
|
|||
|
||||
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]), &
|
||||
mesh_node0)
|
||||
|
||||
|
|
Loading…
Reference in New Issue