Code Monkey home page Code Monkey logo

ammonia-prospective-scenarios's Introduction

ammonia-prospective-scenarios GitHub release (latest by date) DOI

Description

This is a repository containing scenarios that implement the projections developed for the following publication:

A Prospective Life Cycle Assessment of Global Ammonia Decarbonisation Scenarios
Johanna Boyce, Romain Sacchi, Earl Goetheer, Bernhard Steubing
In review.

It is meant to be used in premise in addition to a global IAM scenario, to provide refined projections for the future supply of ammonia for each IAM region.

Note that projections regarding regional ammonia markets stop at 2050. Any premise database with a reference year beyond 2050 will use projections for 2050.

This data package contains all the files necessary for premise to implement this scenario and create market- and region specific technology supply shares for ammonia.

Note

Cannot be used together with update("fuels").

Sourced from publication

If you use this data package in your research, please cite the following publication: A Prospective Life Cycle Assessment of Global Ammonia Decarbonisation Scenarios
Johanna Boyce, Romain Sacchi, Earl Goetheer, Bernhard Steubing
In review.

Results

Unitary and absolute results per technology and region are available in the results folder.

Data validation

goodtables.io

Test

example workflow

Ecoinvent database compatibility

ecoinvent 3.9 cut-off

IAM scenario compatibility

The following coupling is done between IAM scenarios and the ammonia market scenarios (APS):

IAM scenario APS scenario
IMAGE SSP2-Base Business As Usual
IMAGE SSP2-RCP26 Sustainable development
IMAGE SSP2-RCP19 Sustainable development
REMIND SSP2-Base Business As Usual
REMIND SSP2-PkBudg1150 Sustainable development
REMIND SSP2-PkBudg500 Sustainable development

What does this do?

This external scenario update the ecoinvent market for ammonia, according to the projections described in the Master thesis study of J. Boyce, 2022.

Ammonia


The following markets are introduced:

  • market for ammonia, via steam reforming w/ CCS (APS)
  • market for hydrogen, electrolysis (APS)
  • market for ammonia (APS)

market for ammonia (APS) is supplied by seven ammonia production pathways:

  • MP (Methane Pyrolysis), called ammonia production, hydrogen from methane pyrolysis,
  • SMR (Steam Methane Reforming), called ammonia production, steam reforming,
  • SMRC (SMR with CCS), called market for ammonia, via steam reforming w/ CCS,
  • ELE (electrolysis), called ammonia production, hydrogen from electrolysis,
  • OIL (Partial oxidation of oil), called ammonia production, hydrogen from partial oxidation of oil,
  • CG (coal gasification), called ammonia production, hydrogen from coal gasification,
  • CGC (CG with CCS), called ammonia production, hydrogen from coal gasification w/ CCS.

This market re-links to activities that consume ammonia throughout the database.

Hydrogen


The following market is introduced:

  • market for hydrogen, electrolysis (APS)

It is supplied by two hydrogen production pathways:

  • AE (alkaline electrolysis), and
  • PEM electrolysis

This market re-links to ammonia-producing activities that consume hydrogen throughout the database.

Flow diagram

diagram ammonia markets

How to use it?

    import brightway2 as bw
    from premise import NewDatabase
    from datapackage import Package
    
    
    fp = r"https://raw.githubusercontent.com/premise-community-scenarios/ammonia-prospective-scenarios/main/datapackage.json"
    ammonia = Package(fp)
    
    bw.projects.set_current("your_bw_project")
    
    ndb = NewDatabase(
        scenarios = [
            {"model":"image", "pathway":"SSP2-Base", "year":2050, "external scenarios": [{"scenario": "Business As Usual - image", "data": ammonia}]},
            {"model":"image", "pathway":"SSP2-RCP26", "year":2030, "external scenarios": [{"scenario": "Sustainable development - image", "data": ammonia}]},
        ],        
        source_db="ecoinvent 3.10 cutoff",
        source_version="3.10",
        key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    )
        
   ndb.update("external") # or ndb.update() if you want to update the database with the IAM data plus the external scenario
   

ammonia-prospective-scenarios's People

Contributors

romainsacchi avatar

Stargazers

 avatar

Watchers

 avatar

ammonia-prospective-scenarios's Issues

Error when updating external scenario

Hello,
I was testing the ammonia scenarios using ecoinvent 3.8, however, I could not create and write the database because of this error.
@romainsacchi , do you know how I can solve it?
Thanks a lot.

//////////////// IMPORTING USER-DEFINED INVENTORIES ////////////////

ValueError Traceback (most recent call last)

----> 3 ndb.update_all()

(...)

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\ecoinvent_modification.py:986, in NewDatabase.update_all(self)
984 self.update_steel()
985 self.update_fuels()
--> 986 self.update_external_scenario()

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\ecoinvent_modification.py:915, in NewDatabase.update_external_scenario(self)
913 for d, datapackage in enumerate(self.datapackages):
914 if "inventories" in [r.name for r in datapackage.resources]:
--> 915 inventories = self.__import_additional_inventories(
916 datapackage
917 )
918 else:
919 inventories = []

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\ecoinvent_modification.py:721, in NewDatabase.__import_additional_inventories(self, datapackage)
718 data = []
720 if datapackage.get_resource("inventories"):
--> 721 additional = AdditionalInventory(
722 database=self.database,
723 version_in=datapackage.descriptor["ecoinvent"]["version"],
724 version_out=self.version,
725 path=datapackage.get_resource("inventories").source,
726 )
727 additional.prepare_inventory()
728 data.extend(additional.merge_inventory())

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\inventory_imports.py:530, in AdditionalInventory.init(self, database, version_in, version_out, path)
529 def init(self, database, version_in, version_out, path):
--> 530 super().init(database, version_in, version_out, path)

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\inventory_imports.py:131, in BaseInventoryImport.init(self, database, version_in, version_out, path)
125 raise FileNotFoundError(
126 f"The inventory file {path} could not be found."
127 )
129 self.path = path
--> 131 self.import_db = self.load_inventory(path)
133 # register migration maps
134 # as imported inventories link to different ecoinvent versions
135 ei_versions = ["35", "36", "37", "38"]

File ~\Miniconda3\envs\bw2\lib\site-packages\premise\inventory_imports.py:553, in AdditionalInventory.load_inventory(self, path)
551 return ExcelImporter(path)
552 elif Path(path).suffix == ".csv":
--> 553 return CSVImporter(path)
554 else:
555 raise ValueError(
556 "Incorrect filetype for inventories." "Should be either .xlsx or .csv"
557 )

File ~\Miniconda3\envs\bw2\lib\site-packages\bw2io\importers\excel.py:107, in ExcelImporter.init(self, filepath)
105 start = time()
106 data = self.extractor.extract(filepath)
--> 107 data = [(x, y) for x, y in data if valid_first_cell(x, y)]
108 print(
109 "Extracted {} worksheets in {:.2f} seconds".format(
110 len(data), time() - start
111 )
112 )
113 if data and any(line for line in data):

File ~\Miniconda3\envs\bw2\lib\site-packages\bw2io\importers\excel.py:107, in (.0)
105 start = time()
106 data = self.extractor.extract(filepath)
--> 107 data = [(x, y) for x, y in data if valid_first_cell(x, y)]
108 print(
109 "Extracted {} worksheets in {:.2f} seconds".format(
110 len(data), time() - start
111 )
112 )
113 if data and any(line for line in data):

ValueError: too many values to unpack (expected 2)

Error in example

The example refers to non-existing scenarios: Business as usual and Sustainable development, the should be Business As Usual - image (or remind) and Sustainable development - image (or remind)

Electricity for cryogenic air separation

In the inventory, the new activity "ammonia production, hydrogen from electrolysis" includes a new activity "nitrogen, from cryogenic distillation, gaseous" that does not contain any data regarding the electricity necessary for the air separation.

I see that no electricity is referenced in the original source, page 33 of the supplementary information of Planetary Boundaries Analysis of Low-Carbon Ammonia Production Routes, but could not find an explanation for it. Even though no compression is used in the activity, I would expect some electricity consumed in the process.

From what is available in the literature, the activity from"Nitrogen - air separation cryogenic" from ecoinvent contains 0.563kWh per kg of N2 and I have also seen values ranging from 0.42kWh to 0.37kWh per kg of N2 from the publication Potential for improving the energy efficiency of cryogenic air separation unit (ASU) using binary heat recovery cycles, page 230, table 2, from 2015.

Also, in case this is relevant, 0.177 kg hydrogen + 0.823 kg nitrogen represents the ideal HB process (no losses). ref: Life Cycle Assessment of Ammonia Production Methods, 2018.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.