Overview
The pycalphad Skill (K-Dense) belongs to the scientific-agent-skills collection. It provides workflow instructions and a bundled Python helper for using the upstream pycalphad package; it is neither the package itself nor an autonomous running agent. Its role is to guide finite-temperature CALPHAD equilibrium calculations for a specified bulk composition, pressure, and temperature list, with explicit database provenance and phase-selection decisions.
Inputs include a local thermodynamic TDB database and JSON settings defining components, candidate phases, elemental mole fractions, and conditions. The workflow requires exactly N-1 independent elemental fractions and a dependent non-vacancy element, rather than silently normalizing the composition. Outputs include report.json with settings, hashes, numerical checks, and baseline/refined results, plus phase-equilibria.csv containing stable composition sets and molar phase fractions. Separate vertices sharing a phase name are retained, supporting inspection of same-phase miscibility gaps.
The helper checks finite Gibbs energies, phase-fraction totals, reconstructed bulk composition, and sensitivity to increased phase-constitution sampling density. These checks assess numerical consistency, not experimental database accuracy or proof of a global minimum. The bundled ideal-cu-ni.tdb is a hypothetical teaching model, not an assessed Cu-Ni database. Real-alloy interpretation therefore requires an appropriate thermodynamic database and scrutiny of its license and assessed domain. The workflow describes equilibrium, not precipitation kinetics or retained metastable microstructures; specialized constraints and custom modeling fall outside the helper's documented scope.
Key Features
- Guides local TDB equilibrium calculations for one elemental bulk composition, one pressure, and an explicit finite-temperature list.
- Validates composition inputs and phase compatibility, including vacancy handling and conflicting order/disorder candidate selections.
- Compares baseline and increased-sampling calculations using mass balance, molar phase-fraction totals, and whole-system Gibbs energy checks.
- Exports report.json with database/settings hashes, requested and solver-imposed compositions, excluded phases, results, and visible failed checks.
- Exports phase-equilibria.csv with each stable composition set separately, preserving multiple vertices of the same phase in miscibility gaps.
- Includes a hypothetical Cu-Ni teaching database and configuration for evaluating the workflow without presenting them as real-material assessment data.
Use Cases
- Suggested evaluation: reproduce the hypothetical Cu-Ni example to inspect equilibrium outputs, lever-rule behavior, and numerical-check reporting.
- Suggested evaluation: examine equilibrium phase fractions over temperature for a user-supplied alloy database within its documented assessment domain.
- Suggested evaluation: inspect tie-line compositions and same-phase miscibility-gap vertices while checking reconstructed bulk composition.
- Suggested evaluation: document how deliberate phase exclusions affect a constrained equilibrium calculation, without interpreting it as a prediction of transformation kinetics.
How to Use
- Read the named Skill and locate its helper, settings template, teaching database, and validation reference in the collection. Follow the supplied environment requirements and execution example rather than inventing installation options.
- Establish your TDB's source, license, assessment, and applicable temperature, pressure, and composition ranges. Use the bundled hypothetical database only for teaching or workflow evaluation.
- Inspect components and phases, record exclusions, and prepare the settings with N-1 independent elemental mole fractions, a dependent element, temperatures in K, and pressure in Pa. Convert mass-based compositions beforehand.
- Run the documented local helper into a new output directory. Inspect report.json for phase-sum, mass-balance, sampling-sensitivity, and solver composition-adjustment checks; refine temperatures and sampling near transitions.
- Interpret phase-equilibria.csv using the phase-composition documentation. Report molar fractions, separate composition sets, database provenance, exclusions, and unresolved limitations. Its Gibbs energy column represents the whole system, not each individual phase.