Commit Graph

434 Commits

Author SHA1 Message Date
Tom Brown
098281b432 Correct central CHP from extraction to back pressure
The assumptions for c_b and c_v and eta were arranged assuming
extraction plants (like the coal CHP in DEA).

However, if you look in DEA assumptions at "09b Wood Pellets Medium"
(used for solid biomass CHP) and "Gas turbine simple cycle (large)"
(used for gas CHP) they are not extraction plants but back pressure
plants.

The back pressure coefficient in DEA c_b is simply

c_b = name plate electricity efficiency / name plate heat efficiency

both measured when both heat and electricity are produced at maximum.

For the extraction plants, the efficiency was measured in condensation
mode, i.e. no heat production.
2020-12-07 12:32:53 +01:00
Tom Brown
47a618f385 Replace large CHP 2-link feasibility diagram with single link
In almost 99.5% of cases the CHP dispatches along the backpressure
line where heat output is proportional to electricity output.

So we can switch to a single link to avoid the burden of modelling the
full electricity-heat feasibility space of CHPs.

This only applies to large CHPs in district heating networks.
2020-12-07 10:48:24 +01:00
Tom Brown
21c4fd4761
Merge pull request #80 from PyPSA/retro-new-pandas
Retro new pandas
2020-12-04 16:17:10 +01:00
lisazeyen
0187d4d1d4 make retro script work with newer version of pandas 2020-12-02 13:34:33 +01:00
lisazeyen
57aea1db35 drop H2 and battery buses from pypsa-eur 2020-12-02 13:03:13 +01:00
lisazeyen
de33ed3eb5 update mocksnakemake for testing 2020-12-02 12:48:11 +01:00
Tom Brown
2c49b8e3c3 config: Move heat pump sink temp from script to config.yaml 2020-12-02 11:51:27 +01:00
Tom Brown
1ea31f0e57 Redo investment-year-dependent exogenous retrofitting parameter
Specify as dictionary, use get_parameter to get correct value.

Also remove old parameter "space_heating_fraction" since this is
superceded by the new exogenous retro code.
2020-12-01 14:41:11 +01:00
Tom Brown
974155bd46 Merge branch 'master' into retro 2020-11-30 17:07:43 +01:00
Tom Brown
17bf0dfbb1 prepare_costs: use default lifetime from config.yaml
Rather than hard-coding 25 years.
2020-11-30 17:01:14 +01:00
Tom Brown
7cfce2e324
Merge pull request #76 from PyPSA/country-subsets
energy_totals: only fix 'BA' if in list of countries
2020-11-30 16:43:15 +01:00
Tom Brown
90e1d75df6 land transport: allow share of fossil-FCEV-EV to change over time
Allow share of land transport to be set exogenously in config.yaml.
2020-11-30 16:20:26 +01:00
Tom Brown
abbaa0d098 Move CO2 budgets from data/co2_budget.csv to dict in config.yaml
Strategy is too keep as much of configuration in config.yaml as
possible.

We also aim to allow exogenous investment-year-dependent
configurations to be done in a similar manner (e.g. share of district
heating or FCEV transport).
2020-11-30 13:21:38 +01:00
Fabian Neumann
a143ab7122 energy_totals: only fix 'BA' if in list of countries 2020-11-24 13:44:02 +01:00
lisazeyen
e511dac148 fix bug for urban_fraction factor, rewrite pattern for defining country, location and temporal resolution, add more comments for endogenously retrofitting 2020-11-11 18:18:56 +01:00
Tom Brown
65944e20ca plot_network: Fix bugs in plotting of today's network 2020-10-28 18:47:28 +01:00
Tom Brown
a613da6031 make_summary: Don't add back line costs for LV for PyPSA-Eur > 0.2.0
PyPSA-Eur now includes HVAC and HVDC line costs with LV option.

So don't add them back to costs afterwards.
2020-10-28 18:24:54 +01:00
Tom Brown
9721dccc0f Make micro CHP optional, option to reduce non-NH3 basic chemicals
Also add option to limit extension of HVAC and HVDC transmission
lines.

Also fix bug that option to limit solar & wind potential was bypassed.
2020-10-28 18:21:28 +01:00
lisazeyen
63f1e99c8b remove unnecessary variables when adding endogenously retrofitting 2020-10-21 19:19:38 +02:00
lisazeyen
1e2895023b add script for building retro costs per country and sector, add retrofitting parameters to config.yaml 2020-10-21 16:04:27 +02:00
lisazeyen
d1282ba315 add option for endogenously retrofitting 2020-10-21 15:21:26 +02:00
Tom Brown
989495ce79 prepare_sector_network: Type of new busmap index and values to str
Otherwise they're read in as integers and the mapping fails.
2020-10-21 14:31:37 +02:00
lisazeyen
301d74f059 add option for exogenously retrofitting, space heat demand is reduced before adding losses in DH 2020-10-21 14:30:26 +02:00
lisazeyen
75ff2d19ee move transport data input path to Snakefile 2020-10-21 13:45:49 +02:00
lisazeyen
0563c986a2 modify mocksnakemake for testing 2020-10-21 13:35:34 +02:00
Tom Brown
f0ef0e1136
Merge pull request #70 from eb5194/master
compatibility with pypsa-eur PR: clustermaps to csv
2020-10-21 13:01:17 +02:00
lisazeyen
b4fbb47d29 fix bug when adding biomass industry demand, add option to remove biomass transport and have only single EU biomass node 2020-10-21 07:21:09 +02:00
lisazeyen
13cae7d66f drop nan values to avoid runtime error when removing todays electricity demand 2020-10-20 14:19:07 +02:00
lisazeyen
ae9c0d9530 prepare_sector_network: split industry demand for biomass to single nodes 2020-10-20 14:08:17 +02:00
lisazeyen
651a7ff693 add biomass transport, split potential for solid biomass to nodes, add costs for upgrading biogas to gas 2020-10-20 13:46:39 +02:00
lisazeyen
b4f1c570d6 move input data path for emobility/transport data to snakemake input 2020-10-20 10:13:02 +02:00
lisazeyen
2b9ac511b5 update mocksnakemake for testing 2020-10-20 09:34:45 +02:00
Tom Brown
e8b923e076 industry: subtract today's ind elec demand, add back new demand
Since today's industrial electricity demand is distributed by
population and GDP, subtract this from the regular electricity demand
(which already has space/water heating subtracted).

Now regular electricity demand is only non-heating electricity demand
in residential and tertiary sectors.

Add back new industry electricity demand at the correct locations, as
determined using the hotmaps database.
2020-10-12 14:56:41 +02:00
Tom Brown
80cbe98630 industry: add current nodal electricity demand to subtract later 2020-10-12 13:26:21 +02:00
Tom Brown
f2b347334d industry: build nodal energy demand from nodal production 2020-10-12 12:20:04 +02:00
Tom Brown
f0937e203b industry: separate code for distribution key from nodal production
This allows us to reuse the key for today's nodal energy demand from
industry.
2020-10-12 12:07:49 +02:00
Tom Brown
90f5349b7d Use hotmaps industrial database for distribution in each country
I.e. per sector geographical distribution of industrial facilities
within each country.

Drop facilities outside Europe and with no geocoordinates.

Use ETS emissions as a distribution key; where emissions data is
missing, substitute with an average for that sector and that country
(strong assumption).
2020-10-05 20:04:04 +02:00
eb5194
5dabdac288 add_existing_baseyear: read input file as .csv 2020-10-02 12:21:31 +02:00
eb5194
9fac6f5392 prepare_sector_network: read input file as .csv 2020-10-02 12:20:55 +02:00
Tom Brown
b862bb95cd Fix H2 underground potentials from TWh to MWh; simplify H2 data 2020-09-25 16:23:45 +02:00
Tom Brown
de52711700 Fix calculation of solar rooftop potentials for "m" clusters
I.e. when the generators are clustered to the "simplified" network
resolution, but the grid is clustered further, e.g. by using the
clusters = 37m "m" option.
2020-09-25 15:25:41 +02:00
Tom Brown
6b964865e7
Merge pull request #69 from PyPSA/salt_cavern_potential
Salt cavern potential
2020-09-22 20:19:29 +02:00
Tom Brown
a1904886ac
Merge branch 'master' into distribution 2020-09-22 20:18:21 +02:00
Tom Brown
98435d7fc6
Merge pull request #68 from PyPSA/yaml_loader
read config.yaml for testing with yaml.safe_load()
2020-09-22 20:17:32 +02:00
lisazeyen
7972637334 add upper energy capacity limit for hydrogen storage per country, caution: for multiple nodes in one country storage potential is distributed by population 2020-09-22 09:54:52 +02:00
lisazeyen
27e2584ae8 split hydrogen storage into underground storage in salt cavern for countries with potential, others overground hydrogen storage, switch costs from gas storage to corresponding hydrogen storage 2020-09-22 09:52:53 +02:00
lisazeyen
7fe7dc381f read config.yaml for testing with yaml.safe_load() 2020-09-22 09:32:24 +02:00
lisazeyen
e1babafa35 remove taken the minimum of old solar p_nom_max and solar rooftop because no overlap between the potentials 2020-09-22 09:24:30 +02:00
lisazeyen
736c7166ac add missing multiplication with gas distribution grid cost factor 2020-09-22 09:18:28 +02:00
Tom Brown
791a58fc6b Make selection of biomass classes (solid, biogas) more explicit
List classes in config.yaml, rather than integer selection in
build_biomass_potentials.py.

Also output potentials for all years and scenarios for analysis.
2020-09-21 18:35:45 +02:00
Tom Brown
44ee205820 Fix recalculation of offshore connection costs for "m" clusters
I.e. when the generators are clustered to the "simplified" network
resolution, but the grid is clustered further, e.g. by using the
clusters = 37m "m" option.
2020-09-21 17:04:45 +02:00
Tom Brown
ac4100922a Include also industry new electricity load at low voltage bus
For consistency with the existing industry electricity load already
there.

This only applies when the electricity distribution grid is inserted.
2020-09-21 12:06:20 +02:00
lisazeyen
6d440499d5 add option to add costs for gas distribution. Caution, currently assuming same costs for gas distribution as the ones for electricity distribution 2020-09-15 18:03:33 +02:00
lisazeyen
b2789960fc add missing resistive heater and micro CHP to electricity distribution, add new electricity demand for industry to electricity distribution, restrict solar rooftop potential, change for testing mocksnakemake input for the costs to technology database 2020-09-15 17:48:57 +02:00
Tom Brown
06a3b029d8 When changing prim/secondary production, take account of existing
Don't fix uniform ratios e.g. of 0.3:0.7 primary:secondary for steel
and aluminium, but convert the necessary amount of existing primary in
each country so that the overall ratio applies at European level.

This stops sudden swings from primary to secondary in countries
dominated by primary production.
2020-09-07 19:15:40 +02:00
Tom Brown
c58f18667d Add non-EU28 energy demand per country and sector for today
Use the industrial production per sector and multiply with EU28
averages for energy per sector.
2020-09-07 19:12:47 +02:00
Tom Brown
783e026ebf Separate ammonia from basic chemicals in today's industry energy 2020-09-07 18:41:07 +02:00
Tom Brown
04629b5113 For DRI+EAF route for primary steel, add electricity for DRI shaft 2020-09-07 17:23:31 +02:00
Tom Brown
916aa5e0d9 Generate today's industry demand per ct and per sector
Only covers EU28 at the moment.

Uses the energy balances sheets from JRC-IDEES.
2020-09-07 16:48:06 +02:00
Tom Brown
aa3ffb9ac2 Remove biomass from chemicals, cement; increase in PPA, FBT
Remove non-existing biomass from chemicals and cement, since these
need higher temperatures than achievable with residues and waste.

Increase biomass in pulp and paper (since already used extensively
here and T < 500), and replace methane with biomass in food, beverages
and tobacco, since temperatures needed are low (T < 500).
2020-09-07 14:49:20 +02:00
Tom Brown
f3dcda9179 Include integrated steelworks in industry_sector_ratio
Also switch it from sep=";" to ","
2020-09-07 11:04:50 +02:00
Tom Brown
f45b9a37ae Separate ammonia from other "Basic chemicals"
This allows us to control the substitution of natural gas for hydrogen
in NH3 production.

Remaining basic chemicals are olefins, BTX and chlorine.

For 2015 NH3 production, we use the USGS data source.
2020-08-28 19:13:18 +02:00
Tom Brown
b761281b3d Move changes to primary/secondary routes for Al/St to new script
This was handled before in industry_sector_ratios.csv which was
confusing.

Now industry_sector_ratios.csv represents the genuine energy
consumption per tonne of material for each industrial route
(MWh/tMaterial).

An new file is created with ktMaterial/a in
industrial_production_per_country_tomorrow.csv which contains changes
to the fraction of primary/secondary routes compared to today's
production in industrial_production_per_country.csv.

This is less confusing I think.
2020-08-26 16:13:01 +02:00
Tom Brown
851142fe0f Separate script for industrial production per ct from energy demand 2020-08-26 13:12:16 +02:00
Tom Brown
37f36047ca Industry demand: Also record material production per industry 2020-08-26 12:06:01 +02:00
Tom Brown
515416fd75 PyPSA-Eur-Sec Version 0.2.0
Please see the release notes:

https://pypsa-eur-sec.readthedocs.io/en/latest/release_notes.html#pypsa-eur-sec-0-2-0-21st-august-2020

for more information.
2020-08-21 12:34:20 +02:00
Tom Brown
beefb57c25 Fix plotting of maps and balances; move log/benchmark to results/ 2020-08-21 12:15:01 +02:00
Tom Brown
fa767772d6 Remove onshore wind land costs, since included in latest DEA data 2020-08-20 18:41:19 +02:00
Tom Brown
95e676828a Remove old data/costs.csv and dependencies on it 2020-08-20 14:26:39 +02:00
Tom Brown
3f5aa60ad2 solve_network: Refactor land use constraints for renewables 2020-08-19 20:25:04 +02:00
Tom Brown
6b40504159 add_existing_baseyears: Correct for p_nom data is thermal output
p_nom in PyPSA is capacity on the input side (from final energy),
whereas existing capacities are given on output side (i.e. heat
delivered).
2020-08-19 12:51:53 +02:00
Tom Brown
6444f7fde9 Weight offshore connection costs with aggregation weight
Rather than taking a mean of the clustered connection costs.

Apply cost update also for overnight scenarios based on planning year.

Add land costs for onshore wind.
2020-08-19 12:41:17 +02:00
martavp
35e1d4b03b fix bug when determining elec_buses 2020-08-17 12:08:49 +02:00
martavp
d4be632e7a add add_land_constraint. The constraint is now imposed in a simplified way.
The p_nom for already installed capacities are substrated from the p_nom_max of extendable capacities.
2020-08-17 12:04:45 +02:00
martavp
6037882dbb small change in commented line 2020-08-14 11:04:35 +02:00
Tom Brown
8c196a7a21 Take care of CHPs when doing p_nom < threshold & extra_functionality
- add_brownfield.py: Have to make sure that for each CHP there is both
  a heat and electric link, but they have different p_nom for each
  CHP, so have to make sure we don't remove one without the other.

- solve_network.py: Make sure extra_functionality constraints for CHP
  power-heat feasibility graph also work for non-extendable CHPs.
2020-08-14 09:11:19 +02:00
Tom Brown
7e6c7b3dd3 Merge branch 'master' of github.com:martavp/pypsa-eur-sec into martavp-master 2020-08-12 18:10:41 +02:00
Tom Brown
663e1195e1 Add suffix -year to optimized components before solving
This simplifies the structure of add_brownfield.py dramatically.

Some other changes need to be make elsewhere because of name
changes (e.g. battery constraints in solve_network.py).
2020-08-12 18:08:01 +02:00
martavp
89a48bfad3 include existing conventional carriers in config file 2020-08-12 11:24:15 +02:00
martavp
18ff256811 Update cost for wind and solar, including the AC and DC connection costs for offshore.
In order to calculate connection costs, average values for underground_fraction and average_distance are calculated for all the buses in the initial network mapped to the clustered network.
2020-08-12 11:08:09 +02:00
Tom Brown
16b05a570d Distribute heating technologies within each country by population 2020-08-11 11:09:39 +02:00
Tom Brown
a59b2bce19 Add location attribute to each bus
E.g. "DE0 0 residential rural heat" has location "DE0 0", and "EU gas"
and "co2 atmosphere" have location "EU".
2020-08-11 11:07:55 +02:00
Tom Brown
1d6b6483e0 add_existing_baseyear: Divide p_nom by efficiency for Links
This is because the p_nom of a Link is the thermal capacity at bus0,
whereas the capacities we have are the electrical capacity at bus1.
2020-08-11 09:55:39 +02:00
Tom Brown
658f8ad00c Distribute existing power plants to the correct nodes
Previously they were distributed only by country to the first node in
the country.

Now conventional power plants are assigned to the correct node using
the bus map from PyPSA-Eur.

Wind and solar are distributed in each country by capacity factor.

The code has been refactored and a bug was fixed whereby total
capacities of wind and solar in each country were not correct.

Now the years in the config.yaml for myopic are integers not strings.
2020-08-10 20:30:29 +02:00
Tom Brown
b57a6c18f8 Make directory for costs files configurable
Default to parallel directory for technology_data repository.
2020-07-30 08:27:33 +02:00
Tom Brown
ece21bfdfa add_existing_baseyear.py: Add carrier to conventional generators 2020-07-30 08:22:27 +02:00
Tom Brown
7abe928337 prepare_sector_network: Fix costs bug and carrier bug
In prepare_costs, you need the min_count=1 in the sum so that it
generates NaNs for missing data (rather than 0) so that NaNs can be
subsituted by .fillna in the next line. Otherwise many values
(discount rates and efficiencies for solar, wind) are set to zero.

Also added carriers, storage and generators for coal, nuclear and
oil. (This needs to be organized better soon so that the carriers are
defined in config.yaml.)
2020-07-29 15:50:40 +02:00
martavp
4523f324cd Group the generators existing before base year into categories and add them to the network as e.g. solar-2005, solar-2010, solar-2015 2020-07-18 11:22:30 +02:00
martavp
17a348d1e6 Add lifetime attribute to generators, links and stores in prepare_sector_network and use that attribute to check if a generator optimized in a previous time step should be added in add_brownfield (or if its lifetime has expired) 2020-07-17 15:20:20 +02:00
martavp
fa0b88a9b1 Add lifetime and build_year attributes to generators, links and stores. 2020-07-14 20:04:36 +02:00
martavp
7d1500604f import prepare_cost function from prepare_sector_network 2020-07-14 13:28:10 +02:00
martavp
201e4d2f57 simplify make_summary and plot_summary since now overnight also includes planning_horizons and carbon_budget_name 2020-07-08 16:35:50 +02:00
martavp
dedabe695e Add conditional use of add_land_use_constraint (only for config['foresight']='myopic') 2020-07-08 16:32:17 +02:00
martavp
a4c22a29a4 Remove generators, stores and links whose installationYear + lifetime < year. Correct commented lines to YearDecomissioning > year 2020-07-08 16:28:08 +02:00
martavp
059d1daed8 activate rule add_land_use constraint 2020-07-08 08:53:17 +02:00
martavp
8c53506897 include dependence of the number of header lines in csv files based on if overnigh or mypic option is selected 2020-07-07 18:46:12 +02:00
martavp
cf3c45321e include planning_horizons and co2_budget_name in multindex if options['foresight']='myopic' 2020-07-07 18:42:25 +02:00
martavp
0f85f18e86 Add land use constraint to e.g. all the solar installed in different years 2020-07-07 18:40:17 +02:00
martavp
236da36d5e Include myopic option in prepare_network.py so that, when selected, it reads CO2_limit from a carbon_budget file 2020-07-07 18:37:42 +02:00
martavp
95f80aeba7 Add scripts to (a) include existing power and heating capacities installed before the base year, and (b) add to year n, capacities optimized in year n-1.
Existing onwind and offwind capacity are now read from IRENA database, similarly to solar capacities. Previously we were using thewindpower.net database which is not open.
2020-07-07 18:26:31 +02:00
Tom Brown
2bee13fe40 plot_summary: Plot energy / CO2 balances for each carrier
Take data from supply_energy.csv and plot the balances for each
carrier.

One summary for energy excludes CO2 flows (unlike graphs/energy.pdf).
2020-05-13 13:40:00 +02:00
Tom Brown
eb34356722 make_summary: Remove erroneous power outputs for non-multi links
This bug in PyPSA was fixed in:

f484adc876
2020-05-13 13:25:32 +02:00
Tom Brown
1c5f471acb Include option for grid connection cost for onshore and utility PV
Only include these technologies since they are connected at new
locations.

Other technologies can fit in at existing connections.
2020-05-11 13:37:10 +02:00
Tom Brown
bdb3c8886d make_summary.py: Fix so that it works with simpl != ""
Non-empty simpl is needed for cases where the resource resolution
is higher than the network resolution, e.g.

simpl = 70
cluster = 37m
2020-05-07 18:16:28 +02:00
Tom Brown
8538233bba Fix bug due to invalid cluster bus region geometries
These geometries are apparently invalid due to self-crossing or
self-touching polygons.

The geometries are created by pypsa-eur/scripts/cluster_network.py but
appear to be valid before being written to file.

They are only valid after being read back in from file.

This seems to indicate some numerical issue relating to file reading
and writing.

Now the geometries are cleaned after being read in.
2020-05-07 14:45:14 +02:00
Tom Brown
e92558716e config.yaml: Remove unnecessary settings
Adjustments made to scripts to read correct settings.

Documentation of scenario options improved.
2020-04-30 18:38:55 +02:00
Tom Brown
f9952b9aad Fixed for PyPSA-Eur 0.1.0, PyPSA 0.17.0 and plotting
This commit now work with PyPSA-Eur 0.1.0 (tested with commit
bb3477 from 14th April 2020).

Changes to line/link_widths/colors for plotting networks in PyPSA
0.17.0.

Other corrections to plotting code so it works with this version.

Include oil boilers in colors in config.yaml.
2020-04-29 18:23:18 +02:00
Tom Brown
478832f484 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-04-29 09:53:11 +02:00
d-fine dev
a4db176458 add new link oil boiler
* prepare_sector_network:
    - add link for oil boiler in function add_industry()
    - add function for partitioning clusters into different heat node types

* config.yaml: add option for oil_boiler

* costs.csv: add costs for oil boiler
2020-04-09 14:58:03 +02:00
Tom Brown
bd85f751ac Include home battery for low voltage node 2020-03-26 14:54:10 +01:00
Tom Brown
31cad1bd6d Separate rooftop and utility solar PV 2020-03-26 10:06:59 +01:00
lisazeyen
a239f7efbf make the script running with pandas 1.0, colors for some network plots, add option to plot the current transmission system in the cost_network plot 2020-03-25 17:14:28 +01:00
Tom Brown
0df8fc50cf Summaries and plotting: Fix groupby with two bys for pandas 1.0.x 2020-03-25 16:42:38 +01:00
Tom Brown
9b326ba493 Include electricity distribution grid between load and EVs 2020-03-25 12:52:25 +01:00
Tom Brown
5dc572c35e solve_network.py: Remove hacked installation of conda libraries 2020-03-04 18:10:57 +01:00
Tom Brown
ab401907b2 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-01-31 19:25:19 +01:00
Tom Brown
d4c6521aaf For H2 network plotting, introduce dummy MultiIndex to get area
Otherwise the area is not consistent with the legend (I'll open a
PyPSA issue).
2020-01-31 19:20:46 +01:00
lisazeyen
36a57222f7 Clip p min pu (#50)
* changes for retrofitting

* changed Snakefile to work with new pypsa-eur version, change solve_network.py to clip also n.generators_t.p_min_pu

* removed retrofitting data files
2020-01-24 15:31:17 +01:00
Tom Brown
b6383b37b7
Merge pull request #46 from nworbmot/describe_biomass_categories
Describe biomass categories
2020-01-22 16:58:26 +01:00
Tom Brown
e0cf7e0860 Fix transmission map for nomopyomo outputs; plot also H2 network
Use s_nom_min for the reference point for the transmission
reinforcement not s_nom, since s_nom is now overwritten for LV > 1.0
(the old pyomo code kept the s_nom variable fixed in the pyomo model
rather than via pypsa setting s_nom_extendable = False, like the
nomopyomo code now does).

The legend scale of the H2 network electrolyzers is wrong. I don't yet
understand why. Possibly the cost scale in the other map is also wrong.
2020-01-21 19:44:36 +01:00
Tom Brown
17e8d114b1 Allow wave costs to be modified 2020-01-14 21:36:35 +01:00
Tom Brown
2278d67687 Add wave with default minimum costs 2020-01-11 09:11:09 +01:00
Tom Brown
9ed2cbffa8 Update code to PyPSA 0.16.1 2020-01-10 18:13:01 +01:00
Tom Brown
0e5dcbbce4 Fix clash of names in creation of candidate network for H2
Sometimes Lines and Links have same name, so need MultiIndex to avoid
a clash of names.
2019-12-26 10:21:22 +00:00
Tom Brown
9a5ae01a92 Adjust code to use version 0.16.0 of PyPSA for nomopyomo framework 2019-12-26 10:19:26 +00:00
Tom Brown
ca15750b48 Catch process emissions from feedstock for industry demand script 2019-12-19 17:49:45 +01:00
Tom Brown
ba52bbf5d4 Merge branch 'process' 2019-12-19 14:04:04 +01:00
Tom Brown
180846945f Fix bug in ordering of MultiIndex in make_summary.py
df.loc[idx[a,b,some_list],label] does NOT preserve the ordering of
some_list, but sorts it instead. Therefore the pattern:

df.loc[idx[a,b,s.index],label] = s.values

was mismatching the index and values.
2019-12-19 11:40:17 +01:00
Tom Brown
eb2fa1b24e Adjust plotting for new CCS scheme 2019-12-19 11:39:38 +01:00
Tom Brown
c525e2a6ae Install package dependencies nomopyomo branch PyPSA and gurobipy
Inelegant - installed by hand in solve_network.py.

Should replace with environment.yaml.
2019-12-19 11:38:43 +01:00
Tom Brown
52581466b6 Account for chemical industry process emissions more carefully
Remove emissions from hydrogen production for ammonia (since H2 now
comes from electrolysis).

Allow process emissions from petrochemical production to be captured
(the carbon is not necessarily fossil, but could come from CCU).
2019-12-18 09:45:14 +01:00
Tom Brown
105aeba215 Merge branch 'nomopyomo' 2019-12-13 18:07:06 +01:00
Tom Brown
41f7f44dcf Make CCS optional for SMR and industry process emissions 2019-12-13 18:06:38 +01:00
Tom Brown
49a68bdd35 Separate CHP gas/solid biomass, with/without CCS
Also fix CHP p_nom_ratio constraint, and battery charger/discharger
constraint.
2019-12-12 15:03:51 +01:00
Tom Brown
ec9b447949 make_summary: Account for multi-links in supply* summaries 2019-12-06 17:40:20 +01:00
Tom Brown
80642ae9af Fix post-processing to read nomopyomo nc; fix MultiIndex issue
With new pandas:

pd.Index([])|pd.MultiIndex(...)

returns a pd.Index, not a pd.MultiIndex, so just reversed:

pd.MultiIndex(...)|pd.Index([])

This returns a pd.MultiIndex.
2019-12-06 16:56:33 +01:00
Tom Brown
066f1b0bb5 Fix solve_network.py to use nomopyomo for LV > 1.0 2019-12-06 16:55:28 +01:00
martavp
f6d407cc24
Add files via upload
describe biomass
2019-12-04 16:38:19 +01:00
martavp
5038faa020
Delete build_biomass_potentials.py
describe biomass
2019-12-04 16:37:50 +01:00
Tom Brown
6cbd3384e4 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2019-11-27 18:36:01 +01:00
Tom Brown
8982147706 Convert code to use PyPSA nomopyomo branch; only works for LV=1.0
Will extend to LV > 1.0 soon.
2019-11-27 18:34:53 +01:00
Tom Brown
3fac944e5b 191108: Include a correctly-costed H2 network
Offers same topology to optimisation for H2 grid as that of HVAC and
HVDC grid.
2019-11-26 18:00:45 +01:00
martavp
5251ee5e56
Add files via upload
Read industry constants from config.yaml
2019-10-07 16:21:14 +02:00
Tom Brown
8d68146e7c Switch to BDEW-based weekday/end space heating demand profiles
These are different for residential and services demand.

Also include Snakefile in config files copied for each run.

Use gurobi settings from gurobi support for speed.

Commented out settings for testing randomness for noise.
2019-08-07 19:08:06 +02:00
Tom Brown
019e2f3f25 Split heat demand into residential and services with diff profiles
All urban central (i.e. district heating) is aggregated to the same
profile and bus.

The code is now written to cycle over each heating sector to add
demand and supply technologies, only changing what is necessary to
change, rather than just copying chunks of code and modifying
parameters there. This should make it easier to get an overview of
what's going on.
2019-08-07 11:33:29 +02:00
Tom Brown
eebac1bfa3 Deduct electric heating from electricity load profile
Otherwise it is double-counted in both the heating and the electricity
load profiles. This removes 454 TWh/a from electricity.
2019-08-01 16:16:05 +02:00
Tom Brown
d3a0f7e67d Diff intraday heat profiles for (res, services) x (water, space)
These are specified in data/heat_load_profile.csv.

The resulting heat_demand df has MultiIndex columns, where the first
level is ["sector use"], and the second level level is nodes.
2019-08-01 15:43:04 +02:00
Tom Brown
72b7ea0997 Allow space heating to be linearly reduced (without cost so far) 2019-07-31 14:22:33 +02:00
Tom Brown
886b7c5f48 Include micro-CHP using PEMFC 2019-07-28 13:10:21 +02:00
Tom Brown
318444e3a4 Include new industry technologies for plotting colours 2019-07-21 12:11:40 +02:00
Tom Brown
7e37dbbd03 Include multi-link outputs in energy balance 2019-07-21 12:11:05 +02:00
Tom Brown
ae1ea81520 Copper plate biogas and solid biomass
Because there was insufficient solid biomass in 3-4 countries to
supply industry for it locally, and we need to account for transport
of solid biomass.

Should be replaced by transport cost links between countries.
2019-07-21 12:09:18 +02:00
Tom Brown
32af25df62 Backup config files before solve_network rather than after
For debugging cases where solving failed.
2019-07-20 10:55:23 +02:00
Tom Brown
03670c1ab3 Simplify industry load-link-bus to avoid numerical problems
Gurobi had numerical problems solving the system.

Trivial load-link-bus combinations to manage CO2 have been replaced
with simple loads.
2019-07-19 12:10:22 +02:00
Tom Brown
06cb526fef Re-integrate industry, aviation and shipping into model
Following plan by Marta and Kun
2019-07-19 10:21:12 +02:00
Tom Brown
990ab035c3 Include light-rail and high-speed-rail in "electricity rail"
This then conforms with JRC IDEES totals
2019-07-19 10:19:21 +02:00
Tom Brown
7509d61348 Split industrial demand across nodes by population 2019-07-18 15:55:58 +02:00
Tom Brown
b132193f7f Read in more sector detail for road, rail, aviation and navigation 2019-07-18 15:38:37 +02:00
Tom Brown
f3b6027cd5 Incorporate Marta and Kun's scripts to build industry demand
By country and by energy source.
2019-07-18 11:40:38 +02:00
Tom Brown
ddca9afcc7 Give all loads a carrier; rename heat buses; fix district h losses
Heat buses renamed to:

rural (for low-density areas where district heating not possible)

urban decentral (for high-density areas without district heating and
individual heating technologies) (used to be called "urban")

urban central (for high-density areas with district heating) (used to
be called "central")

District heating losses applied only to urban central.
2019-07-16 16:00:21 +02:00
Tom Brown
6cc676d6cf 190516: Try removing H2 network too 2019-07-12 08:51:25 +02:00
Tom Brown
ae3059f676 Add "central" option to remove electricity grid (HVAC, HVDC, B2B) 2019-05-16 16:08:16 +02:00
Tom Brown
8394dca22c Rule to save a copy of important config files after each run 2019-05-16 09:39:03 +02:00
Tom Brown
9ad0eb01e2 Use waste heat from FT and fuel cells in district heating 2019-05-14 11:49:32 +02:00
Tom Brown
77bef57c60 Automatic plotting of network maps with costs per node 2019-05-13 17:09:26 +02:00
Tom Brown
52a02bd979 Compute cfs; compute nodal costs, capacities, cfs; fix prices 2019-05-13 16:48:29 +02:00
Tom Brown
71c04909b5 Allow option of underground H2 storage 2019-05-13 16:47:54 +02:00
Tom Brown
3c28e4daba Include lossless and costless H2 network to examine benefit
Agglomerate H2 storage for this case.

Need to replace with separate H2 links and stores.
2019-05-12 11:27:56 +02:00
Tom Brown
a10a7d2b15 Limit sequestration to 200 Mt/a, introduce SMR, vent stored CO2 2019-05-11 15:55:06 +02:00
Tom Brown
38c49ad460 Fix paper_graphics.py maps for cartopy and industrial demands 2019-05-09 17:28:16 +02:00
Tom Brown
1aa9f9e70b Copy over paper_graphics.py from old pypsa-eur sector branch 2019-05-09 15:22:14 +02:00
Tom Brown
0ab5bd200a Fix gas and oil stores so that they allow fossil fuel extraction
Before both initial SOC and final SOC were set to be zero, which
prevents synthetic fuel transfer over the year boundary, and prevents
the use of fossil fuels for non-zero CO2 scenarios.

Now done properly with cyclic Store (prevents accumulation of fossil
fuels as a form of sequestration) and Generator (to imitate fossil
fuel extraction).
2019-05-08 12:18:18 +02:00
Tom Brown
5357b7b92f Record total capacities and total costs 2019-05-03 17:11:13 +02:00
Tom Brown
c47ffb8d03 Changes for 190501-256 2019-05-02 08:39:29 +02:00
Tom Brown
82a057791e Allow storing FT fuels, cost for FT conversion, fossil FT fuels
Also include raw data/costs.csv
2019-04-30 12:05:36 +02:00
Tom Brown
952534c5c9 Generalise limitation of tech potentials
tech name must only appear, but not be identical to generator
carrier. This allows to use the name "offshore" for both "offshore-ac"
and "offshore-dc", but then "solar" also catches "solar thermal",
which is fine since for solar thermal potentials are np.inf, unless
limit is 0 since np.inf*0 is nan.
2019-04-24 12:17:42 +02:00
Tom Brown
d48d51f765 Cater for AC and DC offshore in plotting 2019-04-23 16:22:09 +02:00
Tom Brown
5157041ee2 Update for compatibility with latest PyPSA-eur master branch
Remove non-renewable generator and storage units from electricity-only
base network, since they're added differently here with links.

Remove unncessary cruft from config.yaml which is not used by
PyPSA-Eur-Sec (e.g. renewable configuration parameters).

Rename "naptha" to correct "naphtha".
2019-04-18 15:23:37 +02:00
Tom Brown
3b0e0dfb3a Changes to make solving and post-processing work 2019-04-18 12:12:38 +02:00
Tom Brown
cfe44ce702 Copy solve_network.py and *_summary.py from pypsa-eur sector branch 2019-04-18 11:39:17 +02:00
Tom Brown
e88b6c850f Fix prepare_sector_network to reproduce old sector prenetworks
from pypsa-eur sector branch
2019-04-17 17:04:33 +02:00
Tom Brown
ad865c18c6 Copy prepare_network.py from pypsa-eur sector commit 95820e57f795
...to scripts/prepare_sector_network.py
2019-04-17 14:24:22 +02:00
Tom Brown
ea22a792b7 Fix all data preparation steps up to prepare_network 2019-04-17 11:44:16 +02:00
Tom Brown
1b26c3c737 Copy data preparation scripts from pypsa-eur sector branch 2019-04-16 16:03:51 +02:00