Skip to content

Commit

Permalink
Simplify integration of unsustainable solid biomass (#1275)
Browse files Browse the repository at this point in the history
* remove extra bus and link; remove redundant addition of oil carrier_bus

* remove redundant addition of oil carrier buses

* changed PyPSA requirement in envs/environment.yaml
  • Loading branch information
cpschau authored Sep 11, 2024
1 parent e6d4dd6 commit 65054ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion envs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pip

- atlite>=0.2.9
- pypsa>=0.29
- pypsa>=0.30.2
- linopy
- dask

Expand Down
23 changes: 2 additions & 21 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,6 @@ def add_biomass(n, costs):
)

if biomass_potentials.filter(like="unsustainable").sum().sum() > 0:
add_carrier_buses(n, "oil")
# Create timeseries to force usage of unsustainable potentials
e_max_pu = pd.DataFrame(1, index=n.snapshots, columns=spatial.gas.biogas)
e_max_pu.iloc[-1] = 0
Expand All @@ -2830,14 +2829,6 @@ def add_biomass(n, costs):
e_max_pu=e_max_pu,
)

n.madd(
"Bus",
spatial.biomass.nodes_unsustainable,
location=spatial.biomass.locations,
carrier="unsustainable solid biomass",
unit="MWh_LHV",
)

e_max_pu = pd.DataFrame(
1, index=n.snapshots, columns=spatial.biomass.nodes_unsustainable
)
Expand All @@ -2846,7 +2837,7 @@ def add_biomass(n, costs):
n.madd(
"Store",
spatial.biomass.nodes_unsustainable,
bus=spatial.biomass.nodes_unsustainable,
bus=spatial.biomass.nodes,
carrier="unsustainable solid biomass",
e_nom=unsustainable_solid_biomass_potentials_spatial,
marginal_cost=costs.at["fuelwood", "fuel"],
Expand All @@ -2855,16 +2846,6 @@ def add_biomass(n, costs):
e_max_pu=e_max_pu,
)

n.madd(
"Link",
spatial.biomass.nodes_unsustainable,
bus0=spatial.biomass.nodes_unsustainable,
bus1=spatial.biomass.nodes,
carrier="unsustainable solid biomass",
efficiency=1,
p_nom=unsustainable_solid_biomass_potentials_spatial,
)

n.madd(
"Bus",
spatial.biomass.bioliquids,
Expand Down Expand Up @@ -3024,7 +3005,7 @@ def add_biomass(n, costs):
n.madd(
"Generator",
spatial.biomass.nodes_unsustainable,
bus=spatial.biomass.nodes_unsustainable,
bus=spatial.biomass.nodes,
carrier="unsustainable solid biomass",
p_nom=10000,
marginal_cost=costs.at["fuelwood", "fuel"]
Expand Down

0 comments on commit 65054ae

Please sign in to comment.