[docs]classT0(object):"T0: temperature where the energy of two phases are equal, GM(ONE) = GM(TWO)"_phase_one:CompositionSet_phase_two:CompositionSetsolver:Solverproperty_to_optimize:ConditionableComputablePropertyminimum_value:float=298.15maximum_value:float=6000residual_tol:float=0.01maximum_iterations:int=50implementation_units=property(lambdaself:self.property_to_optimize.implementation_units)display_units=property(lambdaself:self.property_to_optimize.display_units)def__init__(self,phase_one:Union[CompositionSet,str],phase_two:Union[CompositionSet,str],wks:Optional["Workspace"]):ifwksisNone:ifnotisinstance(phase_one,CompositionSet)andnotisinstance(phase_two,CompositionSet):raiseValueError('T0 calculation requires a starting point for both phases;'' either CompositionSet objects should be specified, or pass in a Workspace'' of a previous calculation including the phases.')ifnotisinstance(phase_one,CompositionSet):phase_one_orig=phase_onephase_one=find_first_compset(phase_one,wks)ifphase_oneisNone:raiseValueError(f'{phase_one_orig} is never stable in the specified Workspace')ifnotisinstance(phase_two,CompositionSet):phase_two_orig=phase_twophase_two=find_first_compset(phase_two,wks)ifphase_twoisNone:raiseValueError(f'{phase_two_orig} is never stable in the specified Workspace')self._phase_one=phase_oneself._phase_two=phase_twoself.solver=Solver()# This cannot be a class-level attribute because we cannot assume pycalphad.variables is initialized# if it isn't, we will get back a ModelComputedProperty instead of the TemperatureType we want# We cannot just import pycalphad.variables because of a circular importself.property_to_optimize=as_property('T')def__str__(self):returnf'{self.__class__.__name__}({self._phase_one.phase_record.phase_name},{self._phase_two.phase_record.phase_name})'@propertydefshape(self)->Tuple[int]:returntuple()