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 Modified ADM1 flowsheet #1469

Merged
merged 243 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
7d35890
add
luohezhiming Mar 16, 2023
4766c52
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 16, 2023
ef81bae
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 22, 2023
168bbaf
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 27, 2023
a09b4e9
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 30, 2023
44a22e8
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 31, 2023
1c1a135
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 5, 2023
401f997
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 10, 2023
258f6fe
delete redundant files
luohezhiming Apr 11, 2023
2c994c3
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 17, 2023
5b6baed
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 21, 2023
0afa551
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 24, 2023
479fb6d
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 28, 2023
b393ed0
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 9, 2023
708ad0a
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 12, 2023
5a69761
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 17, 2023
112415a
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 19, 2023
93737c0
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 25, 2023
3162e34
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 26, 2023
637b32d
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 29, 2023
ea4e066
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 5, 2023
84a2900
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 7, 2023
17bc5e3
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 12, 2023
f816483
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 13, 2023
fea68e3
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 14, 2023
c19fba5
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 20, 2023
0754d21
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 22, 2023
9dcece1
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 22, 2023
a5325c9
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 27, 2023
c4bc3ef
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 5, 2023
bb8ca41
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 7, 2023
5afdc55
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 11, 2023
35ecf79
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 12, 2023
fb2a100
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 17, 2023
40b4de5
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 19, 2023
72f6f25
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 21, 2023
ece1d2f
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 2, 2023
a861a5b
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 7, 2023
d58a9a7
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 9, 2023
4968282
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 19, 2023
acfd9f6
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 23, 2023
a97fbe3
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 24, 2023
2fc2425
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 25, 2023
581dec0
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Sep 4, 2023
3202970
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Sep 20, 2023
625e610
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Sep 25, 2023
2a37aca
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 2, 2023
1fa9316
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 3, 2023
74811ea
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 16, 2023
a89268c
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 16, 2023
09cf01e
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 19, 2023
4070fa1
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 20, 2023
0d6fe1a
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Oct 23, 2023
0f09c3c
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 6, 2023
5f82e05
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 9, 2023
025f9b6
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 13, 2023
af92e14
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 15, 2023
c61fc6d
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 16, 2023
87fbfaf
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 17, 2023
cc20cf2
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 22, 2023
20a0b7b
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 22, 2023
7e4224f
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 27, 2023
e48e352
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Nov 30, 2023
2e0c474
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Dec 6, 2023
88c873d
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Dec 7, 2023
d75ea4e
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Dec 14, 2023
4cc24eb
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Dec 15, 2023
64eb819
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Dec 30, 2023
3b03877
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 2, 2024
9757884
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 5, 2024
cc171a6
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 12, 2024
fbdfae9
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 19, 2024
799e3b0
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 25, 2024
324685e
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jan 30, 2024
4158c7e
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 2, 2024
5f8b7d1
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 5, 2024
17d268c
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 7, 2024
383a9d8
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 7, 2024
9a05662
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 28, 2024
dd00a3f
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 28, 2024
8175c28
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 28, 2024
252b899
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Feb 29, 2024
9de729a
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 4, 2024
349b52c
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 4, 2024
b0e7287
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 12, 2024
74abee6
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 21, 2024
dc73edf
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 25, 2024
8fd87d2
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 25, 2024
50703b1
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Mar 26, 2024
2e44849
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 1, 2024
4bc5fe6
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 4, 2024
fa9c6df
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 12, 2024
1c09fe1
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 24, 2024
aed90ee
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 26, 2024
98a5258
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Apr 29, 2024
b2e24bf
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 3, 2024
46053da
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 9, 2024
47ab6de
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 13, 2024
97f6b5b
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming May 28, 2024
6750049
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 5, 2024
8f709ff
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 6, 2024
a0e2e25
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 6, 2024
af1dc9a
Finish implementation of adm1/asm2d translator
MarcusHolly Jun 13, 2024
8318db2
Resolve inconsistent unit errors
MarcusHolly Jun 13, 2024
c0b8329
Update test file
MarcusHolly Jun 13, 2024
b1273c4
Remove completed to-do item
MarcusHolly Jun 13, 2024
5a56f34
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 14, 2024
df81af7
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 17, 2024
6b6a448
Add Soraya's scaling improvements
MarcusHolly Jun 17, 2024
66a7c44
Address minor formatting issues
MarcusHolly Jun 17, 2024
07ff096
Add BSM2 flowsheet w/new translator
MarcusHolly Jun 18, 2024
8133b7a
New flowsheet solving with Bio_P=True
MarcusHolly Jun 18, 2024
906fb13
Minor improvements to BSM2
MarcusHolly Jun 19, 2024
4953299
BioP=True solves & BioP=False fails
MarcusHolly Jun 19, 2024
f5ee78f
Update translator documentation
MarcusHolly Jun 19, 2024
49ce16c
Correct imports in test file
MarcusHolly Jun 19, 2024
5731370
Try automating scaling
MarcusHolly Jun 20, 2024
7e631e2
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 20, 2024
22c3091
Test autoscaling function
MarcusHolly Jun 21, 2024
98978a0
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 24, 2024
4159a92
Update AD initialization
MarcusHolly Jun 24, 2024
5ab832a
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 24, 2024
22fd6a9
Delete new files and update old files
MarcusHolly Jun 24, 2024
321b16e
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 26, 2024
a205a7a
Add Chenyu's versions of solved flowsheets
MarcusHolly Jun 26, 2024
87ccc2f
Clean up flowsheets
MarcusHolly Jun 26, 2024
7150b66
Update test solutions
MarcusHolly Jun 27, 2024
b7b2c17
Minor cleanup
MarcusHolly Jun 27, 2024
d637ff4
Add scaling factor that was accidentally deleted
MarcusHolly Jun 27, 2024
33b52e3
Add bac 2nd conservation test
MarcusHolly Jun 27, 2024
9125cda
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 27, 2024
4617c92
Address some electroN-P issues
MarcusHolly Jun 27, 2024
c7b9d56
Add scaling function to BSM2 ui file
MarcusHolly Jun 27, 2024
735b8a7
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 27, 2024
a95b8e8
Update test files
MarcusHolly Jun 27, 2024
07ffba0
address Pylint issue
MarcusHolly Jun 27, 2024
9901f3d
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 27, 2024
0aaac45
Change from rel to abs
MarcusHolly Jun 27, 2024
b42f408
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 28, 2024
7d31abb
Change rel to abs for zero-values
MarcusHolly Jun 28, 2024
0e93eb2
Try updating UI file
MarcusHolly Jun 28, 2024
90e6a4e
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jun 28, 2024
59dec65
Remove costing terms from extended BSM2 GUI
MarcusHolly Jun 28, 2024
047b8c8
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 28, 2024
e80d531
Remove bio_P config option
MarcusHolly Jun 28, 2024
dfc95ca
Address merge conflict
MarcusHolly Jun 28, 2024
9c9655e
Chane one more rel to abs
MarcusHolly Jun 29, 2024
814c527
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jun 29, 2024
4e3bc98
Comment out bio_P=False testing and use bio_P=True in UI
MarcusHolly Jul 1, 2024
7b7aba8
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jul 1, 2024
bf0bd1b
Add costing to ui
MarcusHolly Jul 1, 2024
d240381
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jul 1, 2024
5385f9f
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 1, 2024
b64fba3
Address merge conflict
MarcusHolly Jul 2, 2024
65794b6
Replace bio with X_{bio}
MarcusHolly Jul 2, 2024
0e157dd
Delete unnecessary outputs from electroNP flowsheet
MarcusHolly Jul 2, 2024
5674852
Correct mistake in ADM1-ASM2d translator
MarcusHolly Jul 2, 2024
05de86b
Merge branch 'main' into new_adm1_asm2d_interface
lbianchi-lbl Jul 3, 2024
fa128e1
Flowsheet solving for bio_P = False
MarcusHolly Jul 3, 2024
46872d3
Update both translator files based on Xavi feedback
MarcusHolly Jul 5, 2024
5214c59
Merge branch 'new_adm1_asm2d_interface' of https://github.com/MarcusH…
MarcusHolly Jul 5, 2024
81a0233
Undo unit changes in ASM2d/ADM1 translator
MarcusHolly Jul 5, 2024
f898cb6
Correct typo
MarcusHolly Jul 5, 2024
f8471ae
Update adm1_asm2d test
MarcusHolly Jul 5, 2024
c9eb9d2
Update documentation
MarcusHolly Jul 5, 2024
1e6e114
Revised version of BSM2 and electroNP
luohezhiming Jul 11, 2024
7ca83c3
Merge branch 'new_adm1_asm2d_interface' of https://github.com/MarcusH…
MarcusHolly Jul 11, 2024
656fb38
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jul 11, 2024
b469c9b
Clean up BSM2_P_extension flowsheet
MarcusHolly Jul 11, 2024
230a4d3
Update BSM2 w/ P extension tests
MarcusHolly Jul 11, 2024
ffed59c
Update electroN-P flowsheet tests
MarcusHolly Jul 11, 2024
3a1be89
Update BSM2-P GUI
MarcusHolly Jul 11, 2024
3ea1f3c
Address pylint issue
MarcusHolly Jul 11, 2024
c719fbe
Delete tests for bio_P=True
MarcusHolly Jul 11, 2024
46071a5
Have GUI use bio_P=False instead of bio_P=True
MarcusHolly Jul 11, 2024
c6700b5
Put common translator parameters inside of ADM1 reaction package
MarcusHolly Jul 12, 2024
9bc5840
Use watertap solver instead of IDAES
MarcusHolly Jul 16, 2024
b3cd2bf
Update tests for bio_P=True and bio_P=False
MarcusHolly Jul 16, 2024
95a6f9b
Add config option for bio_P into GUI
MarcusHolly Jul 16, 2024
f8476c2
Address pylint issues
MarcusHolly Jul 16, 2024
cbbfe6f
Try to resolve remaining test failures
MarcusHolly Jul 16, 2024
bb95f8d
Add watertap get_solver to test file
MarcusHolly Jul 16, 2024
cc3f243
Get rid of config option in BSM2-P GUI
MarcusHolly Jul 16, 2024
b63ce95
Try to resolve GUI issue
MarcusHolly Jul 16, 2024
9bd6313
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 16, 2024
4dc04b3
Minor change to flowsheet scaling
MarcusHolly Jul 17, 2024
4e8d9ed
Add require_idaes_solver to BSM2-P GUI
MarcusHolly Jul 17, 2024
0729d39
Resolve solving issue
luohezhiming Jul 17, 2024
cc61553
Merge branch 'new_adm1_asm2d_interface' of https://github.com/MarcusH…
luohezhiming Jul 17, 2024
a7bdd21
Comment out everything related to costing
MarcusHolly Jul 17, 2024
77bd768
Merge branch 'new_adm1_asm2d_interface' of https://github.com/MarcusH…
MarcusHolly Jul 17, 2024
c06fe0f
Address Pylint issues
MarcusHolly Jul 17, 2024
3313322
Address Pylint issues
MarcusHolly Jul 17, 2024
b18c7f2
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jul 17, 2024
53baefd
Delete BSM2_electroNP flowsheet
MarcusHolly Jul 18, 2024
88955db
Merge branch 'main' into new_adm1_asm2d_interface
MarcusHolly Jul 18, 2024
a47df08
Modified ADM1 flowsheet
luohezhiming Jul 19, 2024
dcd21d7
Modified ADM1 flowsheet
luohezhiming Jul 22, 2024
9ff6789
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 22, 2024
e814729
Merge branch 'main' into modified_ADM1_flowsheet
luohezhiming Jul 22, 2024
c80fd4d
propagate_state initialization
luohezhiming Jul 23, 2024
16d0c8e
Merge branch 'main' into modified_ADM1_flowsheet
adam-a-a Jul 23, 2024
4c6e64a
pure AD flowsheet
luohezhiming Jul 23, 2024
17df1d5
Update conc_mass_comp scaling
MarcusHolly Jul 26, 2024
3c29568
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Jul 28, 2024
6c558c6
Merge branch 'modified_ADM1_flowsheet' of https://github.com/luohezhi…
luohezhiming Jul 28, 2024
2a534c2
Merge branch 'main' into modified_ADM1_flowsheet
luohezhiming Jul 28, 2024
179d7b9
AD scaling modified; flowsheet scaling modified
luohezhiming Jul 28, 2024
d4b0c20
working version of BSM2_P_extension
luohezhiming Aug 7, 2024
2007816
clean working version with BSM2_P_extension
luohezhiming Aug 7, 2024
d0afa4e
working version of BSM2_electroNP
luohezhiming Aug 8, 2024
3c25953
add tests for modified_ADM1_flowsheet
luohezhiming Aug 8, 2024
1d80142
edit testing files
luohezhiming Aug 8, 2024
927a6ce
requires_idaes_solver
luohezhiming Aug 12, 2024
ec5a083
add requires_idaes_solver to BSM2_electroNP flowsheet
luohezhiming Aug 12, 2024
ba4789e
switch to ipopt-watertap solver
luohezhiming Aug 19, 2024
2e16921
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 19, 2024
9680dc3
Merge branch 'main' into modified_ADM1_flowsheet
luohezhiming Aug 19, 2024
76c8835
revise solver of BSM2_electroNP
luohezhiming Aug 22, 2024
c515d2d
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Aug 22, 2024
859c292
Merge branch 'main' into modified_ADM1_flowsheet
luohezhiming Aug 22, 2024
2ee5726
rescale flow_vol to 1e0
luohezhiming Aug 22, 2024
8313762
change scaling factor of electroNP_ZO
luohezhiming Aug 22, 2024
27c09fd
Adjust scaling
luohezhiming Aug 26, 2024
e2d57f3
Adjust modified ADM1 flowsheet tests
luohezhiming Aug 27, 2024
375510d
pass test
luohezhiming Aug 27, 2024
aad9ab6
pass reaction test with scaling factor set to 1e-5
luohezhiming Aug 28, 2024
a340b80
code linting
luohezhiming Aug 28, 2024
1a5bb67
code linting
luohezhiming Aug 28, 2024
8584a63
code linting DOF of AD
luohezhiming Aug 28, 2024
739e2dd
clean code
luohezhiming Aug 29, 2024
fa4e05c
Replace modified ADM1 flowsheet initialization w/Seq.Decomp
MarcusHolly Aug 30, 2024
9575336
Uncomment DOF check
MarcusHolly Aug 30, 2024
83dd20e
adjust scaling
luohezhiming Aug 30, 2024
c7cc352
Merge branch 'modified_ADM1_flowsheet' of https://github.com/luohezhi…
luohezhiming Aug 30, 2024
da9d7ed
Merge branch 'main' of https://github.com/watertap-org/watertap
luohezhiming Sep 4, 2024
f65e70a
change name of modified_ADM1_flowsheet
luohezhiming Sep 4, 2024
2bb8111
Merge branch 'main' into modified_ADM1_flowsheet
luohezhiming Sep 4, 2024
2210cf9
Change small test values from rel to abs tolerance
MarcusHolly Sep 5, 2024
8ae422f
change rel to abs
luohezhiming Sep 5, 2024
83e54ef
Merge branch 'modified_ADM1_flowsheet' of https://github.com/luohezhi…
luohezhiming Sep 5, 2024
f8c33e8
clean code
luohezhiming Sep 5, 2024
23f0385
Revised settings for electroNP
luohezhiming Sep 5, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
#################################################################################
# WaterTAP Copyright (c) 2020-2024, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory, Oak Ridge National Laboratory,
# National Renewable Energy Laboratory, and National Energy Technology
# Laboratory (subject to receipt of any required approvals from the U.S. Dept.
# of Energy). All rights reserved.
#
# Please see the files COPYRIGHT.md and LICENSE.md for full copyright and license
# information, respectively. These files are also available online at the URL
# "https://github.com/watertap-org/watertap/"
#################################################################################
"""
Flowsheet example full Water Resource Recovery Facility
(WRRF; a.k.a., wastewater treatment plant) with ASM2d and ADM1 with P extension.

The flowsheet follows the same formulation as benchmark simulation model no.2 (BSM2)
but comprises different specifications for default values than BSM2.
"""

# Some more information about this module
__author__ = "Chenyu Wang, Adam Atia, Alejandro Garciadiego, Marcus Holly"

import pyomo.environ as pyo
from pyomo.network import Arc, SequentialDecomposition

from idaes.core import (
FlowsheetBlock,
# UnitModelCostingBlock,
)
from idaes.models.unit_models import (
Feed,
Product,
)
from watertap.core.solvers import get_solver
from idaes.core.util.model_statistics import degrees_of_freedom
import idaes.logger as idaeslog
import idaes.core.util.scaling as iscale
from idaes.core.util.tables import (
create_stream_table_dataframe,
stream_table_dataframe_to_string,
)
from watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_properties import (
ModifiedADM1ParameterBlock,
)
from watertap.property_models.unit_specific.anaerobic_digestion.adm1_properties_vapor import (
ADM1_vaporParameterBlock,
)
from watertap.property_models.unit_specific.anaerobic_digestion.modified_adm1_reactions import (
ModifiedADM1ReactionParameterBlock,
)
from watertap.property_models.unit_specific.activated_sludge.modified_asm2d_properties import (
ModifiedASM2dParameterBlock,
)
from watertap.property_models.unit_specific.activated_sludge.modified_asm2d_reactions import (
ModifiedASM2dReactionParameterBlock,
)
from watertap.unit_models.translators.translator_adm1_asm2d import (
Translator_ADM1_ASM2D,
)
from watertap.unit_models.translators.translator_asm2d_adm1 import Translator_ASM2d_ADM1
from watertap.unit_models.anaerobic_digester import AD
from watertap.core.util.initialization import (
check_solve,
)


from idaes.core.util.initialization import (
propagate_state as _pro_state,
)

# Set up logger
_log = idaeslog.getLogger(__name__)


def propagate_state(arc):
_pro_state(arc)
print(arc.destination.name)
arc.destination.display()


def main(bio_P=False):
m = build(bio_P=bio_P)
set_operating_conditions(m)

initialize_system(m)

results = solve(m)

pyo.assert_optimal_termination(results)
check_solve(
results,
checkpoint="re-solve with controls in place",
logger=_log,
fail_flag=True,
)

return m, results


def build(bio_P=False):
m = pyo.ConcreteModel()

m.fs = FlowsheetBlock(dynamic=False)

# Properties
m.fs.props_ASM2D = ModifiedASM2dParameterBlock()
m.fs.rxn_props_ASM2D = ModifiedASM2dReactionParameterBlock(
property_package=m.fs.props_ASM2D
)
m.fs.props_ADM1 = ModifiedADM1ParameterBlock()
m.fs.props_vap_ADM1 = ADM1_vaporParameterBlock()
m.fs.rxn_props_ADM1 = ModifiedADM1ReactionParameterBlock(
property_package=m.fs.props_ADM1
)

# Feed water stream
m.fs.FeedWater = Feed(property_package=m.fs.props_ASM2D)

# ======================================================================
# Anaerobic digester section
# ASM2d-ADM1 translator
m.fs.translator_asm2d_adm1 = Translator_ASM2d_ADM1(
inlet_property_package=m.fs.props_ASM2D,
outlet_property_package=m.fs.props_ADM1,
inlet_reaction_package=m.fs.rxn_props_ASM2D,
outlet_reaction_package=m.fs.rxn_props_ADM1,
has_phase_equilibrium=False,
outlet_state_defined=True,
bio_P=bio_P,
)

# Anaerobic digester
m.fs.AD = AD(
liquid_property_package=m.fs.props_ADM1,
vapor_property_package=m.fs.props_vap_ADM1,
reaction_package=m.fs.rxn_props_ADM1,
has_heat_transfer=True,
has_pressure_change=False,
)

# ADM1-ASM2d translator
m.fs.translator_adm1_asm2d = Translator_ADM1_ASM2D(
inlet_property_package=m.fs.props_ADM1,
outlet_property_package=m.fs.props_ASM2D,
inlet_reaction_package=m.fs.rxn_props_ADM1,
outlet_reaction_package=m.fs.rxn_props_ASM2D,
has_phase_equilibrium=False,
outlet_state_defined=True,
)

# Product Blocks
m.fs.Treated = Product(property_package=m.fs.props_ASM2D)

# ======================================================================
# Link units related to AD section
m.fs.stream_feed_translator = Arc(
source=m.fs.FeedWater.outlet, destination=m.fs.translator_asm2d_adm1.inlet
)
m.fs.stream_translator_AD = Arc(
source=m.fs.translator_asm2d_adm1.outlet, destination=m.fs.AD.inlet
)
m.fs.stream_AD_translator = Arc(
source=m.fs.AD.liquid_outlet, destination=m.fs.translator_adm1_asm2d.inlet
)
m.fs.stream_translator_product = Arc(
source=m.fs.translator_adm1_asm2d.outlet, destination=m.fs.Treated.inlet
)
pyo.TransformationFactory("network.expand_arcs").apply_to(m)

return m


def set_operating_conditions(m, bio_P=False):
# Feed Water Conditions
print(f"DOF before feed: {degrees_of_freedom(m)}")
m.fs.FeedWater.flow_vol.fix(0.003 * pyo.units.m**3 / pyo.units.s)
m.fs.FeedWater.temperature.fix(308.15 * pyo.units.K)
m.fs.FeedWater.pressure.fix(1 * pyo.units.atm)

if bio_P is True:
m.fs.FeedWater.conc_mass_comp[0, "S_A"].fix(
0.10149 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_F"].fix(
0.16194 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_I"].fix(
0.057450 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_N2"].fix(
0.035564 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_NH4"].fix(
0.028441 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_NO3"].fix(
0.0019361 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_O2"].fix(
0.0013728 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_PO4"].fix(
0.024301 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_K"].fix(
0.37885 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_Mg"].fix(
0.026905 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_IC"].fix(
0.072407 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_AUT"].fix(
0.24933 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_H"].fix(
22.977 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_I"].fix(
11.291 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PAO"].fix(
10.774 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PHA"].fix(
0.0057883 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PP"].fix(
2.8615 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_S"].fix(
3.8008 * pyo.units.kg / pyo.units.m**3
)
else:
m.fs.FeedWater.conc_mass_comp[0, "S_A"].fix(
0.097604 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_F"].fix(
0.14920 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_I"].fix(
0.057450 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_N2"].fix(
0.036043 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_NH4"].fix(
0.029005 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_NO3"].fix(
0.0021103 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_O2"].fix(
0.0013285 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_PO4"].fix(
0.74146 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_K"].fix(
0.37626 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_Mg"].fix(
0.024023 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "S_IC"].fix(
0.073753 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_AUT"].fix(
0.27593 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_H"].fix(
23.397 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_I"].fix(
11.414 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PAO"].fix(
10.142 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PHA"].fix(
0.0044135 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_PP"].fix(
2.7040 * pyo.units.kg / pyo.units.m**3
)
m.fs.FeedWater.conc_mass_comp[0, "X_S"].fix(
3.9110 * pyo.units.kg / pyo.units.m**3
)

# AD
m.fs.AD.volume_liquid.fix(3400)
m.fs.AD.volume_vapor.fix(300)
m.fs.AD.liquid_outlet.temperature.fix(308.15)

def scale_variables(m):
for var in m.fs.component_data_objects(pyo.Var, descend_into=True):
if "flow_vol" in var.name:
iscale.set_scaling_factor(var, 1e0)
if "temperature" in var.name:
iscale.set_scaling_factor(var, 1e-2)
if "pressure" in var.name:
iscale.set_scaling_factor(var, 1e-5)
if "conc_mass_comp" in var.name:
iscale.set_scaling_factor(var, 1e1)

# Apply scaling
scale_variables(m)
iscale.calculate_scaling_factors(m.fs)


def initialize_system(m):
# Initialize flowsheet
seq = SequentialDecomposition()
seq.options.tear_set = []

def function(unit):
unit.initialize(outlvl=idaeslog.INFO, solver="ipopt-watertap")

seq.run(m, function)


def solve(m, solver=None):
if solver is None:
solver = get_solver()
results = solver.solve(m, tee=True)
pyo.assert_optimal_termination(results)
return results


if __name__ == "__main__":
# This method builds and runs a steady state activated sludge flowsheet.
m, results = main(bio_P=True)

stream_table = create_stream_table_dataframe(
{
"Feed": m.fs.FeedWater.outlet,
"ASM-ADM translator inlet": m.fs.translator_asm2d_adm1.inlet,
"AD inlet": m.fs.AD.inlet,
"Treated water": m.fs.Treated.inlet,
},
time_point=0,
)
print(stream_table_dataframe_to_string(stream_table))
Loading
Loading