Networks

The network class is a subclass of the ModelComponent class. All networks are modelled using this class, and there are no subclasses of specific network models. An overview of all networks that are currently modelled can be found below. A network is defined as the set of all arcs (i.e., connections between nodes) of a specific network type (e.g., “electricitySimple”).

List of Networks

All networks that are modelled are listed below.

Network name

electricityOffshore

hydrogenSimple

electricitySimple

CO2Railway

CO2PipelineOffshore

CO2Ship

heat

hydrogenPipelineOffshore

hydrogenShip

CO2Truck

electricityOnshore

hydrogenRailway

CO2PipelineOnshore

hydrogenTruck

hydrogenPipelineOnshore

class Network(netw_data: dict)

Class to read and manage data for networks

For each connection between nodes, an arc is created, with its respective cost, flows, losses and consumption at nodes.

Networks that can be used in two directions (e.g. electricity cables), are called bidirectional and are treated respectively with their size and costs. Other networks, e.g. pipelines, require two installations to be able to transport in two directions. As such their CAPEX is double and their size in both directions can be different.

Set declarations:

  • set_netw_carrier: Set of network carrier (i.e. only one carrier, that is transported in the network)

  • set_arcs: Set of all arcs (from_node, to_node)

  • set_arcs_unique: In case the network is bidirectional: Set of unique arcs (i.e. for each pair of arcs, one unique entry)

  • Furthermore for each node:

    • set_receives_from: A set of nodes the node receives from

    • set_sends_to: A set of nodes the node sends to

  • set_consumed_carriers: In case the network has an energy consumption

Parameter declarations:

  • para_size_min: Min Size (for each arc)

  • para_size_max: Max Size (for each arc)

  • para_size_initial, var_size, var_capex: for existing networks

  • para_capex_gamma: \({\gamma}_1, {\gamma}_2, {\gamma}_3, {\gamma}_4\) for CAPEX calculation (annualized from given data on up-front CAPEX, lifetime and discount rate)

  • para_opex_variable: Variable OPEX

  • para_opex_fixed: Fixed OPEX

  • para_decommissioning_cost: decommissioning costs for existing networks

  • para_send_kflow, para_send_kflowDistance, para_receive_kflow, para_receive_kflowDistance, Parameters for energy consumption at receiving and sending node

Variable declarations:

  • var_capex: CAPEX

  • var_opex_variable: Variable OPEX

  • var_opex_fixed: Fixed OPEX

  • Furthermore for each node:

    • var_netw_emissions_pos: positive emissins at node

    • var_inflow: Inflow to node (as a sum of all inflows from other nodes)

    • var_outflow: Outflow from node (as a sum of all outflows toother nodes)

    • var_consumption: Consumption of other carriers (e.g. electricity required for compression of a gas)

Arc Block declaration

Each arc represents a connection between two nodes, and is thus indexed by ( node_from, node_to). For each arc, the following components are defined. Each variable is indexed by the timestep \(t\) (here left out for convenience).

  • Decision Variables:

    • var_size: Size \(S\)

    • var_flow: Flow \(flow\)

    • var_losses: Losses \(loss\)

    • var_capex, var_capex_aux CAPEX: \(CAPEX\)

    • var_opex_variable: Variable \(OPEXvariable\)

    • var_emissions: emissions from transport/losses

    • If consumption at nodes exists for network:

      • var_consumption_send: Consumption at sending node \(Consumption_{ nodeFrom}\)

      • var_consumption_receive: Consumption at receiving node \(Consumption_{nodeTo}\)

  • Constraint definitions

    • Flow losses:

      \[loss = flow * {\mu} * D\]
    • Flow constraints:

      \[S * minTransport \leq flow \leq S\]
    • Consumption at sending and receiving node:

      \[Consumption_{nodeFrom} = flow * k_{1, send} + flow * distance * k_{2, send}\]
      \[Consumption_{nodeTo} = flow * k_{1, receive} + flow * distance * k_{2, receive}\]
    • CAPEX of respective arc. The CAPEX is calculated as follows (for new networks). Note that for existing networks, the CAPEX is zero, but the fixed OPEX is calculated as a fraction of a hypothetical CAPEX based on the existing size.

      \[CAPEX_{arc} = {\gamma}_1 + {\gamma}_2 * S + {\gamma}_3 * distance + {\gamma}_4 * S * distance\]
    • Variable OPEX:

      \[OPEXvariable_{arc} = CAPEX_{arc} * opex_{variable}\]
    • Emissions:

      \[emissions = flow * f_{emissions} + loss * f_{loss2emission}\]

Constraint declarations This part calculates variables for all respective nodes and enforces constraints for bi-directional networks.

  • If network is bi-directional, the sizes in both directions are equal, and only one direction of flow is possible in each time step. This constraint is formulated for each unique arc:

    \[S_{nodeFrom, nodeTo} = S_{nodeTo, nodeFrom}\]
    \[flow_{nodeFrom, nodeTo} = 0 \lor flow_{nodeTo, nodeFrom} = 0\]
  • CAPEX calculation of whole network as a sum of CAPEX of all arcs. For bi-directional networks, each arc is only considered once, regardless of the direction of the arc.

  • OPEX fix, as fraction of total CAPEX

  • OPEX variable as a sum of variable OPEX for each arc

  • Total emissions as the sum of all arc emissions

  • Total inflow and outflow as a sum for each node:

    \[outflow_{node} = \sum_{nodeTo \in sendsto_{node}} flow_{node, nodeTo}\]
    \[inflow_{node} = \sum_{nodeFrom \in receivesFrom_{node}} flow_{nodeFrom, node} - losses_{nodeFrom, node}\]
  • Energy consumption of other carriers at each node.

construct_netw_model(b_netw, data: dict, set_nodes, set_t_full, set_t_clustered)

Constructs a network as model block.

Parameters:
  • b_netw – pyomo network block

  • data (dict) – dict containing model information

  • set_nodes – pyomo set containing all nodes

  • set_t_full – pyomo set containing timesteps

  • set_t_clustered – pyomo set containing clustered timesteps

Returns:

pyomo block with network model

fit_network_performance()

Fits network performance (bounds and coefficients).

scale_model(b_netw, model, config: dict)

Scales network model

Parameters:
  • b_netw – pyomo network block

  • model – pyomo model

  • config (dict) – config dict containing scaling factors

Returns:

pyomo model

write_results_netw_design(h5_group, model_block)

Function to report network design

Parameters:
  • model_block – pyomo network block

  • h5_group – h5 group to write to

write_results_netw_operation(h5_group, model_block)

Function to report network operation

Parameters:
  • model_block – pyomo network block

  • h5_group – h5 group to write to