idaes-pse icon indicating copy to clipboard operation
idaes-pse copied to clipboard

Cubic EoS model fails to initialize at high pressures.

Open andrewlee94 opened this issue 4 years ago • 1 comments

An external user brought a use case to my attention where the Cubic EoS model failed to converge at high pressures.

The issue appears to be that the deviation between the ideal initial guess and the actual solution for bubble temperature is large enough to cause the solver to fail (scaling might also be an issue).

Test case files attached.

C1C2C3_CEOS.txt mainfile_test_cubic_eos_PR.txt

andrewlee94 avatar Sep 08 '20 15:09 andrewlee94

Rahul Ghandi also suggested a better way to initialize the vapour and liquid compositions in the two-phase region.

One suggestion:

  1. For two phase region, can we initialize the phase flow based on distance of temperature from Tdew and Tbubble.

  2. Once we have approximate feed that is vaporized (step above), we can use Rachford-Rice method to calculate vapor and liquid phase composition. I did a quick calculation and results are as below. The initial guess for phase composition is better (than assuming same as feed).

vapRatio = ((blk[k].temperature.value - blk[k].temeprature_bubble.value) /
                    (blk[k].temeprature_dew.value - blk[k].temeprature_bubble.value))

blk[k].flow_mol_phase["Vap"].value = vapRatio*blk[k].flow_mol.value
blk[k].flow_mol_phase["Liq"].value = (1-vapRatio)*blk[k].flow_mol.value

# Initialize the vapor and liquid compositions using Rachford-Rice equation
for j in blk[k].params.component_list:
    psat = 1e5*10**(blk[k].params.antoine[j, "1"] - blk[k].params.antoine[;, "2"] /
                               (blk[k].temperature.value + blk[k].params.antoine[j, "3"]))
    kfact = psat/blk[k].pressure.value
    blk[k].mole_frac_phase_comp["Liq", j].value = blk[k].mole_frac_comp[j]/(1+vapRatio*(kfact-1))
    blk[k].mole_frac_phase_comp["Vap", j].value = blk[k].mole_frac_phase_comp["Liq", j].value*kfact

andrewlee94 avatar Sep 09 '20 13:09 andrewlee94

Closing due to lack of activity.

andrewlee94 avatar Feb 16 '23 20:02 andrewlee94