For reference I have a common used natural gas plotted using a commercial software. See image above. The Bubble curve is purple and ends at the critical point. Dew curves with different quality (liquid phases of 25%. 10%, 5%, 1%) continues after the critical point.
My results, after plotting with Excel seems to be a bit different. I have not calculated the critical point, but the Bubble and Dew curves are similar. See screenshot below.
The blue curve is the first found Bubble pressure at any temperature (within the Bubble range of course). The green curve is the second found Bubble pressure at any temperature. Likewise with the Dew, orange is the first found Dew temperature and red the second found Dew temperature.
What I can't understand is why the second roots of Dew and Bubble both cross each other, and extend inside the phase envelope.
Is it a calculation error? Or do you have to calculate both Bubble and Dew and cut off the curves where the cross each others path, or turn into the phase envelope?
PS. I use Van der Waals mixing rules to mix the gas solution. I use Peng-Robinson EOS.
Otherwise I've been following this approach