View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0003390  OpenFOAM  Bug  public  20191118 12:57  20191212 11:38 
Reporter  MSontheimer  Assigned To  will  
Priority  normal  Severity  major  Reproducibility  always 
Status  resolved  Resolution  fixed  
Platform  Unix  OS  Ubuntu  OS Version  18.04 
Fixed in Version  dev  
Summary  0003390: Wrong liquid properties coefficients of ethanol (Cp, h)  
Description  The 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 Reproduce  Use 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 Information  One can use CoolProp to find new coefficients for ethanol. A leastsquares 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.89534803995077e05, 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 standardstate temperature. This finally leads to the following coefficients: h_ ( 6710293.74515003, 3086.27257308567, 6.95086490962410, 0.01498418955407958, 4.73837009987693e06, 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.  
Tags  No tags attached.  



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. 

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.20523562482363e05, 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 runtime. Resolved in dev by https://github.com/OpenFOAM/OpenFOAMdev/commit/d37fbcc39c834c2bbc436d0e5dd5e588aede0b5a 
Date Modified  Username  Field  Change 

20191118 12:57  MSontheimer  New Issue  
20191118 12:57  MSontheimer  File Added: OpenFOAM_CoolProp_Comparison.png  
20191118 12:57  MSontheimer  File Added: comparison_old_new_coeffs.png  
20191120 12:45  henry  Note Added: 0010926  
20191212 11:38  will  Assigned To  => will 
20191212 11:38  will  Status  new => resolved 
20191212 11:38  will  Resolution  open => fixed 
20191212 11:38  will  Fixed in Version  => dev 
20191212 11:38  will  Note Added: 0010978 