Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion watertap/data/techno_economic/nanofiltration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ rHGO_dye_rejection:
units: dimensionless
constituent_longform: Total Dissolved Solids (TDS)
applied_pressure:
value: 7 # corresponds to default of 100 psi
value: 2 # corresponds to default of 29 psi
units: bar
water_permeability_coefficient:
value: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ def test_set_operating_conditions(self, system_frame):
)

# test pump block
assert pytest.approx(7, rel=1e-5) == value(
assert pytest.approx(2, rel=1e-5) == value(
m.fs.dye_separation.P1.applied_pressure[0]
)

# test nanofiltration
assert pytest.approx(359.7653, rel=1e-5) == value(
assert pytest.approx(1259.18, rel=1e-5) == value(
m.fs.dye_separation.nanofiltration.area
)

Expand Down Expand Up @@ -162,12 +162,12 @@ def test_set_operating_conditions(self, system_frame):
assert pytest.approx(0.2, rel=1e-5) == value(m.fs.feed.conc_mass_comp[0, "dye"])

# test pump block
assert pytest.approx(7, rel=1e-5) == value(
assert pytest.approx(2, rel=1e-5) == value(
m.fs.dye_separation.P1.applied_pressure[0]
)

# test nanofiltration
assert pytest.approx(359.8925, rel=1e-5) == value(
assert pytest.approx(1259.62, rel=1e-5) == value(
m.fs.dye_separation.nanofiltration.area
)

Expand Down Expand Up @@ -262,12 +262,12 @@ def test_set_operating_conditions(self, system_frame):
assert pytest.approx(0.2, rel=1e-5) == value(m.fs.feed.conc_mass_comp[0, "dye"])

# test pump block
assert pytest.approx(7, rel=1e-5) == value(
assert pytest.approx(2, rel=1e-5) == value(
m.fs.dye_separation.P1.applied_pressure[0]
)

# test nanofiltration
assert pytest.approx(359.8925, rel=1e-5) == value(
assert pytest.approx(1259.62, rel=1e-5) == value(
m.fs.dye_separation.nanofiltration.area
)

Expand Down Expand Up @@ -367,12 +367,12 @@ def test_set_operating_conditions(self, system_frame):
)

# test pump block
assert pytest.approx(7, rel=1e-5) == value(
assert pytest.approx(2, rel=1e-5) == value(
m.fs.dye_separation.P1.applied_pressure[0]
)

# test nanofiltration
assert pytest.approx(359.8925, rel=1e-5) == value(
assert pytest.approx(1259.62, rel=1e-5) == value(
m.fs.dye_separation.nanofiltration.area
)

Expand Down Expand Up @@ -426,8 +426,8 @@ def test_costing(self, system_frame):
assert_optimal_termination(results)

# check costing
assert pytest.approx(0.97535, rel=1e-3) == value(m.fs.LCOW)
assert pytest.approx(-0.256495, rel=1e-3) == value(m.fs.LCOT)
assert pytest.approx(0.965823, rel=1e-3) == value(m.fs.LCOW)
assert pytest.approx(-0.2653945, rel=1e-3) == value(m.fs.LCOT)

@pytest.mark.component
@pytest.mark.requires_idaes_solver
Expand Down Expand Up @@ -465,12 +465,12 @@ def test_set_operating_conditions(self, system_frame):
assert pytest.approx(0.2, rel=1e-5) == value(m.fs.feed.conc_mass_comp[0, "dye"])

# test pump block
assert pytest.approx(7, rel=1e-5) == value(
assert pytest.approx(2, rel=1e-5) == value(
m.fs.dye_separation.P1.applied_pressure[0]
)

# test nanofiltration
assert pytest.approx(359.8925, rel=1e-5) == value(
assert pytest.approx(1259.62, rel=1e-5) == value(
m.fs.dye_separation.nanofiltration.area
)

Expand Down Expand Up @@ -523,8 +523,8 @@ def test_costing(self, system_frame):
assert_optimal_termination(results)

# check costing
assert pytest.approx(0.435911, rel=1e-3) == value(m.fs.LCOW)
assert pytest.approx(-0.76109, rel=1e-3) == value(m.fs.LCOT)
assert pytest.approx(0.426391, rel=1e-3) == value(m.fs.LCOW)
assert pytest.approx(-0.77, rel=1e-3) == value(m.fs.LCOT)

@pytest.mark.component
@pytest.mark.requires_idaes_solver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

# test the first 11 case studies that can be run with or without RO
pytest_parameterize_NF = list(range(1, 12))
# then test case studies 9-11 that can only run with RO
pytest_parameterize_RO = list(range(12, 18))
# then test case studies 12-20 that can only run with RO
pytest_parameterize_RO = list(range(12, 20))


@pytest.mark.parametrize("case_num", pytest_parameterize_NF)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def test_solution(self, model):
assert pytest.approx(23.710346, rel=1e-5) == value(
model.fs.unit.properties_byproduct[0].conc_mass_comp["dye"]
)
assert pytest.approx(4.605479, rel=1e-5) == value(model.fs.unit.area)
assert pytest.approx(16.119175, rel=1e-5) == value(model.fs.unit.area)
assert pytest.approx(0.9899499, rel=1e-5) == value(
model.fs.unit.rejection_comp[0, "dye"]
)
Expand Down Expand Up @@ -496,8 +496,8 @@ def test_costing_non_default_subtype():
# Check for optimal solution
assert check_optimal_termination(results)

assert pytest.approx(46290.20269, rel=1e-5) == value(m.fs.unit.area)
assert pytest.approx(2.31451, rel=1e-5) == value(m.fs.unit.costing.capital_cost)
assert pytest.approx(0.462902, rel=1e-5) == value(
assert pytest.approx(162015.7094, rel=1e-5) == value(m.fs.unit.area)
assert pytest.approx(8.10079, rel=1e-5) == value(m.fs.unit.costing.capital_cost)
assert pytest.approx(1.62016, rel=1e-5) == value(
m.fs.unit.costing.fixed_operating_cost
)
Loading