morphogen.homogenization.identification

Identification of the parameters of a behaviour on reference responses, as Zopt does for Zsim: the parameters chosen are those whose material point (simulate_point()), under the loading path of each reference, gives the stresses of the reference at its times in the least-squares sense (a trust-region method on the logarithms of the parameters, which stay positive and within span decades of their starting values). A reference is a response along a path: the macroscopic curves of a loading path of a morphology (to give it a macroscopic law) or the points of a test. Several references are followed together, each by its weight whatever its number of points: a tension and a shear, cycles of several amplitudes, which tell the isotropic hardening from the kinematic one.

The parameters are named after the keys of the configurations of the material (from_config()): young, poisson and, of its von Mises plasticity, yield, hardening, the isotropic terms Q, b (Q2, b2 for the second…), the kinematic terms C, D (C2…) and Norton’s K, n; of its porous plasticity, those of its matrix (yield, hardening, Q, b…, the kinematic terms C1, D1, C2…, K, n), the initial porosity, Gurson’s q1, q2, q3 and the coalescence fc, fF, Rousselier’s sigma1, D, the elliptic C, F (numbers, not tables of the porosity) and the nucleation fN, eN, sN, A, B, e0: a porous morphology (a matrix with voids) gives its macroscopic law, the classic calibration of Gurson’s model on unit cells under several triaxialities. Of the behaviours of morphogen.homogenization.laws: the terms of a viscoelasticity, g1, tau1, g2… (shear) and k1, tauk1… (bulk), which give a viscoelastic composite its Prony series from its relaxation; the positive parameters of a hyperelasticity (mu, c10, c01, c20, c30, lock, bulk; the material given by its law, without young and poisson); and those of a damage (threshold, strength, ultimate, fracture_energy, ratio, viscosity).

morphogen.homogenization.identification.PLASTIC = ('yield', 'hardening', 'Q', 'b', 'C', 'D', 'K', 'n')

The parameters of von Mises plasticity that can be identified, beside young and poisson

morphogen.homogenization.identification.HILL = ('hill11', 'hill22', 'hill33', 'hill12', 'hill23', 'hill31')

those of the components)

Type:

The coefficients of Hill’s criterion (hill11 … hill31

morphogen.homogenization.identification.POROUS = ('yield', 'hardening', 'Q', 'b', 'K', 'n', 'porosity', 'q1', 'q2', 'q3', 'fc', 'fF', 'sigma1', 'D', 'C', 'F', 'fN', 'eN', 'sN', 'A', 'B', 'e0')

Those of porous plasticity (its matrix, its criterion, its nucleation)

morphogen.homogenization.identification.ANALYTIC = ('viscoelasticity', 'hyperelasticity', 'damage')

The behaviours of morphogen.homogenization.laws in the configuration of a material

morphogen.homogenization.identification.FAILED = 1000.0

The residuals of a material point that fails (its Newton iterations diverge)

morphogen.homogenization.identification.get_parameter(config: dict, name: str) → float[source]

The value of a parameter in the configuration of a material.

morphogen.homogenization.identification.set_parameter(config: dict, name: str, value: float) → None[source]

Set a parameter in the configuration of a material (in place).

morphogen.homogenization.identification.driven(result: PathResult) → int[source]

The index of the stress component that varies most along a response.

class morphogen.homogenization.identification.Reference(path: object, times: object, stresses: object, components: list[int] | None = None, weight: float = 1.0)[source]

Bases: object

A response the identification follows: the stresses (n x 6 in the order of the paths, or the n values of the components compared) at the times of a loading path (its name or specification), the indices of the components compared (by default the one that varies most) and the weight of the reference in the gap.

class morphogen.homogenization.identification.Identification(parameters: list[str], initial: dict, values: dict, material: dict, references: list[Reference], responses: list[PathResult], initial_responses: list[PathResult | None], gaps: list[float], initial_gaps: list[float], error: float, initial_error: float, evaluations: int)[source]

Bases: object

The parameters identified: their starting and final values, the material, the references followed (their components resolved), the responses of the material point under their paths with the parameters found and with the starting values (None where it fails), the relative root mean square of the gap to each reference (to its largest stress) and of the weighted gap to all, before and after, and the number of evaluations (a material point under the path of each reference).

property response: PathResult

The response under the path of the first reference.

property components: list[int]

The components compared in the first reference.

morphogen.homogenization.identification.identify(material: dict, path, times, stresses, parameters, *, components=None, kinematics: str = 'small', span: float = 3.0, max_evaluations: int = 200, callback: Callable[[int, float], None] | None = None) → Identification[source]

Identify parameters of material (a mapping of the configurations) so that its material point under path gives the stresses (n x 6 in the order of the paths, or n values of one component) of the reference at its times (components: the indices compared, by default the component that varies most in the reference): identify_references() with one reference.

morphogen.homogenization.identification.identify_references(material: dict, references, parameters, *, kinematics: str = 'small', span: float = 3.0, max_evaluations: int = 200, callback: Callable[[int, float], None] | None = None) → Identification[source]

Identify parameters of material (a mapping of the configurations) so that its material point under the path of each of the references (Reference) gives their stresses at their times: the gaps relative to the largest stress of each reference, the mean of their squares over each reference weighted by the references (each counts by its weight, whatever its number of points). callback(evaluations, error) after each evaluation (it may raise Stopped).

morphogen.homogenization.identification.LOADINGS = ('11', '22', '33', '12', '23', '31')

a tension along each axis, a shear in each plane

Type:

The loadings of a macroscopic law

morphogen.homogenization.identification.TRIAXIAL = ('confined11', 'confined22', 'confined33', 'hydrostatic')

a tension along an axis whose lateral strains are held, and a hydrostatic tension

Type:

Those of a higher stress triaxiality (porous morphologies)

morphogen.homogenization.identification.loading_path(name: str, strain: float, n: int, cycle: bool = False) → tuple[dict, list[int]][source]

The path of a loading of a macroscopic law (LOADINGS, TRIAXIAL) to strain in n increments (with cycle, then to -strain in 2 n), and the components of the stress compared.

class morphogen.homogenization.identification.MacroscopicLaw(loadings: tuple[str, ...], paths: list[dict], responses: list[PathResult], identification: Identification)[source]

Bases: object

The macroscopic law of a morphology (macroscopic_law()): its responses under the loadings, as the references of the identification of the law.

morphogen.homogenization.identification.law_start(responses, loadings, law: str = 'hill', *, kinematic: bool = False, matrix: dict | None = None, porosity: float | None = None) → tuple[dict, list[str]][source]

A starting law for the responses of a morphology under loadings (one loading each, macroscopic_law(): monotonic, or a cycle that first loads), and the parameters to fit: Young’s modulus and Poisson’s ratio of the first increment of the first tension (of the first shear without a tension: its shear modulus, ν = 0.3), the yield stress at 70 % of the stress at the peak of the loading (a shear times sqrt 3), the linear hardening of the slope of the second half of the loading; with kinematic, a backstress (C, D) that takes half of that hardening and saturates over the strain of the loading; fitted, those and, for law="hill", the coefficients of the loadings run but the first (its coefficient stays 1: the coefficients and the yield stress have one scale). For law="gurson", Gurson’s porous plasticity of the von Mises matrix (the configuration of a material) and of the porosity (the fraction of the voids), starting from Tvergaard’s q1 = 1.5 and q2 = 1: fitted, the elastic constants (from the first increment of a tension, or those of the matrix), q1 and q2.

morphogen.homogenization.identification.macroscopic_law(respond: Callable[[dict], PathResult], start: dict | None = None, parameters=None, *, law: str = 'hill', loadings=('11', '22', '33', '12', '23', '31'), strain: float = 0.01, increments: int = 20, cycle: bool = False, matrix: dict | None = None, porosity: float | None = None, kinematics: str = 'small', span: float = 3.0, max_evaluations: int = 200, callback: Callable[[int, float], None] | None = None) → MacroscopicLaw[source]

The law that gives a morphology its macroscopic behaviour: respond(path), the macroscopic response of the morphology along a loading path (a PathResult: lambda path: NonlinearFFTProblem(image, materials).run(path)), under a monotonic loading of each component of loadings to strain in increments steps (a tension along an axis, "11"…, or a shear in a plane, "12"…: the other stresses free; with cycle, then back to -strain in twice as many, which shows the Bauschinger effect), then the identification of the law on these responses together (identify_references(), each response compared on its loaded component): the parameters of start (a mapping of the configurations of a material), or of the von Mises or Hill law that law_start() estimates from the responses, with a kinematic hardening when the loadings cycle, or Gurson’s law of a porous morphology (matrix, porosity), whose q1 and q2 need loadings of several stress triaxialities (TRIAXIAL: a confined or hydrostatic tension, compared on its three normal stresses).