Discrete time simulation of gas liquid equilibrium in a tank

I am trying to write a discrete time simulation of liquid/gaseous oxygen in a pressurised cryogenic fuel tank. For now I am assuming that the only external change to the system is the influx of heat through the radiation. Now my problem is this: For every dt i want to calculate the change in pressure as a result of the change in temperature. But the vapour pressure depends on the temperature, and the temperature changes if the oxygen boils.

I looked into internal energy, and i know that the energy in the whole system should change only by the given heatflux, but i don't understand how i go from this to the pressure and temperature of the system.

So long story short, how do i calculate the equilibrium of a system with a known heat-input?

Thanks.

• Ok, so how do i get from this to the equilibrium of gas and liquid? Ie. moles in gas/moles in liquid. – David van rijn Dec 8 '15 at 14:27