TEA not working in BioSTEAM #174
-
Hello I have tried to run TEA for the preprocessing of a biorefinery using the same code provided in the documentation, however it shows the following error: *TypeError: unsupported operand type(s) for : 'property' and 'float' I have tried to fix this error, however I am unable to solve. The code is given as follows:
Note: This code would not be able to run it because different unit operations are used other than available in the repository. I am new to using BioSTEAM, so I am not sure if there is any error in my code or the TEA file of BioSTEAM. I would really appreciate if you can help me in this regard. Thanks a lot for always helping. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
The code you posted does not run for many reasons (e.g., biosteam is not imported, there is no thermodynamic property package). Please include all the code required to reproduce the error. Can you also post the following:
It is helpful to remove any irrelevant code too. For example, if the error happens at an earlier line, remove any lines that comes next. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I'm still unable to reproduce your error. I get the following error running your code:
Are you running any other scripts before running this one? Although the error may be unrelated, you may find it helpful to upgrade to BioSTEAM 2.38.8. The documentation always shows the latest version. |
Beta Was this translation helpful? Give feedback.
-
@Uzair1shah, there are many units listed in your code that are not in BioSTEAM. These units were never in BioSTEAM previously (nor have there been any renaming of unit operations in the last year). When you create new unit subclasses, BioSTEAM automatically registers them in the I get the same error with the most recent code you posted:
It may be better if you try to minimize your code such that it still reproduces the error you are seeing. |
Beta Was this translation helpful? Give feedback.
-
@Uzair1shah, OK! I was able to reproduce the error. The issue is the first argument to a TEA object should be a System object not a TEA subclass: sys = bst.main_flowsheet.create_system('sys')
tea = Preprocessing(system=sys, # Not Preprocessing
IRR=0.15,
duration=(2018, 2038),
depreciation='MACRS7',
income_tax=0.21, # Previously 35% in published study
operating_days=200,
lang_factor=3,
construction_schedule=(0.4, 0.6),
WC_over_FCI=0.05,
labor_cost=2.5e6,
fringe_benefits=0.4,
property_tax=0.11,
property_insurance=0.11,
supplies=0.20,
maintenance=0.01,
administration=0.005) Thanks! |
Beta Was this translation helpful? Give feedback.
@Uzair1shah, OK! I was able to reproduce the error. The issue is the first argument to a TEA object should be a System object not a TEA subclass: