Autoignition deelay time evalutation of NTC on CH4

159 views
Skip to first unread message

tullio viola

unread,
Jul 8, 2021, 1:00:02 PM7/8/21
to Cantera Users' Group

Hi all,

I modified the script found in examples in cantera.org to obtain the autoignition delay time.
In the original script the autoignition delay time was evaluated on OH max.
But...In this case I'd like to evaluate the delay every Tfin=Tin+10K

someone can help me?

Thank you

Tullio

Steven DeCaluwe

unread,
Jul 8, 2021, 5:19:57 PM7/8/21
to <cantera-users@googlegroups.com>
Hi Tulio,

Can you point to exactly which script you modified (namely, python, Jupiter, or possibly Matlab?)

Depending on which interface/language you are using, you should be able to parse the temperature trace to find the corresponding time delay.  But I’ll await your reply before making a specific suggestion.

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/a05e045d-88cb-4e1e-b9eb-0fb974abdf08n%40googlegroups.com.

tullio viola

unread,
Jul 9, 2021, 4:04:20 AM7/9/21
to canter...@googlegroups.com
Dear Steven,
I attach the python script modified by me. It has also implemented the thermal exchange...but the autoignition delay time is  still evaluated with the criteria of OH max.
Thanks and best regards


Tullio

NTC.py

tullio viola

unread,
Jul 9, 2021, 5:04:12 AM7/9/21
to canter...@googlegroups.com
The point is: evaluate the ignition delay time when I see a rise of temperature of 10 K.

This is more clear.

Thank you Steven

Steven DeCaluwe

unread,
Jul 9, 2021, 11:28:01 AM7/9/21
to <cantera-users@googlegroups.com>
Hi Tulio,

Please see attached.  I used numpy’s “interp” function to find where the desired temperature rise was obtained.

Best,
Steven



——————————————————
Steven C. DeCaluwe, Ph.D | Associate Professor of Mechanical Engineering
COLORADOSCHOOLOFMINES
Brown Building W410B
Golden, CO 80401

Twitter: @CORESresearch
He / Him / His





NTC.py

tullio viola

unread,
Jul 9, 2021, 4:38:00 PM7/9/21
to canter...@googlegroups.com
Dear Steven,
thank you for your valuable help. With the beginning of the new week I will modify the script and make it public on the group. Can you suggest detailed cantera manuals? I would need them very much.

Thank you for your help.

Tullio

tullio viola

unread,
Jul 12, 2021, 11:39:54 AM7/12/21
to canter...@googlegroups.com
Dear Steven, I added your suggestions, but  considering the case study https://cantera.org/examples/jupyter/reactors/batch_reactor_ignition_delay_NTC.ipynb.html   The script doesn't work for the second part, because I have a problem with:


reference_species_history.append(gas[reference_species].X[0])

    i_ign = np.array(reference_species_history).argmax()


You'll find my changes in the script attached.


Thank you

Best regards
Tullio


NTC_modified.py

tullio viola

unread,
Jul 12, 2021, 11:45:33 AM7/12/21
to canter...@googlegroups.com
    Sorry, I used this but it doesn't work


   t = 0
    while t < estimated_ignition_delay_times[i]:
        t = reactor_network.step()
        time_history.append(t)
       
        T_rise_history.append(gas[T_rise].T[0])

    idt = np.array(T_rise_history)
    tau = time_history[idt]
    t1 = time.time()

tullio viola

unread,
Jul 12, 2021, 12:55:40 PM7/12/21
to canter...@googlegroups.com
Dear Steven,
I tried in different ways to modify the script trying to evaluate the NTC, as in the second figure considering the type of function incremented in the first part. Unfortunately, trying in different ways, I get two kind of errors: the first one is about len() and the second one that I think is something about the type of values because return "float"...From here it would be useful also to save in csv for all the array of initial temperatures tested, but also here, at this point I don't know how to do. Anyway, I'd like you to suggest a guide on cantera so I can better understand all the features. i'll reattach the script with the latest modifiers I've done.

Best regards and thank you very much for help

Il giorno ven 9 lug 2021 alle ore 17:28 Steven DeCaluwe <deca...@mines.edu> ha scritto:
NTC_modified.py

Steven DeCaluwe

unread,
Jul 12, 2021, 2:24:11 PM7/12/21
to canter...@googlegroups.com
Thanks, Tulio,

There was a little bit of confusion in that second half of the code, in terms of what to store in `T_rise_history`.  Frankly, I also find the example a little odd, in that the function we use for IDT in the first half is abandoned, for the second part of the code.

I looked at two ways of fixing it, one that used the current “time_history” and “T_rise_history” arrays as defined and re-implemented the `np.interp` for the 2nd half of the code, and one that created a new ct.SolutionArray to calculate the IDTs as in the first half of the example.  I went with the latter approach, but verified that they give the same results, so it is only a matter of preference.

Hope this helps,
Steven

NTC_modified_SD2.py

tullio viola

unread,
Jul 13, 2021, 9:22:33 AM7/13/21
to canter...@googlegroups.com
Dear Steven,

I tried to run simulations but, in this case, I think that is not working because CH4+Air seems to give an NTC as described in picture attached. Not only this, but, it is impossible that in the first figure at 950K the temperature increases over 2700K and than it shows a cooling so fast. Something happens that I don't understand.
The case that I tried to test is adiabatic...I reattach the script. I appreciate very much your help.

best regards

Tullio

Figure_950.png
Figure_test_SCRIPT_NTC.png
NTC_modified_SD2_NEW_init_AD.py

tullio viola

unread,
Jul 13, 2021, 9:29:50 AM7/13/21
to canter...@googlegroups.com
<cantera.composite.SolutionArray object at 0x7f095ef4d2b0>
Computed Ignition Delay: 6.782e-05 seconds for T=1800.0K. Took 42.93s to compute
<cantera.composite.SolutionArray object at 0x7f095ef4d190>
Computed Ignition Delay: 1.273e-04 seconds for T=1700.0K. Took 30.93s to compute
<cantera.composite.SolutionArray object at 0x7f096408dc70>
Computed Ignition Delay: 2.698e-04 seconds for T=1600.0K. Took 33.07s to compute
<cantera.composite.SolutionArray object at 0x7f096408dc40>
Computed Ignition Delay: 6.671e-04 seconds for T=1500.0K. Took 31.19s to compute
<cantera.composite.SolutionArray object at 0x7f095ef4d3a0>


sorry , I also forget to attach these advices...


Tullio

tullio viola

unread,
Jul 13, 2021, 9:49:23 AM7/13/21
to canter...@googlegroups.com
Sorry for so much emails but I attached the wrong python script. For the adiabatic case I used U=0....this is for the non adiabatic case....the images where for U=0
NTC_modified_SD2_NEW_init_AD.py

Steven DeCaluwe

unread,
Jul 13, 2021, 10:10:11 AM7/13/21
to <cantera-users@googlegroups.com>
Hi Tullio,

1. For the energy equation, you are setting U = 1000, which seems like it would lead to very fast heat transfer…?  If you want adiabatic, I would think you want U very close to 0?

2. I also got no NTC for methane (using gri 3.0).  I think this has to do with your definition of the ignition delay time, or to do with your mechanism file.  I’d recommend the example mechanisms for those notebooks (seiner.cti, found here).  See if you reproduce NTC using that mechanism and your definition of IDT.  If not, then there is something in your code.

Best,
Steven


To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/CAKRrY4wjyQ0ZMab_WCX95XoGk4HWoV_XvSjQUsNJ9t9%3DAM31Xw%40mail.gmail.com.
<Figure_950.png><Figure_test_SCRIPT_NTC.png><NTC_modified_SD2_NEW_init_AD.py>

tullio viola

unread,
Jul 13, 2021, 10:26:16 AM7/13/21
to canter...@googlegroups.com
Dear Steven thank you for fast response.

I perfectly agree...for point 1. Infact I attached a wrong script, I was doing some tests and then I left U=1000. So, wrong!

for point 2. Ok, I'll try again.

thank you

You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/H4RyEUfRM9Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/5EC1E6A7-C963-4217-9C2C-41F42C243E2A%40mines.edu.

tullio viola

unread,
Jul 13, 2021, 10:40:40 AM7/13/21
to canter...@googlegroups.com
I found the article where the NTC study on methane was studied. This is the method.

Regards

You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/H4RyEUfRM9Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/5EC1E6A7-C963-4217-9C2C-41F42C243E2A%40mines.edu.
Modeling Negative Temperature Coefficient region in methane oxidation.pdf

tullio viola

unread,
Jul 14, 2021, 7:13:07 AM7/14/21
to canter...@googlegroups.com
Dear Steven,

i solved the problem that was in the second part of the script. I saw also the script of the NonIdealShockTube on the cantera website. Now, the last problem, before I give to the google group the script with this method: I have a problem with the thermal exchange., I want to evaluate the heat exchange with U..but want to set the Temperature external as Tinlet of the reactor....so I'll have an exchange Tmax-Treactor with a specific U. How can I obtain this? I saw on the website but no infos about. Thanks

Tullio

You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/H4RyEUfRM9Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/5EC1E6A7-C963-4217-9C2C-41F42C243E2A%40mines.edu.
BatchNTCbehaviour.py
BatchNTCbehaviour.py

tullio viola

unread,
Jul 14, 2021, 7:49:22 AM7/14/21
to canter...@googlegroups.com
Silved Aldo the Heart Exchange problem....I ll post the finale script
Reply all
Reply to author
Forward
0 new messages