Replacement of stream in registry #163
-
Hello, I have been trying to model a vibrating screen in BioSTEAM for a biorefinery using the unit operation given in the repository. That is the code i have trying to run:
There are other unit operations as well before vibrating screen but they work fine. This vibrating screen runs as well, but it shows an error line saying: RuntimeWarning: <Stream: S105> has been replaced in registry S105 = Stream('S105', phase='s'). It shows that it has been replaced with S104. The same goes with S106 that it has been replaced with S105. Even when i try to add another unit operation after vibrating screen, it shows me the same stream errors that streams have been replaced in registry. Also, it shows error in making process flow diagram. I tried to figure it out by looking into "Streams" and "piping" but could not figure it out. I would really appreciate if anyone can help me with this issue. Also, let me know if you require the whole code because it is fairly long and i have just added a snippet of it where i faced the issue. Thanks a lot. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @Uzair1shah, It looks like you've defined streams S105 and S106, but you don't pass those into the outs argument when defining your vibrating screen UO104. Instead, UO104 seems to be taking two newly defined streams, also with IDs 'S105' and 'S106'. Because these new streams have the same names as the previously defined streams, they replace the existing ones in the registry. Luckily this has a straightforward fix -- simply pass the actual variables S105 and S106 rather than the strings 'S105' and 'S106' as the outs of UO104. Best, |
Beta Was this translation helpful? Give feedback.
-
Regarding the graphviz diagrams, graphviz itself is a software that may need to be installed separately, which can be tricky sometimes. Please checkout the docs for instructions: https://biosteam.readthedocs.io/en/latest/#common-issues If you already installed graphviz and included it in your environment path but the problem persist, we are happy to help. You can run bst.preferences.raise_exception = True then repeat whatever needed to reproduce the problem and post here the full traceback with the code. You may want to checkout #158 too. Please divide questions/issues into separate issues for next time. This helps us catalog questions and keep discussions focused. Thanks, |
Beta Was this translation helpful? Give feedback.
Hi @Uzair1shah,
It looks like you've defined streams S105 and S106, but you don't pass those into the outs argument when defining your vibrating screen UO104. Instead, UO104 seems to be taking two newly defined streams, also with IDs 'S105' and 'S106'. Because these new streams have the same names as the previously defined streams, they replace the existing ones in the registry.
Luckily this has a straightforward fix -- simply pass the actual variables S105 and S106 rather than the strings 'S105' and 'S106' as the outs of UO104.
Best,
Sarang