CellSplit

The implementation of split cell class is CellSplit. In order to compile this class one should set the cmake variable SPLIT_CELL ON in the configuration.

Simulating multi-phase structures with muSpectre involves pixels which share material as they may lie in the interface of phases. Different homogenisation schemes can be used for substituting pixels if the effective media consists of two or more phases. One of these approximations assuming iso-strain pixels is the Voigt method. In the CellSplit pixels’ effective constitutive behavior is approximated as the weighted average of the constituent materials w.r.t their volume fractions \((\alpha)\)

\begin{align} \boldsymbol{P}^l &= f\big(\boldsymbol{F}^l\big) &, \boldsymbol{P}^r &= f\big(\boldsymbol{F}^r\big)\tag{1}\\ \boldsymbol{F} &= \boldsymbol{F}^r &, \boldsymbol{F} &= \boldsymbol{F}^l\tag{2}\\ \overline{\boldsymbol{P}} &= \langle\boldsymbol{P}\rangle\tag{3}\\ \end{align}

where

\begin{align} \langle\boldsymbol{P}\rangle &= \alpha^l \boldsymbol{P}^l + \alpha^r \boldsymbol{P}^r\tag{4}. \end{align}

The superscripts \((l)\) and \((r)\) show the two constituent materials of the pixel and \((\boldsymbol{P})\), \((\boldsymbol{F})\) are, respectively, first Piola-Kirchhoff and deforamtion gradient tensors. \((\alpha)\) is the volume fraction of the phases.The CellSplit inherits from CellBase and can be used in its stead. Currently, all materials inheriting from MaterialMuSpectre can be added to an instance of CellSplit. However, it should be noted that for adding pixel to the materials contained in this type of cell, add_pixel_split() sould be employed instead of plain add_pixel_split(). This function takes the ratio of the materials in the pixel that is being assigned to it as an input parameter. It is notable that the summation of ratio of materials should add up to unity for all the pixels in the cell.

Specialised function make_automatic_precipitate_split_pixels() exists in CellSplit which enables user to assign materials based on the material and geometry of precipitates (as a set of coordinates composing a polyheron/polygon in 3D/2D). Moreover, one can use the function complete_material_assignment() in order to assign the pixels whose assignments are not completed to a specific material. The following snippet shows how one can use the machinery to employ this specific kind of Cell in µSpectre.

Python Usage Example

rve = msp.Cell(res, lengths,
               formulation, None, 'fftw', None,
               msp.SplitCell.split)

mat1 = msp.material.MaterialLinearElastic1_2d.make(
   rve, "mat1", E1, .noo1)

mat2 = msp.material.MaterialLinearElastic1_2d.make(
   rve, "mat2",  E2, .noo2)

points = np.ndarray(shape=(num, 2))
for j, tetha in enumerate(np.linspace(0, 2*np.pi, num, endpoint=false)):
    points[j, 0] = center[0] + radius*np.cos(tetha)
    points[j, 1] = center[1] + radius*np.sin(tetha)

points_list = [points.tolist()]

rve.make_precipitate(mat1, points_list)
rve.complete_material_assignemnt_simple(mat2)