[Bug] Latent heat not fully transferred in heat exchanger
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:
- I created two heat identical heat exchangers with 100% helium-4 in stream 1 and 100% nitrogen in stream 2.
- Stream 1 inlet is at 90 K and 1.5E6 Pa (15 bara).
- Stream 2 inlet is at 1.2E5 Pa (1.2 bara) and 0% vapor fraction, which means the nitrogen is at 78.8193 K
- 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.
- 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.
- 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

Heat Exchanger 2

Desktop (please complete the following information):
- OS: Windows 10 pro
- Version [v 8.0.4]
Additional context
@renzhuo can you attach the flowsheet file?
Here we go Liquid_Nitrogen_Subcooler.zip
@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.
@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
@renzhuo v8.1.0 contains the fix and is now available for download 👍🏻
Sorry I forgot to check your fixes, quite busy recently. I will take a look and let you know. Thanks!
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.