Modeling manual ignition in Cantera

840 views
Skip to first unread message

Sonal Mishra

unread,
Feb 3, 2021, 11:28:47 PM2/3/21
to Cantera Users' Group
Hi!

I'm trying to manually ignite a fuel mixture and then intend to gradually increase the strain rate to figure out the extinction temperature. Can someone give some insights on how we are supposed to model self ignition for a counter-flow diffusion set up?

Thank you!
Sonal

Steven DeCaluwe

unread,
Feb 4, 2021, 11:05:01 AM2/4/21
to <cantera-users@googlegroups.com>
Hi Sonal,

I think the practice in the past has been to introduce a small transient perturbation in one of the state conditions, for example a short temperature pulse or a short increase in some reactive intermediate?

Is this along the lines of what you are thinking?

If so, I can likely dig up an example, provided I am not imagining the whole thing ;)

Also, if so, what interface are you using to access Cantera functionality (python, Matlab, C++, etc?)

Best,
Steven DeCaluwe


--
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/0e27ee2d-ce69-4ddc-9b20-7749e4f1268dn%40googlegroups.com.

Ando

unread,
Feb 15, 2021, 12:02:23 PM2/15/21
to Cantera Users' Group
The answer would also be very interesting to me, as I would like to ignite a fuel mixture by a spark plug. Is there a way, to implement this in Cantera?
Best
Ando

Ando

unread,
Feb 15, 2021, 12:03:11 PM2/15/21
to Cantera Users' Group
Sorry, I forgot my environment: It's python 3.8.
Best
Ando

Steven DeCaluwe

unread,
Feb 15, 2021, 11:44:15 PM2/15/21
to <cantera-users@googlegroups.com>
I don’t know, I might have been imagining this?  I seem to remember an example of this from my early days using Cantera (back in 2004, when I was looking over a lot of the Matlab examples), but I cannot find any example of it now.

Regardless, looking over the examples from the website (or downloading and running relevant ones yourself) might provide some help:

Best,
Steven


Ando

unread,
Feb 16, 2021, 8:58:35 AM2/16/21
to Cantera Users' Group

Unfortunately the examples only contain autoignited combustion (ic_engine.py). I couldn't find any spark ignited and/or externaly triggered combustion or reaction within the examples directory.

Steven DeCaluwe

unread,
Feb 16, 2021, 10:40:10 AM2/16/21
to canter...@googlegroups.com
I think what I’d recommend is customizing the ODE set, and putting in a flag such that if the time is between some t_ig_start < t < t_ig_end (where `t_ig_start` and `t_ig_end` are *very* close together), you overwrite one of that variables, inside the ode function, to reflect an ignition pulse.

For example, you’d replace the line

self.gas.TP = y[0], self.P


With something like 

if t >= self.t_ig[’start’] & t <= self.t_ig[‘end’]:
self.gas.TP = 1000, self.P
else:
self.gas.TP = y[0], self.P

This would require creating a dict for `t_ig` inside the ode initialization routine.  

Anyway, this is one way to implement it.  Let me know if it makes sense, or if you’d like me to write it out a bit more.

Best,
Steven

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

Twitter: @CORESresearch
He / Him / His





Ingmar Schoegl

unread,
Feb 16, 2021, 5:54:08 PM2/16/21
to Cantera Users' Group
I likewise have some faint recollections of an example from the a long time ago, but cannot locate it among current files.

From my perspective, I would build on the fuel injection example, e.g. https://cantera.org/examples/python/reactors/fuel_injection.py.html . Change the initial composition of 'gas' so it contains both fuel and oxidizer, and replace the fuel injection from 'inlet' with an injection of a small amount of radicals. The gaussian pulse should do nicely, but you may have to play with the amount to inject at a given temperature.
-ingmar-

Steven DeCaluwe

unread,
Feb 16, 2021, 6:04:51 PM2/16/21
to canter...@googlegroups.com
Ah, yes, that should replicate it nicely—not sure why I didn’t catch that feature, when I was looking, earlier.  Nice catch.

Best,
Steven 

Sam Smith

unread,
Sep 3, 2021, 10:36:29 AM9/3/21
to Cantera Users' Group
Hi Ingmar:
How would one describe a Weibe function like burning profile with this method?  Has anyone validated the pressure profile of an engine with the ic_engine example?
Thanks
Sam

Ingmar Schoegl

unread,
Sep 3, 2021, 3:00:55 PM9/3/21
to Cantera Users' Group
Sam - good question. If I recall correctly, the Wiebe function describes fractional heat release as a function of crank angle. You can likely extract something like that from `ic_engine` (integrate heat release and normalize?). Honestly, it would be pretty surprising if there'd be a good match with real data. The simplifying assumptions for this model are pretty drastic as a 0D model cannot handle anything related to flame propagation, mixing, etc..
-ingmar-

Sam Smith

unread,
Sep 4, 2021, 9:28:12 AM9/4/21
to Cantera Users' Group
Thank you for your note, Ingmar.  I too don't think ic_engine.py can match the actual engine pressure profiles.
The weibe function is a ratio of mass fraction burned to total fuel mass fraction - with the injector method, one can only inject a prescribed profile but it might not necessarily burn as the chamber (cyl) temperature will not be high enough.  In a real engine the flame kernel is hot enough that one can assume the fuel entering the burned zone is burned in a few microseconds, whereas in the ic_engine example, the cylinder temperature is not hot enough to "burn" the injected fuel.  One could have another injector to inject H atoms for a short duration to act as a spark but still the rate of heat release would not match the actual engine date.
There are other 0-D models that have used 2-zones to get a reasonable match with engine data - but of course then the models are not "predictive".

Sam.

Mark E. Fuller

unread,
Jul 19, 2022, 2:05:01 PM7/19/22
to Cantera Users' Group
Follow-upon the code that Ingmar and Steven recall for igniting mixtures: https://groups.google.com/g/cantera-users/c/aiQK1RGeAjw/m/pKwZnBP6AQAJ
Reply all
Reply to author
Forward
0 new messages