watertap.costing package

Subpackages

Submodules

watertap.costing.util module

watertap.costing.util.cost_by_flow_volume(blk, flow_cost, flow_to_cost)[source]

Generic function for costing by flow volume.

Parameters
  • [currency]/ (flow_cost - The cost of the device in) –

  • [volume]/[time] (flow_to_cost - The flow costed in) –

watertap.costing.util.cost_membrane(blk, membrane_cost, factor_membrane_replacement)[source]

Generic function for costing a membrane. Assumes the unit_model has an area variable or parameter.

Parameters
  • area (membrane_cost - The cost of the membrane in currency per) –

  • factor (factor_membrane_replacement - Membrane replacement) – [fraction of membrane replaced/year]

watertap.costing.watertap_costing_package module

class watertap.costing.watertap_costing_package.WaterTAPCosting(*args, **kwds)

Bases: ProcessBlock

Parameters
  • rule (function) – A rule function or None. Default rule calls build().

  • concrete (bool) – If True, make this a toplevel model. Default - False.

  • ctype (class) –

    Pyomo ctype of the block. Default - pyomo.environ.Block

    Config args

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.

  • idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(WaterTAPCosting) New instance

class watertap.costing.watertap_costing_package.WaterTAPCostingData(component)[source]

Bases: FlowsheetCostingBlockData

add_LCOW(flow_rate, name='LCOW')[source]

Add Levelized Cost of Water (LCOW) to costing block. :param flow_rate - flow rate of water: calculating LCOW :type flow_rate - flow rate of water: volumetric :param name: LCOW) :type name: optional

add_annual_water_production(flow_rate, name='annual_water_production')[source]

Add annual water production to costing block. :param flow_rate - flow rate of water: calculating annual water production :type flow_rate - flow rate of water: volumetric :param name: Expression (default: annual_water_production) :type name: optional

add_defined_flow(flow_name, flow_cost)[source]

This method adds a defined flow to the costing block.

NOTE: Use this method to add defined_flows to the costing block

to ensure updates to flow_cost get propagated in the model. See https://github.com/IDAES/idaes-pse/pull/1014 for details.

Parameters
  • flow_name – string containing the name of the flow to register

  • flow_cost – Pyomo expression that represents the flow unit cost

Returns

None

add_specific_electrical_carbon_intensity(flow_rate, name='specific_electrical_carbon_intensity')[source]

Add specific electrical carbon intensity (kg_CO2eq/m**3) to costing block. :param flow_rate - flow rate of water: calculating specific electrical carbon intensity :type flow_rate - flow rate of water: volumetric :param name: energy consumption (default: specific_electrical_carbon_intensity) :type name: optional

add_specific_energy_consumption(flow_rate, name='specific_energy_consumption')[source]

Add specific energy consumption (kWh/m**3) to costing block. :param flow_rate - flow rate of water: calculating specific energy consumption :type flow_rate - flow rate of water: volumetric :param name: energy consumption (default: specific_energy_consumption) :type name: optional

build()[source]

Base build method for FlowsheetCostingBlocks.

This method sets up the basic attributes expected for registering costing of unit operations and flows and calls the build_global_params method from the associated costing package.

build_global_params()[source]

This is where any global parameters, such as Lang factors or coefficients for costing methods that should be shared across the process, should be declared. Sub-Blocks may be used ot help organize parameters if requried.

Dervied class must overload this method.

build_process_costs()[source]

This is where process wide costing correlations should be declared. The following aggregate costs are available for use in calculating these process-wide costs:

  1. self.aggregate_capital_cost

  2. self.aggregate_fixed_operating_cost

  3. self.aggregate_variable_operating_cost

  4. self.aggregate_flow_costs (indexed by flow type)

Dervied class must overload this method.

cost_flow(flow_expr, flow_type)[source]

This method registers a given flow component (Var or expression) for costing. All flows are required to be bounded to be non-negative (i.e. a lower bound equal to or greater than 0).

Parameters
  • flow_expr – Pyomo Var or expression that represents a material flow that should be included in the process costing. Units are expected to be on a per time basis.

  • flow_type – string identifying the material this flow represents. This string must be available to the FlowsheetCostingBlock as a known flow type.

Raises
  • ValueError if flow_type is not recognized.

  • TypeError if flow_expr is an indexed Var.

initialize_build()[source]

This is where custom initialization procedures can be implemented for flowsheet level costing components.

Dervied class must overload this method.

Module contents