Binder and Inclusions 3D Example

XML Input File

The basename for this file is pbx_3D.xml. The file can be run using this command:

microstructpy --demo=pbx_3D.xml

The full text of the file is:

<?xml version="1.0" encoding="UTF-8"?>
<input>
    <material>
        <name> Binder </name>
        <material_type> matrix </material_type>
        <fraction> 35 </fraction>
        <shape> sphere </shape>
        <size>
            <dist_type> uniform </dist_type>
            <loc> 0.45 </loc>
            <scale> 0.25 </scale>
        </size>
        <color> lightgray </color>
    </material>

    <material>
        <name> Inclusions </name>
        <material_type> crystalline </material_type>
        <fraction> 65 </fraction>
        <shape> sphere </shape>
        <size>
            <dist_type> lognorm </dist_type>
            <scale> 0.8 </scale>
            <s> 0.3 </s>
        </size>
        <color> darkorange </color>
    </material>

    <domain>
        <shape> cube </shape>
        <side_length> 3 </side_length>
        <corner> (0, 0, 0) </corner>
        <periodic> True </periodic>
    </domain>

    <settings>
        <directory> pbx_3D </directory>
        <verbose> True </verbose>
        <rng_seeds>
            <size> 1 </size>
            <position> 1 </position>
        </rng_seeds>

        <!-- the overlap tolerance: with 0.7 all the seeds can be placed -->
        <rtol> 0.7 </rtol>

        <!-- the seeds and the grains stay a margin away from the periodic
             faces, or cross them by more than the margin: auto is half the
             target edge length, at most an eighth of the smallest grain -->
        <periodic_margin> auto </periodic_margin>
        <edge_opt> True </edge_opt>
        <edge_opt_n_iter> 10 </edge_opt_n_iter>

        <mesh_min_angle> 15 </mesh_min_angle>
        <mesh_max_volume> 0.02 </mesh_max_volume>

        <seeds_kwargs>
            <linewidths> 0.2 </linewidths>
        </seeds_kwargs>
        <poly_kwargs>
            <linewidths> 0.2 </linewidths>
        </poly_kwargs>
        <tri_kwargs>
            <linewidths> 0.1 </linewidths>
        </tri_kwargs>
    </settings>
</input>

Materials

This is the 3D version of the Binder and Inclusions Example: crystalline inclusions (65% of the volume, spherical seeds with lognormal diameters) in a binder (a matrix phase, 35% of the volume, seeded with small spheres).

Domain Geometry

The materials fill a cube of side length 3, periodic in the three directions.

Settings

The overlap tolerance rtol is set to 0.7 so that the small binder seeds can be placed between the inclusions, and the random number generator seeds make the microstructure repeatable.

The mesh has a minimum dihedral angle of 15 degrees and a maximum element volume of 0.02.

The seeds are placed a margin away from the periodic faces (periodic_margin set to auto: half the target edge length, or an eighth of the smallest grain if that is smaller) and the edge optimization moves the seeds that leave a thin piece of a grain on a face, a corner narrower than the minimum angle of the mesh, or a very short edge, since any of these forces very small tetrahedra.

Output Files

The three plots that this file generates are the seeding, the polyhedral mesh, and the tetrahedral mesh. These three plots are shown in Fig. 29 - Fig. 31.

Seed geometries.

Fig. 29 Binder and inclusions 3D example - seed geometries.

Polyhedral mesh.

Fig. 30 Binder and inclusions 3D example - polyhedral mesh.

Tetrahedral mesh.

Fig. 31 Binder and inclusions 3D example - tetrahedral mesh.