usnistgov / REFPROP-issues

A repository solely used for reporting issues with NIST REFPROP
26 stars 13 forks source link

ternary density failure #257

Closed vdiky closed 4 years ago

vdiky commented 4 years ago

I don't frequently visit this site, and I have a very limited time for any action. First of all, I would ask if you can see that in your internal TDE and if the problem deserves more investments (e.g., I may have an obsolete Refprop, but I have to use it for release, then we need to maintain the released and current Refprop in parallel...) So, just run internal TDE, press Ctrl+N, paste butane + propane + 2-methylpropane and press enter, go menu Mixture models - Refprop - Original, click Stop button to save time preventing calculation of deviations, double click Density (L+G), and Plot for plotting:

image

ianhbell commented 4 years ago

What (precise) version of refprop do you use? What isobars have you plotted?

vdiky commented 4 years ago

Pressure is not present. The isopleths are for the available data: x1/x2=0.25/0, 0.5/0, 0.6/0.2, 0.75/0...

ianhbell commented 4 years ago

What version of REFPROP?

ianhbell commented 4 years ago

Also, for this use case, recommend to trace the phase envelope (with SATSPLNdll), much more reliable in general than blind flash calculations.

vdiky commented 4 years ago

6/4/2018 - must be 10.0 release.

vdiky commented 4 years ago
        double pvle;
        _FORTRAN_INTEGER_ kph = 1;
        _FORTRAN_INTEGER_ iguess = 0;
        double xliq[20], xvap[20];
        double d, q, rhol, rhov;
        _FORTRAN_INTEGER_ ierr;
        char herr[256];
        SATTPdll(pt->vl[3],pvle,x,kph,iguess,d,rhol,rhov,xliq,xvap,q,ierr,herr,errormessagelength);
        if (ierr==124)
        {
            SATSPLNdll(x, ierr, herr, errormessagelength);
            if (ierr<=0)
                SATTPdll(pt->vl[3],pvle,x,kph,iguess,d,rhol,rhov,xliq,xvap,q,ierr,herr,errormessagelength);
        }
        status = ierr;
        return (sel==2) ? pvle : (x[0]*m[0]+x[1]*m[1]+x[2]*m[2])*rhol;
EricLemmon commented 4 years ago

I just used the GUI to plot D-T saturation lines for a whole variety of compositions for these fluids and didn't see any mistakes. I was going to paste the plot here until I accidentally hit the little "x" in the top right hand corner and exited the program too soon! Oops.

Either the latest updates to the code have fixed the problem or I am using a different method than you to generate these. Come over one of these days and we can talk about better methods to calculate these phase envelopes.

ianhbell commented 4 years ago

Also, the version can be obtained programmatically, which is more reliable than the date of revision. If you have the 10.0 patch you can use the RPVersion function, otherwise the DLL# argument to the REFPROPdll function.

vdiky commented 4 years ago

Was a patch to 10.0 issued? I didn't know that. How can I get it?

ianhbell commented 4 years ago

Please email me and I can send you the link…

EricLemmon commented 4 years ago

Has this issue been resolved? Did you email Ian for the patch?

vdiky commented 4 years ago

image

Refprop version 10.0002

EricLemmon commented 4 years ago

You said this is version 10.0.0.02. You need to try the latest, 10.0.0.77.

vdiky commented 4 years ago

was it officially released? where is it located?

vdiky commented 4 years ago

alpha image