morphogen.rve.windows¶
The window method for tensors: the stiffness and the conductivity of the windows of one large periodic realization.
The realization is solved once per unit macroscopic load by the FFT solver
(morphogen.homogenization.fft): the six unit strains E^(k) (Voigt order 11 22 33
23 31 12, engineering shears); the three in-plane ones E_11, E_22, E_12 of a planar
image (nz = 1: the plane stiffness, Voigt order 11 22 12); the three unit gradients of
the conductivity. The tensor of a window w is the matrix of the window means of the
mutual energy densities of these solutions,
C^w_kl = <eps^(k) : C : eps^(l)>_w (K^w_kl = <grad T^(k) . K grad T^(l)>_w),
integrated over the Gauss points of its voxels as the solver integrates the energy. It is
symmetric, to the bit (its upper triangle is computed, then mirrored), and positive
semi-definite: a . C^w a is the mean energy over the window of the solution
sum_k a_k u^(k). Over windows tiling the box, its mean is the box’s mean energy to
round-off, which Hill’s lemma <sigma : eps> = Sigma : E makes the box’s apparent
stiffness C_kl = E^(k) . <sigma^(l)> (that of
stiffness_tensor(); the conductivity of
conductivity_tensor()), to the tolerance of the solver: the
energy is stationary at the solution, its error of the second order in that of the fields,
that of the mean stresses of the first. Its diagonal is the energy estimate of the apparent
moduli (Dirrenberger et al. 2014, eqs. 64 and 66).
This definition rather than the window means of the stresses under the unit strains,
<sigma^(l)>_w (Kanit et al. 2003): those tile the box as exactly, but are neither
symmetric (C A at a point, A the concentration of the strains: 16 % off on random
voxels of a contrast of 10) nor positive (their symmetric part indefinite at voxels of that
contrast, in windows of 2 voxels at a contrast of 1000), and in a laminate their components
across the layers are those of the box in every window, the tractions being continuous: no
scatter, whatever the window. <sigma>_w <eps>_w^-1, the
window’s own apparent tensor, is neither symmetric nor tiling, and is undefined where the
mean strain of a window is singular (a rigid inclusion). In a laminate, whose strains are
uniform in each layer (eps = A_p E), the window tensor is sum_p f_p^w A_p^T C_p A_p,
f_p^w the fraction of the layers p in the window.
The windows are the cubes of w voxels that tile the image from its origin, the
remainder left out, as in morphogen.rve.scaling.window_statistics() (squares of w
pixels across a planar image, whose measure is then their area). Their statistics per size
are those of the ensemble method, the windows as realizations
(TensorStatistics, method="windows"): the mean Cbar
and the standard deviation of each component, S = Cbar^-1 and the mean of the
compliances of the windows, the RVE size of each component. A window without stiffness in
some direction (within a pore) has no compliance (NaN, as a singular realization).
Shifted tilings (shifts > 1, as in window_statistics()):
the tilings shifted by the offsets k w // shifts voxels along each axis, all their
combinations, wrapping around the periodic image. They take the fields already solved,
each tiling one more pass of the kernel over the image (a few percent of a solve). Each is
a translate of the first on the periodic image, its windows of the law of the unshifted
ones: the statistics of a size are the means over all the windows of all its tilings (over
each tiling of the box, the box’s tensor), the variances pooled within the tilings and the
counts of one tiling, the independent windows (morphogen.rve.scaling).
- morphogen.rve.windows.WINDOW_TENSORS = {'conductivity_tensor': 'thermal', 'diffusivity_tensor': 'diffusion', 'electrical_conductivity_tensor': 'electrical', 'permeability_tensor': 'magnetic', 'permittivity_tensor': 'dielectric', 'stiffness': 'elastic'}¶
the stiffness, and the tensor of each transport phenomenon (
conductivity_tensor,electrical_conductivity_tensor,permittivity_tensor,permeability_tensor,diffusivity_tensor)- Type:
The tensors of the window method and the physics of their problems
- class morphogen.rve.windows.WindowTensors(property: str, edges: ndarray, volumes: ndarray, tensors: list[ndarray], box: ndarray, apparent: ndarray, bc: str = 'periodic', dimension: int = 3, offsets: list[ndarray] | None = None)[source]¶
Bases:
objectThe tensors of the windows of one realization (see the module documentation).
property:stiffnessorconductivity_tensor;edges: the window edges (voxels),volumestheir measures (their areas across a planar image,dimension2) andtensors[k]the tensors of the windows of edgeedges[k],(n_k, d, d): in morphoGen’s Voigt order 11 22 33 23 31 12 with engineering shears (11 22 12 in the plane), the axes 1 2 3 for the conductivity (notation).box: the tensor of the whole realization by the same definition, the mean of the windows that tile it;apparent: its apparent tensor from its mean stresses (fluxes), symmetrized, ashomogenize()gives it:boxto the tolerance of the solver.offsets[k]: with shifted tilings, the offsets (voxels,(t_k, 3)) of thet_ktilings of the sizek, the unshifted one first,tensors[k]then the windows of all of them, tiling by tiling; None: one tiling of each size.- property key: str¶
- property notation: str¶
The notation of the tensors (
tensor_notation()).
- property tilings: ndarray¶
The number of tilings of each size (1 without shifts).
- statistics(options: StudyOptions | None = None) TensorStatistics[source]¶
Their statistics per size, the windows as realizations: the mean tensor and the standard deviation of each component, its inverse and the mean of the inverses of the windows, the RVE size of each component (
options: those of the study, without bootstrap; the windows of non-finite tensors left out, as the realizations oftensor_statistics()); with shifted tilings, the means over all their windows, the variances pooled within the tilings, the counts of one (see the module).
- morphogen.rve.windows.window_tensors(image, materials, window_sizes, *, property: str = 'stiffness', tol: float = 1e-08, maxiter: int | None = None, grains=None, orientations=None, device: str = 'cpu', shifts: int = 1) WindowTensors[source]¶
The tensors of the windows of a periodic voxel image (see the module documentation):
propertystiffness(six unit strains; three in the plane of a planar image) orconductivity_tensor(three unit gradients), solved once each by the FFT solver (tol,maxiter,device; crystals turned by the orientations of theirgrains, seemake_problem()), then averaged over the windows of each edge ofwindow_sizes(voxels): of the tiling from the origin, or withshifts > 1of the tilings shifted byk w // shiftsvoxels along each axis (k < shifts, all their combinations, wrapping around the image), from the same solutions.WindowTensors.statistics()gives their statistics per size.