Regarding emissions using PFR example in Cantera

427 views
Skip to first unread message

Sneha Ravishankar

unread,
Oct 9, 2019, 6:42:16 AM10/9/19
to Cantera Users' Group
Hello All,

I'm using Cantera 2.4.0 on a Windows system, with the python interface.

My work intends to model a high pressure turbine stage as a PFR and study the behaviour of emissions in the same, for different operating conditions. I started off my work by slightly modifying the PFR example in Cantera, based on my requirements.

I model the PFR with a length of 0.34044m (which is the calculated length for the single stage, as obtained  from CFD). When I give the input temperature as 2200K, CO shoots up at the very beginning of the reactor and remain the same through the entire remaining length. Whereas when I set the inlet temperature as 1400K, CO falls rapidly again in the same initial length (approximately around 0.005m) and then remains constant throughout the entire length.

This poses a serious problem to the modeling capability of the PFR because the residence time in this length is very small that the reactions must have proceeded in a close to infinite rate for this to happen. Therefore there is no physical explanation to this phenomenon that is observed. Please help me out. I had tried to obtain the reaction rates for the PFR but then they are for the whole length and not the initial length where I want to pin point what is happening.

Kindly let me know if you think there is something wrong with the PFR modeling done. Also, please let me know if it  is possible to obtain net_rates_of_progress for every PSR in the PFR and not just one pertaining to the whole PFR. I have attached my code, mechanism and plots.

Kindly advise.

Thank you in advance.

Regards,
Sneha
POLIMI_C1C3_HT_NOX_1412.cti
CO.jpg
PFR_turbine.py

Walter Dal'Maz Silva

unread,
Oct 9, 2019, 4:24:49 PM10/9/19
to Cantera Users' Group

Dear Sneha,

I ran your simulations with a more formal approach (integrating the PFR equations instead of making the hypothesis of finite thin reactors) and got different results for a temperature of 1400 K, but reproduced your description at 2200 K when considering an adiabatic reactor. What is the expected result? Attached you will find my results and script. I suggest you try making the same.

There are 2 easy options to do so:

1) instead of adapting the thin reactor approach to your case, try adapting this (https://cantera.org/examples/jupyter/reactors/1D_pfr_surfchem.ipynb.html) example by removing the surface kinetics (you'll have to modify the initialization matrix, so reserve some time for doing the exercise, I did when I wrote an old unsupported library and you can get something here https://waltermateriais.github.io/CanteraPFR_docs/docs/sources/ct_pfr/pypfr.html), or
2) try another library that makes use of Cantera and I wrote with the intention to one day contribute to Cantera (but since currently I am working with a different subject that will be delayed if nobody does before I get able to do so).

Since I am most of the time a Linux user/developer, I recently adapted the build process to support Windows and that might be messy, but I can send you a compiled working version of the DLL if you can scan it to make sure I didn't send you a virus. You will find it here (https://github.com/waltermateriais/Kinetics/tree/master/plugflow). You will need to compile the C-library and copy the required files to the Python package before installing it with pip. The instructions in README of both C/Python libraries are easy to follow.

Kind regards,
Walter
sample-T1400.0K-2019-10-09_19-29-11-0.png
sample-T2200.0K-2019-10-09_19-29-14.csv
sample-T2200.0K-2019-10-09_19-29-14-0.png
sample.py
sample-T1400.0K-2019-10-09_19-29-11.csv

Sneha Ravishankar

unread,
Oct 9, 2019, 5:21:24 PM10/9/19
to Cantera Users' Group
Dear Walter,


Thank you very much for your reply. 

I will try out your suggestions.


The thing that I was asking about was that, like the image you sent, for an inlet temperature of 2200K, the mass fraction of CO has a very steep rise in around 0.01m and remains in equilibrium thereon. There is no physical explanation for this, except trying to obtain rates of progress for the initial reactors. There is no expected result. I am getting this result and would like to explain it better with a solid backing for why I get this result. That is why I had asked for ways to obtain rates of progress for each PSR in the PFR network. I hope I have clarified my motive. If you have any other suggestions to help to track where this behaviour comes from, please do let me know.


Kind regards,
Sneha

Walter Dal'Maz Silva

unread,
Oct 10, 2019, 3:02:55 AM10/10/19
to Cantera Users' Group
Hi,

Sorry, maybe I didn't understand your initial question. I actually understood that you were unsure of the lower temperature behavior.

In that case what you could do is:

1) Store the net rates of progress from the kinetics manager (https://cantera.org/documentation/docs-2.4/sphinx/html/cython/kinetics.html, see net_rates_of_progress) to a file every *reactor step*.

2) Using a single reactor at constant pressure, draw the reaction path diagram (https://www.tilmanbremer.de/2017/06/tutorial-generating-reaction-path-diagrams-with-cantera-and-python/) to interpret why the system manifold drove you to a saddle point regarding CO production rate. Probably the main resource generating CO was fully consumed in the early stages of the process leading to this stationary state all along the reactor. 

I also had exactly the same problem with the same species studying the kinetics of C2H2 decomposition at medium vacuum. Acetylene is stored for safety reasons in acetone and is always polluted with a bit of methane. When analyzing the reaction path one notices that most of acetone consumption is performed initially by the residual CH4, reaching steady state really close to reactor inlet in regards to CO concentration. If you identify the main source of CO you will possibly reach the same conclusion. Furthermore, I don't see any theoretical reasons why the process should not happen in the process time scale of 10^-5 s you are dealing with.
Kind regards,
Walter

Sneha Ravishankar

unread,
Oct 10, 2019, 9:08:47 AM10/10/19
to Cantera Users' Group
Dear Walter,

Thank you very much for your reply.



The net_rates_of_progress is what I am trying to get, but unlike the thermodynamic states (i.e. T,P and Y), the net_rates_of_progress can be obtained for the Whole PFR and not every single PSR in the PFR. I am trying different ways to obtain the net_rates_of_progress for each PSR in different ways, but have not been successful. I have attached the script for the same. Please kindly advise on ways to obtain net_rates_of_progress for *every PSR in the PFR*.


Kind regards,
Sneha
test_1_with_density.py

Sneha Ravishankar

unread,
Oct 10, 2019, 9:08:48 AM10/10/19
to Cantera Users' Group
Dear Walter,

Thank you very much for your reply.

The first point that you mentioned about net_rates_of_progress is exactly what I was trying for. But unlike states (i.e. T,P,Y), the net_rates_of_Progress stores in a variable for the whole PFR and not every single PSR in the PFR.

I tried different ways to do it but I am getting errors. 

  • I declare an array "r_rate" and when I use that in the loop, it saves rate of progress for the whole PFR
  • I use an array "r_rate" and make it object type after getting the idea from another python forum, but it saves some 6 values which I am not sure what they are.
I have attached the script which I used for trying this. Please advise on how net_rates_of_progress can be stored (either in a variable or in a file) for each PSR in the whole PFR so that I can see what is happening in the PSRs at the beginning.

Kind regards,
Sneha
test_1_with_density.py

Martin Spalding

unread,
Feb 20, 2020, 12:02:14 PM2/20/20
to Cantera Users' Group
Hi Sneha,

Perhaps I'm missing your point, but isn't the 2200K result simply the equilibrium solution?

Using the NASA equilibrium code for CH4 in air at phi = 0.5 and initial temperature at 1244 K results in a mixture at 2190 K with CO = 204 ppm. With initial temperature of 300 K, the result is a mixture at 1480 K and CO = 0.1 ppm.

Martin
ch4_1244.txt
ch4_300.txt
Reply all
Reply to author
Forward
0 new messages