Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4e90290
Created FpTPxpc state definition file
tannerpolley Nov 19, 2025
f329e03
Created FpTPxpc state definition test files for normal and electrolyt…
tannerpolley Nov 21, 2025
7432a78
Altered `b.component_in_phase` methods due to bug where it was not fi…
tannerpolley Nov 21, 2025
500bf12
Adding bounds and initialization for various phase equilibrium variables
tannerpolley Nov 21, 2025
c996b9a
Revise the display variables to the appropriate state variables
tannerpolley Nov 21, 2025
edcc1c0
Add the configuration file for the BT_Ideal test for the FpTPxpc stat…
tannerpolley Nov 21, 2025
95e2871
Add the test file for the FpTPxpc state definition on the BT_Ideal ca…
tannerpolley Nov 21, 2025
a284a59
Ran Black
tannerpolley Nov 21, 2025
650612c
Fixed `test_define_display_vars`
tannerpolley Nov 24, 2025
bbf9ad3
Fixed pylint issues
tannerpolley Nov 24, 2025
6fff95b
Fixed pylint issues
tannerpolley Nov 24, 2025
10157ef
Revised author names, removed unnecessary tests, and removed a redund…
tannerpolley Dec 3, 2025
1993914
Ran Black
tannerpolley Dec 3, 2025
76021d8
Changes to creation of variable `_teq` and constraint 'equilibrium_co…
tannerpolley Dec 11, 2025
4f24ee1
Updated 'phase_frac_constraint' name to match where it is used elsewhere
tannerpolley Dec 11, 2025
45d0e0e
Ran black and reverted some changes that caused errors. Pushes these …
tannerpolley Jan 15, 2026
eabdcc7
Reverted `generic_property.py` to the main branch state since the cha…
tannerpolley Jan 15, 2026
262b12e
Reverted `generic_property.py` to the main branch state since the cha…
tannerpolley Jan 15, 2026
0041d7a
Ran black
tannerpolley Jan 16, 2026
a5e7300
Ran black
tannerpolley Jan 16, 2026
7224127
Ran black
tannerpolley Jan 16, 2026
25f72bc
Ran black
tannerpolley Jan 16, 2026
7635e6a
Ran black
tannerpolley Jan 16, 2026
adc4d03
Ran black
tannerpolley Jan 16, 2026
c88eafd
Ran black
tannerpolley Jan 16, 2026
7590db4
Trigger CI
tannerpolley Jan 16, 2026
4052f35
Inserted temperature bounds back into `_teq` to prevent evaluation er…
tannerpolley Jan 16, 2026
a45e00f
Uncommented section for testing phase equilibrium initializer object …
tannerpolley Feb 19, 2026
9494de6
Actually needed to change the number of asserted residuals to 2 rathe…
tannerpolley Feb 19, 2026
7f6c38f
Removed last unnecessary print statements
tannerpolley Feb 21, 2026
6e78996
legacy scaling Pressure sweep was failing with new Pyomo version on l…
tannerpolley Feb 21, 2026
1480dcc
Black
tannerpolley Feb 21, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@
"source": [
"import sys\n",
"import os\n",
"sys.path.append(os.path.abspath('..')) # current folder is ~/examples\n",
"\n",
"sys.path.append(os.path.abspath(\"..\")) # current folder is ~/examples\n",
"import pandas as pd\n",
"from idaes.apps.uncertainty_propagation.uncertainties import quantify_propagate_uncertainty\n",
"from idaes.apps.uncertainty_propagation.examples.NRTL_model_scripts import NRTL_model, NRTL_model_opt"
"from idaes.apps.uncertainty_propagation.uncertainties import (\n",
" quantify_propagate_uncertainty,\n",
")\n",
"from idaes.apps.uncertainty_propagation.examples.NRTL_model_scripts import (\n",
" NRTL_model,\n",
" NRTL_model_opt,\n",
")"
]
},
{
Expand All @@ -41,11 +47,14 @@
"outputs": [],
"source": [
"def SSE(model, data):\n",
" expr = ((float(data[\"vap_benzene\"]) -\n",
" model.fs.flash.vap_outlet.mole_frac_comp[0, \"benzene\"])**2 +\n",
" (float(data[\"liq_benzene\"]) -\n",
" model.fs.flash.liq_outlet.mole_frac_comp[0, \"benzene\"])**2)\n",
" return expr*1E4"
" expr = (\n",
" float(data[\"vap_benzene\"])\n",
" - model.fs.flash.vap_outlet.mole_frac_comp[0, \"benzene\"]\n",
" ) ** 2 + (\n",
" float(data[\"liq_benzene\"])\n",
" - model.fs.flash.liq_outlet.mole_frac_comp[0, \"benzene\"]\n",
" ) ** 2\n",
" return expr * 1e4"
]
},
{
Expand All @@ -54,9 +63,12 @@
"metadata": {},
"outputs": [],
"source": [
"variable_name = [\"fs.properties.tau['benzene', 'toluene']\", \"fs.properties.tau['toluene','benzene']\"]\n",
"variable_name = [\n",
" \"fs.properties.tau['benzene', 'toluene']\",\n",
" \"fs.properties.tau['toluene','benzene']\",\n",
"]\n",
"current_path = os.path.dirname(os.path.realpath(__file__))\n",
"data = pd.read_csv(os.path.join(current_path, 'BT_NRTL_dataset.csv'))"
"data = pd.read_csv(os.path.join(current_path, \"BT_NRTL_dataset.csv\"))"
]
},
{
Expand All @@ -65,7 +77,9 @@
"metadata": {},
"outputs": [],
"source": [
"results = quantify_propagate_uncertainty(NRTL_model,NRTL_model_opt, data, variable_name, SSE)"
"results = quantify_propagate_uncertainty(\n",
" NRTL_model, NRTL_model_opt, data, variable_name, SSE\n",
")"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@
"source": [
"import sys\n",
"import os\n",
"sys.path.append(os.path.abspath('..')) # current folder is ~/examples\n",
"\n",
"sys.path.append(os.path.abspath(\"..\")) # current folder is ~/examples\n",
"import pandas as pd\n",
"from idaes.apps.uncertainty_propagation.uncertainties import quantify_propagate_uncertainty\n",
"from idaes.apps.uncertainty_propagation.examples.rooney_biegler import rooney_biegler_model,rooney_biegler_model_opt"
"from idaes.apps.uncertainty_propagation.uncertainties import (\n",
" quantify_propagate_uncertainty,\n",
")\n",
"from idaes.apps.uncertainty_propagation.examples.rooney_biegler import (\n",
" rooney_biegler_model,\n",
" rooney_biegler_model_opt,\n",
")"
]
},
{
Expand All @@ -41,7 +47,9 @@
"outputs": [],
"source": [
"def SSE(model, data):\n",
" expr = sum((data.y[i] - model.response_function[data.hour[i]])**2 for i in data.index)\n",
" expr = sum(\n",
" (data.y[i] - model.response_function[data.hour[i]]) ** 2 for i in data.index\n",
" )\n",
" return expr"
]
},
Expand All @@ -51,14 +59,11 @@
"metadata": {},
"outputs": [],
"source": [
"variable_name = ['asymptote', 'rate_constant']\n",
"data = pd.DataFrame(data=[[1,8.3],\n",
" [2,10.3],\n",
" [3,19.0],\n",
" [4,16.0],\n",
" [5,15.6],\n",
" [7,19.8]],\n",
" columns=['hour', 'y'])"
"variable_name = [\"asymptote\", \"rate_constant\"]\n",
"data = pd.DataFrame(\n",
" data=[[1, 8.3], [2, 10.3], [3, 19.0], [4, 16.0], [5, 15.6], [7, 19.8]],\n",
" columns=[\"hour\", \"y\"],\n",
")"
]
},
{
Expand All @@ -67,7 +72,9 @@
"metadata": {},
"outputs": [],
"source": [
"results = quantify_propagate_uncertainty(rooney_biegler_model,rooney_biegler_model_opt, data, variable_name, SSE)"
"results = quantify_propagate_uncertainty(\n",
" rooney_biegler_model, rooney_biegler_model_opt, data, variable_name, SSE\n",
")"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2873,6 +2873,7 @@ def build(self):
initialize=t_value,
doc="Temperature for calculating phase equilibrium",
units=t_units,
bounds=self.temperature.bounds,
)

# Create common components for each property package
Expand Down
Loading
Loading