Skip to content

Tutorials ​

Mean-field homogenization replaces a heterogeneous microstructure — a matrix carrying inclusions, pores, or cracks — by an equivalent homogeneous medium with the same overall response. MeanFieldHomogenization computes that response from phase properties, geometries, volume fractions, and a scheme encoding an assumption about how the phases interact.

The groups follow the chapters of Theory, in the same order, so that a tutorial sits where its theory is: the problems of a single heterogeneity first, then the schemes that turn them into effective properties, then the extensions to conductivity and viscoelasticity. Two groups have no theory chapter of their own, differentiation and symbolic computation. Simplest first within each group. Pages under generated/ are produced from the runnable demos in scripts/ by Literate.jl.

First steps ​

PageWhat it shows
A first homogenizationbuild an RVE; dilute vs Mori–Tanaka
Bounds and classical schemesVoigt/Reuss bounds, self-consistent, where each scheme sits

The Eshelby problem ​

One inclusion in an infinite matrix: its Hill tensor, how an orientation average acts on it, and inclusions that go beyond the ellipsoid. Theory: The Eshelby inclusion problem and Hill polarization tensors.

PageWhat it shows
Hill polarization tensors in practicehill_tensor on four geometries; residues vs cubature on an anisotropic matrix; the Eshelby tensor against its closed form; P → a dilute estimate
Hill tensors by reduction to a sphereevery Hill tensor is that of a sphere in a transformed medium: the same tensor computed both ways, on a spheroid in a transversely isotropic matrix, a triaxial ellipsoid in a triclinic one and an elliptically orthotropic matrix
Symmetrizationexact rotation-group average vs best-fit projection
The custom-inclusion contractplugging an arbitrary morphology into every scheme — the three entry gates, the density seam, free orientation averaging
An inclusion whose response is a neural networkboth phases — how a surrogate is trained (schematics of the network and of the fitting loop, the recorded learning curve) and how a trained one is used: what stays exact whatever the fit, accuracy against the closed form, every scheme, and the derivative with respect to the morphology
Replacing a finite-element solve by a surrogatethe case the machinery exists for: the eccentric-core sphere, whose concentration tensors have no closed form. Gate B with the 6-component transversely isotropic pair, the contrast ratios that replace gate A's homogeneity, the accuracy against the finite elements, the speed-up, and a derivative with respect to the eccentricity

Cracks and degenerate shapes ​

The flat limit of the ellipsoid, where the volume fraction gives way to a crack density. Theory: Crack opening displacement and compliance.

PageWhat it shows
Cracks and crack densityvolume fraction → crack density; the COD tensor
Two routes to a crack: the COD tensor and the flattened ellipsoidthe identity      checked: from the crack plane, from the first-order term of the Hill tensor of a flattened ellipsoid (by SymPy in an isotropic matrix, by ForwardDiff in random anisotropic ones); the three integrators of ; an analytic anchor in an elliptically orthotropic matrix
Crack distributions: isotropic or parallelthe same density, two orientation rules; the two self-consistent forms and their two percolation thresholds (9/16 exactly for the compliance form, ≈ 1.158 for the stiffness one); the local-versus-global frame of a TensRotated result
Validating a finite-element crackthe same crack solved by finite elements: what the corrected boundary condition buys, and convergence to the closed-form COD

The generalized Eshelby problem — morphological patterns ​

Composite inclusions carry no Hill tensor at all: they enter the schemes through their volume-averaged concentration tensors instead. Theory: the layered sphere and the layered spheroid.

PageWhat it shows
Layered spheresHervé–Zaoui n-layer concentration and layer averages
n-layer sphere: pointwise fieldsthe strain, stress and displacement at any point inside and outside an n-layer sphere, perfect or imperfect interfaces, consistent with the layer averages
Layered spheroids: geometry and effective conductivitythe confocal n-layer spheroid, the equivalent particle, harmonic-series accuracy
Imperfect interfaces: what they do to the local fieldspointwise temperature and flux, streamlines, conductance sweep, 3-D view
Highly conducting interfacesequivalent conductivity of an HC-coated particle vs aspect ratio
A layered spheroid, meshedthe same body by Fourier axisymmetric finite elements: calibrated against the two closed forms, taken to nests neither covers, then replaced by a surrogate trained on the cell so the morphology becomes differentiable
Nanocomposites: the equivalent particlea Gurtin-Murdoch interface condensed into a particle stiffness, its three limiting shapes reproduced exactly, and the size effect it produces through an ordinary Mori-Tanaka estimate — no new scheme needed

Homogenization schemes ​

The schemes that turn those solutions into effective properties: the mean-field estimates, the exact laminate, and the two N-body schemes, which resolve the interactions inclusion by inclusion and so need a ParticleAssembly, a cell that carries positions, rather than an RVE. The cluster model on cubic arrays and the equivalent inclusion method against a published table are under Applications: each exists to reproduce one paper's numbers rather than to teach the library. Theory: Homogenization schemes; for the N-body schemes, interaction tensors, the cluster model and the equivalent inclusion method, with the API on the particle-assembly manual page.

PageWhat it shows
Porous materials: the self-consistent trap and every schemewhy soft pores break the naive self-consistent iteration, then every scheme on the canonical porosity sweep, spheres and oblate pores
The differential scheme and path dependenceincremental homogenization; why mixing order matters, and four trajectories to the same fractions watched τ by τ
Periodic multilayer: the exact laminate solutiona cell with no matrix and no Eshelby problem: the exact effective tensor, per-layer concentration, the bounds it saturates
Imperfect interfaces in a laminate, and the size effectthe four interface models on a planar interface, and the interface density that makes the period matter
Multiscale chaining: explicit and declarative, side by sidethe two ways of chaining scales, the same answer, and the ForwardDiff pass that goes through both
Chaining scales through an N-body schemethe declarative multiscale seam with an assembly on either side, and why chaining two N-body estimates needs the anisotropic Green operator: a cluster estimate on a cubic array is cubic, not isotropic. Three scales end to end, plus a sensitivity across them
Thermal expansion and Biot tensorLevin's theorem on the concentration tensors of a scheme: the thermal expansion of a two-phase composite under five schemes, anisotropic with aligned platelets, the Biot tensor of a solid with pores and pressurized cracks, and both in closed form

Extension to conductivity ​

PageWhat it shows
Transport propertiesthe same algebra at tensor order 2: diffusivity of a porous medium, anisotropy from oriented pores

Extension to viscoelasticity ​

PageWhat it shows
Viscoelastic compositescomplex moduli in the frequency domain; a first taste of aging creep
The rheological model catalogthe classical chains, the fractional family and the bituminous models side by side; master curves, Cole-Cole and Black diagrams; the exact 2S2P1D pair in both domains; and one object driving both homogenization routes
Generalized Kelvin ⇄ generalized Maxwellthe exact conversion between the two representations: the interlacing that makes it unconditionally robust, the round trip at twenty branches, and two independent closed forms — the Zener relations and the Burgers relaxation function — as oracles
Choosing a numerical Laplace inversionfour algorithms measured against four exact pairs; why branch cuts are not the problem and oscillation is; the Gaver-Stehfest optimum and why more terms is worse; ForwardDiff straight through
Frequency or time?the complex-modulus and time-domain ALV routes, cross-checked on the same non-aging composite
Aging viscoelastic schemes side by sideDilute / Mori-Tanaka / Maxwell / PCW on one creep test; the aspect ratio; where the distribution shape decides the answer
Aging creep: loading age against inclusion shapeaging and morphology on the same output: three loading ages × three aspect ratios, and why the shape effect is an offset independent of the age
Derivatives through the aging-viscoelastic pipelineForwardDiff through the Volterra assembly: the set_param lens for RVE parameters, closure capture for moduli and relaxation times
A creeping laminatethe exact multilayer in aging viscoelasticity: the same algebra with Volterra products in place of tensor products

Differentiation and solvers ​

PageWhat it shows
Derivatives and sensitivitiesdifferentiate any result with ForwardDiff, no finite differences
From derivatives to a strength criterionthose derivatives as a macroscopic strength criterion
Nonlinear solvers for the self-consistent fixed pointNonlinearSolve.jl instead of Picard, and sensitivities that agree either way
Nonlinear homogenization by the secant methodelastic–perfectly plastic porous solid, closed by second moments

Symbolic computation ​

PageWhat it shows
Symbolic spheresthe same tensor algebra on SymPy / Symbolics expressions: Eshelby/Hill tensors and the closed-form estimates
Symbolic laminates: arithmetic and harmonic averagesthe one microstructure whose effective behavior is a closed form, derived symbolically
Symbolic viscoelasticitymodels with symbolic parameters, and symbolic Laplace-Carson inversion: the Burgers relaxation function derived rather than transcribed, and precisely where the symbolic route stops