{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "from pycalphad import Database, equilibrium, Model, binplot\n", "import pycalphad.variables as v" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Components: AL PT VA\n", "Phases: AL3NI2 BCC_B2 FCC_L12 LIQUID PT2AL PT2AL3 PT5AL21 PT5AL3 PT8AL21 [done]\n", "Computing initial grid [291 points, 38.5KB]\n", "Computing convex hull [iteration 1]\n", "progress 167048.44641283673\n", "Refining convex hull\n", "Rebuilding grid [299 points, 39.6KB]\n", "Computing convex hull [iteration 2]\n", "progress 0.0\n", "Convergence achieved\n", "CPU times: user 24.8 s, sys: 16 ms, total: 24.9 s\n", "Wall time: 24.8 s\n", "\n", "Dimensions: (T: 1, X_AL: 1, component: 2, internal_dof: 9, vertex: 2)\n", "Coordinates:\n", " * T (T) float64 1.2e+03\n", " * X_AL (X_AL) float64 0.4\n", " * vertex (vertex) int64 0 1\n", " * component (component) object 'AL' 'PT'\n", " * internal_dof (internal_dof) int64 0 1 2 3 4 5 6 7 8\n", "Data variables:\n", " GM (T, X_AL) float64 -1.469e+05\n", " MU (T, X_AL, component) float64 -1.67e+05 -1.335e+05\n", " NP (T, X_AL, vertex) float64 0.2 0.8\n", " X (T, X_AL, vertex, component) float64 0.5 0.5 0.375 0.625\n", " Y (T, X_AL, vertex, internal_dof) float64 1.0 0.0 1.0 0.0 ...\n", " Phase (T, X_AL, vertex) object 'FCC_L12' 'PT5AL3'\n", "Attributes:\n", " iterations: 2\n" ] } ], "source": [ "db_alpt = Database('alpt_2015.tdb')\n", "my_phases_alpt = ['PT2AL', 'PT5AL21', 'PT5AL3', 'LIQUID', 'AL3NI2', 'PT8AL21', 'PT2AL3', 'FCC_L12', 'BCC_B2']\n", "%time eq = equilibrium(db_alpt, ['AL', 'PT', 'VA'] , my_phases_alpt, {v.X('AL'):0.4, v.T:1200})\n", "print(eq)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }