# How to calculate t-zero temperature using Thermo-Calc- Python (TCPython) for multiple alloys?

T-zero temperature is the temperature at which the Gibbs energies of two phases are equal. Here, I wish to find the temperature at which FCC and BCC have same Gibbs energy. Thermo-Calc console mode has an in-built function to calculate t-zero. However, if I manually do the calculation in TC-Python the results are different.

import numpy as np
from tc_python import *
w_c=0.008
with TCPython() as start:
# create and configure a single equilibrium calculation
calc_result = (
start
.set_cache_folder(os.path.basename(__file__) + "_cache")
.select_database_and_elements("TCFE6", ["Fe","C"])
.get_system()
.with_single_equilibrium_calculation()
.disable_global_minimization()
.set_condition(ThermodynamicQuantity.mass_fraction_of_a_component("C"), w_c)
)
step=2000
for temp in np.linspace(500,1200,step):
calc = (
calc_result
.set_condition(ThermodynamicQuantity.temperature(),temp)
.calculate()
)

gf = abs(calc.get_value_of('GM(FCC_A1)'))
gb = abs(calc.get_value_of('GM(BCC_A2)'))
if(abs(gf-gb)<=1):
print(temp,gf,gb)
break


There was no temperature that satisfied this criteria. However, in console mode (adv-options t-zero bcc_A2 fcc_A1 )I got 784.79 K. If I use run_poly_command also, I get the set-temperature (473 K) and not t-zero temperature.

from tc_python import *
w_c=0.008
with TCPython() as start:
# create and configure a single equilibrium calculation
calc_result = (
start
.set_cache_folder(os.path.basename(__file__) + "_cache")
.select_database_and_elements("TCFE6", ["Fe","C"])
.get_system()
.with_single_equilibrium_calculation()
.disable_global_minimization()
.set_condition(ThermodynamicQuantity.mass_fraction_of_a_component("C"), w_c)
.set_condition(ThermodynamicQuantity.temperature(),473)
)
print(calc.get_value_of('T'))


What command should be used to get t-zero temperature in TC-Python?

• I think this question would profit a lot from more context, and an example input. May 10 '20 at 12:57
• I’m voting to close this question because: The user has not responded to a request to provide more detail, and has not even signed in since asking the question on May 9th, so the user has not even checked to see if there is an answer. They might have solved the problem or lost interest. It would still be valuable to have an answer here in case someone comes across the question when searching on Google, but Martin says the question needs to be more specific anyway. We can re-open if OP comes back Jul 4 '20 at 14:05
• I have made some changes. Kindly re-open the question. Jul 7 '20 at 7:31
• Thanks for adding all that. I've voted to reopen and contacted Tyberius to maybe open it faster. Jul 7 '20 at 11:44
• @AloneProgrammer No I am not finding the equilibrium temperature for Austenite to ferrite transformation. Mass fraction of c=0.008. T-zero temperature will not be available in phase diagram. Jul 9 '20 at 6:28