7
$\begingroup$

I am attempting to calculate the driving force of nucleation for several different precipitate phases using TC-Python. To this I want to suspend all phases, except for the matrix phase (e.g. FCC_L12). Then I want to set the precipitate phase of interest to be dormant (so the driving force can still be calculated).

Below is an example of what my current approach looks like. The issue is that Thermo-Calc will automatically generate several FCC composition sets (e.g. "FCC_L12#2", "FCC_L12#3", etc.), but I only want one of these composition sets to be active (as the matrix). I don't know how to suspend certain composition sets and allow others. Is this possible to do in TC-Python?

with TCPython() as session:
    system=(session.disable_caching()
           .select_database_and_elements(database_name, elements)
           .get_system())
           
    calc=(system.with_single_equilibrium_calculation()
         .with_options(SingleEquilibriumOptions()
         .enable_approximate_driving_force_for_metastable_phases())
         .enable_global_minimization())
    calc.set_condition(ThermodynamicQuantity.temperature(), temp)
    for el_indx in range(len(elements)):
        calc.set_condition(ThermodynamicQuantity
             .mole_fraction_of_a_component(elements[el_indx]), comps[el_indx])

    calc.set_phase_to_suspended("*")
    calc.set_phase_to_entered("FCC_L12", 0)
    calc.set_phase_to_dormant(precip_phaseName)

    calc_result=calc.calculate()
    drivingForce = calc_result.get_value_of('DGM(' + precip_phaseName + ')')
$\endgroup$
3
  • 3
    $\begingroup$ I'm not very familiar with TC-Python, but I see that you have .enable_global_minimization() set on your system. If you remove that line and turn off global minimization, will it stop creating new composition sets? $\endgroup$ Jul 19 at 18:30
  • $\begingroup$ @BrandonBocklund That did the trick. Amazing, as always. Thanks! $\endgroup$
    – sgp45
    Jul 20 at 19:46
  • $\begingroup$ Great, I moved my comment into an answer! $\endgroup$ Jul 21 at 15:38
5
$\begingroup$

Thermo-Calc creates new composition sets from the global minimization process and you cannot, to my knowledge, have direct control of preventing certain composition sets from being created. Disabling global minimization (removing .enable_global_minimization()) may get you what you need, but you should be careful to ensure that the composition set of FCC_L12 that you get as your matrix corresponds to the composition set that you intend to be the matrix.

with TCPython() as session:
    system=(session.disable_caching()
           .select_database_and_elements(database_name, elements)
           .get_system())
           
    calc=(system.with_single_equilibrium_calculation()
         .with_options(SingleEquilibriumOptions()
         .enable_approximate_driving_force_for_metastable_phases()))
    calc.set_condition(ThermodynamicQuantity.temperature(), temp)
    for el_indx in range(len(elements)):
        calc.set_condition(ThermodynamicQuantity
             .mole_fraction_of_a_component(elements[el_indx]), comps[el_indx])

    calc.set_phase_to_suspended("*")
    calc.set_phase_to_entered("FCC_L12", 0)
    calc.set_phase_to_dormant(precip_phaseName)

    calc_result=calc.calculate()
    drivingForce = calc_result.get_value_of('DGM(' + precip_phaseName + ')')
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.