morphogen.contact.problem

Bodies in contact: the quasi-static solver of morphogen.fracture.cohesive with the forces of the surfaces that touch (see morphogen.contact).

morphogen.contact.problem.contact_forces(passes, x, x_old, neighbours: int, target: float, tangent: bool, predict: bool)[source]

The forces of the passes of contacts on the dofs of the nodes at the positions x (x_old: at the end of the last step) and, with tangent, their tangent (None if no point presses); target: the load factor, which places the obstacles; predict: the tangent of the predictor of a step. The state of the slave points of this evaluation is kept in their passes (trial, pressed, resultant, last).

morphogen.contact.problem.contact_pass(nodes, slave, master, own, obstacle, spec, stiffest: float, shares: int = 1)[source]

A pass of a contact: the slave points of slave against master (or against the obstacle), with the parameters of spec (a pair or an obstacle); the two passes of a symmetric pair, or the two sides of a surface that touches itself, share the penalty and the stick, so that both together are those asked for.

morphogen.contact.problem.stiffest_modulus(materials, phases) → float[source]

The largest Young’s modulus (or normal stiffness) of the materials of the phases present.

class morphogen.contact.problem.ContactResult(loads: ndarray, reactions: ndarray, iterations: ndarray, displacement: ndarray, area: ndarray, pressure: ndarray, forces: ndarray, penetration: ndarray, names: list, points: list = <factory>, fields: list = <factory>, time_s: float = 0.0, work: dict = <factory>, cohesive: CohesiveResult | None = None)[source]

Bases: object

The steps of a contact problem: the load factors, the reactions of the prescribed sets (steps x sets x 3), the Newton iterations, the final displacement (nodes x 3), with fields those of the steps, and for each contact (the pairs, then the obstacles: names) at each step the area in contact (reference area of the slave points that press; of one of the two sides for a symmetric pair or a surface that touches itself), the largest pressure (the points of the two sides then each carry half of it: theirs are doubled) and the forces of the slave surface on its master or on its obstacle (steps x contacts x 3); the deepest penetration of each step. work: at each step, "external" (of the prescribed displacements and forces), "bulk", "interfaces" and "contact" (of their internal forces: they add up to the external work; that of the contact is the energy of the penalty and of friction, less the work of the obstacles that move), "friction" (dissipated by friction) and "obstacles" (done by the obstacles on the body). points: for each contact, the slave points at the end, a dict of their position, pressure, tangential traction, gap, weight (reference area; of the points at the nodes of the faces, the share that the other surface sees) and energy dissipated by friction per unit area. cohesive: the steps of the cohesive interfaces of the problem, if any.

rows() → list[dict][source]

One row per step: the load factor, the reactions of each prescribed set, the area, the largest pressure and the force of each contact, the deepest penetration and the works.

class morphogen.contact.problem.ContactProblem(mesh: TetMesh, materials, pairs=(), obstacles=(), *, kinematics: str = 'finite', bulk: str = 'auto', interfaces: Interfaces | None = None, law=None, augmentations: int = 0, tolerance: float | None = None, neighbours: int = 12)[source]

Bases: CohesiveProblem

A body, or several in one mesh (assemble()), whose surfaces may touch each other, themselves and rigid obstacles (see morphogen.contact): mesh (tetrahedra of 4 or 10 nodes), the materials of its phases, the pairs of surfaces (Pair) and the obstacles (Obstacle).

kinematics and bulk: those of CohesiveProblem (the gaps are always those of the deformed surfaces; in small strains the bulk alone is linear). interfaces and law: cohesive interfaces of the mesh as well. augmentations: the largest number of updates of the multipliers of the augmented Lagrangian per step (0: the penalty alone), made while a point penetrates deeper than tolerance (a length; by default a hundredth of the size of the smallest faces). neighbours: the master faces tried for each slave point, the nearest by their centroids.

run(prescribed, load: float = 1.0, **options) → ContactResult[source]

Grow the prescribed displacements, the forces and the motions of the obstacles to the load factor load: the entries and options of run() (steps, tol, max_newton, max_cuts, fields, forces, duration, viscosity and history of the cohesive interfaces), but its initial state.

nodal_pressure() → ndarray[source]

The pressure of the contacts at the nodes at the end of the last step: at each node of a slave surface, the mean over the faces around it, weighted by their areas, of the mean pressure of their points; 0 elsewhere.

write(path, result, step: int = -1)[source]

The body (<path>.vtu: the displacement of step with fields, else the final one, and at the end the pressure of the contacts at the nodes); returns the path.