Cross-validation against Echoes
MeanFieldHomogenization is a port of the C++ Echoes code, so nearly every quantity has an independent reference. The cross-checks live in scripts/bench_echoes/ and call Echoes through PyCall (setup: From Echoes to MeanFieldHomogenization); the ALV ones also ship *_python.json dumps so they run without an Echoes install.
Cross-checks
| Script | Validated | Tolerance |
|---|---|---|
benchmark.jl | machine (aniso), ~1e-6 (iso) | |
benchmark_nlayers.jl | n-layer averages | 1e-6 |
benchmark_porous.jl | porous moduli, 10 schemes × 2 shapes × 7 porosities | 1e-6 |
benchmark_strength.jl | mortar | 1 % / 2 % |
benchmark_hill_derivative.jl | 1e-5 / 1e-4 |
Agreement measured
| Quantity | Agreement |
|---|---|
| Hill | machine precision |
| Hill | 1e-6 … 1e-8 |
| ISO 1e-15, ORTHO 1e-6 | |
| Crack | machine precision |
| Porous moduli — Voigt, Reuss, Dilute, DiluteDual, Maxwell, PCW, MT | 2.5e-14 |
| Porous moduli — SC, | 5.7e-7 |
| n-layer sphere | 4.6e-13 / 4.4e-14 |
| n-layer sphere, local | 5.8e-16 |
| Rotational averages TI / ISO (C++ transcribed verbatim) | 1e-12 |
| ALV per-layer | 1e-16 diag, 1e-6 off-diag |
| Dual-interface concentrations / effective diffusivity | 1e-8 / 1e-5 |
| Cracked ALV creep, PCW / SC + interface | 1e-4 / 1.4e-4 |
| Three-scale mortar | 1e-3 |
Deliberate divergences
Conventions and formulation choices, not numerical error — do not "fix" them.
| Divergence | Nature | Explained in |
|---|---|---|
| Elliptic crack | normalization, see below | COD tensors |
| MT on a cracked RVE | Viscoelasticity | |
| ASC, porous oblate | Echoes' compliance-form ASC converges to another branch | benchmark_porous.jl |
| DifferentialScheme, porous | pre-existing gap, 2.6e-3 → 6.2e-2, reproducible | benchmark_porous.jl |
| Strength | water/air regularized to a small positive stiffness | Strength |
MeanFieldHomogenization normalizes the crack compliance by the minor semi-axis
Verified at
Degenerate cases hide conventions
At
Running
import DECUHR, Integrals # the :decuhr back-end lives in an extension
include("scripts/bench_echoes/benchmark.jl")