Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bilwint opened this issue Jul 5, 2024 · 3 comments
Open

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

bilwint opened this issue Jul 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bilwint
Copy link
Contributor

bilwint commented Jul 5, 2024

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.

@jfreissmann
Copy link
Owner

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 jfreissmann added the bug Something isn't working label Jul 9, 2024
@fwitte
Copy link
Contributor

fwitte commented Jul 10, 2024

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.

@bilwint
Copy link
Contributor Author

bilwint commented Jul 11, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants