usnistgov / REFPROP-issues

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

Property data fitting and verification #81

Closed QiangCaoSH closed 5 years ago

QiangCaoSH commented 5 years ago

To people who may be interested, I’d like to know how you verify property data. I get an impression that the data is achieved with such procedures: 1) measuring data of specific points, 2) developing theoretical model, determining coefficient based on measured data, 3) data are calculated with the theoretical model. Maybe there are lots of iteration procedure, I guess. Is the measurement the only method for verifying the data? Are there theoretical methods for the verification?

Best regards, Qiang CAO Ph.D., Assistant Professor

Institute of Refrigeration and Cryogenics School of Mechanical Engineering Tongji University Add: Cao'an highway 4800#, Shanghai 201804 E-mail: QiangCao@tongji.edu.cn

EricLemmon commented 5 years ago

Thanks for the question, this is something that is often of interest to many.

Fitting experimental data to an equation of state is a process that includes not only statistical validation of the equation to the available measurements but also a lot of art. When we start fitting a new fluid, we first collect all of the data available and then look at the quality and quantity of the data. Depending on the importance of the fluid and/or the amount (or lack) of data available, we may ask our colleagues at NIST or elsewhere to measure additional data points, especially densities and speeds of sound, both of which are extremely important in the development of accurate equations of state. With the new measurements and our current fitting techniques, we then fit an equation of state.

For fluids where the data situation is poor (either by the amount of data available or the accuracy of the data) and when the fluid is not of high importance to industry, then we have to apply the art in addition to the statistics in making an equation of state. Our Helmholtz equations can be quite flexible and can allow us to fit both the good and bad data in situations where they exist at different state conditions. This however often leads to poor extrapolation because the equation has to bend significantly to fit the bad data in addition to the good data. The art is then applied by looking at various plots such as Cv vs. temperature, pressure vs. density, the PIP vs. both density and temperature, (Z-1)/D vs. density, and so on. The PIP and (Z-1)/D are two properties that are very powerful in judging the accuracy of an equation, but are not generally used in industrial settings. Their meanings are explained in much of the recent literature on our equations of state. An equation that extrapolates poorly will quickly be evident to the trained eye. This takes many weeks of teaching a student before he or she learns the art of the plots and can identify the bad behavior. When we cannot correct the plots to obtain the proper characteristics, we begin to suspect one or more data sets. It then becomes a fun challenge to find the data set causing the problems. Once identified, it is removed from the fit. As the fitting process continues, it is again put back into the fit to determine if the initial findings were correct. Often we initially identify the wrong data, so we continue to massage the equation with different data sets until we find a solution that best represents the correct data and thus produces smooth extrapolation of different properties such as the PIP.

In situations where the good and bad data overlap the same area, the equation generally cannot fit both. The data might be PVT from one author and speed of sound from another. These may appear to be two completely different properties, thus you might think that the equation could fit both, but this is not the case. Pressure is calculated by taking the first derivative of the Helmholtz energy (the equation of state) with respect to density, and speed of sound requires the calculation of quite a number of different derivatives of the Helmholtz energy with respect to either (or both) density or temperature. With enough PVT data covering a large area of temperature and pressure, then not only do we have a density derivative, but the large area also contributes to information on the first temperature derivative, and the first and second derivatives with either or both temperature and density. Thus, incorrect sound speed data can NOT be fitted simultaneously with PVT data when the data are available over a large area, or vice versa.

It is thus not a matter of theoretical methods that we use to validate data, but the thermodynamics of equations of state and the relation of all properties with each other through various derivatives of the Helmholtz energy (although I guess you could indeed call this a theoretical method). This combined with the trained eye to see incorrect extrapolation behavior become the basis for the validation of data and for fitting equations of state. These methods even make it possible to obtain accurate properties in the vapor phase and supercritical regions when there are no data in either of these regions. We apply a significant number of constraints to control the properties (such as the PIP and rectilinear diameter), and through years of experience we have learned how to best obtain the most correct equations possible over the full liquid/vapor surface with our current fitting techniques.

Over the past several years molecular simulation techniques have become good enough that we can also start to use calculations from these models to help validate the equation of state. Some of this is still in its infancy, but will become more important as new models are developed that produce more accurate calculations for our use.

QiangCaoSH commented 5 years ago

Well, this is such a profound explanation. I realize that the property equation is based on experiment measurement, the theoretical work are all trying to minimize errors, extend to a wide range and get more property. Future simulation techniques are under-developing. Thank you very much! By the way, what is PIP and (Z-1)/D? Is there some related explanation? I have not found in the internet.

EricLemmon commented 5 years ago

The term (Z-1)/D refers to the compressibility factor minus one, all divided by the density. The PIP is the phase identification parameter published by a wonderful friend who we call GV because his real name is too difficult for us to pronounce! You can find it here:

G. Venkatarathnam and L.R. Oellrich, Identification of the phase of a fluid using partial derivatives of pressure, volume, and temperature without reference to saturation properties: Applications in phase equilibria calculations, Fluid Phase Equilib., 301:225-233, 2011.

The work of Eisenbach on a preliminary equation for propylene glycol gives an excellent review of these two parameters and the fitting techniques we now use. This work is freely available and can be obtained here:

https://trc.nist.gov/refprop/FAQ/Propylene_glycol_Eisenbach.pdf

QiangCaoSH commented 5 years ago

Great! I have learnt a lot. Thank you so much!