diff --git a/PRIVATE b/PRIVATE index 25ce39dd0..8f27fc91c 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 25ce39dd0f5bf49dc5c2bec20767d93d2b76d353 +Subproject commit 8f27fc91ca757a1dfdfd04892708af7e94941ef9 diff --git a/examples/SpectralMethod/Polycrystal/material.yaml b/examples/SpectralMethod/Polycrystal/material.yaml index 16c6042a6..99ff0440c 100644 --- a/examples/SpectralMethod/Polycrystal/material.yaml +++ b/examples/SpectralMethod/Polycrystal/material.yaml @@ -1,107 +1,109 @@ homogenization: SX: mech: {type: none} -microstructure: -- constituents: - - fraction: 1.0 - orientation: [1.0, 0.0, 0.0, 0.0] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.7936696712125002, -0.28765777461664166, -0.3436487135089419, 0.4113964260949434] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.3986143167493579, -0.7014883552495493, 0.2154871765709027, 0.5500781677772945] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.28645844315788244, -0.022571491243423537, -0.467933059311115, -0.8357456192708106] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.33012772942625784, -0.6781865350268957, 0.6494525351030648, 0.09638521992649676] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.43596817439583935, -0.5982537129781701, 0.046599032277502436, 0.6707106499919265] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.169734823419553, -0.699615227367322, -0.6059581215838098, -0.33844257746495854] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.9698864809294915, 0.1729052643205874, -0.15948307917616958, 0.06315956884687175] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.46205660912967883, 0.3105054068891252, -0.617849551030653, 0.555294529545738] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.4512443497461787, -0.7636045534540555, -0.04739348426715133, -0.45939142396805815] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.2161856212656443, -0.6581450184826598, -0.5498086209601588, 0.4667112513346289] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.8753220715350803, -0.4561599367657419, -0.13298279533852678, -0.08969369719975541] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.11908260752431069, 0.18266024809834172, -0.7144822594012615, -0.664807992845101] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.751104669484278, 0.5585633382623958, -0.34579336397009175, 0.06538900566860861] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.08740438971703973, 0.8991264096610437, -0.4156704205935976, 0.10559485570696363] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.5584325870096193, 0.6016408353068798, -0.14280340445801173, 0.5529814994483859] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.4052725440888093, 0.25253073423599154, 0.5693263597910454, -0.669215876471182] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.7570164606888676, 0.15265448024694664, -0.5998021466848317, 0.20942796551297105] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.6987659297138081, -0.132172211261028, -0.19693254724422338, 0.6748883269678543] - phase: Aluminum - homogenization: SX -- constituents: - - fraction: 1.0 - orientation: [0.7729330445886478, 0.21682179052722322, -0.5207379472917645, 0.2905078484066341] - phase: Aluminum - homogenization: SX + +material: + - constituents: + - fraction: 1.0 + orientation: [1.0, 0.0, 0.0, 0.0] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.7936696712125002, -0.28765777461664166, -0.3436487135089419, 0.4113964260949434] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.3986143167493579, -0.7014883552495493, 0.2154871765709027, 0.5500781677772945] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.28645844315788244, -0.022571491243423537, -0.467933059311115, -0.8357456192708106] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.33012772942625784, -0.6781865350268957, 0.6494525351030648, 0.09638521992649676] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.43596817439583935, -0.5982537129781701, 0.046599032277502436, 0.6707106499919265] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.169734823419553, -0.699615227367322, -0.6059581215838098, -0.33844257746495854] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.9698864809294915, 0.1729052643205874, -0.15948307917616958, 0.06315956884687175] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.46205660912967883, 0.3105054068891252, -0.617849551030653, 0.555294529545738] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.4512443497461787, -0.7636045534540555, -0.04739348426715133, -0.45939142396805815] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.2161856212656443, -0.6581450184826598, -0.5498086209601588, 0.4667112513346289] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.8753220715350803, -0.4561599367657419, -0.13298279533852678, -0.08969369719975541] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.11908260752431069, 0.18266024809834172, -0.7144822594012615, -0.664807992845101] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.751104669484278, 0.5585633382623958, -0.34579336397009175, 0.06538900566860861] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.08740438971703973, 0.8991264096610437, -0.4156704205935976, 0.10559485570696363] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.5584325870096193, 0.6016408353068798, -0.14280340445801173, 0.5529814994483859] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.4052725440888093, 0.25253073423599154, 0.5693263597910454, -0.669215876471182] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.7570164606888676, 0.15265448024694664, -0.5998021466848317, 0.20942796551297105] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + orientation: [0.6987659297138081, -0.132172211261028, -0.19693254724422338, 0.6748883269678543] + phase: Aluminum + homogenization: SX + - constituents: + - fraction: 1.0 + 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 - diff --git a/src/IO.f90 b/src/IO.f90 index 0542e7a62..4a442cb06 100644 --- a/src/IO.f90 +++ b/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) diff --git a/src/discretization.f90 b/src/discretization.f90 index 3bb905cf3..e6e53fcf4 100644 --- a/src/discretization.f90 +++ b/src/discretization.f90 @@ -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 diff --git a/src/material.f90 b/src/material.f90 index 6688a0ae5..3a2483246 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -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)) diff --git a/src/mesh/discretization_mesh.f90 b/src/mesh/discretization_mesh.f90 index b57a4b332..bc96951a1 100644 --- a/src/mesh/discretization_mesh.f90 +++ b/src/mesh/discretization_mesh.f90 @@ -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)