morphogen.models.design

Microstructures from combinatorial design: tile assemblies and random strut lattices.

tile_assembly

Compatible assemblies of building blocks (polarized blocks of combinatorial metamaterials, pipe networks) drawn by wave function collapse or uniformly by transfer matrices; their voxels form a lattice microstructure.

random_lattice

Strut lattices with defects: struts removed at random down to a mean coordination, nodes displaced at random; the rigidity of the pin-jointed framework (mechanisms, self-stresses, floppy strains) is analysed.

morphogen.models.design.PARENT_COORDINATION = {'bcc': 8.0, 'cubic': 6.0, 'fcc': 6.0, 'octet': 12.0}

Mean coordination of the intact lattices.

morphogen.models.design.MAX_RIGIDITY_NODES = 1000

Largest framework (nodes) whose rigidity is analysed.

class morphogen.models.design.TileAssembly(tiles: str = 'polarized', tile_length: float = 1.0, tile_cells: int = 8, dimension: int = 3, method: str = 'wfc', channel_radius: float = 0.25, pipe_radius: float = 0.2, open_probability: float = 0.5, degrees: tuple[float, ...] | None = None, boundary: int | None = None, smoothing: float = 0.0)[source]

Bases: Model

Compatible assemblies of building blocks with matching faces.

polarized blocks (combinatorial metamaterials after Coulais et al. 2016) or pipes (networks without dead ends at the tile boundaries).

phases: ClassVar[dict[int, str]] = {0: 'void', 1: 'solid'}

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'tiles'

Objects counted by expected_count() (fibres, spheres, cells…).

tile_set()[source]
tile_grid(domain: Domain) → tuple[int, int, int][source]
expected_count(domain: Domain) → float[source]

Mean number of objects of the model in domain (None when undefined).

Used to express RVE sizes as numbers of fibres, grains or cells (Dirrenberger et al. 2014, Table 10).

generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) → LatticeField[source]

One realization of the model in domain.

class morphogen.models.design.RandomLattice(cell: str = 'octet', cell_size: float = 1.0, strut_radius: float = 0.08, coordination: float | None = None, removal_fraction: float | None = None, min_degree: int = 3, perturbation: float = 0.0, rigidity: bool = True, *, anisotropy: Anisotropy | None = None, frame_stiffness: bool = False)[source]

Bases: Model

Strut lattices with defects: missing struts and displaced nodes.

Struts of a cubic, bcc, fcc or octet lattice are removed at random, down to a mean coordination or by a fraction, and nodes are displaced at random. The rigidity of the pin-jointed framework tells whether it is stretching-dominated (no floppy macroscopic strain; Maxwell’s count needs a coordination of at least 6), and with frame_stiffness the stiffness of its frame of beams (rigid joints) is added to the summary.

phases: ClassVar[dict[int, str]] = {0: 'void', 1: 'struts'}

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'unit cells'

Objects counted by expected_count() (fibres, spheres, cells…).

theory(domain: Domain | None = None) → dict[str, float][source]

Theoretical morphological characteristics known in closed form (may be empty).

Some values depend on the domain (e.g. the intensity implied by a number of cells).

expected_count(domain: Domain) → float[source]

Mean number of objects of the model in domain (None when undefined).

Used to express RVE sizes as numbers of fibres, grains or cells (Dirrenberger et al. 2014, Table 10).

framework(n_cells, rng: Generator) → Framework[source]

The random framework of n_cells unit cells.

generate(domain: Domain, seed: int | SeedSequence | Generator | None = None) → PrimitiveUnion[source]

One realization of the model in domain.