dwsim icon indicating copy to clipboard operation
dwsim copied to clipboard

[Bug] Latent heat not fully transferred in heat exchanger

Open renzhuo opened this issue 3 years ago • 4 comments

Describe the bug For heat exchangers, when one stream goes from 100% liquid at the inlet to 100% vapor with at the outlet, not all latent heat is exchanged.

To Reproduce Steps to reproduce the behavior:

  1. I created two heat identical heat exchangers with 100% helium-4 in stream 1 and 100% nitrogen in stream 2.
  2. Stream 1 inlet is at 90 K and 1.5E6 Pa (15 bara).
  3. Stream 2 inlet is at 1.2E5 Pa (1.2 bara) and 0% vapor fraction, which means the nitrogen is at 78.8193 K
  4. Heat exchanger 1 calculation type is set to 'Specify Outlet Molar Vapor Fraction Stream 2', outlet vapor fraction is set to 1 for stream 2.
  5. Heat exchanger 2 calculation type is set to 'Calculate hot fluid outlet temperature', cold fluid outlet temperature (stream 2) is set to 78.83 K, 0.02 K higher than saturated temperature.
  6. Calculated heat exchanged from Heat Exchanger 1 is 4.00 kW, while calculated heat exchanged from Heat Exxchanger 2 is 4.21 kW, about 5% error.

Expected behavior Expect heat exchanged to be nearly the same for both heat exchangers

Screenshots Heat Exchanger 1 image

Heat Exchanger 2 image

Desktop (please complete the following information):

  • OS: Windows 10 pro
  • Version [v 8.0.4]

Additional context

renzhuo avatar Aug 08 '22 19:08 renzhuo

@renzhuo can you attach the flowsheet file?

DanWBR avatar Aug 09 '22 16:08 DanWBR

Here we go Liquid_Nitrogen_Subcooler.zip

renzhuo avatar Aug 09 '22 17:08 renzhuo

@renzhuo CoolProp calculations near saturation points are interpolated to some extent. The library is very unstable when extrapolating properties (T, P) outside the allowed ranges, so I had to do something about it.

DanWBR avatar Aug 13 '22 15:08 DanWBR

@renzhuo this is the procedure to calculate enthalpy of a stream's phase using CoolProp: https://github.com/DanWBR/dwsim/blob/windows/DWSIM.Thermodynamics/PropertyPackages/CoolProp.vb#L1295

DanWBR avatar Aug 13 '22 15:08 DanWBR

@renzhuo v8.1.0 contains the fix and is now available for download 👍🏻

DanWBR avatar Aug 22 '22 20:08 DanWBR

Sorry I forgot to check your fixes, quite busy recently. I will take a look and let you know. Thanks!

renzhuo avatar Aug 22 '22 20:08 renzhuo

I think it works correctly now. There is a small error probably comparing to using CoolProp directly. That probably comes from linear extrapolation so it I will go ahead and close the issue.

renzhuo avatar Aug 22 '22 20:08 renzhuo