Skip to content

Latest commit

 

History

History
141 lines (113 loc) · 3.2 KB

README.md

File metadata and controls

141 lines (113 loc) · 3.2 KB

Calmato

CI Codecov

Calmato is an open-source CALPHAD (CALculation of PHAse Diagrams) package in Julia language, which uses EAGO as its optimization engine. The package is still in the alpha stage of development and has limited functionality and reliability.

Example

Let's take the Cu-Zn system assesed by Liang et al. (2015) as an example.

Search and read the tdb file from TDB DB:

using Calmato

db = search_db("Cu Zn Liang Hsiao 2015")
[1] Liang, Hsiao and Schmid-Fetzer (2015) Cu,Zn 
Database Summary:
        Elements: 4
        Functions: 10
        Phases: 8

Print contents of the database:

print(db)
Database:
        Elements: 4
                /-
                Va
                Cu
                Zn
        Functions: 10
                RTLNP
                GHSERCU
                GHSERZN
                GLIQCU
                GBCCCU
                GHCPCU
                GLIQZN
                GBCCZN
                GFCCZN
                A1BCZ
        Phases: 8
                1: Liquid; (Cu,Zn)
                        G(Cu;0)
                        G(Zn;0)
                        L(Cu,Zn;0)
                        L(Cu,Zn;1)
                        L(Cu,Zn;2)
                2: Bcc; (Cu,Zn)
                        G(Cu;0)
                        G(Zn;0)
                        L(Cu,Zn;0)
                        L(Cu,Zn;1)
                        L(Cu,Zn;2)
                3: Bcc_B2; (Cu,Zn)₀.₅(Cu,Zn)₀.₅
                        ...

Initialize a system:

sys = init_system(db)
System:
        Elements: 2
        Phases: 7

The init_system function automatically choose all the elements in the database except for electron gas (/-) and vacancy (VA) as components of the system:

Point calculation of an equilibrium state:

X = [0.3, 0.7]
T = 700 # K
equilib(sys, X, T)
Gamma; Cu₄(Cu,Zn)₆(Cu,Zn)₁₆: 0.1041
        Cu: 0.3242
        Zn: 0.6758
        (Cu,Zn)₆
                Cu: 0.7363
                Zn: 0.2637
        (Cu,Zn)₁₆
                Cu: 0.0007
                Zn: 0.9993
Eps; (Cu,Zn): 0.8959
        Cu: 0.2269
        Zn: 0.7731

Calculation of equlibirum solidification, or the temperature dependence of phase constitution:

Ts = 600:10:1200
res = solidify(sys, X, Ts)
Solidification:
        600 ≤ T ≤ 1200
        61 calculations

Calmato currently supports Plots for visualization of results:

using Plots

plot(res)

solidification

TODO

Upcoming

  • Database operations (edit, merge, export, etc.)

Near-future

  • Tests
  • Documentation
  • Release

Faraway-future

  • Magnetic contribution
  • Phase diagram calculation
  • GUI