View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003390||OpenFOAM||Bug||public||2019-11-18 12:57||2019-12-12 11:38|
|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 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:|
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:
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.|
OpenFOAM_CoolProp_Comparison.png (299,110 bytes)
||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:
-0.121990926653498, // <-- Was -1.21990926653498
-0.00714146172046278, // <-- Was 0.00714146172046278
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
|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|