Skip to content

Material laws ​

MaterialLaws is the part of MeanFieldHomogenization that deals with one material point: a constitutive law, linear or not, that may remember its history, and that may couple several fields. With it you can

  • write a law in a few lines of mathematics, either as the equations of its integration over a time step or as two potentials;

  • test it along any loading path, a tensile test, a creep test, a cycle, an undrained compression, before using it anywhere else;

  • plug it into a finite-element computation, exactly where a homogenized material plugs in today;

  • homogenize a composite of nonlinear phases into a law of the same kind.

The consistent tangent, the coupling blocks between fields and the derivatives with respect to the parameters are computed for you, by automatic differentiation: you never write a derivative by hand.

Four pieces that do not depend on each other ​

piecethe question it answerswhat you write
the lawwhat is the material?a ResidualLaw or a PotentialLaw: plain functions and a NamedTuple of parameters
the local algorithmhow is one step integrated?nothing: LocalNewton is the default
the loadingalong which path is the point driven?a LoadingPath, each component driven by its gradient or by its flux
the couplingwhere is the law evaluated?point_response for one point, material_response in an element loop

Any law runs with any algorithm, along any path, in any caller. Changing one piece never means touching another.

A first calculation ​

A steel bar pulled in tension, with von Mises plasticity and linear isotropic hardening. The law has five parameters; the path drives the axial strain from 0 to 0.5 % and leaves the lateral faces free.

julia
using MeanFieldHomogenization

law = J2Plasticity(; E = 200e3, ν = 0.3, σ₀ = 250.0, H = 2e3)     # MPa
path = LoadingPath(range(0, 1; length = 51); ε11 = t -> 5e-3 * t)
r = point_response(law, path)
r[:σ11][end], r[:p][end]      # axial stress (MPa) and cumulated plastic strain
(257.4257425742574, 0.003712871287128713)

r[:σ11] is the axial stress at every time of the path, r[:p] the cumulated plastic strain, an internal variable of the law. The lateral stresses r[:σ22] and r[:σ33] are zero, as the path asked: the driver found the lateral strains that make them vanish.

Three kinds of laws, one tool ​

kindwhat changesexample shipped
a law of the strain alonenothing is rememberedLinearElasticity, PowerLawElasticity
a law with internal variables and their evolutionthe state carries the history: plastic strain, viscous strain, damageJ2Plasticity, NortonViscoplasticity, MaxwellViscoelasticity
a law of coupled primal fieldsseveral gradients and their conjugate fluxes, with every coupling block of the tangentBiotPoroelasticity (strain and pore pressure)

The three are written the same way. A coupled law only lists its fields: gradients = (ε = 6, p = 1) and flux_names = (σ = 6, φ = 1) for poroelasticity; a thermo-hydro-mechanical law would add the temperature and the entropy in the same manner.

Reading order ​

Each law and each homogenized model has one page, which states the theory and runs it: the blocks of a page, in order, form a script of scripts/material_laws/ that runs on its own.

page
Common ground
Integrating a law over a stepthe incremental problem, the consistent tangent by the implicit-function theorem, the potential route, exact derivatives
Manual
Writing a lawthe residual route, the potential route, internal variables, coupled fields
The laws shippedthe six laws, their equations, parameters and behavior along typical paths
Driving a pointloading paths, mixed control, reading the response
Plugging a law into a computationthe Gauss-point contract, the flat interface for speed, differentiating with respect to parameters
Laws
Elastoplastic bar under cyclesJ2 plasticity against the closed form, isotropic and kinematic hardening
A damage law written from scratcha law of your own, with a threshold and an evolving internal variable
Drained and undrained poroelasticitya coupled law, the same sample in two tests
Homogenized laws
Secant methodsthe linear comparison composite, the classical and the modified secant methods; two power-law phases against the Voigt bound
Uniform fields: Voigt–Taylor and Reuss–Sachsevery phase at the macroscopic strain or at the macroscopic stress, for any phase laws; a steel and an alloy
Polycrystalsgrains of single crystals under the Taylor model; the Taylor factor of a random FCC aggregate
The incremental tangent approachphases with a history linearized by their tangents at each step, isotropic projection; a particle-reinforced alloy
The affine formulationphases replaced by their tangents and prestresses at their average strains, Levin's theorem, exact for laminates; against the secant estimates
Damage by the growth of microcrackscrack densities as internal variables, Griffith's resistance, stability and viscous regularization
Nonlinear poroelasticity of a cracked rockcracks closing under the Terzaghi effective stress, stress-dependent stiffness and Biot tensor
The strength of a porous plastic solidthe rigid–plastic limit of the secant method, a strength domain from a phase law, normality
Strength of a frictional matrixa Drucker–Prager matrix with a non-associated flow rule, limit states around pores or rigid inclusions

Small strain

The laws are written in infinitesimal strain. The kinematics is a trait of the law (kinematics), so that finite strain can be added later without changing the laws written today.