db = Database('steel_database_fix.tdb')
elements = ['C','SI','MN','CR','NI','MO','W','CU','N','P','S','FE']
weight_elem = [12.011,28.085,54.938,51.996,58.693,95.95,183.84,63.546,14.007,30.974,32.06,55.845]
#converting the alloy composition from weight fraction to molar fraction
weight_frac = [0.02,0.3,1.8,22.5,5.4,2.8,0,0,0.16,0.03,0.001,66.989]
frac = [weight_frac[i] / weight_elem[i] for i in range(0,len(weight_frac))]
frac_mol = [frac[i]/sum(frac) for i in range(0,len(frac))]
from pycalphad import equilibrium
comps = ['FE','C','CR','NI','MO','MN','N',]
phases = ['FCC_A1','BCC_A2','LIQUID','SIGMA','M23C6']
param = {v.X('CR'):frac_mol[3], v.X('NI'):frac_mol[4], v.X('MO'):frac_mol[5], v.X('N'):frac_mol[8],
v.X('MN'):frac_mol[2], v.X('C'):frac_mol[0], v.T:(600, 1300, 25), v.P:101325}
eq = equilibrium(db, comps, phases, param)
I don't have the exact results available now, but my results indicated stabilibity of the FCC_A1, M23C6 and SIGMA (these two last phases depending on the temperature).
Note that in this test i didn't used all the alloying elements, but when i tried with the remaining elements the BCC_A2 still not stable (according to the results)
Other example that i tried:
comps = ['FE', 'C']
phases = ['BCC_A2', 'FCC_A1', 'CEMENTITE', 'LIQUID']
param = {v.X('C'):0.005, v.T:(600,1300,50), v.P:101325}
eq = equilibrium(db, comps, phases, param)