Closed 5venNi closed 11 months ago
@5venNi,
thank you for reporting the issue. I have implemented a fix in #427, if you want to try it, you can install the developer version and use the update directly. I would like to add one or two more tests to prevent this specific issue from happening in the future, so I will merge it later this week and then soon create a new release to make the bugfix available for installation from PyPI.
Best
Francesco
P.S.: If you need support to set up a developer installation you can check out this page: https://tespy.readthedocs.io/en/main/development/how.html In case you want to give it a try and something does not work, please let me know. I'll try to help you directly then and maybe adjust that page correspondingly.
Thanks @fwitte for fixing it that quickly. It seems to work properly for the MWE above as well as my real use case.
Quick update: I will not implement more tests for now and merge #427 without them. The reason for that is #384, where I do a full restructuring of the TESPy back-end which also includes an improved fluid vector propagation. I have included your test case in the development of that. If you are interested, the restructuring will
Have a good weekend!
Best
@5venNi, quick update, in case you are still working with TESPy:
I merged #384 and published version 0.7.0. The new version changes a lot on the fluid properties side (you do not need to state fluid={"R134a": 1, "water": 0}
anymore, just fluid={"R134a": 1}
does the job now. The propagation has changed again a bit, but it should be more robust than before, so I hope it also deals with your real application. On top of that I added the test case to the testing pipeline. On top of that, the changes simplify further development with respect to implementing refrigerant mixtures in general, if that is still of relevance for you.
Best
Francesco
I think I found an issue with the fluid propagation in the initialisation of a network with Splitters and Merges. With the minimum working example (MWE) below, I get
in the fluid propagation. As far as I can tell from running it in debug mode, this is due to infinite looping trough the Splitter and the Merge even though this should be prevented with the
start
argument in thepropagate_fluid_to_target
functions according to the descriptions.The code below leads to the described error. The error would not occur if the fluid declaration was placed right after the source in this MWE. However, I have a more complicated network that requires me to generate stable starting values according to this tutorial (first replace certain attributes with others and solve this more stable system, followed by solving it again with the correct attributes). In this case, a fluid propagation with the initial values for the fluid composition is attempted from after the merge in the second calculation. This behaviour can be seen by uncommenting the commented part in the code below and declaring the fluid composition after the source.