grains.simulation.nature_of_deformation

grains.simulation.nature_of_deformation(microstructure, strain_field, interface_width=3, visualize=True)[source]

Characterizes the intergranular/intragranular deformations.

To decide whether the strain localization is intergranular (happens along grain boundaries, also called interfaces) or intragranular in a given microstructure, the strain field is projected on the microstructure. Here, by strain field we mean a scalar field, often called equivalent strain that is derived from a strain tensor.

It is irrelevant for this function whether the strain field is obtained from a numerical simulation or from a (post-processed) full-field measurement. All what matters is that the strain field be available on a grid of the same size as the microstructure.

The strain field is assumed to be localized on an interface if its neighborhood, with band width defined by the user, contains higher strain values than what is outside the band (i.e. the grain interiors). A too large band width identifies small grains to have boundary only, without any interior. This means that even if the strain field in reality localizes inside such small grains, the localization is classified as intergranular. However, even for extreme deformations, one should not expect that the strain localizes on an interface with a single-point width. Moreover, using a too small band width is susceptible to the exact position of the interfaces, which are extracted from the grain microstructure. A judicial balance needs to be achieved in practice.

Parameters
  • microstructure (ndarray) – Labelled image corresponding to the segmented grains in a grain microstructure.

  • strain_field (ndarray) – Discrete scalar field of the same size as the microstructure.

  • interface_width (int, optional) – Thickness of the band around the interfaces.

  • visualize (bool, optional) – If True, three plots are created. Two of them show the deformation field within the bands and outside the bands. They are linked together, so when you pan or zoom on one, the other plot will follow. The third plot contains two histograms on top of each other, giving the frequency of the strain values within the bands and outside the bands.

Returns

  • boundary_strain (ndarray) – Copy of strain_field, but values outside the band are set to NaN.

  • bulk_strain (ndarray) – Copy of strain_field, but values within the band are set to NaN.

  • bands (ndarray) – Boolean array of the same size as strain_field, with True values corresponding to the band.

See also

grains.dic.DIC.strain()

Computes a strain tensor from the displacement field.

grains.dic.DIC.equivalent_strain()

Extracts a scalar quantity from a strain tensor.

matplotlib.pyplot.hist()

Plots a histogram.

Notes

  1. From the modelling viewpoint, it is important to know whether the strain localizes to the grain boundaries or it is dominant within the grains as well. In the former case, simplifications in the models save computational time in the simulations.

  2. In dynamics, the evolution of the strain field is relevant. E.g. an initially intergranular deformation can turn into diffuse localization that occurs within the grains as well. In that case, a strain field must be obtained at each time step, and this function can be called for each such instance.

Examples

The following figure was created by this function with visualize set to True and band_width chosen to be 3.

../_images/intergranular-intragranular_deformations.gif