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

Possible problem in Propyne EOS #557

Open
nist-aharvey opened this issue Nov 10, 2022 · 1 comment
Open

Possible problem in Propyne EOS #557

nist-aharvey opened this issue Nov 10, 2022 · 1 comment

Comments

@nist-aharvey
Copy link

In the GUI (Version 10.0), I choose Propyne as the fluid, and then do Specified State Points, T=298.15 K and P = 1 MPa.
This should be a state easily in the liquid phase (the saturation pressure is something like .58 MPa at that pressure).
The GUI comes back with a Warning I've never seen before:
CHECKSTATE Warning -705] State appears to be two-phase: d(Cv)/dT is positive.

Other calculations, like saturation calculations and vapor-phase P/T points, seem to work OK, but a lot of T/P calculations in the liquid fail in this way or in other ways (sometimes for density out of range for what seem like they should be reasonable liquid states).
I did not try to evaluate the stated derivative in the message, but off the top of my head I can't think of any fundamental thermodynamic reason why d(Cv)/dT can't be positive in a liquid phase.

P.S. You have probably gotten this suggestion before, but it would be great if the "Error Status" box in the GUI allowed the user to copy the text of the error message so it could be pasted into reports like this.

@EricLemmon
Copy link
Collaborator

For version 10 I did a huge study to try to find simple conditions that would always indicate that a state point was 2-phase, especially for fluids such as nitrogen where the behavior can be very interesting in the 2-phase, much of which bypasses normal tests that have been used for years to test for such states. Below are the conditions I found that indicate two phase states, with the negative ones being warnings instead of full errors because of such issues as the slope of Cv vs. T being positive for some of the bad fluids such as propyne, but the state is still single phase.

       700         Density is between ancillary values
       701         State is deep within 2-phase boundary
       702         dP/dD is negative
       703         dD/dT is positive
       704         d^2(P)/dTdD is negative
       706         Cv is negative
       707         d^2(T)/dPdD is positive
       708         Residual energy is positive
      -710         d(ln(P))/d(ln(D)) is positive
      -711         Pressure is negative
      -705         d(Cv)/dT is positive

If I remember right, for pure fluids then these checks often work for metastable states, but mixtures are much more difficult and their metastable states often bypass these rules.

The code in subroutine CheckState in the UTILITY.FOR file gives most of the details about the oddballs that don't obey these rules. I've pasted the comments from the top of the routine below, but there are numerous other comments spread throughout the code.

      subroutine CHECKSTATE (iFlag,mFlag,T,D,z,Err,ierr,herr)
c
c  Determine if the state at the input temperature and density is a
c  potential 2-phase state by applying various criteria, such as
c  a negative dP/d(rho).  However, some erroneous results could be
c  returned from bad equations of state, or fluids that behave
c  differently from other fluids (i.e., water, D2O, helium, and the
c  three hydrogens).
c
c  Inputs:
c    iFlag--When set to 1, use the pure fluid ancillary equations to check
c             for single-phase or two-phase states.  The error can be as high
c             as 1% from the true saturation state (always erroring on
c             the side of the metastable state near saturation.)
c           When set to 0, use the various criteria outlined below to
c             estimate the state of the input point.
c    mFlag--If set to 1, the mixture criteria will also be applied,
c             but these calculations are much slower than those for the
c             pure fluids, and only really contribute for non-ideal
c             mixtures.
c        T--Temperature [K]
c        D--Molar density [mol/L]
c        z--Composition array (array of mole fractions)
c
c  Outputs:
c      Err--The value of the first criteria that triggers the possibility
c           of a two-phase state.  The value is only useful in comparing
c           to the values at other states.  Those closer to saturation
c           will generally have smaller values.  Only negative values
c           indicate two-phase states.
c     ierr--Error flag:  0 - Inputs appear to be single phase or in the metastable region
c                     >700 - Pure fluid density is within the 2-phase according to the ancillary equations.
c     herr--Error string (character*255)
c
c  Nonissue fluids:  Those that fail at densities 0% to 50% higher than the
c    triple point;  Methanol, Neon, Propyne, R11, R12, R152a, R21
c    (much, but not all, of these failures are below the melting line).
c
c  Fluids to watch:  Those that fail at densities somewhat less than the
c    triple point, but at higher temperatures;
c    Fluorine, NF3, R13, R22.
c
c  Bad fluids, errors will occur:  These fails in the single-phase region
c    around the liquid triple point;
c      Fluorine  (d2PdTD)
c      Propyne   (phi30+2d0*phi20-12d0)
c      NF3       (d2PdTD)
c      R123      (d2PdTD+4d0)
c
c  Vapor phase failures:
c    Water, D2O, and Methanol fail the (phi02+3d-3) test in parts of the vapor phase.
c
c  Fluids that should fail:
c    Water (d2TdPD-1d-3 up to 315 K and 64 mol/L, ending at the saturated liquid line or the melting line.)
c    Water (phi30+2d0*phi20-12d0 below 276 K down to the melting line, and between 59 and 67 mol/L.)
c    D2O (d2TdPD-1d-3 up to 330 K and 60 mol/L, ending at the saturated liquid line or the melting line.)
c    D2O (dDdT up to 285 K and 58 mol/L, ending at the saturated liquid line or the melting line.)
c    Helium (d2TdPD-1d-3 from the lambda temperature to 3.15 K and from the the saturated liquid line to 50 mol/L.)
c
c  For CO2, the nonanalytical terms cause (d2PdTD+4d0) to fail in the critical region at temperatures
c    below 304.2 K and densities between 9.5 and 12.4 mol/L.

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