How a random e0 field affects the crack in a 2D tensile lattice
A random field of the elastic-strain threshold e0 makes the crack localise earlier, at a lower peak, and along a different path. Generated with my own genran code (Gaussian, Weibull, or grafted Weibull–Gaussian).
Previously I showed that a periodic mesh removes the boundary
artefact in 2D direct-tension lattice models — the crack stops locking
onto the loaded face and instead reflects the heterogeneity of the
random node distribution. In this post, the natural follow-up: what happens
when we make the material heterogeneous too, by sampling the elastic
strain threshold e0 from a spatial random field?
The random field
The parameter e0 is what controls when an individual lattice element starts to
damage. In the previous case, it has been a single constant. Here
the per-element value is sampled from a 2D random field generated by my
own genran code, which uses
the spectral representation of Shinozuka & Deodatis to produce fields
with a prescribed autocorrelation and a prescribed distribution. genran supports Gaussian, Weibull, and grafted
Weibull–Gaussian marginals; the iterative refinement of Shields,
Deodatis & Bocchini (2011) recovers the prescribed autocorrelation
when the distribution is non-Gaussian.
For this post the field is Gaussian with autocorrelation length comparable to the lattice spacing — long enough that neighbouring elements are correlated, short enough that the field has visible texture across the specimen.

The lattice picks the field up through OOFEM’s InterpolatingFunction
directive, which multiplies each element’s e0 by the field value at
its Gauss point.
What changes
Two analyses on the same lattice (same mesh, same loading, same mean
material parameters), differing only in whether e0 is uniform or
randomly distributed:

The random field shifts the response in three ways:
- Earlier localisation. Cracks initiate at the weakest spots
long before the average element is anywhere near
e0. Diffuse damage builds up while the load is still rising. - Lower peak load and lower peak displacement. The first weak band to coalesce sets the strength.
- Different crack location and shape. The path is dictated by the random field rather than only by mesh randomness.
The uniform case isn’t a “perfectly straight” crack — the random node
distribution alone gives some tortuosity. But the band geometry is
controlled only by mesh-level randomness; in the random-e0 case the
field adds a second, larger source of heterogeneity that the crack
follows.

What to vary
random/random.in is where the field statistics live. Worth playing
with:
ranint— the random seed. Keeping everything else fixed and varying the seed gives you different realisations of the same statistical field; the crack location moves with it. A small parametric study over ~10 seeds is the standard way to get a meaningful structural-response distribution out of this kind of model.autoLength— the autocorrelation length. Short → cracks pick up local weak elements. Long → cracks follow large-scale weak zones. The transition between the two regimes is a useful sanity check on the mapping between the field and the lattice.
Reproduce
git clone https://github.com/githubgrasp/oofem-examples.git
cd oofem-examples/lattice-tensile-random-2d
docker run --rm -v "$PWD":/work ghcr.io/githubgrasp/oofem-public:lattice-tensile-random-2d bash run-all.sh
The image tag :lattice-tensile-random-2d is the exact one used to
produce the figures above and is immutable. Use :latest instead if
you would rather run the current OOFEM build — results may drift
slightly as the code evolves.
The example folder is at github.com/githubgrasp/oofem-examples/lattice-tensile-random-2d; issues and questions go on the issue tracker. More verification sets to follow.
Built with OOFEM.