I know that it is possible to get order constitution data for phases when using Thermo-Calc's GUI (e.g. to get "BCC_B2 DISORD" instead of just "BCC_B2") for a single equilibrium calculation, but I can't find a way to do it in TC-Python. I can get ordering data from TC_Python when using the PropertyDiagram module, but again, I am interested in getting it from single equilibrium calculations. I think it might be possible to do by using the "Sublattice()" method on the individual phases, but I haven't been able to get it to work. If someone could provide some example code how to do this or at least outline the approach that would be great!
Here's a basic example of how I would get phase data with TC_python. This does NOT tell me the order constitution which is the problem.
from tc_python import *
"""
This example shows how to create a single equilibrium calculation
from a ternary system and configure it to calculate the solidus
and liquidus temperature using fixed phase conditions for the
liquid phase.
There can be multiple solutions to a fixed phase condition and it is
good practice to perform a regular equilibrium calculation close to
where the phase transition is. This example starts with an equilibrium
calculation at 1700K in order to get good start values.
"""
def list_stable_phases(calc_result):
"""
List the stable phases and their amount on screen.
Args:
calc_result: Calculation result from an equilibrium calculation
"""
stable_phases = calc_result.get_stable_phases()
for phase in stable_phases:
print("Amount of " + phase + " = {0:.3f}".format(calc_result.get_value_of('NP(' + phase + ')')))
with TCPython() as session:
# create equilibrium calculation object and set conditions
eq_calculation = (
session.
set_cache_folder(os.path.basename(__file__) + "_cache").
select_database_and_elements("FEDEMO", ["Fe", "Cr", "C"]).
get_system().
with_single_equilibrium_calculation().
set_condition(ThermodynamicQuantity.temperature(), 1700.0).
set_condition(ThermodynamicQuantity.mass_fraction_of_a_component("Cr"), 0.1).
set_condition(ThermodynamicQuantity.mass_fraction_of_a_component("C"), 0.01)
)
# calculate equilibrium and list stable phases
calc_result = eq_calculation.calculate()
list_stable_phases(calc_result)
tc_python.system.System.get_phase_in_system()
. For each phase the sublattices are obtained by usingtc_python.system.Phase. get_sublattices()
." I'm not sure if this is what you meant by using Sublattice, but it could be worth trying. $\endgroup$