Skip to content

BSC.02 SLSP.01

Sunil Anandatheertha edited this page Jul 3, 2021 · 4 revisions

Moving on from HERE, use the following to enable grain detection using PXO.

    [TimeSteps, All_Grains_time, All_GrainBoundaries_time, All_GrainAreas_time, GBL_time,...
        All_GrainEqGrainSize_time, GrainCentroid_xy_time, ogn, CFN, FileLocations, GenericFileName,...
        ImageFileName, DataFileNames, Number_of_grains, Grain_Area_PXL,...
        NGRAINS] = Characterize_Grain_Structure_2D(0, 'af2d', 'ALG_01');

Data in most cells is arranged as follows: All_GrainAreas_time is a 1 x Minst cell (Minst: number of temporal instances between 1 and M, with M being total number of MC steps defined in MC_Param.Num_MC_Steps). Number of Minst is the ratio (MC_Param.Num_MC_Steps) / (MC_Loop.DataOperation.txtwriteint). Each entry in All_GrainAreas_time{1, minst} is a 1 X Q cell (Q being total number of Pott's state defined previously in Lattice.q). Querry as following:

>> All_GrainAreas_time
All_GrainAreas_time =
  1×10 cell array
  Columns 1 through 5
    {1×10 cell}    {1×10 cell}    {1×10 cell}    {1×10 cell}    {1×10 cell}
  Columns 6 through 10
    {1×10 cell}    {1×10 cell}    {1×10 cell}    {1×10 cell}    {1×10 cell}

Each column contains data in minstth temporal instance. Now querry as:

>> All_GrainAreas_time{10}
ans =
  1×10 cell array
  Columns 1 through 5
    {1×13 cell}    {1×13 cell}    {1×9 cell}    {1×8 cell}    {1×10 cell}
  Columns 6 through 10
    {1×8 cell}    {1×15 cell}    {1×13 cell}    {1×13 cell}    {1×9 cell}

Here, in All_GrainAreas_time{10}, 10 is the 10th temporal instance. There are 10 columns. Each column points to a state q in q = 1:Q. Now querry grain area data for grains belonging to q = 1 Pott's state as below.

>> All_GrainAreas_time{10}{1}
ans =
  1×13 cell array
  Columns 1 through 9
    {[135]}    {[1]}    {[54]}    {[1]}    {[1]}    {[1]}    {[1]}    {[1]}    {[2]}
  Columns 10 through 13
    {[1]}    {[1]}    {[1]}    {[1]}

Each of the 13 columns correspond to a grain ng.(q=1) in ng.1 = 1:Ng.1. The value itseld, provides the area of the corresponding grain. Other similar variables have similar construct.

Basic tutorial 02 - A

Bar graph below each temporal slice of GS shows the partitioning of number of grains with each state. Ng provides number of grains and q provides the corresponding state in 1:Q.


Basic tutorial 02 - B Each grain can be visualized as patch as above using plot__Grain_Structure_in_patches('2d', TimeSteps, All_Grains_time). Alternatively, pixellated visualization can also be made using plot__Grain_Structure_in_pixels('2d', TimeSteps, All_Grains_time). Here, TimeSteps and All_Grains_time are outputs from [...] = Characterize_Grain_Structure_2D(...) used previosly.

NEXT STEPS HERE

Clone this wiki locally