morphogen.homogenization.nonlinear¶
Nonlinear homogenization along loading paths: the periodic element.
The unknowns of a step are the fluctuation w of the displacement u = E x + w
(periodic, or zero on the boundary for kinematic conditions) and the components of the
macroscopic strain E that are not prescribed: the macroscopic degrees of freedom of
the periodic element of Z-set. Their equations are
equilibrium,
R_w = int B^T sigma dV = 0on the reduced unknowns ofw;the macroscopic stress,
R_E = int sigma dV - V Sigma = 0on the components ofEprescribed as stresses (V: the volume of the box, voids included). The reactions of the other components ofEareV Sigma.
The stresses come from the behaviours of the phases (von Mises elasto-viscoplasticity,
morphogen.homogenization.behaviours; crystal plasticity,
morphogen.homogenization.crystal), integrated implicitly over each step. Newton’s
method solves the equations with the consistent tangent:
[ K_ww K_wE ] [dw] [R_w] [ K_Ew K_EE ] [dE] = - [R_E], K_ww = int B^T C B, K_wE = int B^T C, K_EE = int C
whose macroscopic block is condensed: K_ww Y = K_wE (one solve per unknown
component of E, from the solutions of the previous iteration) gives the 6 x 6 (at
most) system (K_EE - K_Ew Y) dE = -R_E + K_Ew K_ww^-1 R_w. The linear solvers are
those of the linear problems (sparse LU, or conjugate gradients with algebraic
multigrid, whose hierarchy is built once per step). The consistent tangents of the
points are symmetrized for them when the laws of all the phases have symmetric ones;
otherwise (tangent, TANGENTS) they are kept whole, K_Ew is no longer
K_wE^T and the tangent is solved by LU or by GMRES (with the multigrid of its
symmetric part), the Krylov solvers symmetrizing them again at the linearizations where
their measured asymmetry is below ASYMMETRY. A step that does not converge, whose
local integration fails, or whose corrections by GMRES stagnate at _STALLED
Newton iterations in a row, is divided by two (at most max_cuts times), and the step
grows back after two converged steps.
In finite strains (kinematics="finite", morphogen.homogenization.finite) the
equations are written on the reference configuration with the first Piola-Kirchhoff
stress P and its tangent dP/dF; the macroscopic gradient F = I + E is upper
triangular, its components E (nominal strains and simple shears) conjugate to those
of the mean of P (nominal stresses). The outputs add the Cauchy stress and the
logarithmic strain.
For linear behaviours in small strains the solutions are those of the condensation of
morphogen.homogenization.core.superpose().
The time stepping and the Newton iterations (_PathSolver) are shared with the
FFT solver of voxel images (morphogen.homogenization.fft_nonlinear), which gives
its own discretization and linear solver.
- morphogen.homogenization.nonlinear.KINEMATICS = ('small', 'finite')¶
Kinematics of the nonlinear problems
- morphogen.homogenization.nonlinear.TANGENTS = ('auto', 'symmetric', 'full')¶
Consistent tangents of the points in the Newton iterations of the volume elements: symmetrized and solved by conjugate gradients, or full and solved by GMRES (sparse LU by finite elements);
autosymmetrizes them when the laws of all the phases have symmetric tangents, and otherwise, for the Krylov solvers, where their measured asymmetry is belowASYMMETRY
- morphogen.homogenization.nonlinear.ASYMMETRY = 0.02¶
With
tangent="auto"and laws whose tangents are not all symmetric, the volume elements solved by Krylov methods (voxels; finite elements with multigrid) measure the asymmetry of the consistent tangents of the points of each phase at each linearization (asymmetry()) and symmetrize them where the largest is below this value (conjugate gradients, MINRES); above it they solve the full tangents by GMRES
- morphogen.homogenization.nonlinear.kinematics_of(value) bool[source]¶
Whether the kinematics
"small"or"finite"is finite.
- class morphogen.homogenization.nonlinear.Behaviours(kind: ndarray, pmat: ndarray, data: tuple, width: int, crystals: list = <factory>, mfront: list = <factory>, symmetric: bool = True)[source]¶
Bases:
objectBehaviours of the elements of phases: the kind of each element (elastic, von Mises, crystal, MFront), its row of parameters (
pmat: ofparams, of the crystal arrays or ofmfront; -1 for elastic elements), the data of the integration kernels (seemorphogen.homogenization.behaviours.update_points()), the number of internal variables of a point, the crystal plasticity of each crystal row and the laws of the points integrated outside the kernels (mfront: the MFront behaviours loaded by MGIS,MFrontLaw, and the learned laws,LearnedLaw).symmetric: whether the consistent tangents of all the laws are symmetric (seebehaviour_table()).- property nonlinear: bool¶
- morphogen.homogenization.nonlinear.behaviour_table(phase, materials: dict[int, Material], table: MaterialTable, *, finite: bool = False) Behaviours[source]¶
Behaviours of the elements of phases
phasewith their materialstable(morphogen.homogenization.materials.material_table()): the slip systems of the crystals turn with the orientation of their material.The consistent tangents are symmetric (
Behaviours.symmetric) for elasticity, for von Mises and Hill plasticity without Armstrong-Frederick terms (D = 0), for crystal plasticity in small strains without isotropic hardening (Q b = 0), for the learned potentials and standard models and for the MFront behaviours that declare it; not for the Armstrong-Frederick hardening (the backstresses turn the direction of flow), the isotropic hardening of the slip systems and the multiplicative crystal plasticity of finite strains, porous plasticity (the growth of the porosity), the learned perceptrons and recurrent networks, and the other MFront behaviours.
- morphogen.homogenization.nonlinear.external_points(laws, kind, pmat, point_mat, rotations, finite: bool, *, symmetric: bool = True)[source]¶
The points of the behaviours integrated outside the kernels (of the kind
MFRONT, of thelawspmat): those of the MFront behaviours by MGIS (MFrontPoints), those of the learned laws by their models (LearnedPoints), together, their tangents symmetrized withsymmetric(for the conjugate gradients); None without them.
- morphogen.homogenization.nonlinear.asymmetry(tangent, wts, groups=None) float[source]¶
The asymmetry of the consistent tangents
C_pof the points (points x nc x nc, weightswts) that decidestangent="auto"(ASYMMETRY):|C - C^T| / |C|for the block-diagonal operatorCof the points,sqrt(sum_p w_p |C_p - C_p^T|^2 / sum_p w_p |C_p|^2)(Frobenius norms), the stiffer points weighing more; withgroups(the phase of each point), the largest of those of the phases, so that a small phase whose tangents are far from symmetric is not diluted by the others (a learned law at 0.6 % of the voxels: 1.3e-2 for the whole volume element, 0.2 for its phase). Point by point,|C_p - C_p^T| / |C_p|reaches 0.1 to 0.2 at a few points of morphoGen’s own laws (porous points near their softening, crystals whose slip systems harden each other strongly) whose tangents are soft, where the operator stays nearly symmetric.
- class morphogen.homogenization.nonlinear.StepState(time: float, strain: ndarray, q: ndarray, unknown: ndarray, disc: object, grads: ndarray, wts: ndarray, sigma: ndarray, tangent: ndarray)[source]¶
Bases:
objectA converged step of a loading path, given to the
monitorof_PathSolver.run(): its time, the macroscopic strain (6), the unknowns of the fluctuation, the indices of the macroscopic components solved for, and the discretization with the arrays of its integration points (measures of strain, weights, stresses and consistent tangents at the end of the step).
- morphogen.homogenization.nonlinear.simulate_point(material: Material, path, *, name: str = 'point', orientation=None, kinematics: str = 'small', tol: float = 1e-10, max_newton: int = 30, max_cuts: int = 12, tangent: str = 'auto') PathResult[source]¶
Response of one material point (homogeneous strain and stress) to a loading path: the components prescribed as stresses are solved for by Newton’s method with the consistent tangent (a material point simulator, as
Zsim).orientation: Bunge angles (degrees) of a crystal;kinematics:"small"or"finite"strains (the strain then holds the components of the upper triangular displacement gradient, the stress those of the first Piola-Kirchhoff stress). In finite strains, and where its twins turn it, the result has theorientationof the lattice of a crystal at each step: its Bunge anglesg R_e^T, with the rotationR_eof the polar decomposition ofF_e(the material lines along the first axis stay along it, and the planes normal to the third stay normal to it: the grips of a tension along the first axis, the platens of a compression along the third).tangent(TANGENTS): Newton’s method solves a dense system, with by default ("auto") the exact tangents of the laws that are not symmetric (those of the learned laws and of the MFront behaviours too) and the symmetrized ones of the others (which only lose their round-off);"symmetric"symmetrizes them all,"full"keeps them all exact.
- class morphogen.homogenization.nonlinear.Extended(nodes: ndarray, node=None, offset=None)[source]¶
Bases:
objectThe nodes of a cell and the images of some of them across its faces:
nodethe node of each extended node (the nodes of the mesh first),offsetits translation (zero for the nodes themselves) andreferenceits position;fold, the dofs of the extended nodes from those of the nodes. The image of a node of displacementutranslated byLis displaced byu + H L,Hthe macroscopic displacement gradient: the cell deforms with it.
- class morphogen.homogenization.nonlinear.NonlinearFEProblem(mesh, materials: dict[int, Material], bc: str = 'periodic', *, solver: str = 'auto', tol: float = 1e-08, maxiter: int | None = None, newton_tol: float = 1e-06, max_newton: int = 25, max_cuts: int = 10, kinematics: str = 'small', tangent: str = 'auto', integration: str = 'full')[source]¶
Bases:
_PathSolver,FEElasticProblemNonlinear behaviours of the phases (von Mises elasto-(visco)plasticity, crystal plasticity) on a tetrahedral mesh, loaded along paths: periodic conditions (the periodic element, whose macroscopic strain components are degrees of freedom) or kinematic ones (
kubc:u = E xon the boundary,Elikewise), in small or finite strains (kinematics).newton_tol: relative residual of convergence of the equilibrium (to the norm of the nodal forces before they cancel) and of the macroscopic stress (to the integral of the norm of the stress);max_newtoniterations per step;max_cutsdivisions of a step by two.tangent: the consistent tangents of the points symmetrized ("symmetric": conjugate gradients with multigrid), full ("full": GMRES with the multigrid of their symmetric part; LU either way for small systems) or, by default ("auto"), symmetrized when the laws of all the phases have symmetric tangents (behaviour_table()), and otherwise kept full by LU and, with multigrid, symmetrized at each linearization where their asymmetry is belowASYMMETRY.integration:"full", the behaviours integrated with the strain of each point, or"bbar", with the volume change of each 10-node tetrahedron as its mean (B-bar;F-bar in finite strains:morphogen.homogenization.dilatation), for nearly incompressible phases — elastomers — and isochoric plastic flow.