Given two substances of different specific heats, how do you find the final temperature and these phase related things Given two substances of different specific heats, how do you find the final temperature of them both, phase of either substance if there was a phase change, and how much either substance has changed if not all of it has changed? I would like a general formula and index of which variables are which.
I tried this and this for example, but the examples assume the same specific heat capacity for both substances.
 A: There isn't a single formula because the process is an iterative one. The guiding principle is energy conservation, but you need to incorporate additional forms of energy transfer if a phase change occurs.
Example: Substance 1 (with mass $m_1$ and temperature $T_\mathrm{1,\,initial}$) starts off as a liquid, and substance 2 (with mass $m_2$ and temperature $T_\mathrm{2,\,initial}$) starts off as a gas. The total amount of energy gained by all substances must be zero according to energy conservation. Initially assume that no phase change occurs; thus, the final temperature $T_\mathrm{final}$ must satisfy
$$m_1C_1(T_\mathrm{1,\,initial}-T_\mathrm{final})+m_2C_2(T_\mathrm{2,\,initial}-T_\mathrm{final})=0$$
for temperature-independent (but material- and phase-dependent) heat capacities $C$. (If the heat capacities vary non-negligibly with temperature within a single phase, then you need to numerically or analytically integrate them.)
If the final temperature is above the liquid's boiling temperature or below the gas's boiling temperature, then the initial assumption is violated; some amount of phase change has occurred. Assume that it is partial. You need to revise the equation by adding $mxL$, where $x$ is the extent of the phase change (i.e., from 0 to 1, representing a lack of to a complete phase change, respectively) and $L$ is the latent heat of vaporization. The final temperature is the phase change temperature that was violated earlier. Now re-solve the equation.
If the extent $x$ is greater than 1, then your most recent assumption is violated. Set $x$ equal to 1 (because the phase change was completed) and add yet another term that represents a temperature change in the new phase. If the liquid was found to completely boil away, for example, then you have 
$$m_1\left[C_\mathrm{1,\,liquid}(T_\mathrm{1,\,initial}-T_\mathrm{vaporization})+L_1+C_\mathrm{1,\,gas}(T_\mathrm{1,\,vaporization}-T_\mathrm{final})\right]+m_2C_2(T_\mathrm{2,\,initial}-T_\mathrm{final})=0$$
Solve again.
In general, you would conduct this iterative process with additional phase change temperatures and phase-dependent heat capacities until your most recent assumption is validated. Then you have obtained the equilibrium temperature.
