A Scheil-Gulliver simulation tool using pycalphad.

Overview

scheil

A Scheil-Gulliver simulation tool using pycalphad.

import matplotlib.pyplot as plt
from pycalphad import Database, variables as v
from scheil import simulate_scheil_solidification

# setup the simulation parameters
dbf = Database('alzn_mey.tdb')
comps = ['AL', 'ZN', 'VA']
phases = sorted(dbf.phases.keys())

liquid_phase_name = 'LIQUID'
initial_composition = {v.X('ZN'): 0.3}
start_temperature = 850

# perform the simulation
sol_res = simulate_scheil_solidification(dbf, comps, phases, initial_composition, start_temperature, step_temperature=1.0)

# plot the result
for phase_name, amounts in sol_res.cum_phase_amounts.items():
    plt.plot(sol_res.temperatures, amounts, label=phase_name)
plt.plot(sol_res.temperatures, sol_res.fraction_liquid, label='LIQUID')
plt.ylabel('Phase Fraction')
plt.xlabel('Temperature (K)')
plt.title('Al-30Zn Scheil simulation, phase fractions')
plt.legend(loc='best')
plt.show()

Phase fraction evolution during a Scheil simulation of Al-30Zn

Installation

pip (recommended)

scheil is suggested to be installed from PyPI.

pip install scheil

Anaconda

conda install -c conda-forge scheil

Development versions

To install an editable development version with pip:

git clone https://github.com/pycalphad/scheil.git
cd scheil
pip install --editable .[dev]

Upgrading scheil later requires you to run git pull in this directory.

Run the automated tests using

pytest

Theory

Uses classic Scheil-Gulliver theory (see G.H. Gulliver, J. Inst. Met. 9 (1913) 120–157 and Scheil, Zeitschrift Für Met. 34 (1942) 70–72.) with assumptions of

  1. Perfect mixing in the liquid
  2. Local equilibrium between solid and liquid
  3. No diffusion in the solid

Getting Help

For help on installing and using scheil, please join the pycalphad/pycalphad Gitter room.

Bugs and software issues should be reported on GitHub.

License

scheil is MIT licensed. See LICENSE.

Citing

If you use the scheil package in your work, please cite the relevant version.

The following DOI, doi:10.5281/zenodo.3630656, will link to the latest released version of the code on Zenodo where you can cite the specific version that you haved used. For example, version 0.1.2 can be cited as:

Bocklund, Brandon, Bobbio, Lourdes D., Otis, Richard A., Beese, Allison M., & Liu, Zi-Kui. (2020, January 29). pycalphad-scheil: 0.1.2 (Version 0.1.2). Zenodo. http://doi.org/10.5281/zenodo.3630657
@software{bocklund_brandon_2020_3630657,
  author       = {Bocklund, Brandon and
                  Bobbio, Lourdes D. and
                  Otis, Richard A. and
                  Beese, Allison M. and
                  Liu, Zi-Kui},
  title        = {pycalphad-scheil: 0.1.2},
  month        = jan,
  year         = 2020,
  publisher    = {Zenodo},
  version      = {0.1.2},
  doi          = {10.5281/zenodo.3630657},
  url          = {https://doi.org/10.5281/zenodo.3630657}
}
Comments
  • Multicomponent systems stop prematurely

    Multicomponent systems stop prematurely

    Hi Brandon, I am trying to use pycalphad to simulate solidification behaviour of alloys 625 and Monel. I noticed that simulation ends at some temperature dependent on composition and temperature step, even if solidification is far from complete. I attach an extreme example for Monel, comparing temperature steps of 5K and 2K. The simulation with 2K stops prematurely. I noted a similar behavior with alloys 625, even if not so dramatic. Also changes in composition affects the end point.

    image image

    I attach the code and the database I am using, derived from mc_ni_v2.034.tdb Thank you very much for your help and all you did with pycalphad!

    MonelScheil.txt ARNi.txt

    opened by AndRicci 10
  • Error while simulating Ni-Al-Cr system

    Error while simulating Ni-Al-Cr system

    I am using a revised version of Ni-database from MatCalc. This database works with pycalphad 0.8.3. When I run scheil 0.1.1, I got error message: ALN: Sublattice frozenset({Species('N', 'N1')}) of (frozenset({Species('AL', 'AL1')}), frozenset({Species('N', 'N1')})) has no components in {Species('AL', 'AL1')}

    Any suggestion?

    opened by dpttw 2
  • `simulate_equilibrium_solidification` should do order/disorder checks automatically

    `simulate_equilibrium_solidification` should do order/disorder checks automatically

    Currently there are no checks for order/disorder phase name checking in simulate_equilibrium_solidification, so a order/disorder modeled phase that is in a disordered configuration will still show as the ordered phase name.

    The main challenge in making this change that the order/disorder check assumes a pycalphad LightDataset, rather than xarray Dataset.

    opened by bocklund 1
  • Performance pass

    Performance pass

    The code should be profiled and any optimizations made if possible and reasonable.

    For example, equilibrium(..., to_xarray=False) could be used, but the indexing into the LightDataset objects would have to be updated

    opened by bocklund 1
  • Multicomponent systems incorrectly terminate at peritectic reactions

    Multicomponent systems incorrectly terminate at peritectic reactions

    Peritectic-type reactions in the ternary go from L+A -> A+B, terminating the current Scheil algorithm. Section 12.8 in Hillert's Phase Equilibria, Phase Diagrams, and Phase Transformations (2nd Edition) may be insightful. Specifically, the idea below might be able to be used to determine when a peritectic region is found and how to update the composition of the liquid so that the liquidus can continue to be followed down the liquidus projection to a eutectic.

    screen shot 2019-01-02 at 2 02 47 pm
    opened by bocklund 1
  • ENH: improve handling for ordered phases

    ENH: improve handling for ordered phases

    Introduces an OrderingRecord object to track the relationship between ordered and disordered phases, replacing the old ordering code. The new ordering approach can be used for arbitrary equilibrium calculations and is used to fix #8.

    The logic for defining how to compare the disordered phases is currently the same as before, considering the site ratios to determine equivalent sublattices. I am deferring action on this with the issue filed in https://github.com/pycalphad/scheil/issues/23.

    opened by bocklund 0
  • ENH: use adaptive sampling by default

    ENH: use adaptive sampling by default

    • Points dictionaries are now created for the user by default if they are not provided.
    • Adaptive sampling does not do any "local" random sampling by default, it just adds the point from the solution
    • Don't use pycalphad.core.utils.generate_dof to create the dof_dict (it is deprecated)
    opened by bocklund 0
  • ENH: Build phase records instead of callables

    ENH: Build phase records instead of callables

    Uses the pycalphad API to pass PhaseRecord dictionaries to calculate and equilibrium to improve the tight-loop performance of equilibrium and Scheil solidification simulations https://github.com/pycalphad/pycalphad/pull/361.

    Building phase records can give a significant performance boost, roughly 10x to 100x speedup in some cases.

    opened by bocklund 0
  • BLD/MAINT: Modernize project metadata

    BLD/MAINT: Modernize project metadata

    • Add pyproject.toml
    • Switch to setuptools_scm instead of versioneer
    • Update installation instructions in README
    • Add automated deployment on Releases
    • Update docs theme to furo
    opened by bocklund 0
  • FIX: Fix removing disordered phase candidates

    FIX: Fix removing disordered phase candidates

    Fixes a regression introduced in #11, where filter_phases was introduced to remove phases that cannot be stable or phases where the disordered part is given as a candidate phase. The change in #11 made it so the disordered phase was not a part of the list of solid_phases that could form during the solidification simulations. With the disordered phase name not included in the solid_phases, the order_disorder_eq_phases function that renamed the ordered phases with disordered configurations to their disordered counterpart would lead to the phase amount of disordered configurations to not be saved.

    This PR fixes that and adds a parameterized test case that tests that the disordered phase always is accounted for regardless of whether or not the ordered phase is in the candidate phases or not.

    opened by bocklund 0
  • FIX: Force exit in equilibrium solidification after a successful binary search

    FIX: Force exit in equilibrium solidification after a successful binary search

    • Exit the equilibrium solidification while loop after a binary search, because the solidification must be converged then by definition (fixes a floating point precision issue where 0.999... < 1 caused the loop to be infinite on some platforms.
    • Update CI for pip version of pycalphad
    • Remove environment.yml development file
    • Drop Python 3.6
    opened by bocklund 0
  • Improve logic for deciding which sublattices are equivalent when checking ordering

    Improve logic for deciding which sublattices are equivalent when checking ordering

    Currently, sublattices in ordered (partitioned) phases are considered equivalent by symmetry if their site ratios are equal. This is a poor heuristic and will fail to determine that sublattices 0 and 1 are equivalent in an FCC_L12 phase with sublattice model [['A', 'B'], ['A', 'B'], ['VA']] with site ratios [0.25, 0.75, 3].

    Relevant for this fix will be the current heuristic in pycalphad models https://github.com/pycalphad/pycalphad/pull/311, and the changes that will occur as a result of fixing https://github.com/pycalphad/pycalphad/issues/345.

    opened by bocklund 0
Releases(0.1.6)
Owner
pycalphad
Computational Thermodynamics in Python
pycalphad
在原神中使用围栏绘图

yuanshen_draw 在原神中使用围栏绘图 文件说明 toLines.py 将一张图片转换为对应的线条集合,视频可以按帧转换。 draw.py 在原神家园里绘制一张线条图。 draw_video.py 在原神家园里绘制视频(自动按帧摆放,截图(win)并回收) cat_to_video.py

14 Oct 08, 2022
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
HW 2: Visualizing interesting datasets

HW 2: Visualizing interesting datasets Check out the project instructions here! Mean Earnings per Hour for Males and Females My first graph uses data

7 Oct 27, 2021
A library for bridging Python and HTML/Javascript (via Svelte) for creating interactive visualizations

A library for bridging Python and HTML/Javascript (via Svelte) for creating interactive visualizations

Anthropic 98 Dec 27, 2022
Matplotlib tutorial for beginner

matplotlib is probably the single most used Python package for 2D-graphics. It provides both a very quick way to visualize data from Python and publication-quality figures in many formats. We are goi

Nicolas P. Rougier 2.6k Dec 28, 2022
DrawBot lets you draw images taken from the internet on Skribbl.io, Gartic Phone and Paint

DrawBot You don't speak french? No worries, english translation is over here. C'est quoi ? DrawBot est un logiciel codé par V2F qui va prendre possess

V2F 205 Jan 01, 2023
Create artistic visualisations with your exercise data (Python version)

strava_py Create artistic visualisations with your exercise data (Python version). This is a port of the R strava package to Python. Examples Facets A

Marcus Volz 53 Dec 28, 2022
Machine learning beginner to Kaggle competitor in 30 days. Non-coders welcome. The program starts Monday, August 2, and lasts four weeks. It's designed for people who want to learn machine learning.

30-Days-of-ML-Kaggle 🔥 About the Hands On Program 💻 Machine learning beginner → Kaggle competitor in 30 days. Non-coders welcome The program starts

Roja Achary 145 Jan 01, 2023
eoplatform is a Python package that aims to simplify Remote Sensing Earth Observation by providing actionable information on a wide swath of RS platforms and provide a simple API for downloading and visualizing RS imagery

An Earth Observation Platform Earth Observation made easy. Report Bug | Request Feature About eoplatform is a Python package that aims to simplify Rem

Matthew Tralka 4 Aug 11, 2022
Extensible, parallel implementations of t-SNE

openTSNE openTSNE is a modular Python implementation of t-Distributed Stochasitc Neighbor Embedding (t-SNE) [1], a popular dimensionality-reduction al

Pavlin Poličar 1.1k Jan 03, 2023
Pyan3 - Offline call graph generator for Python 3

Pyan takes one or more Python source files, performs a (rather superficial) static analysis, and constructs a directed graph of the objects in the combined source, and how they define or use each oth

Juha Jeronen 235 Jan 02, 2023
Package managers visualization

Software Galaxies This repository combines visualizations of major software package managers. All visualizations are available here: http://anvaka.git

Andrei Kashcha 1.4k Dec 22, 2022
Glue is a python project to link visualizations of scientific datasets across many files.

Glue Glue is a python project to link visualizations of scientific datasets across many files. Click on the image for a quick demo: Features Interacti

675 Dec 09, 2022
An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui An interactive GUI for WhiteboxTools in a Jupyter-based environment GitHub repo: https://github.com/giswqs/whiteboxgui Documentation: http

Qiusheng Wu 105 Dec 15, 2022
Visualise Ansible execution time across playbooks, tasks, and hosts.

ansible-trace Visualise where time is spent in your Ansible playbooks: what tasks, and what hosts, so you can find where to optimise and decrease play

Mark Hansen 81 Dec 15, 2022
Learning Convolutional Neural Networks with Interactive Visualization.

CNN Explainer An interactive visualization system designed to help non-experts learn about Convolutional Neural Networks (CNNs) For more information,

Polo Club of Data Science 6.3k Jan 01, 2023
649 Pokémon palettes as CSVs, with a Python lib to turn names/IDs into palettes, or MatPlotLib compatible ListedColormaps.

PokePalette 649 Pokémon, broken down into CSVs of their RGB colour palettes. Complete with a Python library to convert names or Pokédex IDs into eithe

11 Dec 05, 2022
:bowtie: Create a dashboard with python!

Installation | Documentation | Gitter Chat | Google Group Bowtie Introduction Bowtie is a library for writing dashboards in Python. No need to know we

Jacques Kvam 753 Dec 22, 2022
100 Days of Code The Complete Python Pro Bootcamp for 2022

100-Day-With-Python 100 Days of Code - The Complete Python Pro Bootcamp for 2022. In this course, I spend with python language over 100 days, and I up

Rajdip Das 8 Jun 22, 2022
Automatic data visualization in atom with the nteract data-explorer

Data Explorer Interactively explore your data directly in atom with hydrogen! The nteract data-explorer provides automatic data visualization, so you

Ben Russert 65 Dec 01, 2022