Fracture and Crack Path

Key source files: crack_visibility.py, crack_criterion.py, static_crack_propagator.py, crack_propagator.py, crack.py (all under GM_modules/Meshfree/src/solver/).
Assembly hook: mlpg/assembler.py — assemble_stiffness_voronoi().
Entry points: solve_with_static_crack_path() (default), solve_with_crack_propagation() (legacy).

Two fracture modes are available (selected via CrackSettings.mode):

1. Overview and Physical Motivation

In meshfree methods the absence of a fixed mesh is a natural advantage for fracture mechanics: no remeshing is required as damage grows. Instead, the crack is treated as an internal boundary that modifies the visibility between nodes — nodes that are separated by the crack contribute zero (or reduced) stiffness to one another.

GearMaster implements two algorithms under a common CrackSettings configuration object. Both rely on the same constitutive assumptions:

2. Shared Infrastructure: Voronoi Visibility

2.1 Delaunay graph and Voronoi duality

Both fracture modes exploit the Delaunay triangulation of the node set, which is the combinatorial dual of the Voronoi tessellation used by MLPG5. Two nodes I and J share a Voronoi integration edge precisely when (I, J) is a Delaunay edge. Removing this edge from the stiffness integral disconnects the two nodes in the structural sense.

2.2 BrokenEdgeConnectivity New

The class BrokenEdgeConnectivity (file: crack_visibility.py) stores a set of explicitly broken Delaunay edge pairs and exposes the same assembler interface as VoronoiCrackConnectivity:

Geometric Ray-Cast and Spatial Cache

All visibility queries use a geometric crossing test rather than BFS graph traversal. For each query segment (origin→target), the test checks whether any broken Voronoi ridge segment intersects it via a 2-D segment-vs-segment cross-product criterion (proper intersection only, endpoints excluded).

The broken-ridge geometry is maintained by _ensure_broken_ridge_cache(), keyed on len(self._broken) (monotonically non-decreasing — breaking is irreversible). The cache stores:

For each visibility query, cKDTree.query_ball_point(origin, d_max + max_half) pre-selects only the ridges geometrically reachable by the query segment, keeping the per-call cost bounded independently of the total broken-edge count B. The actual crossing test is then fully vectorised over the filtered ridge set by the module-level function _segments_cross_any(origin, targets, rp0, rp1) (NumPy broadcasting, no Python loop).

Complexity: cache rebuild is O(B log B) amortised (only when B grows); each visibility query is O(log B + K ⋅ S) where K is the number of spatially nearby ridges and S is the support size — in practice K « B for all but the most advanced damage states.

2.3 Assembler hook

The Voronoi assembler (assemble_stiffness_voronoi()) accepts either a VoronoiCrackConnectivity or a BrokenEdgeConnectivity object via the crack_visibility parameter. Both are injected into solver_settings["_crack_visibility"] before each solve call:

setup.solver_settings["_crack_visibility"] = broken_edge_connectivity

Inside the assembly loop two checks are applied:

  1. Segment-level: if voronoi_edge_is_cut(I, J), the entire Voronoi integration segment between I and J is skipped.
    Implementation note: the Delaunay neighbour J of each Voronoi segment is identified with a single batched KD-tree query per node (_tree.query(segment_midpoints, k=2)), not by an O(N) linear scan over all nodes. This reduces the assembly cost from O(N²) per step to O(N log N + S) where S is the number of segments per node.
  2. Support-level: after MLS evaluation, filter_support(I, supp) removes support nodes not visible from node I across the crack (geometric ray-cast, see Section 2.2).

3. Fracture Criterion Fields

Implemented in crack_criterion.py. The same criterion fields are available for both fracture modes:

KeyFieldTypical use
"sed" Averaged Strain Energy Density (ASED), Lazzarin-Berto with control radius R0 Weld joints, notches (default)
"von_mises" Von Mises equivalent stress σVM [MPa] General initiation
"max_principal" Maximum principal stress σ1 [MPa] Brittle fracture, Mode-I dominated

4. Linear Static Crack Path  Default / New

4.1 Physical rationale

Under the small-scale yielding hypothesis, the linear elastic field around the dominant stress concentration (weld toe, notch) predicts where the fracture process zone will first open. When one Voronoi edge is broken, the stiffness topology changes and the load redistributes; the process repeats until either the nominal loads are safely below the threshold or the iteration cap is reached.

The load-scaling step follows the same logic as the proportional load factor in limit-analysis and cohesive-zone progressive damage models (Camacho & Ortiz 1996; Jirasek & Bazant 2002):

λk = threshold / Cmax,k      (load scale at which the worst edge reaches the critical value)

Because the system is linear, u(λF) = λu(F), so no extra solve is needed to obtain the scaled field. The factor λ is a post-processing quantity that records the structural utilisation at each propagation step.

4.2 Edge criterion aggregation modes

The scalar criterion is defined at the nodes, but the fracture driving force acts at the Voronoi cell boundary shared by two adjacent nodes. Three aggregation strategies are available, selected via CrackSettings.edge_criterion_mode:

Mode Formula Status When to use
"mean"  (default) Cedge = (Ci + Cj) / 2 ✅ Implemented Balanced estimate; appropriate when the field gradient across the edge is moderate. The edge fails when the average of the two flanking nodes exceeds the threshold.
"max" Cedge = max(Ci, Cj) ✅ Implemented Conservative upper bound — Camacho & Ortiz (1996) cohesive-zone traction criterion. The edge fails as soon as either flanking node exceeds the threshold. Produces a slightly wider / earlier crack path than "mean".
"gauss_edge" Cedge = (1/L) ∫edge C(x) dℓ ≈ Σg wg C(xg) 🚧 Not yet implemented Physically most accurate: evaluates the criterion via MLS shape functions at Gauss points distributed along the Voronoi ridge segment, then computes a length-weighted average. Requires a standalone probe-point MLS evaluator (evaluate_at_point(), Phase 3). Selecting this mode currently raises NotImplementedError.
Practical difference: for dense point clouds (small h near the stress concentration), the criterion field is nearly linear between adjacent nodes and all three modes converge. The difference becomes significant for coarser clouds where the field can vary substantially across a single Voronoi cell.
Gauss-edge implementation plan (Phase 3):
  1. Expose evaluate_at_point(x, solver_context) in mlpg_solver.py — returns displacement, strain and stress at any 2-D point via MLS evaluation.
  2. Implement BrokenEdgeConnectivity.evaluate_edge_criterion_gauss(): for each intact ridge segment place Ng = 3 Gauss points, evaluate the criterion at each, and return the length-weighted average.
  3. Wire into StaticCrackPathSolver when edge_criterion_mode == "gauss_edge".

4.3 Algorithm

broken = BrokenEdgeConnectivity(nodes_2d)     # empty broken-edge set
active_tip = None ; active_tip_locked = False  # single-front state (Fix 1)

for k = 0, 1, …, max_iterations − 1:
    # 1. Solve with nominal loads and current damage state
    setup["_crack_visibility"] = broken
    results = MLPGSolver.solve(model, setup)
    
    # 2. Recover strain/stress; evaluate nodal criterion field
    strain, stress = SPR-C_recovery(results)
    C = evaluate_criterion_field(settings, nodes, strain, stress)  # (N,)
    
    # 2b. Suppress spurious criterion at fully-isolated nodes (Fix 2)
    iso = results.solver_context["isolated_nodes"]
    if iso: C[iso] = 0.0
    
    # 3. Edge criterion over candidate edges
    if connected_growth and broken.n_cut_edges > 0:
        # forward-advancing intact edges, grouped per crack-tip vertex
        by_tip = broken.forward_edges_by_tip(C)
        if not active_tip_locked:  # lock onto the strongest tip ONCE
            active_tip = argmax_tip(by_tip) ; active_tip_locked = True
        edge_crits = by_tip.get(active_tip, {})  # arrest if tip blocked
    else:
        # seed iteration (k=0): break the GLOBAL worst intact edge
        edge_crits = broken.evaluate_edge_criterion(C, mode="max")
    
    # 4. Check stopping: nominal loads safe / front arrested
    if not edge_crits: stop("crack front cannot advance"); break
    C_max = max(edge_crits.values())
    if C_max ≤ threshold:
        stop("nominal loads safe"); break
    
    # 5. Load scale factor (post-processing)
    λ = sqrt(threshold / C_max)  # energy (ASED): λ²·C = threshold
    λ = threshold / C_max      # stress criteria (linear)
    
    # 6. Break worst candidate edge (one per iteration, irreversible)
    (i*, j*) = argmax edge_crits
    broken.break_edge(i*, j*)
    
    # 6b. Advance the locked front to its new free end (Fix 1)
    if connected_growth and active_tip is not None:
        vv = broken.ridge_vertices_of(i*, j*)
        active_tip = (the endpoint of vv that is not the old active_tip)
    
    record StaticCrackStep(broken_edge=(i*,j*), load_scale=λ, …)
    
    if λ ≥ 0.999: stop("reached nominal load"); break

return StaticCrackHistory(steps, broken_edge_connectivity=broken)

4.4 Stopping conditions

ConditionReason string
All edge criteria below threshold"nominal loads safe"
λ ≥ 0.999 (edge failed at ~full load)"reached nominal load level"
No intact Delaunay edges remain"no intact Delaunay edges remain"
Locked front has no forward candidate (connected growth)"crack front cannot advance without enclosing material"
max_iterations reached"max iterations reached"
One edge per iteration: breaking only the worst edge at each step gives the most accurate load redistribution. Breaking multiple edges simultaneously (as in parallel cohesive-zone models) can produce a less physically meaningful path and is not supported.

4.5 Crack-Aware Strain and Stress Recovery

Before this Phase-2 addition, strain and stress recovery (compute_nodal_strain() in results_strain_recovery.py) used the full nodal support regardless of the crack state, causing the MLS gradient fit to compute derivatives across the crack. The symptom was a spurious, growing stress at crack-isolated nodes: as the crack opens wider over successive iterations, the apparent displacement gradient across the gap increases, producing a fictitious stress field at damaged nodes.

The fix propagates the crack_visibility object into compute_nodal_strain(crack_visibility=...) and applies two filters:

  1. Gauss-point stage (Stage 2): for each Gauss-point xg, candidate support nodes are filtered via filter_support_from_point(x_g, candidates) before MLS shape functions are evaluated. If fewer than min_supp (3 for linear basis, 6 for quadratic) nodes remain visible, the Gauss point is skipped entirely.
  2. Node recovery stage (Stage 3): gathered Gauss-point samples are additionally filtered: any sample xg for which segment_crosses_crack(nodes[i], x_g) returns True is discarded from the patch of node i. If the remaining visible support is smaller than min_supp, the node is considered crack-isolated and its strain is forced to zero (strain[i] = 0).
Physical justification: a node from which all Voronoi neighbours are severed receives no load transfer and is pinned to zero displacement by the assembler (Section 4.6). Its strain field is therefore physically zero, and any non-zero result would be a numerical artefact of the MLS interpolation across the open crack gap.
Backward compatibility: when crack_visibility=None (no crack active), the function follows the identical code path as before — the results are byte-for-byte identical to the pre-Phase-2 implementation.

4.6 Isolated Node Handling: Dead-DOF Pinning

As crack propagation advances, one or more nodes may become fully isolated: all their Voronoi-Delaunay neighbours have been cut by broken edges, so every row and column of K corresponding to those nodes is identically zero after assembly. A stiffness matrix with zero rows is exactly singular; the linear solve fails with MatrixRankWarning.

GearMaster handles this in two layers:

  1. Tikhonov regularisation (pre-existing): applied when |K[k,k]| < 10−14 max|diag(K)|. Adds 10−8 max|diag(K)| to K[k,k]. Sufficient for nearly-degenerate DOFs (off-diagonal entries are still nonzero).
  2. Direct dead-DOF pinning (Phase-2 addition): when K[k,k] is zero and the entire row of K is zero (all off-diagonal entries are also zero), the DOF is classified as fully dead. In this case:
    K[k,k] ← Kscale = max|diag(K)|
    f[k] ← 0
    This is identical to a hard Dirichlet BC: it imposes u[k] = 0 and is physically correct because a fully isolated node receives no load transfer and its displacement is arbitrary in the LEFM sense.
Why Tikhonov alone is insufficient: Tikhonov adds a small value to K[k,k] but the off-diagonal coupling terms remain zero, so the row still effectively reads "Ksmall ⋅ u[k] = 0" which forces u[k] ≈ 0 but with poor conditioning. For K matrices with condition numbers already near 1012–1014 (typical for MLPG5 with direct BC), this is not sufficient to prevent numerical singularity.

The solver emits a WARNING log entry identifying the pinned node indices whenever dead-DOF pinning is applied, visible in the Solver Log tab.

4.6.1 Exposing isolated nodes to the propagator New

Dead-DOF pinning makes the linear solve robust, but the propagator still needs to know which nodes were pinned so that it does not treat their (numerically arbitrary) recovered stress as a real driving force. After pinning, MLPGSolver.solve() collects the unique node indices of all pinned DOFs and publishes them in the solver context:

results.solver_context["isolated_nodes"] = unique(dead_dof_idx // 2)

The static crack propagator reads this list right after building the criterion field (step 2b of the algorithm in Section 4.3) and forces C[isolated_nodes] = 0. This prevents an isolated node — whose poorly conditioned solve can yield a large spurious stress — from dominating C_max, collapsing the load scale λ, and producing a false “hot spot” or a back-propagating crack. When no node is isolated the list is empty and the criterion field is untouched.

4.7 Single Persistent Crack Front (Connected Growth) New

With connected_growth=True (the default) the crack is required to grow as a single, geometrically contiguous front rather than nucleating new branches anywhere the criterion happens to peak. Earlier revisions enforced contiguity only on a per-iteration basis: at every step they re-selected the instantaneously strongest crack-tip vertex. Because the very first (seed) edge has two free ends, the selection flip-flopped between them across iterations, producing two diverging branches — the “double crack” and the apparent backward growth observed in practice.

The current implementation keeps a persistent active front:

  1. On the first iteration in which broken edges exist, the propagator calls forward_edges_by_tip(C) — which groups the forward-advancing intact edges by their crack-tip vertex (a Voronoi vertex touched by exactly one broken ridge) — and locks active_tip onto the tip whose best edge has the highest criterion. The lock is set once and never re-evaluated.
  2. On every subsequent iteration only the edges of active_tip are considered candidates. If that tip can no longer advance (it is enclosed by already-broken or boundary ridges), edge_crits is empty and the crack arrests with reason "crack front cannot advance without enclosing material" — it does not jump to the other seed end.
  3. After breaking edge (i*, j*), the front advances to its new free end: ridge_vertices_of(i*, j*) returns the two Voronoi endpoints of the broken ridge, and active_tip is set to whichever endpoint is not the old active tip (a negative index means the boundary was reached and the front terminates).
Helper (BrokenEdgeConnectivity)Returns
forward_edges_by_tip(C){tip_vertex: {edge_key: ahead_criterion}} — only intact edges with exactly one fresh (non-crack) endpoint that advance the front away from the tip.
forward_candidate_edges(C, single_front=True)Convenience wrapper: the edge dict of the single strongest tip (True) or the union over all tips (False).
ridge_vertices_of(i, j)The two Voronoi-vertex indices of broken ridge (i,j), or None if the pair is not a Delaunay edge.
crack_front_tip_vertices()Voronoi vertices lying on exactly one broken ridge (the free ends of the crack).
Seed step. On iteration 0 there are no broken edges yet, so there is no front to lock onto; the propagator breaks the global worst intact edge to nucleate the crack. The persistent-front logic engages from the first broken edge onward.

After the solver finishes, the SolverEditor automatically adds the Linear Static Crack Path result item in the Results tree.

Visual encoding:

Stats tree: the solution tree shows:

Approximation scope: this is a linear-elastic, quasi-static, coarse-grained estimate of the crack path. The path depends on the Delaunay connectivity of the point cloud (which is mesh-dependent) and the criterion aggregation rule. It provides a topologically consistent, physically motivated path at low computational cost. For critical applications, the result should be validated against refined meshes or experimental data.

6. Configuration: CrackSettings

ParameterTypeDefaultDescription
modestr"static_path""static_path": Linear Static Crack Path (this section). "polyline": legacy iterative polyline propagation (Section 7).
criterionstr"sed"Criterion field: "sed", "von_mises", "max_principal"
thresholdfloatrequiredCriterion value above which an edge is considered critical [MPa or same units as criterion]
r0_mmfloat0.28ASED control radius [mm] — used only when criterion="sed"
max_iterationsint50Maximum number of edge-breaking iterations
connected_growthboolTrueEnforce a single, contiguous, persistent crack front (Section 4.7). When False the worst global edge breaks each step (multi-site nucleation).
crack_modelstr"visibility""visibility": embedded crack via support filtering (Level A, current). "duplication": geometric free-surface model (Level B, reserved — not yet implemented).
visibility_methodstr"binary""binary": hard line-of-sight cut. "diffraction": smooth stiffness reduction around the tip (Organ et al. 1996).
diffraction_lambdafloat2.0Diffraction exponent — used only when visibility_method="diffraction". Higher values sharpen the transition near the tip.
da_factorfloat1.5(Legacy, ignored by static_path mode) Step-length multiplier
constrain_to_existing_nodesboolTrue(Legacy, ignored by static_path mode) Snap tip to nearest node
min_crack_lengthfloat∞(Legacy, ignored by static_path mode) Minimum crack length [mm]

6.1 Crack model: Visibility vs. Duplication New

The crack_model setting (Solver editor → Crack model drop-down) selects how the broken edges modify the discrete problem. Two strategies are foreseen; only the first is implemented today.

ModelMechanismStatus
Visibility
("visibility")
The crack is embedded: nodes separated by a broken ridge simply stop seeing each other, so their mutual stiffness is removed (support filtering, Sections 2–4). The node set and the Voronoi cells are unchanged. Default — Level A (active)
Duplication
("duplication")
The crack becomes a true geometric free surface: nodes on the crack are duplicated into independent upper/lower copies with their own DOFs, and the Voronoi test cells are re-clipped against the crack line. Each flank then carries its own displacement field exactly like a pre-slit CAD body. Reserved — Level B (disabled in the GUI, not yet implemented)
Why two models? The visibility model is a robust, low-cost approximation: it suppresses cross-crack load transfer but the two flanks still share node positions and partially overlapping cells, so the open crack is only “half” geometric. A genuinely pre-fractured geometry — a real slit in the CAD — already produces the correct tip concentration and fully unloaded flanks without any special algorithm, because the slit is an actual boundary with independent DOFs. The Duplication model brings that geometric fidelity inside the solver.
Roadmap (fracture as geometry).

7. Legacy Polyline Propagation  Legacy / mode="polyline"

The original crack propagation algorithm (Phase 1) represents the crack as an immutable ordered polyline Crack2D and grows it step by step using a geometry-based visibility criterion.

7.1 Crack geometry: Crack2D

P = [ p0 , p1 , … , pM ]    (mouth at p0, tip at pM)

The class is immutable: extend(da, θ) returns a new instance. Segment intersection uses a cross-product test with endpoint-touch exclusion.

7.2 Visibility: VoronoiCrackConnectivity

Cut edges are detected by testing each Delaunay edge (I,J) against all crack segments (crack.intersects_segment(x_I, x_J)). BFS on the residual graph computes the N×N reachability matrix. See Belytschko et al. (1994).

7.3 Propagation loop (CrackPropagator)

crack = None
for iter = 0 … max_iterations:
    setup["_crack"] = crack
    results = MLPGSolver.solve(model, setup)
    C = evaluate_criterion_field(settings, …)
    if C.max() ≤ threshold: stop
    critical_node = argmax(C)  # or tip-neighbourhood node
    θ* = atan2(τxy, (σxx−σyy)/2) / 2 + π/2  # MTS criterion
    da = da_factor × median_nn_spacing(tip)
    crack = crack.extend(da, θ*)
return CrackHistory

7.4 Stopping conditions

ConditionReason string
Criterion below threshold at step 0"no initiation"
Criterion below threshold at step k > 0"crack arrested"
Tip outside domain bounding box"crack tip exited domain boundary"
Crack length ≥ min_crack_length"target length reached"
max_iterations reached"maximum iterations reached"

8. Comparison of the Two Modes

Property Static Crack Path (static_path) Polyline Propagation (polyline)
Crack representationSet of broken Voronoi edges (graph topology)Ordered polyline Crack2D
Direction criterionImplicit (follows stiffest path via Delaunay topology)Explicit MTS direction θ* per step
Load scalingYes — λ = threshold / C_max per stepNo — full nominal load at every step
Mesh dependencyPath follows Delaunay edges (mesh-dependent, reproducible)Path tip can land anywhere (snapped to nearest node)
Physical basisCohesive-zone progressive damage (Camacho & Ortiz 1996)LEFM propagation direction (Erdogan & Sih 1963)
Post-processing resultLinear Static Crack Path (red broken edges)Criterion Field, polyline overlay, tip marker
Recommended forFatigue path estimation, weld toes, notchesFracture mechanics research, strong Mode I

9. References

h1 { color: #1a3a5c; border-bottom: 2px solid #1a3a5c; padding-bottom: 0.3em; } h2 { color: #2a5a8c; margin-top: 2em; } h3 { color: #3a6a9c; } nav { margin-bottom: 2em; font-size: 0.9em; color: #666; } .note { background: #eef4ff; border-left: 4px solid #2a5a8c; padding: 0.8em 1.2em; margin: 1.5em 0; border-radius: 0 4px 4px 0; } .warning { background: #fff3e8; border-left: 4px solid #b35c00; padding: 0.8em 1.2em; margin: 1.5em 0; border-radius: 0 4px 4px 0; } .future { background: #f3ffe8; border-left: 4px solid #3a8c3a; padding: 0.8em 1.2em; margin: 1.5em 0; border-radius: 0 4px 4px 0; } .formula { background: #f8f8f8; border: 1px solid #ddd; padding: 0.7em 1.2em; margin: 1em 0; border-radius: 4px; font-style: italic; } .formula-block { background: #f8f8f8; border: 1px solid #ddd; padding: 1em 1.4em; margin: 1em 0; border-radius: 4px; font-size: 1.05em; line-height: 1.9; } code { background: #f0f0f0; padding: 0.1em 0.4em; border-radius: 3px; font-size: 0.93em; } table { border-collapse: collapse; width: 100%; margin: 1.5em 0; } th { background: #1a3a5c; color: white; padding: 0.6em 1em; text-align: left; } td { padding: 0.5em 1em; border-bottom: 1px solid #ddd; vertical-align: top; } tr:nth-child(even) td { background: #f4f7fb; } ul li, ol li { margin-bottom: 0.4em; } footer { margin-top: 3em; border-top: 1px solid #ccc; padding-top: 1em; font-size: 0.85em; color: #666; } .algorithm { background: #fafafa; border: 1px solid #bbb; border-radius: 5px; padding: 0.7em 1.3em; margin: 1em 0; font-family: monospace; font-size: 0.93em; line-height: 1.6; }

Fracture and Crack Propagation

Implemented in: crack.py, crack_visibility.py, crack_criterion.py, crack_propagator.py (all under GM_modules/Meshfree/src/solver/).
Assembly hook: mlpg/assembler.py — assemble_stiffness_voronoi().
Top-level entry point: mlpg/mlpg_solver.py — solve_with_crack_propagation().

1. Overview and Motivation

In meshfree methods the absence of a fixed mesh is a natural advantage for fracture mechanics: no remeshing is required as the crack grows. Instead, the crack is treated as an internal boundary that modifies the visibility between integration points and nodes — nodes that are not in each other's line of sight across the crack contribute zero (or reduced) stiffness to one another.

GearMaster implements a 2D quasi-static crack propagation loop in which:

  1. The domain is solved with the current crack geometry (or with no crack on the first step).
  2. A damage criterion field is evaluated at all nodes (ASED, Von Mises stress, or max principal stress).
  3. If the criterion exceeds a user-defined threshold, the crack advances toward the direction perpendicular to the maximum principal stress.
  4. The loop repeats until the crack arrests, exits the domain, or a maximum number of iterations is reached.
Scope: Phase 1 of the implementation covers linear elastic fracture mechanics (LEFM) under the assumption of quasi-static loading and small deformations. Plasticity, cohesive zones, and dynamic fracture are out of scope for this phase.

2. Crack Geometry: Crack2D

The crack is represented as an ordered polyline of 2D points, stored in crack.py as an immutable Python class:

Crack polyline:
P = [ p0 , p1 , … , pM ]    (mouth at p0, crack tip at pM)

Each consecutive pair (pi, pi+1) is one crack segment. The degenerate case M = 1 (two points = straight crack) is fully supported.

The class is immutable: calling extend(da, θ) returns a new Crack2D instance with an extra tip vertex at distance da from the previous tip, in direction θ. This makes it safe to store all intermediate crack states in CrackHistory without defensive copying.

Segment intersection test

The method intersects_segment(p0, p1) checks whether the line segment [p0, p1] crosses any crack segment. The test uses a robust cross-product intersection algorithm and excludes exact endpoint-on-endpoint touches (so that elements at the crack mouth or tip are not falsely cut).

Two segments [A,B] and [C,D] intersect if and only if:
sign( (B-A) × (C-A) ) ≠ sign( (B-A) × (D-A) )    and    sign( (D-C) × (A-C) ) ≠ sign( (D-C) × (B-C) )

where × denotes the 2D scalar cross product and strict inequalities are used to exclude endpoint-touching configurations (with a small tolerance).

3. Visibility Criterion

The visibility criterion, introduced by Belytschko et al. (1994), states that two points xI and xJ interact (are mutually visible) if and only if the straight-line segment connecting them does not cross the crack.

xI and xJ are visible   ⇔   intersects_segment(xI, xJ) = False

In GearMaster two implementations of this criterion are provided, selected automatically by the factory function build_crack_visibility(nodes, crack, assembly):

3.1 Voronoi-edge strategy (default for assembly="voronoi")

Implemented in VoronoiCrackConnectivity (file: crack_visibility.py).

The key insight is that the Voronoi subdomains used by MLPG5 are the dual of the Delaunay triangulation of the node set. Two nodes I and J share a Voronoi edge precisely when they share a Delaunay edge. If the crack crosses that Delaunay edge, the Voronoi segment between I and J is removed from the stiffness integral.

Algorithm

1. Build the Delaunay triangulation of the node set (scipy.spatial.Delaunay).
2. For each Delaunay edge (I, J): test if any crack segment intersects the edge midpoint segment.
   If yes → mark edge (I, J) as cut.
3. Build a residual graph: all Delaunay edges except cut ones.
4. Run BFS (breadth-first search) from every node to compute connected components.
5. Two nodes are visible iff they belong to the same connected component.

The BFS approach correctly handles second- and third-ring neighbours: even if the direct edge I→J is not cut, but the crack separates their neighbourhoods, BFS finds the correct reachability.

Complexity: O(N log N) for Delaunay triangulation + O(N + E) for BFS, where E is the number of Delaunay edges. For a regular grid with N nodes, E ≈ 3N. The pre-computation is done once per propagation step, before stiffness assembly.

Integration with assemble_stiffness_voronoi()

Inside the main assembly loop, two visibility checks are performed:

  1. Segment-level check: for each Voronoi edge (integration segment) between node I and its Delaunay neighbour J, if voronoi_edge_is_cut(I, J) returns True, the entire segment is skipped (its contribution to K is set to zero).
  2. Support-level filter: after MLS shape function evaluation, hidden support nodes are removed via filter_support(I, supp) before accumulating stiffness contributions. This ensures that even globally-invisible nodes (reached only through cut paths) are excluded.
Current limitation (Phase 1): when a Voronoi segment is cut, the entire segment is discarded. A more accurate approach would split the segment at the crack–edge intersection point and integrate only the visible half. This partial-segment integration is planned for Phase 2 and is already documented in the assemble_stiffness_voronoi() docstring.

3.2 Gauss-point strategy (fallback for all other assembly modes)

Implemented in GaussPointVisibility. For each Gauss integration point xg, a support node xJ is excluded if the segment [xg, xJ] crosses any crack segment. This is the classic approach of Belytschko et al. (1994) and requires no pre-computation, but is applied per-Gauss-point and is therefore slightly more expensive for large point clouds.

4. Crack Initiation and Propagation Criteria

Implemented in crack_criterion.py. The user configures a CrackSettings dataclass specifying which criterion to use, the threshold value, and propagation parameters.

4.1 Available criterion fields

Key Field Typical use
"sed" Averaged Strain Energy Density (ASED), Lazzarin-Berto method with control radius R0 Weld joints, notches (default)
"von_mises" Von Mises equivalent stress σVM General ductile-like initiation
"max_principal" Maximum principal stress σ1 Brittle initiation, mode-I dominated

4.2 Initiation: finding the critical node

The critical node is the argmax of the criterion field among all nodes satisfying:

  1. field[i] ≥ threshold
  2. Node i is not already inside the existing crack exclusion zone (within exclusion_radius = R0 from any crack point).

If no node exceeds the threshold, the loop stops with reason "no initiation" (first step) or "crack arrested" (subsequent steps).

4.3 Propagation direction (MTS simplified)

GearMaster uses the Maximum Tensile Stress (MTS) criterion in its simplified stress-based form. Given the stress state at the crack tip node (σxx, σyy, τxy):

α = ½ · atan2( 2τxy , σxx − σyy )       θ* = α + π/2

The crack propagates in direction θ* (radians from +x axis), which is perpendicular to the maximum principal stress.

Phase 2 (planned): exact MTS criterion using stress intensity factors KI and KII extracted from a J-integral domain integral around the crack tip. The propagation angle would then be:
θ* = 2 · atan &left;( KI − √( KI2 + 8 KII2 ) ) / (4 KII) &right;
This requires implementing a domain J-integral evaluator (Shih & Asaro, 1988) on the meshfree point cloud.

4.4 Step length

The step length da is chosen adaptively as:

da = da_factor · median( ||xI − xk|| , k ∈ k-nearest neighbours )

where da_factor = 1.5 by default and the median is over the 8 nearest neighbours of the current tip node. This ensures the step is proportional to the local node density.

5. Propagation Loop: CrackPropagator

The iterative loop is implemented in crack_propagator.py. The top-level entry point is solve_with_crack_propagation() in mlpg_solver.py.

history = CrackHistory()
crack = None             # no crack on step 0

for iter in range(max_iterations):
    inject crack into solver_settings["_crack"]
    results = solver.solve(model, setup)    # solve with current crack
    strain, stress = SPR-C recovery(results)
    field = evaluate_criterion_field(settings, nodes, strain, stress)
    critical_node = find_initiation_node(field, threshold, crack, nodes)
    if critical_node is None → stop ("no initiation" or "crack arrested")
    if crack is None:
        crack = Crack2D([nodes[critical_node], nodes[critical_node]])  # init
    theta = compute_propagation_direction(stress, critical_node)
    da = compute_da(nodes, critical_node, da_factor)
    crack = crack.extend(da, theta)         # immutable extend
    history.append(CrackStep(...))
    if stop_condition_met → break

return history

Stopping conditions

Condition Reason string
Criterion field below threshold on first step"no initiation"
Criterion field below threshold on subsequent step"crack arrested"
Crack length ≥ min_crack_length"target length reached"
Crack tip outside the convex hull of the domain"crack tip exited domain boundary"
Reached max_iterations"maximum iterations reached"

6. Crack Injection Mechanism

To avoid modifying the public API of MLPGSolver.solve(), the crack geometry is passed via the solver settings dictionary:

setup.solver_settings["_crack"] = crack

Inside solve(), the key "_crack" is read and used to instantiate the appropriate visibility object. The key is consumed internally and does not appear in the output results.

7. Configuration: CrackSettings

ParameterTypeDefaultDescription
criterionstr"sed"Criterion field: "sed", "von_mises", "max_principal"
thresholdfloatrequiredCriterion value above which a node is considered critical [same units as the field]
r0_mmfloat0.28ASED control radius [mm] — only used when criterion="sed"
da_factorfloat1.5Step-length multiplier relative to local nodal spacing
max_iterationsint50Maximum number of propagation steps
min_crack_lengthfloat∞Stop when crack total length exceeds this value [mm]
constrain_to_existing_nodesboolTrueSnap each new crack tip to the nearest existing node

8. References