usnistgov / REFPROP-issues

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

Specific Heat for User Defined Mixtures #388

Closed Ichabod09 closed 3 years ago

Ichabod09 commented 3 years ago

Description

I am coming across a discrepancy in the way that Refprop is calculating the Cp (specific heat) of a user defined mixture. This could very well be my inexperience with utilizing this software but I was hoping someone could give some clarification, information as to how REFROP is calculating the Cp for user defined mixtures or if this is an issue. The example I am utilizing is pure methanol Cp, pure water Cp and checking against a 15%methanol/85%water mixture defined in the NIST Refrop software.

Steps to Reproduce

  1. Define 3 different Isoproperty tables at 14.7 psia. One table for pure methanol temp range -7-148 °F, one table pure water -7-148 °F, one table for 15%methanol/85%water (mass fractions).
  2. Multiply the Cp at 0°F for pure methanol by 0.15 and you get 0.08353. Multiply the Cp for pure water by .85 and you get 0.8858. Add these 2 together and the total is 0.9693 which in theory should be the Cp for the mixture.
  3. Compare this number to the Cp given on the mixture table at the same temperature and it is 0.9268 which is significantly different.

Expected behavior: These numbers should be relatively close considering that these 2 fluids will mix so the sum of their parts should be the equal to the solution. It does appear that density follows this trend (i.e. if you multiply the mass fractions for each part of the solution the numbers come out to be relatively close when compared to the methanol/water table.)

Actual behavior: The numbers do not appear to be close enough on the Cp when comparing the tables. Is there a different way that REFPROP is calculating these values?

Versions

REFPROP Version: REFPROP 10.0 Operating System and Version: Windows 10 Access Method: REFPROP Executable

Additional Information

Again I am very new to this software so this could definitely be user error but I am putting this out there in case someone else is seeing the same error or if someone has more information as to how these values are calculated.

ianhbell commented 3 years ago

Can you please do the same evaluation in SI units? Are you sure all inputs are homogeneous?

Ichabod09 commented 3 years ago

I changed my units to SI and re-ran my 3 isoproperty tables from 251.48 Kelvin to 338.48 Kelvin at 0.1013 MPa and got the following numbers using the same mass fractions (15% for methanol, 85% for water): At 255.48 Kelvin Cp for methanol = 2.3303 Multiply 2.33030.15 =0.3495 At 255.48 Kelvin Cp for pure water = 4.3585 Multiply 4.35850.85 = 3.7047 Adding these together for the solution gives 4.0547 The methanol/water chart at 255.48 Kelvin shows 3.8775

Ichabod09 commented 3 years ago

I apologize the math didn't show up properly Multiply 2.3303 x 0.15 = 0.3495 Multiply 4.3585 x 0.85 = 3.7047

ianhbell commented 3 years ago

One point to mention here is that c_p is not defined in this way. It is defined as the temperature derivative of enthalpy of the mixture at constant density and composition. As you are seeing, that is not the same thing. What "chart" are you comparing against?

EricLemmon commented 3 years ago

Heat capacities for mixtures can be quite different than those for the pure fluid constituents in the mixture, mostly in the critical region. I realize you are not anywhere near that point, but graphs can always make a great impression! Look at the picture below, the green is the saturation line of methanol, the blue is that of water, and the red is for the mixture. The x-axis is the density, but plotted as a reduced value based on the critical-point density. The mixture properties are less than either of the pure fluids over quite a range of densities. These effects are real, but it's complicated to explain why.

Then look at the second picture that zooms in on the liquid phase. Your state is around a reduced density of 3. In that region the methanol equation of state dips lower than either water or the mixture. This is most likely caused by association in the liquid phase at temperatures near the triple points of the fluids. Once association comes into play, all concepts of what we think should happen may no longer be true. Ice floats!

image

image

Ichabod09 commented 3 years ago

I am comparing against my defined mixture isoproperty table for 15%methanol/85%water built in REFPROP. Essentially I am comparing the calculations of mass fractions for each individual fluid to the table formulated in REFPROP. 15%methanol-85%Water

ianhbell commented 3 years ago

Another point to mention here is that this input seems to be solid. If we consider the methanol + water models for the mixture treated as incompressible, the models implemented in CoolProp say this input is frozen:

import CoolProp.CoolProp as CP

for meth in ['VMA','MMA', 'MMA2']: # Three different methanol + water models 
    try:
        print(CP.PropsSI('C','T',255.4,'P',101325,f'INCOMP::{meth}-15%'))
    except BaseException as BE:
        print(BE)

yields

Your temperature 255.400000 is below the freezing point of 259.648939. : PropsSI("C","T",255.4,"P",101325,"INCOMP::VMA-15%")
Your temperature 255.400000 is below the freezing point of 262.583606. : PropsSI("C","T",255.4,"P",101325,"INCOMP::MMA-15%")
Your temperature 255.400000 is below the freezing point of 262.483966. : PropsSI("C","T",255.4,"P",101325,"INCOMP::MMA2-15%")
Ichabod09 commented 3 years ago

If I change the parameters to 25% methanol and 75% water and re-run the tables I am getting the same discrepancy at 255 Kelvin which would be out of the freezing for a 25%methanol/75%water mixture. Comparing the mass fraction calcs gives me 3.857025 and the table tells me 3.6438.

ianhbell commented 3 years ago

I did the same test with the incompressible model at 25% MeOH by mass

import CoolProp.CoolProp as CP

for meth in ['VMA', 'MMA', 'MMA2']: # Three different methanol + water models 
    try:
        print(CP.PropsSI('C','T',255.4,'P',101325,f'INCOMP::{meth}-25%'))
    except BaseException as BE:
        print(BE)

yielding

3952.708111099707
3845.9397591623438
3963.386005072916

I think a key point here is that the mixture model for methanol + water in REFPROP has a lot of problems, and it doesn't surprise me that you are seeing deviations of 10% between the empirical incompressible models (curve fits) and the full multi-fluid mixture model (what is in the table). Uncertainty in c_p is often high for both measurements and models.

In general, your approach of mass fraction-weighting the pure fluid values is only an estimation scheme. There is no reason to expect the mixture value of c_p to follow mass-fraction weighting of the pures.

nist-aharvey commented 3 years ago

As Ian said, in general you should not expect heat capacities to mix ideally in this way. That may be the case for simple fluids like hydrocarbons, but both water and methanol have complicated intermolecular forces and would be expected to have nonideal mixing. For example, I find in the literature a substantial excess enthalpy for water+methanol mixtures (at temperatures somewhat higher than yours): https://www.sciencedirect.com/science/article/pii/S0021961405000741 and an excess heat capacity (the effect you are seeing) for water+ethanol: https://www.sciencedirect.com/science/article/pii/S0021961405000741 It is also well known that water+ethanol is significantly nonideal -- if you mix 50 ml of water with 50 ml of ethanol you end up with something like 95 ml of the mixture. So differences from ideal mixing for this system of about 5% are not surprising.

Doing mixture thermodynamics with mass fractions is also dangerous. The normal relationships for ideal solutions, etc., are defined on a molar basis. Some things convert easily to mass fraction and some don't. So much better to examine questions like this in terms of mole fraction.

A final possible problem is that you are doing the calculation at 255 K, where pure water would be a solid. So the pure liquid water number you are using in your ideal mixing calculation is coming from an extrapolation of the water equation of state outside its official range of validity. I suspect it is probably OK with that degree of extrapolation, but I'm not certain of that. To see if that extrapolation is distorting things, you could try the same calculation at 275 K, where you are in the range of validity of both pure-fluid equations of state. You could also plot the pure water Cp versus temperature and see if the curve appears to be doing something funny by the time you get down to 255 K.

Ichabod09 commented 3 years ago

Is there any way to explain how REFPROP is estimating out the Cp of the methanol-water mixtures at lower temperatures? Is utilizing REFPROP for this information a good way of estimating out the Cp for this mixture?

ianhbell commented 3 years ago

If all you want is a reasonably accurate value of c_p of methanol + water mixtures, the approach of REFPROP is likely overkill and I would use one of the incompressible mixture models in CoolProp. Besides, the thermodynamic models for pure methanol, as well as the mixture methanol + water in REFPROP have a lot of issues, and I wouldn't recommend them in general. A quote explaining my general approach (probably misattributed to Albert Einstein) goes "the model should be as simple as possible, but no simpler".

nist-aharvey commented 3 years ago

I would add to Ian's comment that the "simple" approach should be good enough for engineering purposes (within 5 or 10%) only if the values for pure water at the temperatures used are reasonably accurate. That is not guaranteed if you are extrapolating the water EOS far below 273 K. There are some recent good experimental data for Cp of supercooled liquid water that could be compared against to see how good the extrapolation is: https://iopscience.iop.org/article/10.1088/1742-6596/1385/1/012008

EricLemmon commented 3 years ago

Can this issue be closed? There have not been any new questions for two weeks now.