Skip to content

Fix discontinuities in NASA polynomials in thermo libraries#738

Draft
rwest wants to merge 9 commits into
mainfrom
thermodisc
Draft

Fix discontinuities in NASA polynomials in thermo libraries#738
rwest wants to merge 9 commits into
mainfrom
thermodisc

Conversation

@rwest

@rwest rwest commented Jun 17, 2026

Copy link
Copy Markdown
Member

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 thermodisc branch 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.

  • JetSurF1.0 | CH2OCH | heat capacity | 6.541 J/mol/K
  • JetSurF1.0 | CH2OCH | enthalpy | 0.9877 kJ/mol
  • JetSurF1.0 | CH2OCH | entropy | 1.619 J/mol/K
  • JetSurF1.0 | C4H5-2 | enthalpy | 6.518 kJ/mol
  • JetSurF1.0 | C4H5-2 | entropy | 15.73 J/mol/K
  • JetSurF1.0 | C4H6-2 | enthalpy | 4.412 kJ/mol
  • JetSurF1.0 | C4H6-2 | entropy | 10.51 J/mol/K
  • JetSurF1.0 | C2H3CHOCH2 | enthalpy | 1.563 kJ/mol
  • JetSurF1.0 | C2H3CHOCH2 | entropy | 20.97 J/mol/K
  • JetSurF1.0 | CH3CHCHCHO | enthalpy | 0.6672 kJ/mol
  • JetSurF1.0 | CH3CHCHCHO | entropy | 27.45 J/mol/K
  • NOx2018 | HOCHO | enthalpy | 18.23 kJ/mol
  • Klippenstein_Glarborg2016 | HOCHO | enthalpy | 18.23 kJ/mol
  • 2-BTP | C2H3CHOCH2 | enthalpy | 1.563 kJ/mol
  • 2-BTP | C2H3CHOCH2 | entropy | 20.97 J/mol/K
  • 2-BTP | CH2OCH | heat capacity | 6.541 J/mol/K
  • 2-BTP | CH2OCH | enthalpy | 0.9877 kJ/mol
  • 2-BTP | CH2OCH | entropy | 1.619 J/mol/K
  • 2-BTP | C4H6-2 | enthalpy | 4.412 kJ/mol
  • 2-BTP | C4H6-2 | entropy | 10.51 J/mol/K
  • 2-BTP | C4H5-2 | enthalpy | 6.518 kJ/mol
  • 2-BTP | C4H5-2 | entropy | 15.73 J/mol/K
  • 2-BTP | CH3CHCHCHO | enthalpy | 0.6672 kJ/mol
  • 2-BTP | CH3CHCHCHO | entropy | 27.45 J/mol/K
  • 2-BTP | BTP | enthalpy | 24.8 kJ/mol
  • Chlorination | HOCl | entropy | 553.6 J/mol/K
  • JetSurF2.0 | C2H3CHOCH2 | enthalpy | 1.563 kJ/mol
  • JetSurF2.0 | C2H3CHOCH2 | entropy | 20.97 J/mol/K
  • JetSurF2.0 | CH2OCH | heat capacity | 6.541 J/mol/K
  • JetSurF2.0 | CH2OCH | enthalpy | 0.9877 kJ/mol
  • JetSurF2.0 | CH2OCH | entropy | 1.619 J/mol/K
  • JetSurF2.0 | C4H6-2 | enthalpy | 4.412 kJ/mol
  • JetSurF2.0 | C4H6-2 | entropy | 10.51 J/mol/K
  • JetSurF2.0 | C4H5-2 | enthalpy | 6.518 kJ/mol
  • JetSurF2.0 | C4H5-2 | entropy | 15.73 J/mol/K
  • JetSurF2.0 | CH3CHCHCHO | enthalpy | 0.6672 kJ/mol
  • JetSurF2.0 | CH3CHCHCHO | entropy | 27.45 J/mol/K
  • JetSurF2.0 | SAXC4H7 | heat capacity | 3.567 J/mol/K
  • JetSurF2.0 | SAXC4H7 | enthalpy | 0.6598 kJ/mol
  • JetSurF2.0 | cC6H12 | enthalpy | 0.5264 kJ/mol
  • JetSurF2.0 | PXCH2cC5H9 | heat capacity | 5.264 J/mol/K
  • JetSurF2.0 | PXCH2-3-1C4H7 | heat capacity | 5.064 J/mol/K
  • JetSurF2.0 | C2H5cC6H11 | enthalpy | 0.9079 kJ/mol
  • JetSurF2.0 | C3H7cC6H11 | enthalpy | 0.9475 kJ/mol
  • JetSurF2.0 | C9H18-4 | enthalpy | 0.7711 kJ/mol
  • JetSurF2.0 | CH3-4-PXC6H10 | heat capacity | 4.76 J/mol/K
  • JetSurF2.0 | C2H5-3-TAX1C6H10 | heat capacity | 8.299 J/mol/K
  • USC-Mech-ii | CH2OCH | heat capacity | 6.541 J/mol/K
  • USC-Mech-ii | CH2OCH | enthalpy | 0.9877 kJ/mol
  • USC-Mech-ii | CH2OCH | entropy | 1.619 J/mol/K
  • USC-Mech-ii | C4H5-2 | enthalpy | 6.518 kJ/mol
  • USC-Mech-ii | C4H5-2 | entropy | 15.73 J/mol/K
  • USC-Mech-ii | C4H6-2 | enthalpy | 4.412 kJ/mol
  • USC-Mech-ii | C4H6-2 | entropy | 10.51 J/mol/K
  • USC-Mech-ii | C2H3CHOCH2 | enthalpy | 1.563 kJ/mol
  • USC-Mech-ii | C2H3CHOCH2 | entropy | 20.97 J/mol/K
  • USC-Mech-ii | CH3CHCHCHO | enthalpy | 0.6672 kJ/mol
  • USC-Mech-ii | CH3CHCHCHO | entropy | 27.45 J/mol/K

rwest added 5 commits June 16, 2026 14:39
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
rwest added 2 commits June 18, 2026 17:03
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants