OOF2: The Manual

6.2.83. OOF.LoadData.Microstructure

Commands describing Microstructures in data files.

This menu contains all the commands that describe a Microstructure in OOF2 data files. The commands are used in all three of the data file formats described in Section 2.6. The commands are described here so that users can edit script or ascii files, or can construct OOF2 Microstructures in an external program.

Microstructures are saved in data files by the OOF.File.Save.Microstructure, OOF.File.Save.Skeleton, and OOF.File.Save.Mesh commands. Microstructure data files themselves contain the following commands (the examples define a complete 3×3 Microstructure):

  1. A FileVersion command. All data files must begin with one of these.

    Example. 

    FileVersion(number=1.0, format='ascii')

  2. A Microstructure.New command, to create a new empty Microstructure, containing physical and pixel sizes and nothing else.

    Example. 

    Microstructure.New(name='tiny3', size=Point(3,3), isize=iPoint(3,3))
    
  3. Any number (zero or more) of Image.New commands, which add Images to the Microstructure. These can come at any point in the file after the Microstructure has been created.

    Example. 

    Image.New(name='tiny3.ppm',
    	      microstructure='tiny3',
    	      pixels=RGBData8(rgbvalues=[257, 257, 14649, 257, 257,
    	      14649, 0, 0, 15163, 21331, 21331, 64507, 21331, 21331,
    	      64507, 64764, 64764, 64764, 21331, 21331, 64507, 21331,
    	      21331, 64507, 64764, 64764, 64764]))

  4. A Microstructure.Categories command, which categorizes each pixel in the Microstructure. A pixel category is an integer. Pixels with different assigned Materials or belonging to different pixel groups have different categories.

    [Note] Note

    This category definition is slightly different from the one used in calculating Skeleton element homogeneity, in that it ignores the meshable flag on pixel groups.

    Example. 

    Microstructure.Categories(microstructure='tiny3', categories=[[0, 0, 0], [1, 1, 0], [1, 1, 0]])

  5. Zero or more material Property definitions from the OOF.LoadData.Property menu. The properties must all have names.

    Example. 

    Property.Color(name='color1', color=RGBColor(red=0.000000, green=0.000000, blue=1.000000))
    Property.Color(name='color2', color=RGBColor(red=0.000000, green=1.000000, blue=0.000000))
    Property.Elasticity.Anisotropic.Cubic(name='cubicelastic', cijkl=CubicRank4TensorCij(c11=1.0,c12=0.5,c44=0.25))
    Property.Elasticity.Isotropic(name='isoelastic', cijkl=IsotropicRank4TensorCij(c11=1.0,c12=0.5))
    Property.Thermal.ThermalExpansion.Anisotropic.Cubic(name='cubicexp', alpha=CubicRank2Tensor(xx=1.000000), T0=0.0)
    Property.Thermal.ThermalExpansion.Isotropic(name='isothermexp', alpha=1.0, T0=0.0)
    

  6. Zero or more Material commands, defining Materials in terms of the defined Properties.

    Example. 

    Material(name='material1', properties=['Color:color1', 'Elasticity:Isotropic:isoelastic', 'Thermal:ThermalExpansion:Isotropic:isothermexp'])
    Material(name='material2', properties=['Color:color2', 'Elasticity:Anisotropic:Cubic:cubicelastic', 'Thermal:ThermalExpansion:Anisotropic:Cubic:cubicexp'])

  7. Commands from the Microstructure.DefineCategory menu to specify which Materials and pixel groups belong to the pixels in each category. If a category has no Material and no pixel groups, it doesn't appear.

    Example. 

    Microstructure.DefineCategory.Material(microstructure='tiny3', category=0, material='material2')
    Microstructure.DefineCategory.Material(microstructure='tiny3', category=1, material='material1')

  8. A single Microstructure.EndCategories command.

    Example. 

    Microstructure.EndCategories(microstructure='tiny3')

Parent Menu: OOF.LoadData

OOF.LoadData.Microstructure Menu Items