fracture-mechanics
Skill38 starsChanged 5 months agoApache-2.0View on GitHub
Run parameterized 2D lattice fracture simulations from the Fracture and Mechanics notebook as offline artifacts. Use when asked to simulate a pre-cracked triangular lattice, Mode I tension, Mode II shear, Morse/Lennard-Jones/MLIP pair potentials, temperature effects, strain-rate effects, crack propagation, stress-strain curves, or fracture movies. Produces an animated movie, stress-strain plot, final lattice image, CSV data, JSON run metrics, and README by running a bundled Python script.
In this repository9 other files it gives its agents.
- beam-mechanicsSkill
- chladni-platesSkill
- d3-vizSkill
- hierarchical-topoptSkill
- networkxSkill
- pymatgenSkill
- rdkitSkill
- seabornSkill
- torchsimSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 3 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run a 2D triangular-lattice fracture simulation with a sharp edge pre-crack, moving grip boundaries, and a vectorized bond network with …
- Very specific: line 17
Create or use an output directory, usually skill_output_<timestamp>_fracture-mechanics.
- Very specific: line 18
Run scripts/run_fracture_sim.py with either the defaults or the user's selected parameters.
- Very specific: line 19
Use --steps 10000 for final fracture-producing runs unless the user explicitly asks for a quick smoke test.
- Very specific: line 21
Use the default high-quality movie settings, --frames 48 --dpi 120 --movie-fps 16, unless a server-side timeout requires the fallback …
- Very specific: line 25
Run the simulation as its own shell command.
- Very specific: line 27
Verify the artifacts with find in a separate shell call after the simulation succeeds.
- Distinctive: line 64
Use these options when the user asks for specific settings:
- Very specific: line 120
If the user requests a larger exact run, such as steps 30000, nx 128, ny 48, or max-atoms 50000, first decide whether exact parameters are …
- Distinctive: line 124
If exact parameters are required, do not claim the agent shell completed the run.
- Very specific: line 127
If the user mainly wants artifacts, run the timeout fallback profile while preserving the requested physics choices where possible: …
- Very specific: line 133
If a command times out, do not end with failure if a fallback artifact can still be produced.
- Very specific: line 237
If fracture_movie.gif is missing, report fracture_movie.html and the frames/ directory as the movie output.
- Very specific: line 247
If the shell tool times out after partial frames, rerun the same physics with --frames 16 --dpi 90.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fracture Mechanics
Run a 2D triangular-lattice fracture simulation with a sharp edge pre-crack, moving grip boundaries, and a vectorized bond network with permanent stretch-based bond breaking. Always use the bundled script; do not rewrite the simulation from scratch.
Required Workflow
- Create or use an output directory, usually
skill_output_<timestamp>_fracture-mechanics. - Run
scripts/run_fracture_sim.pywith either the defaults or the user's selected parameters. Use--steps 10000for final fracture-producing runs unless the user explicitly asks for a quick smoke test. - Use the default high-quality movie settings,
--frames 48 --dpi 120 --movie-fps 16, unless a server-side timeout requires the fallback--frames 16 --dpi 90. The renderer uses fixed slab bounds, fixed stress-strain axes, and a fixed color scale across frames to prevent movie flicker. - Run the simulation as its own shell command. Do not chain
findorcat summary.jsonafter the long simulation command in the same shell call. - Verify the artifacts with
findin a separate shell call after the simulation succeeds. - Final answer must list exact artifact paths and mention the peak stress/strain from
summary.json.
Default command:
python3 skills/fracture-mechanics/scripts/run_fracture_sim.py \
--out skill_output_<timestamp>_fracture-mechanics \
--title "2D Lattice Fracture" \
--potential morse \
--mode I \
--orientation 90 \
--nx 96 \
--ny 36 \
--max-atoms 5000 \
--crack-length 0.30 \
--temperature 0.004 \
--strain-rate 0.003 \
--damping 0.30 \
--dt 0.005 \
--steps 10000 \
--frames 48 \
--dpi 120 \
--movie-fps 16 \
--bond-cutoff 1.35 \
--break-stretch 1.75 \
--color-by stressVerify:
find skill_output_<timestamp>_fracture-mechanics -maxdepth 2 -type f -printUser Parameters
Use these options when the user asks for specific settings:
--potential:morse,lj, ormlip.--mode:Ifor tension/opening,IIfor shear.--nx,--ny: lattice dimensions. Defaults are 96 x 36. Larger systems are clamped by--max-atoms.--max-atoms: safety clamp for local runs. Default 5000, maximum 40000.--orientation:0or90;90is default.--crack-length: edge crack length as a fraction of specimen width, 0.0-0.80.--temperature: initial kinetic temperature scale.--strain-rate: grip loading rate.--damping: viscous damping. Use0for near-NVE after loading; use 0.1-0.5 for stable visual demos.--dt: timestep.--steps: number of velocity-Verlet steps. Use 10000 for final fracture-producing runs.--frames: number of movie frames. Default 48 for a smoother GIF; use 16 only as a timeout fallback.--seed: deterministic random seed.--a0:autoor an explicit lattice spacing.--morse-a: Morse stiffness/brittleness. Lower values are tougher; higher values are more brittle.--morse-De,--morse-re: Morse energy and equilibrium distance.--lj-eps,--lj-sigma: Lennard-Jones parameters.--mlip-weights: optional JSON file withw,b_in,c, andb_outfor a neural pair potential.--bond-cutoff: initial bonded-neighbor cutoff in units ofa0; default 1.35.--break-stretch: permanently break bonds stretched past this multiple ofa0; default 1.75. Use lower values for more brittle movies and higher values for tougher response.--color-by:stress,pe,coordination,ke, orspeed.--movie-fps: GIF/HTML playback speed. Default 16.--dpi: figure and movie-frame resolution. Default 120; use 90 only as a timeout fallback.
Local Shell Timeout Policy
The local mistral.rs shell executor may stop a single shell call after about 30
seconds. The CLI --response-timeout controls the HTTP response wait, not the
per-shell-call runtime. Avoid sending a long simulation plus verification
commands in one shell call, because the timeout can prevent find and
summary.json inspection from running.
Local-safe final artifact profile:
nx <= 96
ny <= 36
max-atoms <= 5000
steps = 10000
frames = 48
dpi = 120Timeout fallback profile:
nx <= 96
ny <= 36
max-atoms <= 5000
steps = 10000
frames = 16
dpi = 90If the user requests a larger exact run, such as steps 30000, nx 128,
ny 48, or max-atoms 50000, first decide whether exact parameters are
required:
- If exact parameters are required, do not claim the agent shell completed the run. Explain that the exact run exceeds the per-shell-call limit and provide the direct command for the user to run in a normal terminal.
- If the user mainly wants artifacts, run the timeout fallback profile while
preserving the requested physics choices where possible: potential, mode,
orientation, crack length, temperature, strain rate, damping,
dt,bond-cutoff,break-stretch,color-by, and potential parameters. State explicitly which size/rendering/step parameters were reduced.
If a command times out, do not end with failure if a fallback artifact can still
be produced. Rerun with the timeout fallback profile, verify files with find,
read summary.json, and report the fallback results clearly.
Recommended Recipes
Brittle Mode I Fracture
python3 skills/fracture-mechanics/scripts/run_fracture_sim.py \
--out skill_output_<timestamp>_fracture-mechanics \
--title "Brittle Mode I Fracture" \
--potential morse \
--mode I \
--orientation 90 \
--morse-a 7.0 \
--temperature 0.002 \
--strain-rate 0.0035 \
--crack-length 0.34 \
--steps 10000 \
--frames 48 \
--dpi 120 \
--movie-fps 16 \
--break-stretch 1.65 \
--color-by stressTougher Morse Lattice
python3 skills/fracture-mechanics/scripts/run_fracture_sim.py \
--out skill_output_<timestamp>_fracture-mechanics \
--title "Tougher Morse Lattice" \
--potential morse \
--mode I \
--orientation 90 \
--morse-a 3.5 \
--temperature 0.006 \
--strain-rate 0.0025 \
--crack-length 0.25 \
--steps 10000 \
--frames 48 \
--dpi 120 \
--movie-fps 16 \
--break-stretch 2.05 \
--color-by coordinationMode II Shear
python3 skills/fracture-mechanics/scripts/run_fracture_sim.py \
--out skill_output_<timestamp>_fracture-mechanics \
--title "Mode II Shear Crack" \
--potential morse \
--mode II \
--orientation 90 \
--morse-a 5.0 \
--temperature 0.004 \
--strain-rate 0.003 \
--crack-length 0.30 \
--steps 10000 \
--frames 48 \
--dpi 120 \
--movie-fps 16 \
--break-stretch 1.80 \
--color-by speedLennard-Jones Comparison
python3 skills/fracture-mechanics/scripts/run_fracture_sim.py \
--out skill_output_<timestamp>_fracture-mechanics \
--title "Lennard-Jones Fracture Response" \
--potential lj \
--mode I \
--orientation 90 \
--lj-eps 1.0 \
--lj-sigma 0.90 \
--temperature 0.004 \
--strain-rate 0.003 \
--steps 10000 \
--frames 48 \
--dpi 120 \
--movie-fps 16 \
--break-stretch 1.85 \
--color-by peOutputs
The script writes:
fracture_movie.gif: animated fracture movie when Pillow GIF writing is available.fracture_movie.html: HTML fallback playback of rendered frames.frames/frame_*.png: individual movie frames.stress_strain.png: stress-strain plot.final_lattice.png: final atomistic lattice state.stress_strain.csv: step, strain, stress data.summary.json: peak stress, peak strain, final stress, final strain, atom count, and artifact names.parameters.json: exact input parameters and resolved lattice spacing.README.md: explanation and run summary.
If fracture_movie.gif is missing, report fracture_movie.html and the frames/
directory as the movie output. Do not claim success unless find lists the
movie or fallback, stress-strain plot, CSV, JSON run metrics, and README.
Notes
This is a simple fracture model for qualitative mechanism exploration and
artifact generation, not a calibrated predictor of a specific material. Runs
with fewer than 10000 steps are useful only for code smoke tests; do not present
them as final fracture results because the crack may not propagate visibly.
If the shell tool times out after partial frames, rerun the same physics with
--frames 16 --dpi 90; do not reduce --steps below 10000 for the final run.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

