Automation

149 views
Skip to first unread message

Zephan D.

unread,
Dec 5, 2021, 9:05:30 PM12/5/21
to dream3d-users
Hello all,

I was curious if there was a way to create a database of microstructures automatically. 

I have a pipeline that creates satisfying results and would like to automate the process of making a lot of random microstructures that stem from the same stats generator.

Is there any way to do this within Dream3D?

Or should I learn how to use something like AutoHotkey?

Thank!

Z

stopk...@gmail.com

unread,
Dec 6, 2021, 8:52:56 AM12/6/21
to dream3d-users
Hello,

One way of doing this is using the PRISMS-Fatigue framework available at (https://github.com/prisms-center/Fatigue). You can use the generate_microstructures.py file (https://github.com/prisms-center/Fatigue/blob/main/src/generate_microstructures.py) to specify the path to your stats generator file (stored as a single .dream3d file with the StatsGenerator and Write to Dream.3D filters), path to where the microstructure instantiations should be stored, the size and shape of the desired microstructures, the number of microstructure instantiations, and whether you want a periodic or non-periodic microstructure (set face_bc = ['periodic', 'periodic', 'periodic'] or face_bc = ['free', 'free', 'free'], respectively). You can set "create_sub_bands = False" to speed up the process since that is a function associated with creating regions for averaging of certain CPFEM simulation results. Setting "compute_kosher_grain_centroids = False" will also speed up the process.
If this is set to true, the code determines "actual" grain centroids for periodic microstructures, because a grain that is periodic and is split by the boundaries of the microstructure instantiation will have a center of mass in the middle of the microstructure (which is not possible).

Please let me know if you have any questions and I hope this is useful.

Best regards,
Kris

Michael Jackson

unread,
Dec 8, 2021, 9:34:39 AM12/8/21
to stopk...@gmail.com, dream3d-users

Along with what Kris suggested would be to use Python directly to repeatedly called “PipelineRunner(.exe)” and passing in the pipeline file. You will need to move away the output file each time but there are lots of ways to tackle that issue. If you want ultimate control over the process there is the “dream3d-conda” distribution of DREAM.3D that can be installed using “conda install -c http://dream3d.bluequartz.net/binaries/conda dream3d-conda”. This package includes both DREAM.3D (the GUI) and a complete python wrapper for all the functionality of DREAM.3D. Not a lot of documentation on how to write the python side of things but there are a lot of examples that can looked at. Every unit test is also run as a python script each night.

 

https://github.com/BlueQuartzSoftware/DREAM3D/tree/develop/Test/Python/Synthetic for all of the examples that you might be interested in.

 

--

Mike Jackson

--
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/a1203455-5b66-414e-896f-c0b83c715e1dn%40googlegroups.com.

Goose Master

unread,
Dec 8, 2021, 3:33:42 PM12/8/21
to Michael Jackson, stopk...@gmail.com, dream3d-users
Hello all,

Thank you for this information!

I will take a stab at using both of your methods.

Best,
Z

Reply all
Reply to author
Forward
0 new messages