Water is usually considered insoluble in the oil phase; however, at the temperatures typically encountered in the steam-injection process, water may have higher than 40 mol% solubility in the oil phase. On a mass basis, experimental results from the literature indicate water solubility as high as 33%. We developed a practical and robust algorithm for a water/oil/gas three-phase flash calculation. The algorithm is based on the well-developed vapor/liquid two-phase flash-calculation algorithm and avoids trivial or false solutions commonly found in multiphase flash calculations. We also developed a fully compositional thermal reservoir simulator, considering water/oil mutual solubility, to study the effect of water-in-oil solubility on oil recovery in the steam-injection process. A simulation study shows that when water is soluble in the oil phase, it may increase oil recovery appreciably. We also found that the oil fluids should be characterized with at least three components for accurate compositional thermal reservoir-simulation study.