如何在Brightway2中对多输出流程进行建模?

问题描述 投票:0回答:2

在循环过程(氢化和脱氢)中,我正在尝试对脱氢进行建模。

通过活性脱氢,我得到两种产品:

  1. 氢(我的功能单位)
  2. 不饱和氢载体。

在活性脱氢过程中,有两股物流进入。

  1. 饱和氢载体
  2. 热能。

我正在使用 Brightway2 和 Ecoinvent。我的目标是能够在后续交换中引用两个输出流(氢气和不饱和氢载体),或者将两者存储起来,以便我可以继续使用它们。例如,我想在称为“压缩机”的下一次交换中引用脱氢中排出的氢气。

但是,我希望能够在任何下一次交换中参考脱氢过程中现有的不饱和氢载体(在这种情况下,氢载体会再循环,直到它回到饱和形式)。

Flowchart of what I am trying to model

到目前为止,我尝试使用多功能包解决这个问题,但我不断收到错误。我真的不明白为了正确运行多功能包并解决问题需要什么具体语法。

下面我摘录了我的代码。请注意我添加的评论。

# DEHYDROGENATION ACTIVITY
for activity in [act for act in fgdb if 'Dehydrogenation' in act['name']]:
    activity.delete()

#fgdb stands for my foreground system database (basically technosphere matrix)

DHy_Sat = fgdb.new_activity(
    code = 'DHy_ns',
    name = 'Dehydrogenation',
    unit = 'kg'
)

DHy_Sat.new_exchange(
    amount = 1,
    unit = 'kg',
    input = DHy_Sat.key,
    type = 'production',
    reference_product = 'Hydrogen'
).save()

DHy_Sat.new_exchange(
    amount = -69.61, # unsaturated carrier exits DHy_Sat activity
    unit = 'kg',
    input = DHy_Sat.key,
    type = 'technosphere',
    code = 'Notsat_from_DHy',
    reference_product = 'Not Saturated Carrier'
).save()

DHy_Sat['reference product'] = 'Hydrogen'
DHy_Sat.save()

# DEHYDROGENATION EXCHANGES

DHy_Sat.new_exchange(
    amount = 70.68,
    unit = 'kg',
    input = Unloading_Sat.key,   
    type = 'technosphere'
).save() #DHy_Sat activity gets its input from a previous activity called Unloading_Sat

DHy_Sat.new_exchange(
    amount = 3600,
    unit = 'MJ',
    input = heat_for_DHy[0].key, #heat_for_DHy is taken from Ecoinvent
    type = 'technosphere'
).save()

# NOT SATURATED LOADING EXCHANGES

Loading_Notsat.new_exchange(
    amount = 69.61,
    unit = 'kg',
    input = DHy_Sat.key,      #Here I want the input to be the unsaturated carrier ‘Notsat_from_DHy’
    type = 'technosphere'
).save()

Loading_Notsat.new_exchange(
    amount = 0.01,
    unit = 'kWh',
    input = electricity_from_grid_regional[0].key, #is taken from Ecoinvent

    type = 'technosphere'
).save()

# COMPRESSOR

for activity in [act for act in fgdb if 'HP Compressor' in act['name']]: # Avoiding activity duplicates
    activity.delete()

compressor = fgdb.new_activity(
    code='compr_hp',
    name='HP Compressor',
    unit='kg'
)

compressor.new_exchange(
    amount = 42.42,
    unit = 'kWh',
    input = electricity_from_grid_regional[0].key, #comes from Ecoinvent
    type = 'technosphere'
).save()

compressor.new_exchange(
    amount = 1,
    unit = 'kg',
    input = DHy_Sat.key,
    type = 'technosphere'
).save()

compressor.new_exchange(
    amount = 1,
    unit = 'kg',
    input = compressor.key,
    type = 'production'
).save()

compressor['reference product'] = 'hydrogen'
compressor.save()
python modeling lifecycle brightway
2个回答
0
投票

您链接到的

multifunctional
库是一个 shell,那里没有工作代码。目前你需要自己决定如何进行分配,Brightway 中的方法和 LCA 中的方法一样多:)

关键是为多功能流程的功能输出创建

product
节点。多功能流程需要具有
process
以外的类型 -
multifunctional
似乎工作得很好。此过程将保存在数据库中,但在构建矩阵时永远不会使用。

然后,您可以编写一个函数来根据您想要的任何内容进行分配 - 多功能数据集的一些属性,一些外部数据源,这取决于您。然后,您将把分配的单输出进程作为普通数据集存储在同一数据库中(或存储在另一个数据库中,这并不重要)。

这是执行此操作的两个笔记本。我只是忘了我写过一次所以又写了一遍:


0
投票

这更像是一个 LCA 问题,而不是一个编码问题(我也想知道这个多功能库......)。

Brightway2 不会自动解决多功能问题。您需要 1) 了解您的目标和您想要评估的内容 2) 与此一致,选择一种可以回答您的问题的系统模型方法(分区或替换),3) 相应地解决系统问题(您是否尝试过在excel?这样做可能会有用),4)根据brightway语法在brightway中对这样的矩阵进行建模。

旁注:很难给出解决方案,因为所描述的系统非常不清楚。 “循环过程”是相当神秘的。它可以被建模为一种处理活动,然后您甚至不会遇到多功能问题(即,不饱和 H2 载体真的是副产品吗?)。等等。有很多方法可以对此进行建模,但不是一个 Brightway 问题本身

© www.soinside.com 2019 - 2024. All rights reserved.