Disable warning: discontinuity in cp/R

482 views
Skip to first unread message

Maziar

unread,
Feb 9, 2011, 5:01:30 AM2/9/11
to Cantera User's Group
I am using Cantera in pyhton under cygwin and I am using a kinetics
polynomial file developed by someone one. I don't want to change the
coefficients in this file. Since I have a high number of reactors, I
get a lot of these "discontinuity in cp/R" warnings, one for each
species for each reactor. Can someone please show me a way to just
disable the warning? I just want to run my code without getting all
these warning. Thanks

asmith

unread,
Feb 16, 2011, 9:11:33 AM2/16/11
to Cantera User's Group
I'm not sure if there is a way to suppress these from python since the
loglevel flag is not passed to the ThermoPhase initialization, but to
do this in the source code isn't too hard. Edit the following files
(depending on if you are using Chemkin or Nasa curve fits):

Cantera/src/converters/CKReader.cpp
Cantera/src/thermo/SpeciesThermoFactory.cpp

Search for the warning then either modify the tolerances or completely
comment out those sections. Remember you'll have to make, make
install to make sure your changes are there when you re-run your
python code.

Maziar

unread,
Feb 18, 2011, 7:33:32 AM2/18/11
to Cantera User's Group
I really appreciate your reply. I found the SpeciesThermoFactory.cpp
in the downloaded python code but not in the installed cantera folder.
So, do I have to uninstall Cantera, modify the cpp file and then re-
install Cantera again? or is it possible to just modify a file in the
installed cantera folder?
> > these warning. Thanks- Hide quoted text -
>
> - Show quoted text -

Rahul Kumar

unread,
Jul 7, 2014, 11:34:40 AM7/7/14
to canter...@googlegroups.com
asmith i also have same problem with my cti file but i can't find the .cpp file u mentioned and i want to know that it does not effect the calculations of program?
thank you

Nick Curtis

unread,
Jul 7, 2014, 12:25:35 PM7/7/14
to canter...@googlegroups.com
Hi Rahul,
It's generally pretty benign, the warning itself shows you the discontinuity between the polynomial fits at the crossover point.  The one area where it tended to affect results was when the initial conditions (or equilibrium conditions) were right near the crossover point

e.g. if you had constant volume Reactor starting at T = 1000.01 vs T = 999.99 you may get slightly different ignition delays even though the initial state is essentially the same.

However, Cantera 2.1.0 (or maybe 2.0.2, I forget) introduced the IdealGasReactor class to better address this problem.  Since the temperature is now a state variable, and the internal energy (or enthalpy) and specific volume do not have to be iterated for, the effect is fairly minimal.
Reply all
Reply to author
Forward
0 new messages