#################################################################################
# WaterTAP Copyright (c) 2020-2026, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory, Oak Ridge National Laboratory,
# National Laboratory of the Rockies, 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/"
#################################################################################
import pyomo.environ as pyo
from ..util import (
register_costing_parameter_block,
make_capital_cost_var,
cost_steam_flow as util_cost_steam_flow,
)
[docs]def build_steam_ejector_cost_param_block(blk):
"""
Build the costing parameter block for the steam ejector.
"""
blk.base_cost = pyo.Var(
initialize=1949,
doc="Base cost coefficient for steam ejector",
units=pyo.units.USD_2020,
)
blk.cost_exponent = pyo.Var(
initialize=0.3,
doc="Cost scaling exponent",
units=pyo.units.dimensionless,
)
[docs]@register_costing_parameter_block(
build_rule=build_steam_ejector_cost_param_block,
parameter_block_name="steam_ejector",
)
def cost_steam_ejector(blk, cost_steam_flow=False, steam_type="steam"):
"""
Thermo Compressor (Steam Ejector) Costing Method.
Capital cost is calculated using the equation:
Capital Cost (USD) = 1949 × (S + EV)^0.3 (Gabriel 2015, Desalination)
where:
S = Motive steam flow rate (kg/h)
EV = Entrained vapor flow rate (kg/h)
"""
make_capital_cost_var(blk)
blk.costing_package.add_cost_factor(blk, "TIC")
S = pyo.units.convert(
blk.unit_model.properties_motive_steam[0.0].flow_mass_phase_comp["Vap", "H2O"],
to_units=pyo.units.kg / pyo.units.hour,
)
EV = pyo.units.convert(
blk.unit_model.properties_entrained_vapor[0.0].flow_mass_phase_comp[
"Vap", "H2O"
],
to_units=pyo.units.kg / pyo.units.hour,
)
blk.capital_cost_constraint = pyo.Constraint(
expr=blk.capital_cost
== blk.cost_factor
* pyo.units.convert(
blk.costing_package.steam_ejector.base_cost
* (S + EV) ** blk.costing_package.steam_ejector.cost_exponent,
to_units=blk.costing_package.base_currency,
)
)
if cost_steam_flow:
util_cost_steam_flow(
costing_package=blk.costing_package,
steam_cost_type=steam_type,
steam_mass_flow=blk.unit_model.properties_motive_steam[
0.0
].flow_mass_phase_comp["Vap", "H2O"],
steam_pressure=blk.unit_model.properties_motive_steam[0.0].pressure,
)