Warning when using the reaction mehcanism

500 views
Skip to first unread message

Mohammad Adib

unread,
Apr 21, 2021, 9:17:42 AM4/21/21
to Cantera Users' Group
I have converted a ChemKin mechanism to cti format. It works fine but I got three warning, and I am not sure if they affect the results.

CanteraWarning: NasaPoly2::validate: For species DIFENET, discontinuity in cp/R detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 49.96475378 Value computed using high-temperature polynomial: 50.9154079586 

CanteraWarning: NasaPoly2::validate: For species DIFENET, discontinuity in h/RT detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 33.268352402000005 Value computed using high-temperature polynomial: 33.134490784220006 

CanteraWarning: NasaPoly2::validate: For species BIN1AJ, discontinuity in s/R detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 101.02504853293355 Value computed using high-temperature polynomial: 127.10757853293356

jeffrey...@gmail.com

unread,
Apr 21, 2021, 1:08:52 PM4/21/21
to Cantera Users' Group
These warnings are very common. For each species, there are two polynomial fits for cp, h, and s - one at low temperature and one at high temperature. Those warnings tell you that there are discontinuities at the 1000 K, where it switches between polynomials. You can see the values in the warning message, and the discontinuities are pretty small in cp and h, but that discontinuity in s is pretty large. If this is a model that you made, then you should try to create a better fit for entropy (s) without such a large discontinuity. If this is someone else's model, then there isn't really anything you should do.

This does have a small effect on the results, but you'll get the exact same results that chemkin would give. Chemkin just doesn't check for discontinuities, so you would never see this warning with chemkin.

Steven DeCaluwe

unread,
Apr 21, 2021, 1:17:33 PM4/21/21
to canter...@googlegroups.com
Just FYI, we held a workshop at the US National Combustion Meeting in 2019, where Ray Speth demonstrated one case of correcting these “on the fly,” so to speak, which you can see in this jupyter notebook:


Also, if you are using python and know about and accept the discontinuities (caveat emptor!), you can suppress the warnings with:
ct.suppress_thermo_warnings()
before your import statement.

Best,
Steven

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/34d6620d-8151-4521-8d1b-d5419b0e70afn%40googlegroups.com.

Shepherd, Joseph E.

unread,
Apr 21, 2021, 8:56:27 PM4/21/21
to canter...@googlegroups.com
Folks,

This can be more than just an annoying warning. When doing low-temperature ignition simulations than span the temperature "knot" point, this can cause integration to fail if the jumps are sufficiently large. A jump in heat capacity is like a delta function of energy release and with certain otherwise reasonable choices of integration parameters, time integration can grind to a halt in an attempt to resolve the jump.

I wrote a python script several years ago to examine Cantera format databases using the NASA7 format and report on all the culprit species with jumps.
https://shepherd.caltech.edu/EDL/PublicResources/sdt/SDToolbox/cti/utilities/thermo_check.py

I also wrote a set of MATLAB scripts to refit data to new NASA7 polynomials to eliminate the jumps. You can find these tools linked at the bottom of my web page of resources for Thermodynamics Data, https://shepherd.caltech.edu/EDL/PublicResources/sdt/thermo.html

I have made an effort to find and remove the most troublesome jumps and other issues in the thermo data fits for the .cti files in the library hosted on my website. Extrapolating data fit at low temperatures to high temperatures can also be chancy as polynomial fits are poorly behaved when used outside the range of validity. Unfortunately, problematic species data exist in a many data sets on the WWW and these are being propagated as users mix and match thermo data from various sources when creating custom mechanisms.

Caveat emptor indeed!

Joe


-----Original Message-----
From: canter...@googlegroups.com <canter...@googlegroups.com> On Behalf Of Steven DeCaluwe
Sent: Wednesday, April 21, 2021 10:17 AM
To: canter...@googlegroups.com
Subject: [SOCIAL NETWORK] Re: [External] [cantera-users] Re: Warning when using the reaction mehcanism

Just FYI, we held a workshop at the US National Combustion Meeting in 2019, where Ray Speth demonstrated one case of correcting these “on the fly,” so to speak, which you can see in this jupyter notebook:

https://github.com/Cantera/ncm-2019-materials/blob/master/thermo_debugging.ipynb

Also, if you are using python and know about and accept the discontinuities (caveat emptor!), you can suppress the warnings with:
ct.suppress_thermo_warnings()
before your import statement.

Best,
Steven


On Apr 21, 2021, at 11:08 AM, jeffrey...@gmail.com <http://gmail.com> <jeffrey...@gmail.com <mailto:jeffrey...@gmail.com> > wrote:

These warnings are very common. For each species, there are two polynomial fits for cp, h, and s - one at low temperature and one at high temperature. Those warnings tell you that there are discontinuities at the 1000 K, where it switches between polynomials. You can see the values in the warning message, and the discontinuities are pretty small in cp and h, but that discontinuity in s is pretty large. If this is a model that you made, then you should try to create a better fit for entropy (s) without such a large discontinuity. If this is someone else's model, then there isn't really anything you should do.

This does have a small effect on the results, but you'll get the exact same results that chemkin would give. Chemkin just doesn't check for discontinuities, so you would never see this warning with chemkin.


On Wednesday, April 21, 2021 at 6:17:42 AM UTC-7 mhmd.a...@gmail.com <http://gmail.com> wrote:


I have converted a ChemKin mechanism to cti format. It works fine but I got three warning, and I am not sure if they affect the results.

CanteraWarning: NasaPoly2::validate: For species DIFENET, discontinuity in cp/R detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 49.96475378 Value computed using high-temperature polynomial: 50.9154079586 <tel:(915)%20407-9586>


CanteraWarning: NasaPoly2::validate: For species DIFENET, discontinuity in h/RT detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 33.268352402000005 Value computed using high-temperature polynomial: 33.134490784220006


CanteraWarning: NasaPoly2::validate: For species BIN1AJ, discontinuity in s/R detected at Tmid = 1000.0 Value computed using low-temperature polynomial: 101.02504853293355 Value computed using high-temperature polynomial: 127.10757853293356



--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com <mailto:cantera-user...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/34d6620d-8151-4521-8d1b-d5419b0e70afn%40googlegroups.com <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fcantera-users%2F34d6620d-8151-4521-8d1b-d5419b0e70afn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Cdecaluwe%40mines.edu%7C6eb9dfb86e5c477b632208d904e82503%7C997209e009b346239a4d76afa44a675c%7C0%7C0%7C637546217365973746%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=C%2Barxr273vg4WhZ37wKDn8vKuz8BojecMjpJx%2B9tVHw%3D&reserved=0> .



--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com <mailto:cantera-user...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/CED42592-2E52-4676-AF19-8ADCACD3F232%40gmail.com <https://groups.google.com/d/msgid/cantera-users/CED42592-2E52-4676-AF19-8ADCACD3F232%40gmail.com?utm_medium=email&utm_source=footer> .

jeffrey...@gmail.com

unread,
Apr 21, 2021, 11:11:19 PM4/21/21
to Cantera Users' Group
Let me clarify something I wrote above:
I wrote that you shouldn't fix it if this is someone else's model, but that's a big simplification. If you are publishing results of this simulation, and cite the model, you need to be clear about what you actually did. If you fix a thermo fit in someone else's model, you should note that you made a change, and include the improved model as an appendix in your publication. If you find that improving the discontinuities has an impact on your simulations, that's worth mentioning as well. As Joe mentioned above, this is how we improve the state of modeling. If you're feeling bold, you could even send your improved model to the authors of the original model.

Alternatively, you may see that the discontinuity for this particular species doesn't impact your particular simulations, so it's clearer to use and cite the published version of the model. 

Reply all
Reply to author
Forward
0 new messages