0

I have the following flowchart (e.g. Fig. 1: Simple Flowchart) that I would like to create in Brightway2. I have access to an Ecoinvent database to get e.g. CO2 equivalents when building a wind turbine. I have never worked with Brghtway2 before but have some prior knowledge with Python. The structure of my foreground system (technosphere) is composed of activities and exchanges and looks like this:

The wind turbine generates 1 kWh of electrical energy. For each kWh of energy generated from wind power, there is a certain amount of global warming potential that is released to the biosphere. These data are to be obtained from the background system, i.e. the Ecoinvent database. Water electrolysis requires about 55 kWh of electrical energy, about 9 kg of water, to produce 1 kg of hydrogen. In addition, about 8 kg of oxygen are produced and released to the biosphere. The 9 kg of ultra pure water is also obtained from the biosphere or alternatively from the Ecoinvent database. Subsequently, the generated hydrogen is to be compressed. To compress 1 kg of hydrogen from 20 bar to 50 bar, approximately 0.44 kWh of electrical energy is required, sourced from an electricity mix of any country. The global warming potential data for the generation of electricity from an electricity mix of any country shall also be obtained from the Ecoinvent database.

How can I set up this simple foreground and background system. I would be grateful if you could provide me with a sample code for the activities and exchanges described above.

I have set up my electrolysis so far as follows:

Exmpl_electrolysis = fgdb.new_activity(code='electrolysis', name='Hydrogen from PEM', unit='kilogram')

Exmpl_electrolysis.save()

Exmpl_electrolysis.new_exchange(input = [ELECTRICITY MIX], amount=55, unit='kilowatt hour', type='technosphere').save()
zakalaka
  • 1
  • 2
  • You are correct. I have just corrected it. – zakalaka Apr 16 '23 at 16:17
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 16 '23 at 20:48
  • I was hoping someone could point me to the code framework based on the information I gave on the flowchart. So in very concrete and simplified terms, if you look at my flowchart, how can you code the listed activities and their exchanges? The bottom line is that I want to set up some LCAs on some more complicated cycles and compare their global warming potential. – zakalaka Apr 17 '23 at 17:26

1 Answers1

0

An easy way to define your foreground if it is not super big is to store it in an excel or csv and use the excel importer. Here an example. Note that the excel file is in the github repo as well. In this question there is also an screenshot of showing how you could add biosphere exchanges to be linked to the biosphere database. There is other example where the foreground is linked to ecoinvent as background, but I do not find it right now.

Nabla
  • 1,509
  • 3
  • 20
  • 35
  • Thanks for your reply. I think I have already been able to solve this problem sufficiently with an approach similar to the one you suggested. I recently posted a new problem and would be very grateful if you could read through it. Maybe you can also help me with my new problem. – zakalaka Aug 31 '23 at 21:16