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. MeanFieldHom computes that response from phase properties, geometries, volume fractions, and a scheme encoding an assumption about how the phases interact.

Simplest first within each group. Pages under generated/ are produced from the runnable demos in scripts/ by Literate.jl.

Fundamentals

The porous material gets two pages: the simplest non-trivial microstructure, and the one where the choice of scheme matters most.

PageWhat it shows
A first homogenizationbuild an RVE; dilute vs Mori–Tanaka
Bounds and classical schemesVoigt/Reuss bounds, self-consistent, where each scheme sits
Porous materials and the self-consistent trapwhy soft pores break the naive SC iteration
Porous benchmark: all schemesevery scheme on the canonical porosity sweep, spheres and oblate pores
The differential scheme and path dependenceincremental homogenization; why mixing order matters
Comparing loading-path trajectoriesthe same target fractions, four trajectories, watched τ by τ

Inclusions, geometries and orientation

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
Cracks and crack densityvolume fraction → crack density; the COD tensor
Layered spheresHervé–Zaoui n-layer localization and 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
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 localization 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

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

Beyond elasticity

PageWhat it shows
Viscoelastic compositescomplex moduli in the frequency domain; a first taste of ageing creep
Frequency or time?the complex-modulus and time-domain ALV routes, cross-checked on the same non-ageing composite
Ageing viscoelastic schemes side by sideDilute / Mori-Tanaka / Maxwell / PCW on one creep test; the aspect ratio; where the distribution shape decides the answer
Derivatives through the ageing-viscoelastic pipelineForwardDiff through the Volterra assembly: the set_param lens for RVE parameters, closure capture for moduli and relaxation times

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

Interoperability and tools

PageWhat it shows
Validating a finite-element crackwhat the corrected boundary condition buys, and convergence to the closed-form COD
Transport properties2nd-order homogenization: diffusivity of a porous medium, anisotropy from oriented pores
Symbolic spheresthe same tensor algebra on SymPy / Symbolics expressions: Eshelby/Hill tensors and the closed-form estimates