morphogen.fracture.lefm¶
Linear elastic fracture mechanics of 3D cracks: cracks described by two level sets, their energy release rate, and their propagation, either on meshes conforming to the crack, remeshed at each step as in Z-cracks, or by the extended finite element method (XFEM) on a fixed mesh.
A crack (Crack) is the zero of φ, the signed distance to its plane, where
ψ, the signed distance to its front within the plane, is negative: a straight front
(a through or edge crack of length size from point along direction) or a circular
one (a penny of radius size). It grows by moving its front (Crack.grown()).
Conforming meshes (Z-cracks): the body is meshed by MMG conforming to the plane of the
crack (crack_mesh(), or any mesh whose faces lie on it, such as six tetrahedra per
voxel), and the faces behind the front are opened by duplicating their nodes
(morphogen.fracture.cohesive.insert_interfaces()): free crack faces.
Morphologies: the crack meshes of a morphology carry its phases, those of the materials
(mesh.phase), and the sides of the crack apart (mesh.side), through the opened
meshes, the solvers and the transfers of their state: each element in the phase of its
centroid (with_phases(): staircase interfaces, as the grains of polycrystals), or the
interfaces of the phases conforming as well: the background mesh cut by MMG along the
level set of the morphology without remeshing (phase_mesh(), once), then along the
plane of each crack and remeshed in MMG’s multi-material mode, each phase split into its two
sides (cut_mesh()). The elements of void phases (pores) are removed
(without_voids()); the walls of the pores and the interfaces of the phases keep their
nodes when the front is snapped.
XFEM (XFEM; Moës, Dolbow & Belytschko 1999; Sukumar, Moës, Moran & Belytschko
2000): the displacement of linear tetrahedra is enriched, with shifted functions, by the
jump H(φ) - H(φ_i) at the nodes of the elements that the crack cuts through, and by
the branch functions √r (sin θ/2, cos θ/2, sin θ/2 sin θ, cos θ/2 sin θ) (r =
sqrt(φ² + ψ²), θ = atan2(φ, ψ)) at the nodes within tip_radius of the front; the
enriched elements are integrated on sub-tetrahedra of their two sides, refined near the
front.
Energy release rate (release_rate()): under prescribed forces, the potential
energy is -W/2 with W = fᵀ u, so that G = (W(a + δ) - W(a - δ)) / (2 (A(a + δ) -
A(a - δ))), the areas those of the crack inside the body (the opened faces, or the
crack surface in the cut elements): the mean of G along the front, for its uniform
advance; in mode I, K = sqrt(E' G).
Quadratic elements (order=2 of conforming_work()): the opened mesh is made of
10-node tetrahedra, and the mid-edge nodes of the edges that leave the front are moved to
a quarter of their length from it (quarter_points(); Barsoum 1976, Henshell & Shaw
1975): along such an edge the displacement of the isoparametric element is then a
polynomial of the square root of the distance to the front, the leading term of the
fields of a crack, which 4-node elements, of constant strain, only approach by their
refinement. The XFEM, whose enrichment carries that term, keeps its 4-node elements.
Propagation (propagate()): the front advances by steps, its rate given by Paris’
law da/dN = C ΔK^m (the cycles of each step) or by Griffith (the load factor at which
G reaches G_c, G growing as its square); the mesh is rebuilt at each step
(conforming) or kept (XFEM).
- class morphogen.fracture.lefm.Crack(kind: str, point: tuple, normal: tuple, size: float, direction: tuple | None = None)[source]¶
Bases:
objectA planar crack (see the module):
kind"straight"(frompointalongdirectionoversize) or"penny"(centrepoint, radiussize), its plane throughpointnormal tonormal.- frame(x)[source]¶
At points
x(rows): the distancerto the front, the axes of the nearest point of the front,n(normal to the crack),d(in its plane, the direction of propagation) andt = d × n(along the front), and the coordinatesalong the front (a length, or the angle of a penny from the axisn × x,n × yfor a normal alongx).
- morphogen.fracture.lefm.line_in_box(point, direction, lower, upper, count: int = 400)[source]¶
Points (midpoints of
countequal parts) of the segment of the line throughpointalongdirectioninside the box[lower, upper], and the length of each part.
- morphogen.fracture.lefm.crack_mesh(lower, upper, crack: Crack, size: float, grains=None, *, morphology=None, voids=(), conforming: bool = False, front_size: float | None = None, front_radius: float | None = None, **options) TetMesh[source]¶
A tetrahedral mesh of the box
[lower, upper]conforming to the plane of the crack (MMG;optionsthose ofmorphogen.mesh.conforming.conforming_mesh()): the remeshing step of the conforming approach. Its two phases are the sides of the crack.grains: a tessellation (a polycrystal) whose cells the elements take (with_grains()).morphology: a microstructure whose phases the elements take (mesh.phase, the phases of the materials), the sides of the crack kept apart (mesh.side): each element in the phase of its centroid (with_phases(): staircase interfaces), or, withconforming, a mesh conforming to the interfaces of its phases too, the background mesh cut by its level set (phase_mesh()) cut by the plane of the crack and remeshed by MMG (cut_mesh();optionsamongbackground,min_size,hausdorff,gradation,executable,workdir,timeout);morphologymay be that mesh of its phases, made once for all the cracks of a growth.voids: phases whose elements are removed (pores;without_voids()).front_size: the size of the elements withinfront_radiusof the front (by default four times that size), where the mesh is refined by a second pass of MMG with a map of sizes (refine_front()): the singular fields of a curved front resolved without a fine mesh of the whole body.
- morphogen.fracture.lefm.phase_mesh(morphology, lower, upper, size: float, *, background: float | None = None, executable=None, workdir=None, timeout=None) TetMesh[source]¶
The background mesh of the box
[lower, upper](six tetrahedra per cube of a grid of spacingbackground, by defaultsize / 2) cut by MMG along the zero level set of a morphology (two phases: negative in phase 1), without remeshing: a mesh conforming to the interfaces of its phases, its elements of any quality, to be cut by each crack and remeshed once (cut_mesh();crack_mesh()withconforming). The level set is sampled and moved away from zero near the nodes of the grid as formorphogen.mesh.conforming.conforming_mesh(); the plane of a crack is then cut on the same grid as by the crack meshes of a homogeneous body.
- morphogen.fracture.lefm.cut_mesh(mesh: TetMesh, crack, size: float, *, min_size=None, hausdorff=None, gradation: float = 2.0, executable=None, workdir=None, timeout=None) TetMesh[source]¶
The mesh of the phases of a morphology (linear tetrahedra) cut by the plane of a crack,
φ = 0, and remeshed by MMG in its multi-material mode, each phase split into its two sides (the sizes those ofmorphogen.mesh.conforming.conforming_mesh()): a mesh conforming to the interfaces of the phases and to the crack, its phases inmesh.phaseand the sides of the crack inmesh.side(1 whereφ < 0, as the phases ofcrack_mesh()), the faces of the box kept plane. The values ofφat the nodes closer to zero than a fraction of their variation along the edges are moved away from it, as on the grids of the conforming meshes (no sliver).
- morphogen.fracture.lefm.phases_at(morphology, points, spacing: float | None = None) ndarray[source]¶
The phase of a morphology at points (rows): its point queries (two phases), or the voxel of an image of it whose voxels are about
spacing(at most 256 per edge; by default 1/128 of its longest edge);morphologymay also be a function giving the phases of points.
- morphogen.fracture.lefm.with_phases(mesh: TetMesh, morphology, spacing: float | None = None) TetMesh[source]¶
A crack mesh (its phases the sides of the crack) with the phases of a morphology: each element in the phase of the morphology at its centroid (
mesh.phase, byphases_at()), the sides of the crack kept inmesh.side. The interfaces of the phases are then staircases of element faces, as the grain boundaries ofwith_grains().
- morphogen.fracture.lefm.without_voids(mesh: TetMesh, voids=(), islands: float = 0.01) TetMesh[source]¶
A mesh without the elements of the phases
voids(pores), and without the parts of it they leave apart whose volume is belowislandstimes that of the largest (more than one large part: an error, a body that falls apart).
- morphogen.fracture.lefm.with_grains(mesh: TetMesh, grains) TetMesh[source]¶
The mesh with the grains of a tessellation (
grains: itscell_of(points)and itsorientations): each element in the cell of its centroid (mesh.cell), the crystal orientations of the cells (mesh.orientations). The grain boundaries are then staircases of element faces, whose steps shrink with the elements; the crack meshes of a polycrystal stay conforming to the crack alone (MMG cuts one level set).
- morphogen.fracture.lefm.interface_nodes(mesh: TetMesh) ndarray[source]¶
The nodes (a mask) of the interfaces between the phases of a mesh and of its free faces off the faces of its box (the walls of its pores).
- morphogen.fracture.lefm.refine_front(mesh: TetMesh, crack, size: float, radius: float | None = None, *, gradation: float = 1.5, executable=None, workdir=None, timeout=None) TetMesh[source]¶
A crack mesh (linear tetrahedra; its phases, or its phases and its sides) remeshed by MMG with elements of
sizewithinradiusof the front of the crack (by default four times that size), growing beyond it by the ratiogradationbetween neighbours up to the sizes of the mesh: the surfaces between its labels (the surface of the crack, the interfaces of the phases, the walls of the pores) and the faces of the box are kept.
- morphogen.fracture.lefm.snap_front(mesh: TetMesh, crack, fraction: float = 0.5, quality: float = 0.2) TetMesh[source]¶
The mesh with the nodes of the crack surface (between its two phases, the sides of the crack, or its two sides
mesh.side) withinfractionof the length of their edges from the front moved onto it, in the surface: the opened faces then end on the front, instead of a zigzag that lengthens or shortens the crack locally by a fraction of an element (the remeshing of Z-cracks, whose meshes have the front along their edges). A node stays if the move would leave an element around it belowqualitytimes its volume, a triangle of the surface below that fraction of its area, or a node of a face of the box off it; and, with its sides apart from its phases, the nodes of the interfaces of the phases and of the walls of the pores (interface_nodes()).
- morphogen.fracture.lefm.open_crack(mesh: TetMesh, crack: Crack, sides=None)[source]¶
The mesh with the crack opened and the area of the crack (see
crack_faces()).
- morphogen.fracture.lefm.crack_faces(mesh: TetMesh, crack, sides=None)[source]¶
The mesh with the faces of the crack opened, those between its two sides behind its front, and the pairs of faces of its lips (interface elements).
sides: a label per element (by default the sidesmesh.sideof a crack mesh of a morphology, or the two phases of a mesh fromcrack_mesh(), whose interface MMG may have moved slightly, otherwise the sign ofφat the centroids of the elements).
- morphogen.fracture.lefm.boundary_faces(mesh: TetMesh) ndarray[source]¶
The faces of a tetrahedral mesh that belong to one element (rows of three nodes).
- morphogen.fracture.lefm.face_forces(mesh: TetMesh, where: Callable, traction) ndarray[source]¶
Nodal forces (3 n) of a uniform
tractionon the boundary faces whose centroids (those of their corners) satisfywhere: a third of the force of each face to each of its nodes for 4-node elements; for 10-node ones the consistent forces of the six nodes of the face,∫ N_a dA(a third to each mid-edge node of a plane face with straight edges, nothing to its corners).
- morphogen.fracture.lefm.quarter_points(mesh: TetMesh, front) TetMesh[source]¶
The mesh of 10-node tetrahedra whose mid-edge nodes on the edges that leave the nodes
front(those of a crack front: one end on it, the other not) are moved to a quarter of the edge from the front (Barsoum 1976): the displacements of these elements vary as the square root of the distance to the front along these edges, and their strains as its inverse, as the fields of a crack. The edges along the front and the others keep their mid-edge nodes.
- morphogen.fracture.lefm.conforming_work(mesh: TetMesh, material, crack: Crack, forces, supports, *, order: int = 1, quarter_point: bool = True) tuple[float, float][source]¶
W = fᵀ uof the body with the crack opened on its (conforming) mesh, and the area of the crack:forces(mesh)the nodal forces andsupports(mesh)the fixed dofs (functions of the opened mesh).order2: on the 10-node tetrahedra of the mesh, those of the front with their mid-edge nodes at the quarter of their edges (quarter_point; seequarter_points()).
- class morphogen.fracture.lefm.XFEM(mesh: TetMesh, material, crack: Crack, *, tip_radius=None, refine: int = 0)[source]¶
Bases:
objectA cracked body by the extended finite element method (see the module): a linear tetrahedral
meshof an isotropicmaterial, thecrack, the radiustip_radiuswithin which the nodes get the branch functions (by default twice the mean edge) and the number of refinements of the sub-tetrahedra of the elements near the front (refine).- stiffness() csr_matrix[source]¶
The stiffness of all the dofs: the standard ones (
3 n) then the enriched.
- morphogen.fracture.lefm.release_rate(work_area: Callable[[Crack], tuple[float, float]], crack: Crack, delta: float) float[source]¶
The mean energy release rate along the front,
(W(a + δ) - W(a - δ)) / (2 (A(a + δ) - A(a - δ))), from a function givingW = fᵀ uand the area of the crack.
- morphogen.fracture.lefm.xfem_work(mesh: TetMesh, material, forces, supports, **options) Callable[source]¶
crack -> (W, area)by XFEM on a fixed mesh (forces,supports: functions of the mesh).
- morphogen.fracture.lefm.conforming_work_of(mesh_of: Callable[[Crack], TetMesh], material, forces, supports, **options) Callable[source]¶
crack -> (W, area)on conforming meshes,mesh_of(crack)meshing (or remeshing,crack_mesh()) the body for each crack;options: those ofconforming_work()(order=2for 10-node elements, with quarter points).
- class morphogen.fracture.lefm.Propagation(sizes: ndarray, rates: ndarray, factors: ndarray, cycles: ndarray, loads: ndarray)[source]¶
Bases:
objectThe steps of a propagation: crack sizes, energy release rates, stress intensity factors (mode I), cycles (Paris) or critical load factors (Griffith).
- morphogen.fracture.lefm.propagate(work_area: Callable[[Crack], tuple[float, float]], crack: Crack, *, young: float, poisson: float, increment: float, steps: int, delta: float | None = None, paris: tuple[float, float] | None = None, toughness: float | None = None, plane_strain: bool = True) Propagation[source]¶
Grow a crack by
stepsuniform advances of its front byincrement(see the module):Gat each size byrelease_rate()(delta: half the advance of its differences, by defaultincrement / 2),K = sqrt(E' G)(E' = E / (1 - ν²)in plane strain), the cycles of Paris’ lawda/dN = C K^m(paris = (C, m), the loading of the forces as the range) and the load factorsqrt(G_c / G)at which Griffith’s criterion is met (toughnessG_c).