/DRAGen

DRAGen RVE Generator

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

DRAGen - Discrete RVE Automation and Generation

This repository includes the official implementation of the paper A Novel Approach to Discrete Representative Volume Element Automation and Generation-DRAGen. DRAGen is an approach for generating Representative Volume Elements (RVEs) based on a Random Sequential Addition (RSA)-Algorithm for discrete volumes and the tessellation using a discrete tessellation function. The input data are gathered from the analysis of electron backscatter diffraction (EBSD) pictures via MATLAB toolbox MTEX and introduced to the model. Subsequently, the generator follows the below mentioned steps:

  • Randomly generating ellipsoids in volume (RSA)
  • Filling empty spaces between ellipsoids (Discrete Tessellation)
  • Validation of the newly created digital microstructure with input data

The results show that the generator can successfully reconstruct realistic microstructures with elongated grains and martensite bands from given input data sets.

logo

Note: For developing it is highly recommended to use Python versions 3.6 to 3.8. For Python 3.9 Pyvista is not fully supported.
If further questions appear please check the lower section or get in touch with us.

Installation

As the first step, conda needs to be installed. To be sure conda is installed correctly on your system look up here

Git must be installed on the system. Check with:

$ git --version

If it has not been installed use this:

$ conda install -c anaconda git

Open the user path and create the directory where the DRAGen repo will be cloned. Should be like this:

(base) C:\Users> cd \Users\{username}
(base) C:\Users\username> mkdir GitRepos
(base) C:\Users\username> cd GitRepos

To clone this repository into the desired destination, use:

$ git clone https://github.com/IMS-RWTH/DRAGen.git

To be able to use DRAGen, the working directory must be set to the location where the repo was downloaded to in the previous step file which is downloaded at the previous step. Use the commands to go to the exact file by following the path.

$ cd DRAGen

To see the folders on the current point:

$ dir

Create a virtual environment as follows:

$ conda create --name DRAGen python=3.8
$ conda activate DRAGen

(if an error occurs check your conda installation)
To see the list of the environments on conda:

$ conda info --envs

Be sure the DRAGen environment is activated it should look somewhat like this:

(DRAGen)....$ 

Install one of two required module packages depending on cuda availability on the device:

To install requirements without cuda:

(DRAGen)....$ pip install -r requirements.txt 

To install requirements if cuda is available:

(DRAGen)....$ pip install -r requirements_cuda.txt 

Check if every step is utilized correctly by running first generation with:

(DRAGen)....$ python DRAGen_nogui.py

Run DRAGen:

(DRAGen)....$ python DRAGen.py
Show more...

Input data

Header: a b c alpha beta phi1 PHI phi2
Description: grain radius grain radius grain radius grain slope
x-y-plane
soon euler ang. euler ang. euler ang.
Required: mandatory optional optional optional soon optional optional optional
Default: a a 0 soon random random random

DRAGen takes .csv files as input. Theses files must contain at least one radius for each grain. This radius has to be called a in the header.
Optional parameters are:
  1. b and c as second and third radius of each grain (ellipsoids are created).
    a is assumed to be oriented with the rolling direction and is aligned with x-axis, b is aligned with y-axis and c with z-axis.
  2. If a slope relative to x-axis is detected (rotation in x-y-plane, around z-axis), alpha can be used to implement this slope on the grains.
    beta will be implemented in the future and will be a rotation around x- or y-axis.
  3. The texture can be defined with the parameters phi1, PHI and phi2.

Output Data

In V.1.0_b, the output files are Abaqus input files designed for the use with the ICAMS-Crystal-plysticity model. Therefore, the subroutine-files are needed for a successfull analysis.

  • Periodic boundary conditions (PBC): BottomToTop.inp, FrontToRear.inp, LeftToRight.inp, Corners.inp, Edges.inp, Nsets.inp, VerticeSets.inp
  • CP-model data (euler angles and grain size): graindata.inp
  • RVE: RVE_smooth.inp
  • RVE in arry: RVE_Numpy.npy (not needed at the moment!)

It is distiguished between a plastic phase (Phase 1, e.g. Ferrite) purely elastic phase (Phase 2, e.g. Martensite) and . Extensions to more then two phases are in the making.

Input generator

One additional feature of our system is the generation of statistically representative microstructur using Generative Adversarial Networks, a method from the field of deep learning. With our CWGAN-GP, it is possible to generate an unlimited amount of vaild synthetical microstructure. Possible for "normal" grain data, inclusions and even damage (coming soon!). For more information, see our article on the basic idea of using a WGAN (https://www.mdpi.com/1996-1944/13/19/4236) and our IDDRG post on the CWGAN-GP (coming shortly after publishing).

Latest Version

  • DRAGen.V.1.0_b

Support

Please use one of the following keywords for your issue as e-mail subject:

  • General problems
  • RSA error
  • Tesselation error
  • Mesher error
  • Substructure
  • Inclusions
  • Bands