h2.py
Hydrogen-side network modifications: H2 for industry bus and methane pyrolysis.
add_h2_for_industry_bus(n, nodes)
Create per-node "H2 for industry" Bus + Link topology and rewire existing Loads.
Adds a dedicated "H2 for industry" bus per node, adds a unidirectional H2 → H2 for industry Link (so industry H2 demand is supplied from the H2 bus but cannot flow back), and rewires the existing "H2 for industry" Loads from the H2 bus to the new dedicated bus.
Mirrors the "gas for industry" Bus + Link + Load topology used in
prepare_sector_network.add_industry. Links are unidirectional by
PyPSA default (p_min_pu=0).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
pypsa.Network
|
Pre-network to modify in place. |
required |
nodes
|
pandas.Index
|
Clustered node index ( |
required |
Returns:
| Type | Description |
|---|---|
None
|
Modifies |
Source code in mods/network/h2.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
add_h2_imports(n, snakemake)
Add hydrogen import options.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
pypsa.Network
|
Pre-network to modify in place. |
required |
snakemake
|
snakemake.script.Snakemake
|
The workflow snakemake object. |
required |
Source code in mods/network/h2.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
add_methane_pyrolysis_plasma(n, snakemake, costs, nodes, spatial)
Add Methane Pyrolysis (Plasma) H₂ production Links to the sector network.
Methane pyrolysis (plasma variant) splits CH₄ into H₂ and solid carbon (carbon black) using a plasma torch. No CO₂ is emitted during the process; the carbon is captured as a solid material, enabling turquoise hydrogen production with negative emissions potential if the carbon black is permanently stored.
- bus0 = gas (CH₄ input,
p_nomreference in MW_CH4) - bus1 = H2 for industry (H₂ output, directly to industry demand bus)
- bus2 = AC (electricity consumption for plasma torch)
- CO₂ stored bus is intentionally not connected: carbon black is a solid transported by road/rail/ship, not through the CO₂ pipeline network.
Requires add_h2_for_industry_bus to have been called beforehand so that
the "H2 for industry" Bus + Link topology already exists in the network.
All cost parameters in costs are normalized to MWh_H₂. Since bus0
is gas (MW_CH4), efficiencies and capital cost are converted using
eta_H2 = 1 / methane-input.
Carbon black revenue: carbon black sold to the market is valued at the CO₂ price of the same planning horizon, scaled by the stoichiometric CO₂ intensity of carbon black.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
pypsa.Network
|
Pre-network to modify in place. |
required |
snakemake
|
snakemake.script.Snakemake
|
The workflow snakemake object. |
required |
costs
|
pandas.DataFrame
|
Processed cost DataFrame for the current planning horizon. |
required |
nodes
|
pandas.Index
|
Clustered node index ( |
required |
spatial
|
types.SimpleNamespace
|
Spatial namespace produced by |
required |
Returns:
| Type | Description |
|---|---|
None
|
Modifies |
Source code in mods/network/h2.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |