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

Result differences using SATSPLNdll #633

Open
hamschristoph opened this issue Dec 6, 2024 · 3 comments
Open

Result differences using SATSPLNdll #633

hamschristoph opened this issue Dec 6, 2024 · 3 comments

Comments

@hamschristoph
Copy link

Issue with Phase Calculation Using SATSPLNdll

Description

We have encountered an issue with the SATSPLNdll function in REFPROP. When using this function in the python wrapper, we receive different values compared to when the function is not used. Below is an example where the problem occurs:

  • Gas components: CO2, Water
  • Molar fractions (CO2, Water): 0.87784, 0.12216
  • Temperature: 67.09 °C
  • Pressure: 3.7 bara
  • Property requests: CP (We used CP, but our main concern is the phase calculation. With SATSPLNdll execution, we get Q=998.0 & PHASE=Superheated gas; Without SATSPLNdll execution, we get Q=0.977797 & PHASE=Two-phase)
  • Gas model: Peng-Robinson

Expected Behavior

For this example, a two-phase gas should be calculated.

Actual Behavior

  • With SATSPLNdll: PHASE=Superheated gas
  • Without SATSPLNdll: PHASE=Two-phase (as expected)

Question

Is there a problem in the calculation of SATSPLNdll?

Thank you for your assistance.

Versions

REFPROP Version: REFPROP 10
Operating System and Version: Windows 10
Access Method: Python wrapper

@ianhbell
Copy link
Contributor

ianhbell commented Dec 6, 2024

First point: don't use PR for such a non-ideal system.

It is a well-known problem that phase equilibrium calculations are very tricky for such asymmetric systems. Sometimes enabling the saturation splines with SATSPLNdll makes the calculations converge more reliably, sometimes not. Unfortunately you are in the case where it doesn't help. If you care only about binary mixtures, you could try to do tracing, but that is not supported natively in REFPROP.

@hamschristoph
Copy link
Author

Thank you very much for your fast reply and for the hint regarding PR. We will no longer use PR for such non-ideal systems in the future.

Your suggestion regarding tracing is not feasible for us, as we have integrated the refprop wrapper into a simulation and therefore the gas composition as well as temperatures, pressures, etc. change dynamically. In addition, we often use more than two components. Since we want to avoid receiving output of superheated phase, even though the mixture is in two-phase state under the given conditions, we have temporarily deactivated the SATSPLNDLL in our implementation.

@ianhbell
Copy link
Contributor

Unfortunately my suggestion to selectively disable the SATSPLN is about all that I can offer.

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