Skip to content
Agentmart
Submit a tool

mat-phase-field-non-conservative

Simulate non-conservative phase-fields (grain growth and phase transformations) using the Allen-Cahn equation.

Skill by learningmatter-mit

IndexedMIT★ 183
Write a review

Chalk Labs

Need help deploying mat-phase-field-non-conservative?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/learningmatter-mit-mat-phase-field-non-conservative

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Simulate non-conservative phase-fields (grain growth and phase transformations) using the Allen-Cahn equation.

Use cases: marketing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mat-phase-field-non-conservative

What's inside

Skill name
mat-phase-field-non-conservative
Description
Simulate non-conservative phase-fields (grain growth and phase transformations) using the Allen-Cahn equation.
License
MIT
Instructions
61 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (8)

  • SKILL.md
  • README.md · examples/benchmark-dendrite/
  • dendrite.gif · examples/benchmark-dendrite/
  • README.md · examples/benchmark-grain/
  • grain_growth.gif · examples/benchmark-grain/
  • grain_growth_area_decay.png · examples/benchmark-grain/
  • run_dendrite_growth.py · scripts/
  • run_grain_growth.py · scripts/

SKILL.md (first lines)

# Non-Conservative Phase-Field: Allen-Cahn

## Goal
To simulate the morphological evolution of structural transformations (like solidification, melting, or curvature-driven grain growth) using the Allen-Cahn (time-dependent Ginzburg-Landau) equation. This tracks a non-conservative order parameter $\phi$ which distinguishes between phases (e.g., solid vs. liquid).

## Instructions

### 1. Mathematical Formulation
The Allen-Cahn equation describes the evolution of a non-conserved order parameter $\phi$ down a free energy gradient:
$$ \frac{\partial \phi}{\partial t} = -M \frac{\delta F}{\delta \phi} = M \left( \epsilon^2 \nabla^2 \phi - \frac{\partial f(\phi)}{\partial \phi} \right) $$
Where $M$ is the mobility, $\epsilon$ is the gradient energy coefficient controlling the interface thickness, and $f(\phi) = W \phi^2(1-\phi)^2$ is the double-well potential barrier between the two phases ($\phi=0$ and $\phi=1$).

Unlike Cahn-Hilliard, Allen-Cahn does not conserve the integral of $\phi$. It naturally drives systems to reduce their total interfacial area, resulting in curvature-driven boundary migration.

### 2. Running Curvature-Driven Grain Growth
Use the provided script to set up a 2D grid containing a circular solid grain in a liquid matrix and observe its capillarity-driven shrinkage.

```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/run_grain_growth.py \
    --grid-size 100 \
    --radius 30 \
    --steps 200 \
    --dt 0.1 \
    --output grain_growth.gif
```

**Parameters:**
- `--grid-size`: Number of grid points per dimension (e.g., `100` for a 100x100 2D grid).
- `--radius`: Initial radius of the circular grain in grid units.
- `--steps`: Total number of time steps to run.
- `--dt`: Time step size.
- `--output`: Filepath to save the resulting `.gif` animation or `.png`.

## Examples

### Classic Shrinking Circular Grain
A universal mathematical benchmark for the Allen-Cahn equation is proving that a circular domain shrinks at a rate proportional to its curvature (the $v = M \gamma K$ law). The area of the circle must decrease linearly with time.

```bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/run_grain_growth.py \
    --grid-size 100 \
    --radius 35 \
    --steps 300 \
    --dt 0.5 \
    --output examples/benchmark-grain/classic_shrinking_grain.gif
```

See the `examples/benchmark-grain/README.md` for the expected output.

## Constraints
- **Environments**: Scripts require the `cpu` environment. **Each code block MUST specify the environment.**
- **Interface Thickness**: The spatial resolution `dx` must be small enough to resolve the diffuse interface (typically requiring at least 4-5 grid points across the interface controlled by $\epsilon$).

## References
- Allen, S. M., & Cahn, J. W., "A macroscopic theory for antiphase boundary motion and its application to antiphase domain coarsening", *Acta Metallurgica*, 1979. [DOI](https://doi.org/10.1016/0001-6160(79)90196-2)

---

**Author:** Bowen Deng

From learningmatter-mit/AtomisticSkills, MIT.

More from learningmatter-mit/AtomisticSkills

Signals

Stars
183
Forks
31
Open issues
0
Last commit (this folder)
Oct 5, 2026 (1 month ago)
Last release
Oct 6, 2026 (29 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from learningmatter-mit

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get mat-phase-field-non-conservative running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying mat-phase-field-non-conservative?

CallGet help
Cite this page

mat-phase-field-non-conservative skill. Agent Mart. https://agentmart.dev/skills/learningmatter-mit-mat-phase-field-non-conservative (last updated 2026-10-24)