View Issue Details

IDProjectCategoryView StatusLast Update
0003390OpenFOAMBugpublic2019-12-12 11:38
ReporterMSontheimer Assigned Towill  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformUnixOSUbuntuOS Version18.04
Fixed in Versiondev 
Summary0003390: Wrong liquid properties coefficients of ethanol (Cp, h)
DescriptionThe calculation of liquid properties "heat capacity Cp" and "enthalpy h" of ethanol (C2H5OH) based on the NSRDSfunc0 function is wrong due to wrong coefficients. This was found by comparing the OpenFOAM calculations with CoolProp 6.3.0 (see attached image) and literature data.

I don't have access to the NSRDS data base, so I cannot check the coefficients reported there. However, one could also find new coefficients based on the CoolProp database (see additional information).
Steps To ReproduceUse the NSRDS functions implemented in $FOAM_SRC/thermophysicalModels/thermophysicalProperties/thermophysicalFunctions/NSRDSfunctions with the coefficients provided in $FOAM_SRC/thermophysicalModels/thermophysicalProperties/liquidProperties/C2H5OH/C2H5OH.C and calculate heat capacity and enthalpy for different temperatures and compare the results with literature data.
Additional InformationOne can use CoolProp to find new coefficients for ethanol. A least-squares fit within the temperature range T=[200K, 350K] (up to boiling temperature) for NSRDSfunc0 leads to the following coefficients for the heat capacity of ethanol:

Cp_
(
        3086.27257308567,
       -13.9017298192482,
        0.04495256866223873,
       -1.89534803995077e-05,
        0.0,
        0.0
)

with an average error of 0.024% and maximum error of 0.062%.

The coefficients for enthalpy are found by integration, and the integration constant is calculated from enthalpy of formation and latent heat (consistency for "latentHeat"-mode, see https://bugs.openfoam.org/view.php?id=3085):

h_latent = h_vapor - h_liquid => h_latent(T_std) = h_fv - h_liquid(T_std) => h_liquid(T_std) = h_fv - h_latent(T_std).

The latent heat of vaporization is calculated using the OpenFOAM coefficients (since they agree with the CoolProp data), and the enthalpy of formation of vapor is h_fv = -235.31e6 J/kmol (Çengel & Boles: Thermodynamics: An Engineering Approach. 2006), and T_std=298.15K is the standard-state temperature.

This finally leads to the following coefficients:

h_
(
       -6710293.74515003,
        3086.27257308567,
       -6.95086490962410,
        0.01498418955407958,
       -4.73837009987693e-06,
        0.0
)

Results with old and new coefficients are shown in the attached images. Experimental data for Cp are taken from https://webbook.nist.gov/cgi/cbook.cgi?ID=C64175&Mask=2.
TagsNo tags attached.

Activities

MSontheimer

2019-11-18 12:57

reporter  

comparison_old_new_coeffs.png (56,168 bytes)   
comparison_old_new_coeffs.png (56,168 bytes)   

henry

2019-11-20 12:45

manager   ~0010926

If someone here has access to the NSRDS database it would be REALLY useful if all the liquid properties coefficients could be checked and corrected as necessary.

will

2019-12-12 11:38

manager   ~0010978

We now have obtained (with some difficulty) a copy of the 1985 Daubert and Danner reference (see NSRDS0ThermophysicalFunction.H). The liquid Cp coefficients were clearly taken from here and there are two mistakes; "b" is a factor of ten too large, and "c" has the wrong sign. The correct set is as follows:

    Cp_
    (
        2052.57331394213,
       -0.121990926653498, // <-- Was -1.21990926653498
       -0.00714146172046278, // <-- Was 0.00714146172046278
        5.20523562482363e-05,
        0.0,
        0.0
    ),

The Cp/H plots are now much closer similar to yours, but there is still a noticeable difference (about 13%). The referred data is old and is probably not as accurate as the new values that you have fitted. However, in this instance, I think we have to implement something for which we can provide a reference. If you want to use your coefficients you can do so via the "liquid" type which lets you choose NSRDS functions and coefficients at run-time.

Resolved in dev by https://github.com/OpenFOAM/OpenFOAM-dev/commit/d37fbcc39c834c2bbc436d0e5dd5e588aede0b5a

Issue History

Date Modified Username Field Change
2019-11-18 12:57 MSontheimer New Issue
2019-11-18 12:57 MSontheimer File Added: OpenFOAM_CoolProp_Comparison.png
2019-11-18 12:57 MSontheimer File Added: comparison_old_new_coeffs.png
2019-11-20 12:45 henry Note Added: 0010926
2019-12-12 11:38 will Assigned To => will
2019-12-12 11:38 will Status new => resolved
2019-12-12 11:38 will Resolution open => fixed
2019-12-12 11:38 will Fixed in Version => dev
2019-12-12 11:38 will Note Added: 0010978