diff --git a/watertap/costing/unit_models/ion_exchange.py b/watertap/costing/unit_models/ion_exchange.py index 7d2a2117e8..def4444e78 100644 --- a/watertap/costing/unit_models/ion_exchange.py +++ b/watertap/costing/unit_models/ion_exchange.py @@ -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( @@ -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, ) ) diff --git a/watertap/examples/flowsheets/ion_exchange/tests/test_ion_exchange_demo.py b/watertap/examples/flowsheets/ion_exchange/tests/test_ion_exchange_demo.py index 8683c85a88..2cfd9865d2 100644 --- a/watertap/examples/flowsheets/ion_exchange/tests/test_ion_exchange_demo.py +++ b/watertap/examples/flowsheets/ion_exchange/tests/test_ion_exchange_demo.py @@ -151,7 +151,7 @@ def test_specific_operating_conditions(self, ix_0D): assert value(m.fs.costing.specific_energy_consumption) == pytest.approx( 0.057245, rel=1e-3 ) - assert value(m.fs.costing.LCOW) == pytest.approx(0.222437, rel=1e-3) + assert value(m.fs.costing.LCOW) == pytest.approx(0.191008, rel=1e-3) @pytest.mark.component def test_optimization(self, ix_0D): @@ -189,33 +189,33 @@ def test_optimization(self, ix_0D): results = solver.solve(m) assert_optimal_termination(results) assert degrees_of_freedom(m) == 0 - assert value(m.fs.ion_exchange.number_columns) == 6 - assert value(m.fs.ion_exchange.bed_depth) == pytest.approx(1.61147, rel=1e-3) + assert value(m.fs.ion_exchange.number_columns) == 7 + assert value(m.fs.ion_exchange.bed_depth) == pytest.approx(1.38976, rel=1e-3) assert value(m.fs.ion_exchange.t_breakthru) == pytest.approx( - 133404.2583, rel=1e-3 + 133134.2829, rel=1e-3 ) assert value(m.fs.ion_exchange.dimensionless_time) == pytest.approx( 1.33210077, rel=1e-3 ) assert value(m.fs.costing.specific_energy_consumption) == pytest.approx( - 0.051706, rel=1e-3 + 0.039173, rel=1e-3 ) - assert value(m.fs.costing.LCOW) == pytest.approx(0.145645, rel=1e-3) + assert value(m.fs.costing.LCOW) == pytest.approx(0.112747, rel=1e-3) @pytest.mark.unit def test_main_fun(self): m = ixf.main() assert degrees_of_freedom(m) == 0 - assert value(m.fs.ion_exchange.number_columns) == 6 - assert value(m.fs.ion_exchange.bed_depth) == pytest.approx(1.61147, rel=1e-3) + assert value(m.fs.ion_exchange.number_columns) == 7 + assert value(m.fs.ion_exchange.bed_depth) == pytest.approx(1.38976, rel=1e-3) assert value(m.fs.ion_exchange.t_breakthru) == pytest.approx( - 133404.2583, rel=1e-3 + 133134.2829, rel=1e-3 ) assert value(m.fs.ion_exchange.dimensionless_time) == pytest.approx( 1.33210077, rel=1e-3 ) assert value(m.fs.costing.specific_energy_consumption) == pytest.approx( - 0.051706, rel=1e-3 + 0.039173, rel=1e-3 ) - assert value(m.fs.costing.LCOW) == pytest.approx(0.145645, rel=1e-3) + assert value(m.fs.costing.LCOW) == pytest.approx(0.112747, rel=1e-3) diff --git a/watertap/unit_models/tests/test_ion_exchange_0D.py b/watertap/unit_models/tests/test_ion_exchange_0D.py index 381cdf13ed..55793d698a 100644 --- a/watertap/unit_models/tests/test_ion_exchange_0D.py +++ b/watertap/unit_models/tests/test_ion_exchange_0D.py @@ -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 ) @@ -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 ) @@ -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(465913.6619, 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.115619, rel=1e-3) == value(m.fs.costing.LCOW) assert pytest.approx(0.04382530, rel=1e-3) == value( m.fs.costing.specific_energy_consumption )