morphogen.homogenization.frames

Periodic frames of Euler–Bernoulli beams in the plane (Frame: the honeycomb, triangular, square and kagome lattices of architectured materials) and in space (SpaceFrame: the cubic, body-centred cubic, octet and Kelvin lattices of struts), their linear stiffness, the axial forces of a macroscopic strain and the linear buckling of a cell of several primitive cells (Azulay 2023).

In space, a node carries (u, v, w, θx, θy, θz); a strut of circular section has the axial (EA/L), torsional (GJ/L) and bending (EI, the same about both axes of the section) stiffness of a 3D Euler–Bernoulli beam and the consistent geometric stiffness of its transverse motions in both planes, with the torsional term N I_p / (A L); rotations (pseudo-vectors) turn by det(R) R under a symmetry.

A node carries (u, v, θ). A beam of axis e and length L has the stiffness of Euler–Bernoulli beams (axial EA/L; cubic Hermite bending EI/L^3 [12, 6L, 4L^2, ...]) and, under the axial force N (positive in tension), the consistent geometric stiffness N/30L [36, 3L, 4L^2, -L^2, ...] of its transverse motion. The cell is periodic: the displacement of a node is E X + w, E the macroscopic strain and w (and θ) periodic, so that a beam from node i to node j shifted by the periods s of the cell (x_j + A s - x_i its vector d) stretches by e · (E d + w_j - w_i). The axial forces of a macroscopic strain come from the linear periodic problem; the linear buckling loads λ of that strain are those of (K_e + λ K_g) φ = 0 on the periodic fluctuations, translations excluded.

Both frames take, as an option, Timoshenko beams: a transverse shear stiffness κGA per beam (the attribute shear; shear_coefficient κ in from_framework and lattice_of, Cowper’s for solid sections by cowper_coefficient()) gives the exact two-node Timoshenko stiffness, EI / L³(1 + Φ) [12, 6L, (4 + Φ)L², (2 − Φ)L², ...] with Φ = 12 EI / (κGA L²) in each bending plane (θ the rotation of the section), and the consistent geometric stiffness of its interpolation, N / 30L(1 + Φ)² [36 + 60Φ + 30Φ², 3L, (4 + 5Φ + 2.5Φ²)L², −(1 + 5Φ + 2.5Φ²)L², ...]; without it (shear None) the beams are those of Euler–Bernoulli, Φ = 0.

The frames of random periodic frameworks (fibre networks, open foams, lattices with defects) are built by from_framework, beams of circular sections along their bars, and their effective stiffness is solved on sparse matrices by morphogen.homogenization.networks (effective_stiffness). As an option (rigid_joints, the attribute rigid), the beams of a framework have rigid ends at their joints, the struts merged in the nodes of a continuum: a beam flexible over l - a₁ - a₂ whose ends move with the rigid arms a₁ e and -a₂ e of its nodes, u + θ × a e; only the effective stiffness of the sparse problem takes them.

morphogen.homogenization.frames.FLEXIBLE_LIMIT = 0.1

the rigid ends of the shortest beams (edges shorter than two rigid lengths, inside their nodes) are scaled down to leave it

Type:

The least flexible part of a beam with rigid ends, relative to its length

morphogen.homogenization.frames.SECTIONS = ('circular', 'rectangular')

The solid sections of Cowper’s shear coefficients

morphogen.homogenization.frames.cowper_coefficient(poisson, section: str = 'circular')[source]

Cowper’s (1966) shear coefficient κ of a solid section of Poisson’s ratio poisson: 6(1 + ν)/(7 + 6ν) for a circle, 10(1 + ν)/(12 + 11ν) for a rectangle (the transverse shear stiffness of a Timoshenko beam is κGA).

morphogen.homogenization.frames.beam_matrices(d, axial: float, bending: float, force: float = 0.0, shear=None)[source]

Elastic and geometric stiffness (6 x 6, global axes, dofs u1 v1 θ1 u2 v2 θ2) of a beam of vector d, EA, EI and axial force force: an Euler–Bernoulli beam, or with the transverse shear stiffness shear (κGA) the exact two-node Timoshenko beam of shear parameter Φ = 12 EI / (κGA L²) (θ the rotation of the section; Przemieniecki 1968) and the consistent geometric stiffness N ∫ v'² dx of its interpolation (Friedman & Kosmatka 1993), the Euler–Bernoulli ones at Φ = 0.

class morphogen.homogenization.frames.Frame(nodes: ndarray, beams: ndarray, shifts: ndarray, lattice: ndarray, axial: ndarray, bending: ndarray, centre: ndarray, generators: list, area: ndarray | None = None, shear: ndarray | None = None, rigid: ndarray | None = None)[source]

Bases: object

A periodic frame: nodes (positions in the cell), beams (node pairs), shifts (periods between the ends: beam k ends at nodes[j] + lattice @ shifts[k]), the lattice of the cell (vectors in the columns), EA and EI of each beam, the centre and generators (R, t) of its symmetry group, the area of the section of each beam (for the fibre volume per unit area), the transverse shear stiffness κGA of each beam: Timoshenko beams (None, the default: Euler–Bernoulli beams, rigid in shear) and the lengths of the rigid ends of each beam at its first and second node (m x 2; None, the default: none), which the effective stiffness alone takes.

classmethod from_framework(framework, radius, *, young=1.0, poisson=0.3, shear_coefficient=None, rigid_joints=None) → Frame[source]

The plane frame of a periodic framework of the plane (the first two axes of a morphogen.design.frames.Framework, or of its dictionary as the metadata of the planar network models keep it): a beam per bar, of circular section of radius and Young’s modulus young (one value, or one per bar), EA = E π r² and EI = E π r⁴ / 4 (bending in the plane). The box is the cell; its symmetry, the translations alone. With a shear_coefficient κ (one value, one per bar, or "cowper": Cowper’s 6(1 + ν)/(7 + 6ν)), Timoshenko beams of shear stiffness κGA, G = E / 2(1 + ν) (poisson one value or one per bar); Euler–Bernoulli beams without. With rigid_joints (one value or one per bar), the beams are rigid over that many of their radii from each node (the struts merged in the joints; FLEXIBLE_LIMIT of the shortest left flexible).

classmethod lattice_of(kind: str = 'honeycomb', cells=(2, 2), *, length: float = 1.0, elements: int = 4, young: float = 1.0, thickness: float = 0.1, depth: float = 1.0, poisson: float = 0.3, shear_coefficient=None) → Frame[source]

A cell of cells primitive cells of a lattice (honeycomb, triangular, square or kagome) of walls of length, each cut in elements beams of Young’s modulus young and rectangular section thickness x depth: Euler–Bernoulli beams, or with a shear_coefficient κ (a value, or "cowper": Cowper’s 10(1 + ν)/(12 + 11ν) of rectangles) Timoshenko beams of shear stiffness κGA, G = E / 2(1 + ν).

property n_dofs: int
static block(rotation) → ndarray[source]

The action of a point operation on the dofs (u, v, θ) of a node.

vectors() → ndarray[source]

The vector of each beam, from its first end to its second.

stiffness() → ndarray[source]

The elastic stiffness of the periodic fluctuations (dense).

translations() → ndarray[source]

The two rigid translations of the cell (dofs x 2, orthonormal).

complement() → ndarray[source]

An orthonormal basis of the fluctuations orthogonal to the translations.

axial_forces(strain) → tuple[ndarray, ndarray][source]

The axial forces of the beams under the macroscopic strain (2 x 2) and the periodic fluctuations (dofs) of the linear periodic problem.

buckling(strain, modes: int = 6) → tuple[ndarray, ndarray][source]

The lowest modes positive load factors λ of the linear buckling of the cell under λ strain and their modes (dofs x modes).

effective_stiffness()[source]

The effective stiffness of the periodic frame (3 x 3, Voigt order 11, 22, 12 with the engineering shear, per unit area of the plane), its split into stretching and bending and the non-affinity of the fluctuations, by the sparse periodic problem (morphogen.homogenization.networks.frame_stiffness()).

reciprocal() → ndarray[source]

The reciprocal vectors of the cell (columns): b_i · a_j = 2π δ_ij.

bloch_buckling(strain, wavevectors, modes: int = 1) → ndarray[source]

The lowest modes load factors of the linear buckling of the infinite frame under λ strain for the Bloch modes u(x + A s) = u(x) exp(i k · A s) of each wave vector (rows: wave vectors): the smallest over the Brillouin zone gives the critical wavelength, hence the cell of the patterns (Geymonat, Müller & Triantafyllidis 1993); the cell at k of (m1 b1 + m2 b2) / n is that of n x n cells.

plot(ax=None, displacement=None, *, scale: float = 0.0, tiles=(1, 1), **style)[source]

Draw the beams, displaced by displacement (its largest drawn as scale times the median length of the beams; 0.3 by default), the cell repeated tiles times; returns the axes.

morphogen.homogenization.frames.positive_subspace(k: ndarray, tol: float = 1e-10) → ndarray[source]

Orthonormal basis of the subspace where a symmetric stiffness is positive: its mechanisms (eigenvalues below tol times the largest) left out.

morphogen.homogenization.frames.CUBIC_GENERATORS = (array([[ 0., -1.,  0.],        [ 1.,  0.,  0.],        [ 0.,  0.,  1.]]), array([[0., 0., 1.],        [1., 0., 0.],        [0., 1., 0.]]), array([[-1., -0., -0.],        [-0., -1., -0.],        [-0., -0., -1.]]))

generators

Type:

The point group of the cubic lattices (O_h, about a node)

morphogen.homogenization.frames.SPACE_LATTICES = {'bcc': {'centring': [array([0.5, 0.5, 0.5])], 'nodes': array([[0. , 0. , 0. ],        [0.5, 0.5, 0.5]]), 'strut': np.float64(0.8660254037844386)}, 'cubic': {'centring': [], 'nodes': array([[0., 0., 0.]]), 'strut': 1.0}, 'diamond': {'centring': [array([0.5, 0.5, 0. ]), array([0.5, 0. , 0.5]), array([0. , 0.5, 0.5])], 'generators': [(array([[-0.,  1., -0.],        [-1., -0., -0.],        [-0., -0., -1.]]), array([0., 0., 0.])), (array([[0., 0., 1.],        [1., 0., 0.],        [0., 1., 0.]]), array([0., 0., 0.])), (array([[-1., -0., -0.],        [-0., -1., -0.],        [-0., -0., -1.]]), array([0.25, 0.25, 0.25]))], 'nodes': array([[0.  , 0.  , 0.  ],        [0.25, 0.25, 0.25],        [0.5 , 0.5 , 0.  ],        [0.75, 0.75, 0.25],        [0.5 , 0.  , 0.5 ],        [0.75, 0.25, 0.75],        [0.  , 0.5 , 0.5 ],        [0.25, 0.75, 0.75]]), 'strut': np.float64(0.4330127018922193)}, 'kelvin': {'centring': [array([0.5, 0.5, 0.5])], 'nodes': array([[0.  , 0.25, 0.5 ],        [0.  , 0.5 , 0.25],        [0.  , 0.5 , 0.75],        [0.  , 0.75, 0.5 ],        [0.25, 0.  , 0.5 ],        [0.25, 0.5 , 0.  ],        [0.5 , 0.  , 0.25],        [0.5 , 0.  , 0.75],        [0.5 , 0.25, 0.  ],        [0.5 , 0.75, 0.  ],        [0.75, 0.  , 0.5 ],        [0.75, 0.5 , 0.  ]]), 'strut': np.float64(0.3535533905932738)}, 'octet': {'centring': [array([0.5, 0.5, 0. ]), array([0.5, 0. , 0.5]), array([0. , 0.5, 0.5])], 'nodes': array([[0. , 0. , 0. ],        [0.5, 0.5, 0. ],        [0.5, 0. , 0.5],        [0. , 0.5, 0.5]]), 'strut': np.float64(0.7071067811865476)}, 'pyrochlore': {'centring': [array([0.5, 0.5, 0. ]), array([0.5, 0. , 0.5]), array([0. , 0.5, 0.5])], 'generators': [(array([[-0.,  1., -0.],        [-1., -0., -0.],        [-0., -0., -1.]]), array([ 0.  , -0.25, -0.25])), (array([[0., 0., 1.],        [1., 0., 0.],        [0., 1., 0.]]), array([0., 0., 0.])), (array([[-1., -0., -0.],        [-0., -1., -0.],        [-0., -0., -1.]]), array([0., 0., 0.]))], 'nodes': array([[0.  , 0.  , 0.  ],        [0.  , 0.75, 0.75],        [0.75, 0.  , 0.75],        [0.75, 0.75, 0.  ],        [0.5 , 0.5 , 0.  ],        [0.5 , 0.25, 0.75],        [0.25, 0.5 , 0.75],        [0.25, 0.25, 0.  ],        [0.5 , 0.  , 0.5 ],        [0.5 , 0.75, 0.25],        [0.25, 0.  , 0.25],        [0.25, 0.75, 0.5 ],        [0.  , 0.5 , 0.5 ],        [0.  , 0.25, 0.25],        [0.75, 0.5 , 0.25],        [0.75, 0.25, 0.5 ]]), 'strut': np.float64(0.3535533905932738)}}

nodes, length of the struts (between nearest neighbours) and the centring translations of the lattice; point group O_h about the origin, or the generators of the space group (a point operation and a translation each) where some of its operations move the origin: the diamond lattice (a node of one of its two face-centred lattices at the origin: its tetrahedral group, and the inversion about the middle of a strut) and the pyrochlore lattice of tetrahedra joined by their corners (a node at the origin: its inversion and its threefold axis, and the fourfold rotation-reflection about a node of the diamond lattice whose struts it bisects).

Type:

Lattices of struts (conventional cubic cell of edge 1)

morphogen.homogenization.frames.space_beam_matrices(d, axial: float, bending: float, torsion: float, force=0.0, polar=0.0, shear=None)[source]

Elastic and geometric stiffness (12 x 12, global axes, dofs u v w θx θy θz of each end) of a 3D Euler–Bernoulli beam of vector d: EA, EI about both axes of its section (circular or square), GJ, the axial force force (positive in tension) and polar = I_p / A of the section (the torsional term of the geometric stiffness). With the transverse shear stiffness shear (κGA, the same in both planes), the exact Timoshenko beam and its geometric stiffness in each bending plane, of shear parameter Φ = 12 EI / (κGA L²) (as beam_matrices()).

class morphogen.homogenization.frames.SpaceFrame(nodes: ndarray, beams: ndarray, shifts: ndarray, lattice: ndarray, axial: ndarray, bending: ndarray, torsion: ndarray, polar: ndarray, centre: ndarray, generators: list, area: ndarray | None = None, shear: ndarray | None = None, rigid: ndarray | None = None)[source]

Bases: object

A periodic frame of struts in space: nodes (positions in the cell), beams (node pairs), shifts (periods between the ends), the lattice of the cell (vectors in the columns), EA, EI, GJ and I_p / A of each strut, and the centre and generators (R, t) of its symmetry group, the area of the section of each strut (for the relative density), its transverse shear stiffness κGA: Timoshenko beams (None, the default: Euler–Bernoulli beams) and the lengths of its rigid ends at its first and second node (m x 2; None, the default: none), which the effective stiffness alone takes.

classmethod lattice_of(kind: str = 'octet', cells=(1, 1, 1), *, size: float = 1.0, elements: int = 2, young: float = 1.0, poisson: float = 0.3, radius: float = 0.05, shear_coefficient=None) → SpaceFrame[source]

A cell of cells conventional cubic cells of edge size of a lattice of struts (cubic, bcc, octet, kelvin, diamond or pyrochlore: SPACE_LATTICES), each strut cut in elements beams of Young’s modulus young, Poisson’s ratio poisson and circular section of radius (relative to size): Euler–Bernoulli beams, or with a shear_coefficient κ (a value, or "cowper": Cowper’s 6(1 + ν)/(7 + 6ν)) Timoshenko beams of shear stiffness κGA.

classmethod from_framework(framework, radius, *, young=1.0, poisson=0.3, shear_coefficient=None, rigid_joints=None) → SpaceFrame[source]

The frame of the bars of a periodic framework in space (morphogen.design.frames.Framework, or its dictionary as the metadata of delaunay_network, open_foam and random_lattice keep it): a strut per bar, of circular section of radius, Young’s modulus young and Poisson’s ratio poisson (each one value, or one per bar): EA = E π r², EI = E π r⁴ / 4 about both axes of the section, GJ = G π r⁴ / 2. The box of the framework is the cell; its symmetry, the translations alone. With a shear_coefficient κ (one value, one per bar, or "cowper": Cowper’s 6(1 + ν)/(7 + 6ν)), Timoshenko beams of shear stiffness κGA; Euler–Bernoulli beams without. With rigid_joints (one value or one per bar), the struts are rigid over that many of their radii from each node (merged in the joints; FLEXIBLE_LIMIT of the shortest left flexible).

property n_dofs: int
static block(rotation) → ndarray[source]

The action of a point operation on the dofs of a node: displacements turned by R, rotations (pseudo-vectors) by det(R) R.

vectors() → ndarray[source]

The vector of each beam, from its first end to its second.

stiffness() → ndarray[source]

The elastic stiffness of the periodic fluctuations (dense).

translations() → ndarray[source]

The three rigid translations of the cell (dofs x 3, orthonormal).

complement() → ndarray[source]

An orthonormal basis of the fluctuations orthogonal to the translations.

axial_forces(strain) → tuple[ndarray, ndarray][source]

The axial forces of the struts under the macroscopic strain (3 x 3) and the periodic fluctuations (dofs) of the linear periodic problem.

buckling(strain, modes: int = 6) → tuple[ndarray, ndarray][source]

The lowest modes positive load factors λ of the linear buckling of the cell under λ strain and their modes (dofs x modes).

relative_density() → float[source]

The volume of the struts over that of the cell (overlaps at the nodes counted).

macroscopic_stiffness() → ndarray[source]

The apparent stiffness (6 x 6, Voigt order 11, 22, 33, 23, 31, 12 with engineering shear strains) of the periodic frame: the energy of the periodic solutions of the unit strains per unit volume.

effective_stiffness()[source]

macroscopic_stiffness() by the sparse periodic problem, for large random frames, with its split into stretching, bending and torsion and the non-affinity of the fluctuations (morphogen.homogenization.networks.frame_stiffness()).

reciprocal() → ndarray[source]

The reciprocal vectors of the cell (columns): b_i · a_j = 2π δ_ij.

bloch_buckling(strain, wavevectors, modes: int = 1) → ndarray[source]

The lowest modes load factors of the linear buckling of the infinite frame under λ strain for the Bloch modes of each wave vector (rows), as Frame.bloch_buckling().

plot(ax=None, displacement=None, *, scale: float = 0.0, tiles=(1, 1, 1), **style)[source]

Draw the struts in 3D axes, displaced by displacement (its largest drawn as scale times the median length of the beams; 0.3 by default), the cell repeated tiles times; returns the axes.