-
Notifications
You must be signed in to change notification settings - Fork 57
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 NaCl recovery value to crystallizer model #1120
Changes from all commits
0b59610
bd6e3c5
8c0cfb0
1613def
7c88402
5afca59
d4d177b
f201ced
3907d61
74eb982
0b8e1b8
a17266d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,24 +72,24 @@ def test_ideal_naocl_chlorination(): | |
def test_ideal_naocl_chlorination_full_block(): | ||
model = run_chlorination_block_example(fix_free_chlorine=True) | ||
assert model.fs.ideal_naocl_mixer_unit.dosing_rate.value == pytest.approx( | ||
1.7296113311683092e-09, rel=1e-3 | ||
9.505698559578499e-07, rel=1e-3 | ||
) | ||
assert model.fs.ideal_naocl_mixer_unit.outlet.flow_mol[0].value == pytest.approx( | ||
25.000025535888078, rel=1e-3 | ||
) | ||
assert model.fs.ideal_naocl_mixer_unit.outlet.mole_frac_comp[ | ||
0, "OCl_-" | ||
].value == pytest.approx(1.6123004572288052e-07, rel=1e-3) | ||
].value == pytest.approx(5.107133802822922e-07, rel=1e-3) | ||
|
||
assert model.fs.ideal_naocl_chlorination_unit.free_chlorine.value == pytest.approx( | ||
2, rel=1e-3 | ||
) | ||
assert model.fs.ideal_naocl_chlorination_unit.outlet.mole_frac_comp[ | ||
0, "OCl_-" | ||
].value == pytest.approx(5.0027242332010015e-08, rel=1e-3) | ||
].value == pytest.approx(4.5088044031726496e-07, rel=1e-3) | ||
assert model.fs.ideal_naocl_chlorination_unit.outlet.mole_frac_comp[ | ||
0, "H_+" | ||
].value == pytest.approx(1.49011416785194e-10, rel=1e-3) | ||
].value == pytest.approx(5.4260427865375997e-11, rel=1e-3) | ||
Comment on lines
+75
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since these are all close to 0, wonder if they should have absolute tolerances instead of relative tolerances (what we typically want to use for ~0 values). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea good catch, I think that should be the case. |
||
|
||
|
||
@pytest.mark.component | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,12 @@ | |
def test_main(): | ||
m = main() | ||
test_dict = { | ||
"lcow": [m.fs.costing.LCOW, 0.16811587158493219], | ||
"pressure": [m.fs.NF.pump.outlet.pressure[0] / 1e5, 6.56], | ||
"area": [m.fs.NF.nfUnit.area, 285.6900547389303], | ||
"lcow": [m.fs.costing.LCOW, 0.15058960529129017], | ||
"pressure": [m.fs.NF.pump.outlet.pressure[0] / 1e5, 8.13], | ||
"area": [m.fs.NF.nfUnit.area, 423.8956418211484], | ||
"recovery": [ | ||
m.fs.NF.nfUnit.recovery_vol_phase[0.0, "Liq"] * 100, | ||
73.47934090302432, | ||
94.99999441324391, | ||
], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Zhuoran29 can you double check the value of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bknueven Sure, before the change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was able to do this myself: It's actually a bit higher, funnily enough ... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change also brings the converged values without bypass much closer to those with by pass: No Bypass,
No Bypass, with this change:
With Bypass with / without this change:
Comment on lines
+23
to
29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI @avdudchenko |
||
} | ||
for (model_result, testval) in test_dict.values(): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where I changed the domain in the costing package and it creates some different solutions in the testing files below, one of which has a difference larger than 10%. @bknueven @adam-a-a