Skip to content

pycalphad Phase Equilibria

Compute alloy phase fractions and compositions from TDB thermodynamic databases

Stars
55,780
Licence
MIT
Files
4 files

What it does

This skill teaches an AI agent to run thermodynamic equilibrium calculations for metal alloys using the pycalphad library and a CALPHAD-format database file (TDB). Given a composition, pressure, and list of temperatures, the agent runs a bundled script that reports which phases are stable, their molar fractions and compositions, and checks the results for mass balance and numerical stability. The skill also requires the agent to state the database source, excluded phases, and limitations of the result.

Great for

  • Materials scientists or students checking alloy phase stability over temperature sweeps
  • Engineers who want reproducible, scripted phase-fraction calculations with a documented database and settings
  • Developers building CALPHAD-based workflows who need a tested pycalphad example

Skip it if

  • Predicting precipitation kinetics, retained metastable microstructures, or properties of phases missing from the database, since the skill explicitly does not model these (equilibrium only)
  • Making real alloy design decisions with the bundled file: it is a hypothetical teaching model, not an assessed Cu-Ni database, and results need a licensed, validated database for real materials
  • Converting weight percentages automatically: the user must convert to mole fractions before using the helper

Try asking

  • “Calculate FCC and liquid phase fractions for a Cu-Ni alloy at 50 mole percent Ni between 900 K and 1300 K using my TDB file”
  • “Run an equilibrium temperature sweep at fixed composition and pressure and report the phase-fraction table with molar basis”
  • “Check whether a lever-rule phase-fraction result is consistent with the exported compositions and mass balance”
Step-by-step guide: how to use pycalphad Phase EquilibriaInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 4 original files, the MIT licence and an attribution note.

    pycalphad.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip pycalphad.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip pycalphad.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Use your own assessed TDB database with its declared temperature range for real alloys, and record its source and license; the bundled file is for teaching only.
  • Supply the composition as N-1 independent mole fractions and make sure the dependent fraction is correct, since fractions are not normalized automatically.
  • Use a new output directory for each run and review report.json checks, including failed ones, rather than assuming convergence.

What's inside

  • assets/equilibrium.json
  • references/model-and-validation.md
  • scripts/equilibrate.py
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.