Skip to content

Commit

Permalink
reconciling ion exchange costing
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Nov 10, 2023
1 parent 846edfc commit 8264aae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
8 changes: 1 addition & 7 deletions watertap/costing/unit_models/ion_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ def build_ion_exhange_cost_param_block(blk):
units=pyo.units.dimensionless,
doc="Number of cycles the regenerant can be reused before disposal",
)
blk.total_installed_cost_factor = pyo.Var(
initialize=1.65,
units=pyo.units.dimensionless,
doc="Costing factor to account for total installed cost of equipment",
)


@register_costing_parameter_block(
Expand Down Expand Up @@ -345,8 +340,7 @@ def cost_ion_exchange(blk):
((blk.capital_cost_vessel + blk.capital_cost_resin) * tot_num_col)
+ blk.capital_cost_backwash_tank
+ blk.capital_cost_regen_tank
)
* ion_exchange_params.total_installed_cost_factor,
),
to_units=blk.costing_package.base_currency,
)
)
Expand Down
24 changes: 12 additions & 12 deletions watertap/unit_models/tests/test_ion_exchange_0D.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,16 @@ def test_costing(self, IX_lang):
results = solver.solve(m, tee=True)
assert_optimal_termination(results)

assert pytest.approx(2.0 * 8894349.86900, rel=1e-3) == value(
assert pytest.approx(2.0 * 8894349.86900 / 1.65, rel=1e-3) == value(
m.fs.costing.aggregate_capital_cost
)
assert pytest.approx(2498819.7327, rel=1e-3) == value(
assert pytest.approx(2288575.0472, rel=1e-3) == value(
m.fs.costing.total_operating_cost
)
assert pytest.approx(17788699.7380, rel=1e-3) == value(
assert pytest.approx(17788699.7380 / 1.65, rel=1e-3) == value(
m.fs.costing.total_capital_cost
)
assert pytest.approx(0.30125629, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.2370983, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.0572452, rel=1e-3) == value(
m.fs.costing.specific_energy_consumption
)
Expand Down Expand Up @@ -611,16 +611,16 @@ def test_costing(self, IX_fr):
results = solver.solve(m, tee=True)
assert_optimal_termination(results)

assert pytest.approx(2.0 * 9701947.4187, rel=1e-3) == value(
assert pytest.approx(2.0 * 9701947.4187 / 1.65, rel=1e-3) == value(
m.fs.costing.aggregate_capital_cost
)
assert pytest.approx(1448862.0602, rel=1e-3) == value(
assert pytest.approx(1219532.1263, rel=1e-3) == value(
m.fs.costing.total_operating_cost
)
assert pytest.approx(19403894.837, rel=1e-3) == value(
assert pytest.approx(19403894.837 / 1.65, rel=1e-3) == value(
m.fs.costing.total_capital_cost
)
assert pytest.approx(0.238664, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.168688, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.04382530, rel=1e-3) == value(
m.fs.costing.specific_energy_consumption
)
Expand Down Expand Up @@ -910,16 +910,16 @@ def test_costing(self, IX_inert):
results = solver.solve(m, tee=True)
assert_optimal_termination(results)

assert pytest.approx(2.0 * 9701947.4187, rel=1e-3) == value(
assert pytest.approx(2.0 * 9701947.4187 / 1.65, rel=1e-3) == value(
m.fs.costing.aggregate_capital_cost
)
assert pytest.approx(695243.5958, rel=1e-3) == value(
assert pytest.approx(1219532.1263, rel=1e-3) == value(
m.fs.costing.total_operating_cost
)
assert pytest.approx(19403894.837, rel=1e-3) == value(
assert pytest.approx(19403894.837 / 1.65, rel=1e-3) == value(
m.fs.costing.total_capital_cost
)
assert pytest.approx(0.18559, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.168688, rel=1e-3) == value(m.fs.costing.LCOW)
assert pytest.approx(0.04382530, rel=1e-3) == value(
m.fs.costing.specific_energy_consumption
)

0 comments on commit 8264aae

Please sign in to comment.