Skip to content

PXO to MTEX to ABAQUS 01

Sunil Anandatheertha edited this page Jun 29, 2021 · 1 revision

Start here for test cases

NOTE: Definition listing is at the end of this page. From FILE ACCESS: gss2d.m --> Build___INPUT_PARAMS___Struct.m, check the following parameters are set to right values below:

Set the lattice parameters:

  • Lattice.type.square = 1
  • Lattice.type.triangular = 0
  • Lattice.type.hexagonal = 0
  • Lattice.size.i = 100;
  • Lattice.size.j = 100;
  • Lattice.size.i_incr = 1.0;
  • Lattice.size.j_incr = 1.0;
  • Lattice.size.Pert_Fac = 0;

Specify how many states are needed

  • Lattice.q = 2^1;----See definition

Specify SLSP details

  • Lattice.zener.slsp.want_slsp = 1;----See definition
  • Lattice.zener.slsp.Vol_Frac = 1.00;----See definition

Specify SLSPC details

  • Lattice.zener.slspc.want_slspc = 0;----See definition
  • Lattice.zener.slspc.typeofcluster = {'circular' , 1, 'oval' , 0, 'rectangluar', 0, `'randomized'};
  • Lattice.zener.slspc.noslspclusters = 10;----See definition
  • Lattice.zener.slspc.clusterdistr = {'circular' , 0, 'oval' , 0, 'rectangluar', 0, 'triangular' , 0, 'hexagfonal' , 0, `'randomized' , 1};
  • Lattice.zener.slspc.islspcvf = 05.00;----See definition
  • Lattice.zener.slspc.radiusfactorforcircle = 0.0500;----_See illustration: _
  • Lattice.zener.slspc.cif = 0.800;----_See illustration: _

Specify fibrous slsp array details

  • Lattice.zener.cnt.want_cnt = 0;----See definition
  • Lattice.zener.cnt.noofcnt = 0032----See definition
  • Lattice.zener.cnt.NpCNT = 0050;
  • Lattice.zener.cnt.genradiusfactor = 1.00;
  • Lattice.zener.cnt.cntinsidefactor = 0.95;
  • Lattice.zener.cnt.thicknessfactor = 1.00;
  • Lattice.zener.cnt.startingangle = 0;
  • Lattice.zener.cnt.thetaone = 000;
  • Lattice.zener.cnt.thetatwo = 030;
  • Lattice.zener.cnt.overlaycntsinlatticeplot = 1;
  • Lattice.zener.cnt.ROTATEiCNTs = 1;
  • Lattice.zener.cnt.rotateallaboutsameangle = 0;
  • Lattice.zener.cnt.icntrotang = 5;

Specify fibre cluster details (to do)

  • Lattice.zener.cntc.want_CNTC = 0;----See definition
  • Lattice.zener.cntc.nocntclusters = 1;

Specify energy min. procedure (to do)

  • MC_Param.delE_calc.discrete = 1;----See definition
  • MC_Param.delE_calc.continuous = 0;

Specify how many nearest neighbours to consider

  • MC_Param.Num_Nearest_Neigh_Level.lattice_square = 1;----See definition
  • MC_Param.Num_Nearest_Neigh_Level.lattice_triangular = 1;
  • MC_Param.Num_Nearest_Neigh_Level.lattice_hexagonal = 1;

Which MC step should I start form (keep 1)

  • MC_Param.StartFrom_MCStep = 1;----See definition

Total number of Monte-Carlo time steps (simulation step)

  • MC_Param.Num_MC_Steps = 2E3;----See definition

Which algorithm to use?

  • MC_Param.MCP__ALGORITHM = 01;

Other MC details

  • MC_Param.dimensionality = '2d';
  • MC_Param.WeightMatrixID = 'symm_03';
  • MC_Param.constant_centre = 2;
  • MC_Param.Consider_Energy = 1;

MC_Loop.DataOperation.txtwriteint = 0.5E3;----See definition


FileFolderStructure Functions needed to generate the grain structures are perform a basic visualization are in A. rng is initialized to 1 for previously mentioned reasons. To write the results, a few folders are needed and a few may be generated. These are detailed now. B shows the parameters of the simulation written to simparameters folder. Results are written as data files and image files, as shown in C. D shows the details of the plots folder showing further subfolders, the names being self-explanatory. E shows subfolders in datafiles folder. The break up of E into E1 to E4 is indicated. E1 stores coordinate of all lattice sites, E2 stores the indices of the location of various second phase particles, E3 stores the indicies of characterized grain structure and E4 stores the evolving grain structure metadata in the form of state values.


02 For total MCS of 2000, there will be 2000 temporal slices in the history of partition evolution, and all of them can be stored in PXO. Here, 4 such slices are written at an interval of 500. Green markers indicate the location of second phase particles which act as spatial partition pins, interpreted as Zener particles pinning the grain boundariues in a poly-crystal. Each partition is a unique grain and its color indicates the state to which the grain belongs to. These can be crystallite orientations also.


03 and 04 Function Characterize_Grain_Structure_2D(..) is used to identify individual grains and their grain boundaries. Not recommended for large MCS, low Vf and low q, as it can take a long time. Command line snapshot shows the results of characterizartion segregated into states and the grains belonging to that state. Grain area is the sum of areas of all the lattice site making up the grain. On the right, are shown the folders that the function creates upon successful execution


04a Basic contents in the folder(s) generated by Characterize_Grain_Structure_2D(..) are given here. An image file is written and all others are data files. Image file is shown to the right, which is the grain structure having 32 grains @ 500th temporal slice. Here, the SLSP are identified by various different colours other than the green square previously used. This is a bug and needs correction. Just ignore it. However, at this point, I cannot say with certainty whether these are being taken up as a separate grains by themselves!!. This is TO DO. Contents of a data file are shown as an example, where the numbers indicate the latttice site element number in the MATLAB’s element number notation.


05 Characterize_Grain_Structure_2D(..) also generates statistics of the grain structures @ all temporal slices requested for. Reminder: Temporal slice number requests are done in the initial phases of gss2d, in Build___INPUT_PARAMS___Struct() function @ MC_Loop.DataOperation.txtwriteint. Figures 6, 13, 16, 19 show the probability distribution of grain area, the trend with MCS is quite obvious. Figures 11, 14, 17, 20 show the probability distribution of number of grains, the trend with MCS is a bit more obvious then in the previous case, for reasons which are obvious. Figures 12, 15, 18, 21 are my favourites, not because they are very colourful (though they are and they do look pretty and impressive), but because they provide temporal data on how the number of grains belonging to a particular state value, q, has evolved. Figure 22 should have been working. Right now, I am taking this as a bug in the bug-list, which is to be addressed in the TO DO.


06 Figures 1 to 4 show the neat looking, patched format display of grains at MCS = 500:500:2000. Function making this is given to the top. Personally, I would prefer either pixellated view obtained from PXO's plotgrainstructure2d(...) command or by using MTEX, to do which, we will have to go a little bit further.


07 Function to the top creates temporal evolution of the relationship between grain boundary length and grain boundary area for all grains in the temporal slice under question. Grain boundary length is plotted is plotted on y-axis while grain boundary enclosed area is on the x-axis. Deviation form linear relationship is more at smaller MCS, that is when the grains are small. But, the lack of enough data points at higher MCS, at lower grain pixel area values could also be contributing to this deviation. This should be investigated further.


08 Function at the provides graphical presentation of how the AGS bounds [min, mean, max] vary as the number of grains increase with increasing MCS. Particle volume fraction and simulation temperature will effect this.


09 Function to the top allows calculation of average grain size by the intercept method. The absolute average is the average of the average vertical and average horizontal intercepts. These average vertical and average horizontal intercepts are further averages of the intercept length calculated from a number of vertical and horizontal intercepts made with the grain structure. Values are shown. Intincr1 means an intercept is drawn on every adjacent lattice site along the respective direction (vertical or horizontal) and Intincr5 means an intercept is drawn on every 5th adjacent lattice site along the respective direction. Average of all these is the last value in the command line. Which one to use is decided by the user. TO DO: Intercept calculations to be made to comply with rules defined by ASME grain intercept calculation standard. Figure at the centre shows that average grain size (here, this is the intercept method calculated value) has saturated temporally. The saturation rate would be higher at larger Vf when no Kernel weight functions is specified, as in MCS algorithm 01, which has been selected. Graph top the right shows the relationship between calculated value of average grain size and the choice of the number of intercepts (subscripts v and h: vertical and horizontal respectively)


10 To check.


11 Enter the texture and phase inputs parameters in Build_PHASE_Struct(). Map__TEX_GRST maps the tex data to the grain structure by calculating the texture from the user information provided previously. Texture component method is used by employing MTEX. Exact parameters which can be provided can be found in Build_PHASE_Struct.m. Rolling type texture is generated in this example and shown as a orientation scatter on (111) pole figure for all temporal slices of PXO output. The number of actual orientations equals the number of grains calculated using Characterize_Grain_Structure_2D() function. Due to symmetry, number of orientation on the pole figure appear to be more.


12 Above three function generate CTF_FILE.ctf, an EBSD format output, which can be used in further analysis in other softwares.


13 Function POLY_XTAL____MTEX_GS_ANALYSIS() imports the CTF_FILE.ctf file. POLY_XTAL____MTEX_GS_ANALYSIS() is scripted to perform basic MTEX calculations like grain calculation, grain boundary calculation and visualization, grain boundary misorientation angle calculation and its visualization, Kernel Average Misorientation, variation of shape factor with aspect ratio. The histogram of Bunge’s Euler angle distributions is plotted in last image for demonstration.


14 Download gmsh and MTEX2gmsh from the links provided and unpack them both. Install MTEX2GMSH, when asked point to the gmsh executable and continue..


15 Set some of the MTEX2GMESH properties. 2 gmsh mesh files default.msh, Quad.msh are made which can be opened in gmsh software and another small.inp the input script file of ABAQUS model which can be opened using ABAQUS>File>input>Model>chjooe .inp and open the .inp file


16 Open the mesh in gmsh executable and the mesh file can be loaded. For some reason, best known to the creators of gmsh and mtex2gmsh, the quad mesh file only loads the grain boundaries with no grain internal meshes, may be there is some other options which should have been followed. If you do know the solution, please provide it in the discussions-user solutions section of the GitHub PXO wiki.


17 Also output to ABAQUS using MTEX2GMSH. You can open the file in ABAQUS as previously explained. 2nd image shows the various sets created. However, PXO will be upgraded with in-built mesher.


summary In summary, A shows the many temporal slices. In B, we take the slice needed and is shown in C. Texture is mapped to grain structure and exported as .ctf and then .ctf file is imported in MTEX for further analysis. MTEX2GMSH can also be used once the .ctf file is loaded in MTEX, to call GMSH and export the mesh to ABAQUS format and may be formats of other softwares also. This allows you to take forward crystal plasticity based simulations on all temporal slices of the microstructure !!


Clone this wiki locally