-
Hello dear community, I am trying to calculate the impacts of a multi stage vapor injection on the performance of heat pumps, but unfortunately I have a hard time finding a configuration of boundary conditions that works. The goal is to limit the peak temperature (or peak pressure) and stay as close as possible to the 2-phase border during the compression to limit temperature and therefore energy consumption of the compression. For N=0 the code works fine, but once I get to N=1 I keep getting a singularity in the jacobian matrix, and I can't figure out why, or which boundary conditions to choose to solve it. Here is my code: https://github.com/Ecalia/heatpump-calculations/blob/main/VaporInjectionHeatPumpStudy.py and the results can be seen / executed here https://github.com/Ecalia/heatpump-calculations/blob/main/heatpump-configurations.ipynb Any help would be greatly appreciated! Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Hi @michox, can you quickly add a flowchart to see, what the generic structure of the model will look like? Also, I remember there was something with an injection compressor a long time ago (#230), maybe you can find some hints there already. Best regards |
Beta Was this translation helpful? Give feedback.
-
Hi @fwitte, thanks for the quick response, here is a flowchart for N=2: I've seen the issue, but I was hoping to do it without specifying mass flow, which that solution seems to rely on? |
Beta Was this translation helpful? Give feedback.
-
Got it to run! Turns out the issue was with the location of the cycle closer. After moving it to the same position where yours is, it works N=1 now, thanks! Is there information somewhere about why the position of the cycle closer matters? It also will sometimes work for N=2 every other time, N=3 rarely and after running it like 20 times I also got it to run for N=4, I always get this error during the first run whereas the connections for which this error message show up are not always the same, but there is always at least 4 Any ideas? it does not happen with your code... |
Beta Was this translation helpful? Give feedback.
If you are trying to build a generic model, this is some approach I would take for it: