heatpumps icon indicating copy to clipboard operation
heatpumps copied to clipboard

Plot error for working fluids R114, R365mfc, SES36...etc

Open bilwint opened this issue 1 year ago • 3 comments

Gets Index Error IndexError: index 0 is out of bounds for axis 0 with size 0 while generating plots Ts and logph diagram.

For some of working fluids like R114, R21, R142b, if we change the isoline T range it will work. But for working fluids like R365mfc and SES36 still not work.

Is that necessary to provide isolines, ie. T and s for logph and p & h for Ts diagram ?. Because if we generalise isolines with T_isolines and Q_isolines, except SES36 all other working fluid works.

bilwint avatar Jul 05 '24 13:07 bilwint

Hey @bilwint, thank you for reporting the issue. I was not able to reproduce the errors with refrigerants R114, R21, R142b and R365mfc. Neither a simple cycle nor a serial compression closed economizer resulted in the error you descriped. I was able to reproduce it with SES36. The error seems to stem from calculating the process isoline of the compressor(s). An error occurs when updating the state while calculating the _single_isentropic in fluprodia and since it has a catch all try-except clause for ValueErrors, no values are returned for the process step. (@fwitte the single isoline methods should probably give better feedback and not return no values and let the user fail while plotting the data. I was not able to find a good PropsSI call to stabelize the _single_isentropic method, as you did with _single_isothermal, but maybe the input values are just bad, see below:)

I feel like the error is rooted in an implausible compression process, as it seems that the isentropics leed the vapor back into the vapor-liquid-region. To help the user understand what is going on, I improved the robustness of the generate_state_diagram method, so that a plot is created either way and the user gets clear feedback that something went wrong and data is missing.

Re isoline ranges: We have not tested the isoline range values for all refrigerants, but we chose to set them manually, so that we have readable values and a good line density. I have talked about a better way to automate this with @fwitte, but for now this is not yet possible. If you find more stable values for the isoline ranges of specific refrigerants, feel free to change them in the state_diagram_config.json file in the input directory.

jfreissmann avatar Jul 09 '24 10:07 jfreissmann

Can you provide more insights? What exactly are the inputs? Compression into the two phase region for dry fluids might indeed be an issue, but I would like to replicate the issue first. Also, could we move this issue to the actual fluprodia repository?

Thank you very much

Edit: two issues actually, one on the crash and one on the user feedback.

fwitte avatar Jul 10 '24 15:07 fwitte

@jfreissmann, you are right. The problem is only for SES36. I got the error because my fluprodia version was old.

bilwint avatar Jul 11 '24 19:07 bilwint