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

Consultation about HXN errors #159

Open
zasddsgg opened this issue Jul 14, 2024 · 10 comments
Open

Consultation about HXN errors #159

zasddsgg opened this issue Jul 14, 2024 · 10 comments

Comments

@zasddsgg
Copy link

Hello, when I execute HXN, the following error will be reported, may I ask you how to solve it?
Thanks for your help. Wish you a good day.

AssertionError: <HeatExchangerNetwork: HXN> 
Not equal to tolerance rtol=0.005, atol=0.001

Mismatched elements: 1 / 1 (100%)
Max absolute difference: 9.248
Max relative difference: 0.026
@zasddsgg
Copy link
Author

Hello, could I trouble you take some time to look at this problem. Thanks for your help again.

@zasddsgg
Copy link
Author

Hello, could someone help with this problem. Thanks for your help again.

@zasddsgg
Copy link
Author

@yalinli2, @sarangbhagwat, Hello, could you help with this issue. Thanks for your help.

@sarangbhagwat
Copy link
Member

Hi, @zasddsgg.

This error means there are likely units in your system with heat balance not satisfied. One of the reasons this can happen is if you have any heat exchangers in your system that have the 'rigorous' parameter set to False. To fix this, either set 'rigorous' to True, or (if the first solution is not viable for your implementation) add the heat exchanger (or parent unit) to a list past into the 'ignored' argument when creating your HXN object.

Let me know if you have further questions after trying this.

@zasddsgg
Copy link
Author

zasddsgg commented Jul 19, 2024

a) @sarangbhagwat, Thank you for your advice. I have set all heat exchangers to rigorous=True, and added all heat exchangers to the code HXN = bst.HeatExchangerNetwork('HXN', T_min_app = 10, ignored=lambda: [H1, H2, H3, H4, H5]), but the above error is still reported.

b) In order to ensure the accuracy of HXN, should all the heat exchangers be set to True, and would it be right to set to rigorous=False for some heat exchangers, and rigorous=True for the other heat exchangers?

c) If the heat exchanger is ignored (HXN = bst.HeatExchangerNetwork('HXN', T_min_app = 10, ignored=lambda: [H1, H2, H3, H4, H5])), is HXN still accurate, because HXN is the heat transfer of the heat exchanger.

@zasddsgg
Copy link
Author

@sarangbhagwat, Hello, either set 'rigorous' to True, or add the heat exchanger to a list past into the 'ignored' argument do not solve the error.

@zasddsgg
Copy link
Author

@sarangbhagwat Hello, I have tried some ways, but above error still reports. Could you help with this. Thanks a lot.

@zasddsgg
Copy link
Author

@yoelcortes @yalinli2 @sarangbhagwat Hello, could you help look at this issue. Thanks a lot.

@sarangbhagwat
Copy link
Member

Hi, @zasddsgg. To answer your questions:
(a) I will need code from you to reproduce your error. I would suggest using the following template for your issues (the same as to post new issues for the BioSTEAM repo):

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
A script or a text file that runs the code to reproduce the error.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
Full trace back, as text or a screenshot

Version

  • PyPI version or github

Additional context
Add any other context about the problem here.

(b) You may set rigorous=False for certain heat exchangers if you are sure there is no phase change happening in those exchangers.

(c) Yes, HXN results will still be accurate. The tool will simply be looking at the system as a whole except your ignored units, and putting together a network based on the remaining units.

@zasddsgg
Copy link
Author

zasddsgg commented Aug 3, 2024

Thank you for your help and answer, the problem has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants