Simple microstructure with n x n x n grains, n = number of elements

242 views
Skip to first unread message

stopk...@gmail.com

unread,
May 14, 2021, 12:40:39 PM5/14/21
to dream3d-users
Hello,

I apologize if this question has been asked in the past: is there a method in DREAM.3D to generate microstructures with grains on an "image", or regular grid? Such as a single element per grain or microstructures with n x n x n grains, where n is some number of elements? This image is exactly what I am interested in creating. I realize I can write a Python or MatLab script to create a mesh that can then be read in by DREAM.3D, but I wanted to know if there is any way of doing this with existing filters. Thanks, Mike!

simple_ms_castelluccio_mcdowell.png


Best regards,
Krzysztof S. Stopka

Sean Donegan

unread,
May 14, 2021, 12:51:33 PM5/14/21
to stopk...@gmail.com, dream3d-users
Hi Krzysztof,

Hmm, not in any easy way.  It's possible to get the coarsest case where each voxel is a grain by creating a data array with random numbers (using Create Data Array) and then segmenting that array.  But doing the cases with larger number of voxels per grain isn't something that's easy to do.  In principle you could do it manually by initializing each grain subvolume to a specific Id using the Initialize Data filter, but that would be really tedious.  Probably easier to write a quick Python script to create the grid and then read those values into DREAM.3D using the Import ASCII Data or Import HDF5 filters.

regards,

-Sean

--
You received this message because you are subscribed to the Google Groups "dream3d-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dream3d-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dream3d-users/0c0c3309-9e7f-459c-b42d-50e5a5bf03cdn%40googlegroups.com.

stopk...@gmail.com

unread,
May 14, 2021, 12:53:23 PM5/14/21
to dream3d-users
Hey Sean,

Thanks for the quick reply! I will write a Python script to create a Dx.txt file and combine this with the "Import Dx File (Feature IDs)" to create the more complex cases. I'll post the results on here.

Best regards,
Krzysztof S. Stopka

stopk...@gmail.com

unread,
May 20, 2021, 1:00:55 PM5/20/21
to dream3d-users
Hey Sean,

I wrote a Python script and created a .json pipeline to create the desired microstructure. I uploaded the files to the following GitHub page: https://github.com/prisms-center/Fatigue/tree/main/applications/generate_simple_microstructure

It seems to be working fine ~50% of the time...; sometimes the DREAM.3D .json pipeline crashes, while other times it works... Can you investigate why this is the case? I think I might not be specifying the Phase CellData correctly...? 

Best regards,
Kris

stopk...@gmail.com

unread,
May 20, 2021, 1:55:10 PM5/20/21
to dream3d-users
I found the issue: the .dream3d files with the "StatsGenerator" filter I used previously specified a primary and secondary phase, but the .json pipeline did not account for this. I changed the .dream3d file by removing the secondary phase from the StatsGenerator filter and now the .json pipeline works every time.

The changes have been pushed to the main GitHub repository at https://github.com/prisms-center/Fatigue/tree/main/applications/generate_simple_microstructure.

The default settings in the Python script will create the following microstructure, show here with unique grains. There are 4, 10, and 7 grains in the X, Y, and Z directions, respectively. As a note, this microstructure is non-periodic.

118996464-8e8a9800-b94d-11eb-8f4c-eacc0fc8954a.png

The same microstructure with elements displayed is shown below. There are 6 elements per side for each grain, which results in 6^3 = 216 elements per grain.

118996809-cdb8e900-b94d-11eb-8dba-0f5cf5946d81.png
Reply all
Reply to author
Forward
0 new messages