LCA not working for preprocessing area #177
-
Hello, I have the following code for TEA and LCA of preprocessing area for a biorefinery, but LCA is showing error. I tried to fix it but could not find any appropriate solution for it. I am not sure if the LCA part of the code is wrong or it is due to different version of Biosteam. The main code is as follows:
The error I am encountering is as follows:
The Biosteam version information is as follows: I would really appreciate it if you can guide me through it. Thanks a lot. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I kind of know what was wrong but I don't use the LCA functions of biosteam so I'm not sure if the fix I mentioned is the right way. Essentially when you are allocating based on economic value, all revenue properties of the power, heat utilities (including heating and cooling), and streams are 0. I'm guessing it's because the system isn't producing any electricity/heat, and you didn't assign price to any of the products. So there's no way to allocate because there's no revenue from any of the products. Assigning price would let the program run: for s in sys.products: s.price = 1
GWP_per_USD = sys.get_property_allocated_impact(
key=GWP, name='cost', basis='USD', # Revenue basis defaults to USD
) # kg-CO2e / USD But even before addressing the error you mentioned, I had to add some extra lines to fix the species['CO2'] = bst.Chemical('CO2') # added
# Create an empty Chemicals object and add each species to it
chemicals = tmo.Chemicals([])
for key, value in species.items():
#print(key)
value.default() # call the default method to populate all other properties not defined explicitly. Todo: some properties default to water's properties. Check individual chemical properties for accuracy once model is developed.
chemicals.append(value) # push a chemical object to back of the chemicals collection object
chemicals.compile() # compile the loaded chemicals. Must do.
chemicals.set_synonym('water', 'moisture') # set synonyms or common name for select species
chemicals.set_synonym('CaO', 'ash')
chemicals.set_synonym('methane', 'CH4') # added |
Beta Was this translation helpful? Give feedback.
I kind of know what was wrong but I don't use the LCA functions of biosteam so I'm not sure if the fix I mentioned is the right way. Essentially when you are allocating based on economic value, all revenue properties of the power, heat utilities (including heating and cooling), and streams are 0.
I'm guessing it's because the system isn't producing any electricity/heat, and you didn't assign price to any of the products. So there's no way to allocate because there's no revenue from any of the products.
Assigning price would let the program run: