Dear Brandon,
You are absolutely right, there are different descriptions for the same phase, some of them include order-disorder. I was quite naive thinking that I'd have no problems just keeping all of them in the calculation. However, even if I remove concurrent phase descriptions from the calculations I still get different results, although in this case the phases are always the same. Notice that increasing pdens doesn't help, see below. At the end of this message you can find the python script I'm using to calculate. Link for the database:
https://drive.google.com/file/d/1cGZyiGPNfk_kIsiTIchohmz04M8d_Lww/view?usp=share_link
Thank you for your reply and help.
pdens=500 (default)
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.7920 |
| 873.0 | - | - | 1.0000 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=1000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.0678 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=2000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.9022 | 0.0303 | 0.0675 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=3000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.5403 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=4000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.5403 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=5000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.5403 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=6000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.0678 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=7000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.0678 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=8000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.5403 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=9000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.0678 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
pdens=10000
Molar fractions:
+-----------+--------+-----------+--------+
| Temp. (K) | BCC_A2 | C14_LAVES | FCC_A1 |
+-----------+--------+-----------+--------+
| 673.0 | 0.1033 | 0.0371 | 0.0675 |
| 873.0 | 0.3606 | 0.0313 | 0.5403 |
| 973.0 | 0.5819 | 0.0228 | 0.0679 |
+-----------+--------+-----------+--------+
Python script:
import time
ini=time.time()
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from pycalphad import Database, equilibrium, variables as v
from pycalphad.plot.utils import phase_legend
from prettytable import PrettyTable
matplotlib.style.use('bmh')
dbf = Database('PrecHiMn-04-pycalphad.tdb')
phases_in_database = list(dbf.phases.keys())
phases_input=phases_in_database
phases_to_remove=['CUB_A13','FCC_4SL','BCC_4SL','BCC_2SL','A1_FCC','A2_BCC']
for i in phases_to_remove:
phases_input.remove(i)
print(' ')
print('Phases selected from database:')
print(phases_input)
print(' ')
print('Phases removed from calculation:')
print(phases_to_remove)
print(' ')
comps = ['FE','MN','AL','NB','C','VA']
conds = {v.P: 101325, v.T: [673,873,973], v.X('MN'): 0.26, v.X('AL'): 0.16, v.X('NB'): 0.05, v.X('C'): 0.03}
print('Selected compounds:')
print(comps)
print(' ')
print('Conditions:')
print(conds)
print(' ')
print('Calculating')
eq = equilibrium(dbf,comps,phases_input,conds,calc_opts={"pdens":500})
print(' ')
phases_in_eq = sorted(np.intersect1d(phases_input,eq.Phase.values,assume_unique=False,return_indices=False))
print('Phases in equilibrium:')
print(phases_in_eq)
print(' ')
tabela={}
for t in eq.T.values:
tabela[t]={}
for t in eq.T.values:
for v in eq.vertex.values:
tabela[t][np.reshape(eq.sel(T=t,vertex=v).Phase.values,1)[0]]="{:1.4f}".format(np.reshape(eq.sel(T=t,vertex=v).NP.values,1)[0])
final=[]
for t in eq.T.values:
linha=[t]
for p in phases_in_eq:
if p in tabela[t].keys():
linha=linha+[tabela[t][p]]
else:
linha=linha+['-']
final=final+[linha]
putz=PrettyTable(['Temp. (K)']+phases_in_eq)
for i in final:
putz.add_row(i)
print('Molar fractions:')
print(putz)
print(' ')
phase_handles, phasemap = phase_legend(phases_in_eq)
plt.gca().set_title('Equilibrium Phases')
plt.gca().set_xlabel('Temperature (K)')
plt.gca().set_ylabel('Phase Fraction')
plt.gca().set_ylim((0,1.1))
tmin=min(eq.T.values)
tmax=max(eq.T.values)
plt.gca().set_xlim((tmin-100, tmax+200))
for name in phases_in_eq:
plt.scatter(np.squeeze(eq.T.broadcast_like(eq.NP)), np.squeeze(eq.NP.where(eq.Phase == name)),color=phasemap[name], label=name)
plt.gca().legend(phase_handles, phasemap, loc="best")
plt.savefig('Equilibrium.png')
fim=time.time()
print('Exec. Time: ',time.strftime("%T", time.gmtime(fim-ini)))
print(' ')