morphogen.homogenization.bloch¶
Bloch waves in periodic cells: the dispersion of elastic, acoustic and electromagnetic waves and the band gaps of architected materials (phononic, sonic and photonic crystals).
A Bloch wave u(x) = û(x) exp(i k·x), û periodic, is a free vibration of the
periodic medium at the wave vector k. On a cell meshed by tetrahedra (the finite
elements of morphogen.homogenization.fe, 4 or 10 nodes),
u(x + n∘L) = u(x) exp(i k·(n∘L)) ties each node of the upper faces to its image on
the lower ones: w = T(k) w_masters, the periodic map of the fluctuations, each of
its weights times the phase of the period between the node and that master. The angular
frequencies ω are those of the Hermitian problem T^H K T φ = ω² T^H M T φ (the
stiffness K and the consistent mass M of the cell), the lowest found by
shift-invert Lanczos on its real form of twice the size (each frequency twice). Along
the edges of the irreducible Brillouin zone (Γ–X–M–Γ–R for a cubic cell) the bands give
the dispersion; a range between two bands free of waves along the path is a band gap
(complete if the path holds the extrema of the bands, as for most cells of cubic
symmetry).
Scalar waves. A field u that obeys div(a grad u) + ω² b u = 0 has the same
Bloch problem with one unknown per node, the “stiffness” of the coefficient a and the
“mass” of b (scalar_band_structure()). SCALAR_WAVES names those of the
materials (wave_coefficients()):
waves |
field |
|
|
|---|---|---|---|
|
pressure of a fluid |
|
|
|
antiplane displacement |
|
|
|
electric field |
|
|
|
magnetic field |
|
|
(rho: density, K: bulk modulus, mu: shear modulus, epsilon: permittivity,
mu_m: magnetic permeability). The antiplane shear waves and the two polarizations of
the electromagnetic waves are those of a medium invariant along the third axis (a cell
one voxel thick) for wave vectors in its plane: the photonic crystals of rods and of
holes. In three dimensions the shear waves are those of the elastic solid ("elastic")
and the electromagnetic waves are vector waves, curl(curl H / epsilon) = ω² mu_m H,
solved by plane waves on the voxels of an image ("electromagnetic",
morphogen.homogenization.photonic): the photonic crystals of spheres, of rods
stacked across each other, of any morphology, and the waves that leave the plane of a
crystal of rods. A phase whose coefficient a is zero is left out, its boundary free of
flux: the rigid scatterers of a sonic crystal (1 / rho = 0), the perfect conductors of
te waves. At long wavelengths the first band is that of the homogenized medium, ω² =
k . a* . k / <b> (long_wavelength_speeds(): Wood’s law for the sound of mixtures,
the effective index of a photonic crystal).
- morphogen.homogenization.bloch.POINTS = {'G': (0.0, 0.0, 0.0), 'M': (1.0, 1.0, 0.0), 'R': (1.0, 1.0, 1.0), 'X': (1.0, 0.0, 0.0), 'Y': (0.0, 1.0, 0.0), 'Z': (0.0, 0.0, 1.0)}¶
Corners of the Brillouin zone of an orthorhombic cell, in units of
pi / Lper axis.
- morphogen.homogenization.bloch.SCALAR_WAVES = {'acoustic': ('pressure', '1 / density', '1 / bulk modulus'), 'shear': ('antiplane displacement', 'shear modulus', 'density'), 'te': ('magnetic field along the axis', '1 / permittivity', 'permeability'), 'tm': ('electric field along the axis', '1 / permeability', 'permittivity')}¶
the field, and the coefficients
aandbofdiv(a grad u) + ω² b u = 0(seewave_coefficients())- Type:
The scalar waves of the materials
- morphogen.homogenization.bloch.PLANE_WAVES = ('shear', 'tm', 'te')¶
The scalar waves of a medium invariant along the third axis, for wave vectors in its plane; in three dimensions:
"elastic"and"electromagnetic"
- morphogen.homogenization.bloch.WAVES = ('elastic', 'acoustic', 'shear', 'tm', 'te', 'electromagnetic')¶
The waves of
band_structure()
- morphogen.homogenization.bloch.MASS = {1: array([[0.1 , 0.05, 0.05, 0.05], [0.05, 0.1 , 0.05, 0.05], [0.05, 0.05, 0.1 , 0.05], [0.05, 0.05, 0.05, 0.1 ]]), 2: array([[ 0.01428571, 0.00238095, 0.00238095, 0.00238095, -0.00952381, -0.01428571, -0.00952381, -0.00952381, -0.01428571, -0.01428571], [ 0.00238095, 0.01428571, 0.00238095, 0.00238095, -0.00952381, -0.00952381, -0.01428571, -0.01428571, -0.00952381, -0.01428571], [ 0.00238095, 0.00238095, 0.01428571, 0.00238095, -0.01428571, -0.00952381, -0.00952381, -0.01428571, -0.01428571, -0.00952381], [ 0.00238095, 0.00238095, 0.00238095, 0.01428571, -0.01428571, -0.01428571, -0.01428571, -0.00952381, -0.00952381, -0.00952381], [-0.00952381, -0.00952381, -0.01428571, -0.01428571, 0.07619048, 0.03809524, 0.03809524, 0.03809524, 0.03809524, 0.01904762], [-0.01428571, -0.00952381, -0.00952381, -0.01428571, 0.03809524, 0.07619048, 0.03809524, 0.01904762, 0.03809524, 0.03809524], [-0.00952381, -0.01428571, -0.00952381, -0.01428571, 0.03809524, 0.03809524, 0.07619048, 0.03809524, 0.01904762, 0.03809524], [-0.00952381, -0.01428571, -0.01428571, -0.00952381, 0.03809524, 0.01904762, 0.03809524, 0.07619048, 0.03809524, 0.03809524], [-0.01428571, -0.00952381, -0.01428571, -0.00952381, 0.03809524, 0.03809524, 0.01904762, 0.03809524, 0.07619048, 0.03809524], [-0.01428571, -0.01428571, -0.00952381, -0.00952381, 0.01904762, 0.03809524, 0.03809524, 0.03809524, 0.03809524, 0.07619048]])}¶
Consistent mass matrices of the 4- and 10-node tetrahedra over their volume.
- morphogen.homogenization.bloch.mass_matrix(mesh: TetMesh, density) csr_matrix[source]¶
Consistent mass matrix (nodes x nodes) of a tetrahedral mesh,
densitythe density of each element.
- morphogen.homogenization.bloch.voxel_tet_mesh(image: VoxelImage, phases=None) TetMesh[source]¶
Six tetrahedra per voxel of an image (the Kuhn triangulation of its grid, whose opposite faces match), each with the phase of its voxel;
phases: those kept (the solid of a lattice, say).
- morphogen.homogenization.bloch.brillouin_path(size, path=('G', 'X', 'M', 'G', 'R'), points: int = 12)[source]¶
Wave vectors along the segments between the corners
path(names ofPOINTSor points in units ofpi / L) of the Brillouin zone of a cell of edgessize,pointsper segment: the wave vectors (n x 3), their distance along the path and the positions and names of the corners.
- class morphogen.homogenization.bloch.BandStructure(wavevectors: ndarray, distance: ndarray, frequencies: ndarray, labels: list)[source]¶
Bases:
objectThe angular frequencies (
frequencies: wave vectors x bands, increasing) of the Bloch waves at thewavevectors, theirdistancealong the path and the positions and names of its corners (labels).- gaps(relative: float = 0.001) list[tuple[int, float, float]][source]¶
The band gaps along the path:
(n, low, high)between the bandsnandn + 1(counted from 1), wider thanrelativetimes their mid-frequency.
- morphogen.homogenization.bloch.wave_coefficients(waves: str, materials: dict[int, Material]) tuple[dict, dict][source]¶
The coefficients
aandbof each phase for the scalarwavesofSCALAR_WAVES, from the materials: theirdensityand elastic moduli (acoustic: the pressure waves of fluids, of bulk modulusK;shear: antiplane shear waves), or theirpermittivityandpermeability(tm,te; a permeability left out is that of the units, 1). Voids are left out; give the coefficients themselves toscalar_band_structure()for the phases that the materials do not describe (a fluid has no shear modulus).
- morphogen.homogenization.bloch.electromagnetic_coefficients(materials: dict[int, Material]) tuple[dict, dict][source]¶
The permittivity and the permeability of each phase for the electromagnetic waves (numbers, or 3 x 3 tensors in the axes of the cell), from the materials: their
permittivityandpermeability(left out: that of the units, 1). A void holds no wave in the scalar problems; here every phase carries the field: give the vacuum its permittivity.
- morphogen.homogenization.bloch.scalar_band_structure(sample, stiffness: dict[int, float], mass: dict[int, float], path=('G', 'X', 'M', 'G', 'R'), *, bands: int = 8, points: int = 12, order: int = 2, phases=None) BandStructure[source]¶
The lowest
bandsBloch frequencies of the scalar wavesdiv(a grad u) + ω² b u = 0of a periodic cell (mesh or voxel image, asband_structure()):athestiffnesscoefficient of each phase andbitsmasscoefficient (the table of the module: acoustic, antiplane shear and electromagnetic waves). The phases whoseais zero are left out (rigid scatterers), their boundaries free of flux.
- morphogen.homogenization.bloch.long_wavelength_speeds(sample, stiffness: dict[int, float], mass: dict[int, float], **options) dict[source]¶
The speeds of the scalar waves of a periodic cell at long wavelengths, those of the homogenized medium:
c_i = sqrt(a*_ii / <b>)along each axis, with the effective tensora*of the coefficienta(a conduction problem: the FFT solver of a voxel image, finite elements on a mesh) and the mean ofb(over the whole cell, the phases left out included: they hold no wave). Returns"tensor"(a*, 3 x 3),"mass"(<b>) and"speeds"(3,). For the sound of a mixture of fluids this is Wood’s law (1 / K* = <1 / K>) with the effective density(a*)^-1; for light,c / n*.options: those ofmake_problem().
- morphogen.homogenization.bloch.band_structure(sample, materials: dict[int, Material], path=None, *, bands: int = 12, points: int = 12, order: int = 2, phases=None, waves: str = 'elastic', coarsen: int = 1) BandStructure[source]¶
The lowest
bandsBloch frequencies of a periodic cell (aTetMesh, or aVoxelImagecut into six tetrahedra per voxel, keepingphases) alongpath(corners of the Brillouin zone,pointsper segment; or an array of wave vectors; by default Γ–X–M–Γ–R, Γ–X–M–Γ in the plane of an image one voxel thick), with elements oforder1 or 2. The materials need adensity; void phases are left out, as the clusters of elements that touch no face of the box.waves:"elastic"(the vector waves of the solid); the scalar waves ofSCALAR_WAVES("acoustic", and"shear","tm","te"in the plane of a cell invariant along z) with the coefficients of the materials (wave_coefficients(),scalar_band_structure()); or"electromagnetic", the vector waves of light in a voxel image of any morphology, by plane waves on its voxels or on a gridcoarsentimes coarser (electromagnetic_band_structure();orderandphasesdo not apply).