Simulation for Auto-ignition of Rapid Compression machine and Shock tubes

522 views
Skip to first unread message

vaibhav patel

unread,
Oct 4, 2016, 9:28:21 AM10/4/16
to Cantera Users' Group
Hi every one.
I have just started using cantra from python and I am trying to simulate Auto-ignition of Natural Gas (C1-C5) using a constant volume reactor for Rapid Compression machine and Shock tubes .
Please how do I go about this? Any information could be helpful.

Bryan W. Weber

unread,
Oct 4, 2016, 11:36:26 AM10/4/16
to Cantera Users' Group
Dear Vaibhav,

You can follow this example: http://cantera.github.io/docs/sphinx/html/cython/examples/reactors_reactor1.html, only replace IdealGasConstPressureReactor with IdealGasReactor. This will simulate a constant volume reactor.

Regards,
Bryan

Santosh Shanbhogue

unread,
Oct 4, 2016, 4:11:10 PM10/4/16
to Cantera Users' Group
You can also find illustrated examples here : https://github.com/Cantera/cantera-jupyter

Go down the page and see the example for 'batch reactor'.

All the best, 
Santosh


On Tuesday, October 4, 2016 at 9:28:21 AM UTC-4, vaibhav patel wrote:
Message has been deleted

vaibhav patel

unread,
Oct 5, 2016, 9:24:47 AM10/5/16
to Cantera Users' Group

Dear Sontosh,

Thank you
I have gone through it and i tried but few codes does not exist in IPython as i am using cantera 2.2.1 in windows.
and i don't know how to change or modify codes for cantera 2.2.1
Please can you give some suggestions
regards,
Vaibhav

Santosh Shanbhogue

unread,
Oct 5, 2016, 3:54:51 PM10/5/16
to Cantera Users' Group
Hi Vaibhav,

Can you elaborate what it is about the iPython code that you are having trouble with ? Btw, you should be able to download the conda distribution for Windows. This will give you access to iPython and Jupyter notebooks. The instructions are on the main Cantera github page

Santosh

vaibhav patel

unread,
Oct 5, 2016, 4:42:20 PM10/5/16
to Cantera Users' Group
Hi Santosh,

There is no problem with IPython code, actually i did not know that these codes were for Cantera 2.3.0a3.
I have just install Cantera 2.3.0a3 through Anaconda and its working.

Thank you.

Regards,
Vaibhav

vaibhav patel

unread,
Oct 6, 2016, 11:02:16 AM10/6/16
to Cantera Users' Group
Hi Santosh,
 

I have tried this example for batch reactor from the link, thought it working and displaying results but it is not displaying the plots for both of them and there is no error on the display.

After execution it shows:


<IPython.core.display.Javascript object>

<IPython.core.display.HTML object>


Please can you give any suggestion.


Regards,

Vaibhav



On Wednesday, 5 October 2016 21:54:51 UTC+2, Santosh Shanbhogue wrote:

Santosh Shanbhogue

unread,
Oct 6, 2016, 11:22:17 AM10/6/16
to Cantera Users' Group
Can you do a simple diagnostic for me and tell me if you get a plot:

import matplotlib.pyplot as plt

x
=linspace(0, 1, 50)
plt
.figure()
plt
.plot(x, x*x, '-o')


Do this in a fresh jupyter notebook 

Regards
Santosh

vaibhav patel

unread,
Oct 7, 2016, 4:18:10 AM10/7/16
to Cantera Users' Group
Hi Santosh,

I did two different diagnostic and it displayed the plot.
but when i try to do ignition delay, then it does not show the plot.

Regards,
Vaibhav
Message has been deleted

vaibhav patel

unread,
Nov 1, 2016, 5:38:59 AM11/1/16
to Cantera Users' Group


Dear Bryan,

Thank you, it was helpful.


Regards,
Vaibhav

vaibhav patel

unread,
Nov 10, 2016, 3:46:59 AM11/10/16
to Cantera Users' Group
Hi Bryan,

I have been able to simulate the constant volume reactor ( http://cantera.github.io/docs/sphinx/html/cython/examples/reactors_reactor1.html)
Right now I am trying to figure out the additional code for constant volume autoignition.
Please, I will be very grateful for any further helpful information on this. Thanks

Best Regards,
Vaibhav Patel



On Tuesday, 4 October 2016 17:36:26 UTC+2, Bryan W. Weber wrote:

vaibhav patel

unread,
Nov 10, 2016, 4:09:47 AM11/10/16
to Cantera Users' Group
Hi,

Please , Can some one help.
I have been able to simulate the constant volume reactor.

Right now I am trying to figure out the additional code for constant volume autoignition.
Please, I will be very grateful for any further helpful information on this. Thanks

Best Regards,
Vaibhav Patel

Bryan W. Weber

unread,
Nov 10, 2016, 10:02:48 AM11/10/16
to Cantera Users' Group
Hi Vaibhav,

What do you mean you cannot simulate constant volume autoignition? If you can simulate a constant volume reactor, you are already simulating constant volume autoignition. How are you defining autoignition?

Regards,
Bryan
Message has been deleted

vaibhav patel

unread,
Nov 10, 2016, 5:19:34 PM11/10/16
to Cantera Users' Group
Hi Bryan,
I have gone through the old post for constant volume auto ignition and its confusing, because everyone has different approach.
So I just wanted to ask before I misunderstand. And
I want to understand the basic approach in writing a code for autoignition of RCM.

Bryan W. Weber

unread,
Nov 10, 2016, 5:30:54 PM11/10/16
to Cantera Users' Group
Hi Vaibhav,

Can you show the code that you have? As far as I know, there is pretty much one way to do constant volume autoignition in Python.

Do you want constant volume autoignition, or autoignition in an RCM? Because these are different things. In either case, please show whatever code you've written so far.

Regards,
Bryan

vaibhav patel

unread,
Nov 14, 2016, 4:49:09 AM11/14/16
to Cantera Users' Group
Hi Bryan,

As I earlier mention that I want to simulate Auto-ignition in an RCM with Heat losses.
so far i am able to simulate constant volume Auto-ignition.
Please fine the Attached file.


Please, I will be very grateful for any further helpful information on this. Thanks

Best Regards,
Vaibhav Patel

Vol_Reactor.py

Bryan W. Weber

unread,
Nov 14, 2016, 9:41:51 PM11/14/16
to Cantera Users' Group
Vaibhav,

OK, that is good. What have you tried with respect to RCM modeling? Have you tried to write some code to model a wall with a velocity (if you have, please post it. If not, why not try?)? Do you know the equations that you'll be using to model the reactor? Do you know what input you need for the reactor?

Regards,
Bryan

vaibhav patel

unread,
Nov 15, 2016, 5:39:04 AM11/15/16
to Cantera Users' Group
Hi Bryan,

I have not yet written any code to model a wall velocity.
The equation is  v=K(Pleft−Pright)+v0(t)
but i not sure with the input for the reactor.


Please, I will be very grateful for any further helpful information on this. Thanks


Best Regards,
Vaibhav Patel

vaibhav patel

unread,
Dec 11, 2016, 2:58:29 AM12/11/16
to Cantera Users' Group
Dear Bryan,

Can you please help me, to Model a wall velocity.

Regards,

Vaibhav

Bryan W. Weber

unread,
Dec 11, 2016, 11:32:54 AM12/11/16
to Cantera Users' Group
Vaibhav,

Please provide more detail so that I know how/where to help. Where are you stuck? What code have you tried?

Regards,
Bryan

vaibhav patel

unread,
Dec 11, 2016, 11:50:42 AM12/11/16
to Cantera Users' Group
Dear Oku,

Thank you for  your Email, it was helpful.

Regards,
Vaibhav
Reply all
Reply to author
Forward
0 new messages