rectangular_pillars_array¶
- rectangular_pillars_array(shape: List, spacing: int = 40, dist: str = 'uniform', dist_kwargs: dict = {'loc': 5, 'scale': 10}, lattice: str = 'sc', truncate: bool = True, seed: int = None)[source]¶
A 2D micromodel with rectangular pillars positioned on a lattice
The model is generated by inserting rectangular sections of different widths between each pair of points. The size of pillars is controlled indirectly by the size of the openings.
- Parameters:
shape (array_like) – The X, Y size of the desired image in pixels
spacing (int) – The spacing in pixels betwen pore centers (junctions between pillars). If lattice=’tri’ this refers to the diagonal distance between pores.
dist (str or scipy.stats object) – The statistical distribution to use for throat radii. If a scipy.stats object is given the rvs method is used directly. If a str is given then the corresponding scipy.stats object is creating using the arguments given by dist_kwargds.
dist_kwargs (dict) – A dictionary of keyword arguments to use when instantiating the scipy.stats object specified by dist (if str) was given.
lattice (str) –
The type of lattice to use. Options are:
lattice
description
’sc’
A simple cubic lattice where the pillars are aligned vertically and horizontally with the standard grid. In this case the meaning of
spacing
,Rmin
andRmax
directly refers to the number of pixels.’tri’
A triangular matrix, which is esentially a cubic matrix rotated 45 degrees. In this case the mean of
spacing
,Rmin
andRmax
refer to the length of a pixel.truncate (bool) – A flag to indicate if the output should be truncated to the given shape or if the returned image should be expanded to span an even number of unit cells. The default is False.
seed (int) – The value to initialize numpy’s random number generator. The default is None which results in a new realization each time this function is called.
- Returns:
im – An ndarray with True values indicating the void space.
- Return type:
ndarray
Examples
Click here to view online example.