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

[Bug] Property Override in Heat Exchangers with saltwater is very slow #646

Closed
magnuscarlsen opened this issue May 28, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@magnuscarlsen
Copy link

I need to model water saltier than 12% by mass. At lower salinities I have dealt with this with the seawater module, for higher salinities have added property overrides for density and heat capacity in "overallLiquid" based on pressure, temperature and salinity of the water. The water temp is up to 90 degC. If I run a model without a HX, the calculation takes a few seconds. If I add a heat exchanger to the model, then DWSIM freezes for 20-30 minutes, then it wakes up and calculates the flow sheet in a few seconds. Same flow sheet without property overrrides is also very fast. I think there is a bug in the HX with property overrides.

You can replicate the error if you: Run the flow sheet to see the time it takes, if you remove the HX and the streams associated you'll see that it takes a few seconds. If there is an error in the code for the property override or in the flow sheet (like 0 flowrate, which causes the pipe calc to fial) the sheet calculates very quickly).

I would have expected the flow sheet to be calculated in roughly the same amount of time as a flowsheet without exchangers. But I might have done something wrong in the setup?

Desktop:

  • OS: Windows 11, RAM 16,0 GB, Processor: 12th Gen Intel(R) Core(TM) i7-1260P 2.10 GHz
  • Version v8.7.1
    BaseModelShareable.zip
@magnuscarlsen magnuscarlsen added the bug Something isn't working label May 28, 2024
@andr1976
Copy link
Contributor

@DanWBR would you have time to look at this - highly appreciated :-)

@DanWBR
Copy link
Owner

DanWBR commented Jun 24, 2024

@magnuscarlsen create a new script and do this

image

@DanWBR DanWBR closed this as completed Jun 24, 2024
@andr1976
Copy link
Contributor

@magnuscarlsen can you confirm that this is a fix ?

@magnuscarlsen
Copy link
Author

yes, it seems to work 👍 Thanks very much!

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