Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Complementarity formualtion for VLE with cubic EoSs #1397

Merged
merged 40 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a3f141f
Infrastructure work to support SmoothVLE2
andrewlee94 Apr 17, 2024
ed3734a
Some pylint issues and tests for new cubic EoS functions
andrewlee94 Apr 18, 2024
851cc3b
Fixing broken tests
andrewlee94 Apr 18, 2024
251b7f7
Fixing more tests
andrewlee94 Apr 18, 2024
7997adf
Tests for identify_VL_component_list
andrewlee94 Apr 18, 2024
83539aa
Testing estimation of bubble and dew points
andrewlee94 Apr 21, 2024
59e22dd
First unit testing of SmoothVLE2
andrewlee94 Apr 22, 2024
d76b17d
First running version of code
andrewlee94 Apr 23, 2024
3555f58
Running example
andrewlee94 Apr 23, 2024
78d4372
Starting clean up and transition
andrewlee94 Apr 23, 2024
cf5d515
Merge branch 'main' of https://github.com/IDAES/idaes-pse into smooth…
andrewlee94 Apr 23, 2024
daf0502
Working on Tsweep test failure
andrewlee94 Apr 29, 2024
eb72019
Merging main
andrewlee94 May 9, 2024
7ddc023
Trying to debug Tsweep
andrewlee94 May 9, 2024
81d9d26
Catch for non-cubics with SmoothVLE2
andrewlee94 May 9, 2024
f4eb379
Fixing typo
andrewlee94 May 9, 2024
0f0bd72
Merging main
andrewlee94 May 17, 2024
860ad56
Tweaking eps values
andrewlee94 May 17, 2024
92394ee
Fixing T sweep test
andrewlee94 May 20, 2024
65087b6
Fixing some tests
andrewlee94 May 21, 2024
39f1180
Merging main branch
andrewlee94 May 21, 2024
f2b9813
Fixing some pylint issues
andrewlee94 May 21, 2024
47c29bb
Typo
andrewlee94 May 21, 2024
8e424cf
More pylinting
andrewlee94 May 21, 2024
31fba13
More pylint
andrewlee94 May 21, 2024
b27706a
Clean up debugging code
andrewlee94 May 21, 2024
8771323
Fixing final test
andrewlee94 May 21, 2024
8dd941b
Some clean up
andrewlee94 May 24, 2024
55a5074
Merging main branch
andrewlee94 May 26, 2024
f43e3e0
Using logspace
andrewlee94 May 27, 2024
7a0375b
Adding initial docs
andrewlee94 May 27, 2024
b563460
Documenting epsilons
andrewlee94 May 27, 2024
c0a9e18
Fixing test
andrewlee94 May 27, 2024
9d35277
Adjusting default value of epsilon
andrewlee94 May 28, 2024
a98597c
Fixing typo
andrewlee94 May 28, 2024
ad0da43
Merge branch 'main' into smooth_vle2
andrewlee94 Jun 13, 2024
8b951b8
Fixing pint version issue
andrewlee94 Jun 13, 2024
cbaf0aa
Addressing comments
andrewlee94 Jun 17, 2024
0a1c28c
Merge branch 'main' into smooth_vle2
andrewlee94 Jun 17, 2024
c2a593d
Fixing broken link in docs
andrewlee94 Jun 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
490 changes: 153 additions & 337 deletions idaes/models/properties/modular_properties/base/generic_property.py

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions idaes/models/properties/modular_properties/base/tests/test_vle.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
)
from idaes.core.solvers import get_solver

from idaes.models.properties.modular_properties.base.generic_property import (
_init_Pbub,
_init_Pdew,
_init_Tbub,
_init_Tdew,
)
from idaes.models.properties.modular_properties.state_definitions import FTPx
from idaes.models.properties.modular_properties.eos.ideal import Ideal
from idaes.models.properties.modular_properties.phase_equil import SmoothVLE
Expand Down Expand Up @@ -218,7 +224,7 @@ def test_build(self, model):

@pytest.mark.unit
def test_init_bubble_temperature(self, model):
model.props._init_Tbub(model.props[1], pyunits.K)
_init_Tbub(model.props[1], pyunits.K)

assert pytest.approx(365.35, abs=0.01) == value(
model.props[1].temperature_bubble[("Vap", "Liq")]
Expand All @@ -232,7 +238,7 @@ def test_init_bubble_temperature(self, model):

@pytest.mark.unit
def test_init_dew_temperature(self, model):
model.props._init_Tdew(model.props[1], pyunits.K)
_init_Tdew(model.props[1], pyunits.K)

assert pytest.approx(372.02, abs=0.01) == value(
model.props[1].temperature_dew[("Vap", "Liq")]
Expand All @@ -246,7 +252,7 @@ def test_init_dew_temperature(self, model):

@pytest.mark.unit
def test_init_bubble_pressure(self, model):
model.props._init_Pbub(model.props[1], pyunits.K)
_init_Pbub(model.props[1])

assert pytest.approx(109479, abs=1) == value(
model.props[1].pressure_bubble[("Vap", "Liq")]
Expand All @@ -260,7 +266,7 @@ def test_init_bubble_pressure(self, model):

@pytest.mark.unit
def test_init_dew_pressure(self, model):
model.props._init_Pdew(model.props[1], pyunits.K)
_init_Pdew(model.props[1])

assert pytest.approx(89820, abs=1) == value(
model.props[1].pressure_dew[("Vap", "Liq")]
Expand Down Expand Up @@ -524,7 +530,7 @@ def test_build(self, model):

@pytest.mark.unit
def test_init_bubble_temperature(self, model):
model.props._init_Tbub(model.props[1], pyunits.K)
_init_Tbub(model.props[1], pyunits.K)

assert pytest.approx(365.35, abs=0.01) == value(
model.props[1].temperature_bubble[("Vap", "Liq")]
Expand All @@ -538,7 +544,7 @@ def test_init_bubble_temperature(self, model):

@pytest.mark.unit
def test_init_dew_temperature(self, model):
model.props._init_Tdew(model.props[1], pyunits.K)
_init_Tdew(model.props[1], pyunits.K)

assert pytest.approx(372.02, abs=0.01) == value(
model.props[1].temperature_dew[("Vap", "Liq")]
Expand All @@ -552,7 +558,7 @@ def test_init_dew_temperature(self, model):

@pytest.mark.unit
def test_init_bubble_pressure(self, model):
model.props._init_Pbub(model.props[1], pyunits.K)
_init_Pbub(model.props[1])

assert pytest.approx(109479, abs=1) == value(
model.props[1].pressure_bubble[("Vap", "Liq")]
Expand All @@ -566,7 +572,7 @@ def test_init_bubble_pressure(self, model):

@pytest.mark.unit
def test_init_dew_pressure(self, model):
model.props._init_Pdew(model.props[1], pyunits.K)
_init_Pdew(model.props[1])

assert pytest.approx(89820, abs=1) == value(
model.props[1].pressure_dew[("Vap", "Liq")]
Expand Down Expand Up @@ -703,7 +709,7 @@ def test_build(self, model):

@pytest.mark.unit
def test_init_bubble_temperature(self, model):
model.props._init_Tbub(model.props[1], pyunits.K)
_init_Tbub(model.props[1], pyunits.K)

assert pytest.approx(361.50, abs=0.01) == value(
model.props[1].temperature_bubble[("Vap", "Liq")]
Expand All @@ -720,7 +726,7 @@ def test_init_bubble_temperature(self, model):

@pytest.mark.unit
def test_init_dew_temperature(self, model):
model.props._init_Tdew(model.props[1], pyunits.K)
_init_Tdew(model.props[1], pyunits.K)

assert pytest.approx(370.23, abs=0.01) == value(
model.props[1].temperature_dew[("Vap", "Liq")]
Expand All @@ -737,7 +743,7 @@ def test_init_dew_temperature(self, model):

@pytest.mark.unit
def test_init_bubble_pressure(self, model):
model.props._init_Pbub(model.props[1], pyunits.K)
_init_Pbub(model.props[1])

assert pytest.approx(118531, abs=1) == value(
model.props[1].pressure_bubble[("Vap", "Liq")]
Expand All @@ -754,7 +760,7 @@ def test_init_bubble_pressure(self, model):

@pytest.mark.unit
def test_init_dew_pressure(self, model):
model.props._init_Pdew(model.props[1], pyunits.K)
_init_Pdew(model.props[1])

assert pytest.approx(95056, abs=1) == value(
model.props[1].pressure_dew[("Vap", "Liq")]
Expand Down
Loading
Loading