morphogen.homogenization.networks

The effective stiffness of random periodic frameworks (fibre networks, open foams, lattices with defects) as periodic frames of Euler–Bernoulli beams (or of Timoshenko beams, the option of morphogen.homogenization.frames), and the softening of networks of non-identical beams (Ban, Barocas, Shephard & Picu 2016).

A framework (morphogen.design.frames.Framework: nodes in a periodic box, bars from a node to an image of another; delaunay_network, open_foam and random_lattice keep theirs in their metadata, of which network_frame() makes the frame of a realization) becomes a frame of beams of circular sections, SpaceFrame.from_framework (Frame.from_framework in the plane). The displacement of a node is E X + w and its rotation θ, w and θ periodic, so that a beam from node i to the image of node j (vector d) moves its second end by E d + w_j - w_i and θ_j - θ_i relative to its first. The periodic problem of each macroscopic strain is solved on the sparse stiffness of the fluctuations (SuperLU, the translations held at the first node; without bending and torsion the rotations are left out: a pin-jointed truss), for the strains of morphoGen’s Voigt order 11, 22, 33, 23, 31, 12 with engineering shears (11, 22, 12 in the plane), that of morphogen.homogenization.postprocess.engineering_constants() (the Mandel form is W C W, W = diag(1, 1, 1, √2, √2, √2)). The effective stiffness is the energy of the solutions u_I per unit volume (per unit area in the plane),

C_IJ = (1 / V) Σ_beams u_I · K_e u_J,

the sum of the parts stored in the stretching, bending and torsion of the beams, each positive semi-definite: the energy split of any macroscopic strain. The bending of a Timoshenko beam is a uniform curvature (EI (θ1 - θ2)² / l, no shear force) and the rotation of its chord a = (θ1 + θ2) / 2 - (v2 - v1) / l, of stiffness k_a = 12 EI / l (1 + Φ), the bending and shear compliances in series, whose energy is split between bending and transverse shear as 1 : Φ (the part shear). The affine estimate is the stretching of affinely deformed fibres (Cox 1952), C_aff = (1 / V) Σ E A L N Nᵀ, N = (n1², n2², n3², n2 n3, n3 n1, n1 n2) for a fibre along n: for isotropic orientations E = φ E_s / 6 and ν = 1/4 in space, φ E_s / 3 and 1/3 in the plane, φ = Σ A L / V the fibre volume fraction (the fibre volume per unit area in the plane). The non-affinity of a macroscopic strain E is the mean square non-affine motion of the ends of the beams over their mean square length, Γ = Σ |w_j - w_i|² / (|E|² Σ l²): the measure of Head, Levine & MacKintosh (2003) and Hatami-Marbini & Picu (2008) at the scale of the segments, zero for an affine deformation (that of the nodes themselves, ⟨|w - w̄|²⟩, grows with the size of a plane cell, as the fluctuations of a random medium in two dimensions, and the motions relative to the length of each beam are dominated by the shortest); and the ratio of the Young’s modulus to that of the affine estimate. Beam by beam, the axial force and the energy of each part under a uniaxial stress (beam_forces()) show the force chains and the beams that bend.

Networks of non-identical beams (Ban et al. 2016). The stiffness k_i of a mode of the beams (axial, bending, or modulus: all of them, the Young’s modulus of each fibre) is drawn with mean k_0 and coefficient of variation CV. The Young’s modulus of the network E(k) is the minimum, over the fluctuations and the free macroscopic strains (the lateral contraction of a uniaxial stress), of an energy linear in each k_i: it is concave in each, so that the network softens on average, and to second order in CV

(E_0 - ⟨E⟩) / E_0 = s CV², s = -(k_0² / 2 E_0) Σ_i ∂²E/∂k_i², σ_E² / E_0² = v CV², v = (k_0 / E_0)² Σ_i (∂E/∂k_i)²,

with ∂E/∂k_i = U · K_i' U / V (U the solution of the uniaxial stress, K_i' the stiffness of the mode of beam i per unit k) and ∂²E/∂k_i² = -(2 / V k_0²) (f_i · K⁻¹ f_i + g_i · (V C')⁻¹ g_i), f_i = k_0 K_i' U the force of the beam on the fluctuations, g_iJ = u_J · f_i on the free strains and C' their stiffness, plus U · K_i'' U / V where the stiffness of the beam is not linear in its factor (the EI and κGA of Timoshenko beams, concave: k_a'' = -2 k_a Φ / (1 + Φ)²): computed exactly for a frame (softening_coefficients()) and against replicas of the stiffness (softening()). The mode area scales EA and κGA together, the area of the general sections of Ban et al.

morphogen.homogenization.networks.MODES = ('axial', 'bending', 'modulus', 'area')

axial (EA), bending (EI), modulus (the Young’s modulus: EA, EI, GJ and κGA alike) or area (the area of a general section: EA and the shear stiffness κGA of Timoshenko beams)

Type:

The modes of the beams whose stiffness varies among them

morphogen.homogenization.networks.LAWS = ('normal', 'lognormal', 'bimodal')

The laws of the stiffness of the beams, of mean 1 and coefficient of variation CV: normal (truncated at 1e-3), lognormal and bimodal (1 ± CV, equally likely)

morphogen.homogenization.networks.PLANE_VOIGT = ((0, 0), (1, 1), (0, 1))

The Voigt order of the strains in the plane (engineering shear)

morphogen.homogenization.networks.BATCH = 256

Beams whose fluctuation forces are solved together (the second derivatives)

morphogen.homogenization.networks.MECHANISM = 1e-12

The smallest pivot of the factored stiffness of a truss, relative to the largest, without mechanisms (the zero-energy modes of a Voronoi truss: 5e-19). Beams with rigid joints have none when connected; the short edges of Poisson-Voronoi foams stiffen some dofs by 1e16 times.

class morphogen.homogenization.networks.FrameStiffness(stiffness: ndarray, stretching: ndarray, bending: ndarray, torsion: ndarray, affine: ndarray, gram: ndarray, fluctuations: ndarray, mean_length: float, density: float | None, dimension: int, shear: ndarray | None = None)[source]

Bases: object

The effective stiffness of a periodic frame (frame_stiffness()): the stiffness (6 x 6, Voigt order 11, 22, 33, 23, 31, 12 with engineering shears; 3 x 3, 11, 22, 12, per unit area in the plane) and its parts stored in the stretching, bending and torsion of the beams (their sum), the affine estimate (the stretching of affinely deformed beams), the sums over the beams of the products of the non-affine motions of their ends under the unit strains over that of the squares of their lengths (gram), the periodic fluctuations themselves (dofs x strains), the mean length of the beams, the fibre volume fraction (fibre volume per unit area in the plane; None when the sections are unknown), the dimension and, for Timoshenko beams, the part stored in their transverse shear (None for Euler–Bernoulli beams).

compliance() → ndarray[source]
uniaxial(axis: int = 0) → ndarray[source]

The macroscopic strain (Voigt) of a uniaxial stress along axis, its normal component along the axis equal to 1.

young(axis: int = 0) → float[source]

The Young’s modulus along axis.

poisson(axis: int = 0, lateral: int = 1) → float[source]

The Poisson’s ratio: the contraction along lateral under a stress along axis.

engineering() → dict[str, float][source]

Young’s moduli, Poisson’s ratios and shear moduli (as morphogen.homogenization.postprocess.engineering_constants()).

split(strain=None) → dict[str, float][source]

The fractions of the energy of a macroscopic strain (Voigt components with engineering shears, or a tensor; by default that of a uniaxial stress along x) stored in the stretching, bending and torsion of the beams (and their transverse shear for Timoshenko beams).

nonaffinity(strain=None) → float[source]

The mean square non-affine motion of the ends of the beams over their mean square length under a macroscopic strain E (by default that of a uniaxial stress along x), Σ |w_j - w_i|² / (|E|² Σ l²): zero for an affine deformation.

affinity(axis: int = 0) → float[source]

The Young’s modulus along axis over that of the affine estimate (1 for an affine deformation of slender beams).

by_axis() → list[dict][source]

The values of a uniaxial stress along each axis: the axis (x, y, z), the Young’s modulus, the Poisson’s ratio (the contraction along the next axis), the ratio to the affine estimate (affinity), the fractions of the energy of split() and the nonaffinity.

summary(young: float = 1.0) → dict[str, float][source]

The main values, the moduli relative to the Young’s modulus young of the beams (the mean over the axes of by_axis() for the moduli, Poisson’s ratios, stretching fractions and non-affinity).

morphogen.homogenization.networks.frame_stiffness(frame) → FrameStiffness[source]

The effective stiffness of a periodic frame (Frame or SpaceFrame) by its sparse periodic problem, its split into stretching, bending and torsion and the fluctuations of the nodes (the module docstring gives the conventions).

morphogen.homogenization.networks.PARTS = {'axial': 'stretching', 'bending': 'bending', 'shear': 'shear', 'torsion': 'torsion'}

The parts of the energy of the beams (beam_forces()), as named by FrameStiffness.split(), from the modes of the element stiffness

morphogen.homogenization.networks.beam_forces(frame, axis: int = 0, *, strain=None) → dict[source]

The axial force of each beam of a frame and the energy stored in each part of each beam under a uniaxial stress of 1 along axis (the lateral stresses free) or under a macroscopic strain (Voigt components with engineering shears, or a tensor), by the sparse periodic problem: the strain (Voigt), the force N = EA δ / l of each beam (positive in tension; δ the extension of its flexible part l, which its rigid ends do not change) and its energy per unit volume (per unit area in the plane) stored in its stretching, bending, torsion (in space) and transverse shear (Timoshenko beams), whose sum over the beams and the parts is E · C E / 2: the fractions of FrameStiffness.split() beam by beam. They show the force chains of a network and the beams that bend, as morphogen.viz.figures.frame_figure() draws them.

morphogen.homogenization.networks.network_stiffness(framework, radius, *, young=1.0, poisson=0.3, dimension: int = 3, shear_coefficient=None, rigid_joints=None)[source]

frame_stiffness() of the frame of beams of circular sections of a periodic framework (or of its dictionary, as kept in the metadata of the network models): radius, young and poisson one value or one per bar; Timoshenko beams with a shear_coefficient ("cowper", a value or one per bar), Euler–Bernoulli beams without; with rigid_joints, beams rigid over that many radii from each node (the struts merged in the joints of a continuum).

morphogen.homogenization.networks.RADII = ('radius', 'strut_radius')

the first of these keys in its summary (delaunay_network, open_foam: the radius solved for a volume fraction), else of the parameters of its model (random_lattice)

Type:

The radius of the fibres of a realization of a network model

morphogen.homogenization.networks.network_frame(micro, *, young=1.0, poisson=0.3, shear_coefficient=None, rigid_joints=None)[source]

The frame of beams of a realization of a network model, whose metadata keeps its framework (delaunay_network, open_foam, random_lattice: that of the periodic box, or of the larger periodic lattice of a window): beams of circular sections of the radius of its fibres (RADII), with the options of network_stiffness(); a plane Frame when the framework lies in a plane (its nodes at one height, no bar across the box along z: a planar Delaunay network), else a SpaceFrame. A microstructure without a framework is refused.

morphogen.homogenization.networks.fibre_scales(count: int, cv: float, law: str = 'normal', seed: int | SeedSequence | Generator | None = None)[source]

count factors of mean 1 and coefficient of variation cv: normal (draws below 1e-3 raised to it), lognormal or bimodal (1 - cv or 1 + cv, equally likely).

morphogen.homogenization.networks.scaled_frame(frame, scale, mode: str = 'modulus')[source]

The frame with the stiffness of a mode of its beams multiplied by scale (one factor per beam): axial (EA), bending (EI), area (the area of a general section: EA and the shear stiffness κGA of Timoshenko beams, EI and GJ kept) or modulus (all of them: the Young’s modulus of each beam).

morphogen.homogenization.networks.softening_coefficients(frame, mode: str = 'modulus', axis: int = 0) → dict[source]

The Young’s modulus E_0 of a frame along axis and the coefficients of its softening and scatter when the stiffness of a mode of its beams varies independently from beam to beam, with mean the present one and coefficient of variation CV: (E_0 - ⟨E⟩) / E_0 = s CV² and σ_E² / E_0² = v CV² to second order (Ban et al. 2016, eqs. 22 and 25, computed exactly: the module docstring), with the derivatives dE and d2E per beam of E relative to its factor. The modes are those of scaled_frame(); the stiffness of a Timoshenko beam is not linear in its EI or κGA (bending, area), whose second derivative adds U · K_i'' U / V.

class morphogen.homogenization.networks.Softening(young: float, cv: ndarray, mean: ndarray, std: ndarray, corrected: ndarray, error: ndarray, coefficients: dict, mode: str = 'modulus', law: str = 'normal', replicas: int = 0, axis: int = 0)[source]

Bases: object

Replicas of the stiffness of the beams of a frame (softening()): the coefficients of variation cv and, for each, the mean and standard deviation of the Young’s modulus over the replicas relative to that of the identical beams young, the mean corrected by its first-order part (a control variate of zero mean, which removes most of the scatter of the replicas) and its standard error, the coefficients s and v of softening_coefficients(), and the study: the mode varied, the law of its factors, the number of replicas per CV and the axis of the uniaxial stress.

softening() → ndarray[source]

(E_0 - ⟨E⟩) / E_0 of the corrected means.

predicted() → ndarray[source]

s CV², the second-order softening.

scatter() → ndarray[source]

σ_E² / E_0² of the replicas.

predicted_scatter() → ndarray[source]

v CV², the second-order scatter.

rows() → list[dict][source]

A row per coefficient of variation: the study (mode, law, cv, replicas), the plain mean of E / E_0 over the replicas and its standard error σ / √n (mean_error), the corrected mean and its standard error, the second-order mean 1 - s CV² (theory), the standard deviation std of E / E_0, the scatter σ_E² / E_0² with its standard error for normal draws, σ² √(2 / (n - 1)), and v CV² (theory_scatter).

morphogen.homogenization.networks.softening(frame, mode: str = 'modulus', cvs=(0.1, 0.2, 0.3), *, replicas: int = 100, law: str = 'normal', axis: int = 0, seed: int | SeedSequence | Generator | None = None, callback=None) → Softening[source]

The softening of a network of non-identical beams (Ban et al. 2016): replicas draws of the stiffness of a mode of the beams (fibre_scales() of each cv and law; scaled_frame()) on the same geometry, the Young’s modulus along axis of each, against the second-order theory. callback(done, total) follows the replicas (one solve each).