Troubles using matcalc steel database

164 views
Skip to first unread message

Igor Jordao

unread,
Nov 21, 2018, 12:51:07 PM11/21/18
to pycalphad
Hello,

I downloaded and tried to fix the matcalc database for iron based alloys, i made changes in the tdb file according to this topic: https://groups.google.com/forum/#!topic/pycalphad/_WanDJwZGWA

The pycalphad parsed the fixed tdb file correctly and i tried to do some equilibrium calculations, but i noticed that all the tests that i made resulted in equilibrium conditions without BCC_A2 phase stability. I was trying to calculate the phase fractions of some duplex stainless steels compositions, so the ferrite phase (BCC_A2) stability is expected (at least for the temperatures and compositions that i tried). Once that i perceived this behavior, i tried to calculate the equilibrium of a Fe-C composition with 0.01, 0.005, 0.001, (...) molar fractions of carbon and noticed that in all temperatures and compositions the BCC_A2 phase wasn't listed as equilibrium phase (even in temperatures below the FCC stability field).

Someone have any idea about how to fix this problem?

Here are the download links of the fixed for pycalphad parsing tdb file (https://ufpebr0-my.sharepoint.com/:u:/g/personal/soldamat_demec_ufpe_br/ETTEWrSFYsdElTqmCkSOCTkBe5ebzVTVdIsVXyIbcdxUyg?e=nm03AX) and the original matcalc fe based alloys tdb (https://www.matcalc.at/images/stories/Download/Database/mc_fe_v2.059.tdb)

Brandon Bocklund

unread,
Nov 21, 2018, 12:54:06 PM11/21/18
to pycalphad
Hi Igor,

Can you share a script that runs an equilibrium calculation that reproduces the issue you are having for a point calculation?

Cheers,
Brandon

Igor Jordao

unread,
Nov 21, 2018, 2:14:28 PM11/21/18
to pycalphad
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)

Brandon Bocklund

unread,
Nov 22, 2018, 11:35:31 AM11/22/18
to pycalphad
Hi Igor,

I think the problem was that you didn't have vacancies in your components. pycalphad does not automatically add VA and you need to explicitly include it in your component list.

I ran the following code and was able to get two phase (BCC/Cementite) then (BCC/FCC) then FCC as expected over this temperature range.



from pycalphad import Database, equilibrium, variables as v


db
= Database('steel_database_fix.tdb')


comps
= ['FE', 'C', 'VA']  # note VA added

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)
print(eq)
print(eq.Phase)



Let me know if you have other questions.

Brandon

Igor Jordao

unread,
Nov 27, 2018, 8:34:42 AM11/27/18
to pycalphad
Hi Brandon

Thank you for the solution, now the equilibrium is working properly. I would like to ask another question: There is any limit of components for equilibrium calculation?

brandon...@gmail.com

unread,
Nov 27, 2018, 11:47:29 AM11/27/18
to Igor Jordao, pycalphad
Hi Igor,

pycalphad does not impose any hard limits, however the computational time will increase with more components as you introduce more degrees of freedom into your Gibbs energy expressions.


Brandon

Reply all
Reply to author
Forward
0 new messages