Fix discontinuities in NASA polynomials in thermo libraries#738
Draft
rwest wants to merge 9 commits into
Draft
Conversation
This reverts commit 95a285f.
Detected using the absolute thresholds:
1 kJ/mol for H
1 J/mol/K for S
=== unique failing (library, entry, magnitude) ===
553.6 J/mol/K entropy Chlorination HOCl
27.45 J/mol/K entropy USC-Mech-ii CH3CHCHCHO
27.45 J/mol/K entropy JetSurF2.0 CH3CHCHCHO
27.45 J/mol/K entropy JetSurF1.0 CH3CHCHCHO
27.45 J/mol/K entropy 2-BTP CH3CHCHCHO
24.8 kJ/mol enthalpy 2-BTP BTP
20.97 J/mol/K entropy USC-Mech-ii C2H3CHOCH2
20.97 J/mol/K entropy JetSurF2.0 C2H3CHOCH2
20.97 J/mol/K entropy JetSurF1.0 C2H3CHOCH2
20.97 J/mol/K entropy 2-BTP C2H3CHOCH2
18.23 kJ/mol enthalpy NOx2018 HOCHO
18.23 kJ/mol enthalpy Klippenstein_Glarborg2016 HOCHO
15.73 J/mol/K entropy USC-Mech-ii C4H5-2
15.73 J/mol/K entropy JetSurF2.0 C4H5-2
15.73 J/mol/K entropy JetSurF1.0 C4H5-2
15.73 J/mol/K entropy 2-BTP C4H5-2
10.51 J/mol/K entropy USC-Mech-ii C4H6-2
10.51 J/mol/K entropy JetSurF2.0 C4H6-2
10.51 J/mol/K entropy JetSurF1.0 C4H6-2
10.51 J/mol/K entropy 2-BTP C4H6-2
6.518 kJ/mol enthalpy USC-Mech-ii C4H5-2
6.518 kJ/mol enthalpy JetSurF2.0 C4H5-2
6.518 kJ/mol enthalpy JetSurF1.0 C4H5-2
6.518 kJ/mol enthalpy 2-BTP C4H5-2
4.412 kJ/mol enthalpy USC-Mech-ii C4H6-2
4.412 kJ/mol enthalpy JetSurF2.0 C4H6-2
4.412 kJ/mol enthalpy JetSurF1.0 C4H6-2
4.412 kJ/mol enthalpy 2-BTP C4H6-2
1.619 J/mol/K entropy USC-Mech-ii CH2OCH
1.619 J/mol/K entropy JetSurF2.0 CH2OCH
1.619 J/mol/K entropy JetSurF1.0 CH2OCH
1.619 J/mol/K entropy 2-BTP CH2OCH
1.563 kJ/mol enthalpy USC-Mech-ii C2H3CHOCH2
1.563 kJ/mol enthalpy JetSurF2.0 C2H3CHOCH2
1.563 kJ/mol enthalpy JetSurF1.0 C2H3CHOCH2
1.563 kJ/mol enthalpy 2-BTP C2H3CHOCH2
With the revised thresholds: Thermo library JetSurF1.0 entry CH2OCH: heat capacity is discontinuous by 6.541 J/mol/K at the switch-over temperature T=500.0 K Thermo library JetSurF1.0 entry CH2OCH: enthalpy is discontinuous by 0.9877 kJ/mol at the switch-over temperature T=500.0 K Thermo library JetSurF1.0 entry CH2OCH: entropy is discontinuous by 1.619 J/mol/K at the switch-over temperature T=500.0 K Thermo library JetSurF1.0 entry C4H5-2: enthalpy is discontinuous by 6.518 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry C4H5-2: entropy is discontinuous by 15.73 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry C4H6-2: enthalpy is discontinuous by 4.412 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry C4H6-2: entropy is discontinuous by 10.51 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry C2H3CHOCH2: enthalpy is discontinuous by 1.563 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry C2H3CHOCH2: entropy is discontinuous by 20.97 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry CH3CHCHCHO: enthalpy is discontinuous by 0.6672 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF1.0 entry CH3CHCHCHO: entropy is discontinuous by 27.45 J/mol/K at the switch-over temperature T=1000.0 K Thermo library NOx2018 entry HOCHO: enthalpy is discontinuous by 18.23 kJ/mol at the switch-over temperature T=1000.0 K Thermo library Klippenstein_Glarborg2016 entry HOCHO: enthalpy is discontinuous by 18.23 kJ/mol at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry C2H3CHOCH2: enthalpy is discontinuous by 1.563 kJ/mol at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry C2H3CHOCH2: entropy is discontinuous by 20.97 J/mol/K at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry CH2OCH: heat capacity is discontinuous by 6.541 J/mol/K at the switch-over temperature T=500.0 K Thermo library 2-BTP entry CH2OCH: enthalpy is discontinuous by 0.9877 kJ/mol at the switch-over temperature T=500.0 K Thermo library 2-BTP entry CH2OCH: entropy is discontinuous by 1.619 J/mol/K at the switch-over temperature T=500.0 K Thermo library 2-BTP entry C4H6-2: enthalpy is discontinuous by 4.412 kJ/mol at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry C4H6-2: entropy is discontinuous by 10.51 J/mol/K at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry C4H5-2: enthalpy is discontinuous by 6.518 kJ/mol at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry C4H5-2: entropy is discontinuous by 15.73 J/mol/K at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry CH3CHCHCHO: enthalpy is discontinuous by 0.6672 kJ/mol at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry CH3CHCHCHO: entropy is discontinuous by 27.45 J/mol/K at the switch-over temperature T=1000.0 K Thermo library 2-BTP entry BTP: enthalpy is discontinuous by 24.8 kJ/mol at the switch-over temperature T=1000.0 K Thermo library Chlorination entry HOCl: entropy is discontinuous by 553.6 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry C2H3CHOCH2: enthalpy is discontinuous by 1.563 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry C2H3CHOCH2: entropy is discontinuous by 20.97 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry CH2OCH: heat capacity is discontinuous by 6.541 J/mol/K at the switch-over temperature T=500.0 K Thermo library JetSurF2.0 entry CH2OCH: enthalpy is discontinuous by 0.9877 kJ/mol at the switch-over temperature T=500.0 K Thermo library JetSurF2.0 entry CH2OCH: entropy is discontinuous by 1.619 J/mol/K at the switch-over temperature T=500.0 K Thermo library JetSurF2.0 entry C4H6-2: enthalpy is discontinuous by 4.412 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry C4H6-2: entropy is discontinuous by 10.51 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry C4H5-2: enthalpy is discontinuous by 6.518 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry C4H5-2: entropy is discontinuous by 15.73 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry CH3CHCHCHO: enthalpy is discontinuous by 0.6672 kJ/mol at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry CH3CHCHCHO: entropy is discontinuous by 27.45 J/mol/K at the switch-over temperature T=1000.0 K Thermo library JetSurF2.0 entry SAXC4H7: heat capacity is discontinuous by 3.567 J/mol/K at the switch-over temperature T=1385.0 K Thermo library JetSurF2.0 entry SAXC4H7: enthalpy is discontinuous by 0.6598 kJ/mol at the switch-over temperature T=1385.0 K Thermo library JetSurF2.0 entry cC6H12: enthalpy is discontinuous by 0.5264 kJ/mol at the switch-over temperature T=1375.0 K Thermo library JetSurF2.0 entry PXCH2cC5H9: heat capacity is discontinuous by 5.264 J/mol/K at the switch-over temperature T=1394.0 K Thermo library JetSurF2.0 entry PXCH2-3-1C4H7: heat capacity is discontinuous by 5.064 J/mol/K at the switch-over temperature T=1394.0 K Thermo library JetSurF2.0 entry C2H5cC6H11: enthalpy is discontinuous by 0.9079 kJ/mol at the switch-over temperature T=1391.0 K Thermo library JetSurF2.0 entry C3H7cC6H11: enthalpy is discontinuous by 0.9475 kJ/mol at the switch-over temperature T=1391.0 K Thermo library JetSurF2.0 entry C9H18-4: enthalpy is discontinuous by 0.7711 kJ/mol at the switch-over temperature T=1391.0 K Thermo library JetSurF2.0 entry CH3-4-PXC6H10: heat capacity is discontinuous by 4.76 J/mol/K at the switch-over temperature T=1372.0 K Thermo library JetSurF2.0 entry C2H5-3-TAX1C6H10: heat capacity is discontinuous by 8.299 J/mol/K at the switch-over temperature T=1391.0 K Thermo library USC-Mech-ii entry CH2OCH: heat capacity is discontinuous by 6.541 J/mol/K at the switch-over temperature T=500.0 K Thermo library USC-Mech-ii entry CH2OCH: enthalpy is discontinuous by 0.9877 kJ/mol at the switch-over temperature T=500.0 K Thermo library USC-Mech-ii entry CH2OCH: entropy is discontinuous by 1.619 J/mol/K at the switch-over temperature T=500.0 K Thermo library USC-Mech-ii entry C4H5-2: enthalpy is discontinuous by 6.518 kJ/mol at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry C4H5-2: entropy is discontinuous by 15.73 J/mol/K at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry C4H6-2: enthalpy is discontinuous by 4.412 kJ/mol at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry C4H6-2: entropy is discontinuous by 10.51 J/mol/K at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry C2H3CHOCH2: enthalpy is discontinuous by 1.563 kJ/mol at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry C2H3CHOCH2: entropy is discontinuous by 20.97 J/mol/K at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry CH3CHCHCHO: enthalpy is discontinuous by 0.6672 kJ/mol at the switch-over temperature T=1000.0 K Thermo library USC-Mech-ii entry CH3CHCHCHO: entropy is discontinuous by 27.45 J/mol/K at the switch-over temperature T=1000.0 K
This reverts commit b4c8118.
Many models in the literature use these NASA polynomials for but-2-yne, CC#CC, but they have a discontinuity in the fit, causing errors in Cantera. While trying to not change the values, which the models have been validated with, we attempt here to fix the fits. End up using Cp(T) data from Burcat, which is very similar to that used originally, and shifting it to match the original H298 and S298 values. The resulting fits vary VERY little below 1000K, and by only a couple kcal/mol in deltaG between 1000-2000K. See bundled notebook for details.
There was a discontinuity in the polynomials causing an error in Cantera. The values from Curran 2016 Pentane model is identical up to 1000 K, so we presume is derived from the same source just a corrected fit. We therefore use that instead. Notebook included.
Somehow 0.73E+01 had been turned into 7.3E+01. I'm not sure what process made that possible :-/ Unfortunately led to an error in DeltaG of about 200 kcal/mol at 900K
The values used by Klippenstein and Glarborg in both the Klippenstein_Glarborg2016 and the NOx2018 thermo libraries have a discontinuity in the curves. Apparently after Ruscic modified the polynomials some time between 2010 and 2014 versions of Burcat's compilation. See #703 and #704 for details. To address, we revert to the 2010 values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As reported in RMG-database issues #321 and #703 some thermo libraries have entries with NASA polynomials that have discontinuities, eg. due to typos or fitting mistakes. One of these was fixed in #704
Bad cases can cause real problems. Minor cases cause annoyance when you use the model in Cantera (which checks). I've added a database test that detects this problem in all our thermo libraries, using the strict criteria used in Cantera. This database PR is to fix them, then we can merge the test into RMG-Py (it's on the
thermodiscbranch of the official fork)#704 is a good example of how to fix these.
Some will need a literature search, like that one. Some might require re-fitting (we have tools for this). It's probably worth plotting them in all cases. Add commits to this PR as we gradually fix things, and mark them as done in this list. It looks like a long list, but there's a lot of duplication.