Skip to content

fault_contact: docstrings describe the friction laws as they are - #1229

Open
lmoresi wants to merge 1 commit into
developmentfrom
docs/fault-friction-docstrings
Open

lmoresi wants to merge 1 commit into
developmentfrom
docs/fault-friction-docstrings

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Docstrings only, in src/underworld3/utilities/fault_contact.py.

  • Coulomb. CoulombFaultLaw and add_coulomb_fault_bc called a reaction-fed normal stress "the follow-up increment" / "the next increment". sigma_n="reaction" is already supported. They now say what it does: the no-opening constraint's per-node reaction, updated once per Newton iteration, strength clamped at zero, background added to either form, and the tensile-glue caveat with a pointer to fault_normal_traction.
  • Viscous. add_viscous_fault_bc and ViscousFaultLaw state the units: V is a slip rate (m/s), so eta_f is a viscosity per unit length (Pa s/m), the band limit eta_band / w with shear rate V/w.
  • Module header and SymbolicFaultLaw. The header described only frictionless contact and module-level entry points; it now lists the interface laws, the reaction-fed normal stress, and Stokes.add_fault_bc for the frictionless and viscous cases. SymbolicFaultLaw names all three symbols a law may use.

docs/advanced/split-node-faults.md already described the current behaviour; no change there.

Flagged, not changed (Charter section 6, solver capabilities): the Coulomb and rate-and-state laws are documented entry points as free functions (fault_contact.add_coulomb_fault_bc(stokes, ...)), while the Charter asks for a method on the solver; only frictionless and viscous go through Stokes.add_fault_bc.

Checked with py_compile; not rebuilt here (no pixi environment in this session). No overlap with open PRs: #1033 touches this file near _fault_pair_nodes_on only; #1228 (the transverse-isotropic docstring) does not touch it.

Underworld development team with AI support from Claude Code


Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)

  • I have read the Style Charter and followed it over the surrounding code (S2)
  • No drive-by refactors, renames, or "while I was here" cleanups (S9)
  • Bug fixes ship the regression test, written first, with level_* and tier_* markers (S8) — n/a, docstrings only
  • No hedging names (maybe_ / try_ / do_) and no commented-out code (S3, S4)
  • Every exception swallow states its sanctioned failure mode in a comment (S4) — n/a
  • New data access uses .array / mesh.X.coords (S7) — n/a
  • Parallel safety considered (S11) — n/a, no code change
  • No mesh entity or rank identified by coordinates (S12) — n/a
  • No pixi.toml / pixi.lock or other dependency changes
  • AI-assisted work carries the attribution line below

Underworld development team with AI support from Claude Code


Generated by Claude Code

The Coulomb docstrings still called a reaction-fed normal stress "the
next increment"; sigma_n="reaction" has been supported for some time.
They now say what it does: per-node reaction of the no-opening
constraint, updated once per Newton iteration, strength clamped at zero,
with background added to either form.

The viscous law states its units: V is a slip rate (m/s), so eta_f is a
viscosity per unit length (Pa s/m), the band limit eta_band / w.

The module header described only frictionless contact and module-level
entry points; it now lists the interface laws and points to
Stokes.add_fault_bc for the frictionless and viscous cases.

Docstrings only.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 18, 2026 08:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants