morphogen.models.foam

Open-cell foams and trabecular bone: struts along the edges of a tessellation; fibre networks along the edges of a Delaunay triangulation.

The struts of open-cell foams (polymer and metal foams, sponges) and of trabecular bone (the cancellous bone of vertebrae and of the ends of long bones) lie along the edges of cells close to those of a Voronoi tessellation; their stiffness scales as the square of their relative density, their walls being open (Gibson and Ashby 1997). The model takes the edges of the exact periodic Voronoi tessellation of germs (see morphogen.mesh.polyhedra.periodic_cells()) as spherocylinders of radius r, with spheres of node_ratio r at the vertices (the thickening of the nodes, the Plateau borders of liquid foams). The germs are

  • Poisson points (regularity 0): the Poisson-Voronoi foam;

  • points at least regularity jamming distance of their random sequential addition apart, for more even cells;

  • moved relaxation times to the centroids of their cells (Lloyd’s algorithm, on sample points): toward a centroidal tessellation, whose regular cells are close to those of real foams.

Trabecular bone aligns its struts with the main loads (Wolff’s law): the cells are elongated by anisotropy along axis (the tessellation of the germs is computed in the box shortened by that factor along the axis, then stretched back), or by the stretches of an affine anisotropy along the box axes (morphogen.models.affine: the schema of the other models, here with struts of circular sections). The strut radius is given, or solved on each realization for a relative density (volume_fraction, measured on voxels a few times finer than the struts).

The edges of a Poisson-Voronoi tessellation of lambda germs per unit volume are L_V = 5.832 lambda^(2/3) long per unit volume (Meijering 1953) and meet at N_V = 24 pi^2 / 35 lambda = 6.768 lambda vertices; stretched by a along an axis, a length of isotropic directions grows by F(a) = (a + acosh(a) / sqrt(a^2 - 1)) / 2 ((a + acos(a) / sqrt(1 - a^2)) / 2 for a < 1), and thin struts take the volume fraction pi r^2 L_V to first order.

The fibre networks of Ban et al. (2016) lie along the edges of the dual triangulation, the Delaunay triangulation of the germs (DelaunayNetwork): two germs are joined when their Voronoi cells share a face, 2 + 48 pi^2 / 35 = 15.54 neighbours on average for Poisson germs in space (Meijering’s mean number of faces), 6 in the plane.

morphogen.models.foam.RSA_JAMMING_3D = 0.384

Volume fraction of spheres at the jamming limit of their random sequential addition.

morphogen.models.foam.VORONOI_EDGE_COEFF = 5.832

Edge length per unit volume of Poisson-Voronoi tessellations, per lambda^(2/3).

morphogen.models.foam.VORONOI_VERTEX_COEFF = 6.76772873217556

Vertices per unit volume of Poisson-Voronoi tessellations, per germ.

morphogen.models.foam.stretch_factor(a: float) → float[source]

Mean growth of the lengths of isotropic segments stretched by a along an axis: E[sqrt(1 + (a^2 - 1) cos^2 theta)].

morphogen.models.foam.lloyd_step(germs: ndarray, size: ndarray, samples: int, rng) → ndarray[source]

Germs moved to the centroids of their periodic Voronoi cells, estimated on samples random points of the box.

morphogen.models.foam.periodic_edges(germs: ndarray, size: ndarray) → tuple[ndarray, ndarray][source]

Edges of the periodic Voronoi tessellation of germs in the box [0, size), each once (not its translates): their ends, and the vertices, each once.

morphogen.models.foam.periodic_framework(germs: ndarray, size: ndarray) → Framework[source]

The edges of the periodic Voronoi tessellation of germs in the box [0, size) as a framework: its vertices (in the box) joined by its edges, each once, from a vertex to an image of the other (the frame of beams of the open foams, morphogen.homogenization.frames.SpaceFrame.from_framework()).

morphogen.models.foam.frame_summary(framework: Framework, radius: float, dimension: int = 3) → dict[source]

The stiffness of the frame of beams of a framework (fibres of Young’s modulus 1 and Poisson’s ratio 0.3), for the summaries of the network models (morphogen.homogenization.networks.FrameStiffness.summary()), with the upper triangles of its stiffness frame_C11 … and of its compliance frame_S11 … (S = C^-1; Voigt order 11, 22, 33, 23, 31, 12 with engineering shears, 11, 22, 12 per unit area in the plane; in units of the modulus of the fibres).

morphogen.models.foam.FRAME_STIFFNESS = "Add the stiffness of the frame of beams of the fibres (Young's modulus 1, Poisson's ratio 0.3) to the summary: E, Poisson's ratio, ratio to the affine estimate, fraction of stretching energy and non-affinity under uniaxial stress, and its stiffness C_ij and compliance S_ij (Voigt 11, 22, 33, 23, 31, 12, engineering shears)"

The doc of the parameter of the network models that adds the stiffness of their frame

class morphogen.models.foam.OpenFoam(n_cells: int | None = None, intensity: float | None = None, strut_radius: float | None = None, volume_fraction: float | None = None, node_ratio: float = 1.0, regularity: float = 0.0, relaxation: int = 0, anisotropy: Anisotropy = 1.0, axis: int = 2, *, frame_stiffness: bool = False)[source]

Bases: Model

Open-cell foam or trabecular bone: struts along the edges of the periodic Voronoi tessellation of (regularized) germs, cells elongated by anisotropy along axis, with a strut radius or a relative density. The framework of the struts is kept in the metadata (periodic_framework()), and with frame_stiffness the stiffness of its frame of beams in the summary.

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

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'cells'

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

theta(domain: Domain | None) → float[source]

Cells per unit volume.

property stretch: ndarray

The stretches of the cells along x, y and z.

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

One realization of the model in domain.

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).

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).

morphogen.models.foam.periodic_delaunay(points, size) → tuple[ndarray, ndarray][source]

The edges of the Delaunay triangulation of the periodic box [0, size) of the points (2 or 3 coordinates), each once (not its translates): the pairs (i, j) and the shifts s of the edges from points[i] to points[j] + s * size. The points and their images within a margin of the box (three mean spacings, then doubled) are triangulated (SciPy/Qhull) until the circumsphere of every simplex at a point of the box lies in the margin, so that it is empty of every image: the simplices at the points of the box are those of the periodic triangulation. The images are those of as many periods along each axis as the margin spans (thin boxes: several across).

class morphogen.models.foam.DelaunayNetwork(n_points: int | None = None, intensity: float | None = None, radius: float | None = None, volume_fraction: float | None = None, node_ratio: float = 1.0, regularity: float = 0.0, relaxation: int = 0, dimension: int = 3, *, frame_stiffness: bool = False)[source]

Bases: Model

Fibre networks along the edges of the Delaunay triangulation of random points (Ban, Barocas, Shephard & Picu 2016), in space or in a plane.

As in Ban et al. (J. Mech. Phys. Solids 87, 38, 2016), points are drawn in the box and fibres join the points whose Voronoi cells share a face: the edges of their Delaunay triangulation (periodic: periodic_delaunay()), the struts of the dual of the open foams of OpenFoam (spherocylinders of radius, spheres of node_ratio radii at the nodes), cross-linked at every node. The points are Poisson points, at least regularity jamming distance of their random sequential addition apart (hard-core points), or moved relaxation times to the centroids of their Voronoi cells (space only). dimension: 2: a planar network of points of the plane z in the middle of the domain (the planar Delaunay graph; intensity per unit area). The radius is given, or solved on each realization for a volume_fraction. The framework of the nodes and fibres (morphogen.design.frames.Framework) is kept in the metadata, its coordination and fibre lengths in the summary, and with frame_stiffness the stiffness of its frame of beams (morphogen.homogenization.networks).

phases: ClassVar[dict[int, str]] = {0: 'pores', 1: 'fibres'}

Meaning of the phase indices of the voxel images.

count_label: ClassVar[str] = 'nodes'

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

theta(domain: Domain | None) → float[source]

Nodes per unit volume (per unit area for a planar network).

framework(domain: Domain, rng) → Framework[source]

The nodes (from the lower corner of the domain) and fibres of a realization.

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

One realization of the model in domain.

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).

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

The coordination of the Poisson-Delaunay graph, 2 + 48 pi^2 / 35 in space (the mean number of faces of the Poisson-Voronoi cell, Meijering 1953) and 6 in the plane (Euler), and in the plane the mean fibre length 32 / (9 pi) lambda^(-1/2) (Miles 1970) and the fibre length per unit area 3 lambda times it. In space the mean length of a fibre has no closed form: 1.237 lambda^(-1/3) (Miles 1974) is that of the edges of the typical tetrahedron, which counts each fibre once per tetrahedron around it, and the fibres themselves are longer (1.285 on 20,000 points).