PSR simulation using cantera

262 views
Skip to first unread message

justin thomas

unread,
Jul 13, 2018, 10:42:06 AM7/13/18
to canter...@googlegroups.com
I am new to cantera. i am using cantera 2.3. python 2.7. windows 10 operating system.
 I need to do PSR simulation. for that i tried a code like combustor.py. but the code does not give the expected results (mole fraction vs temperature graph).

Conditions:
0.7 s residence time
20 sec simulation end time
pressure 10 atm
temperature :  700-1200 K
equivalence ratio : 1

kindly check the code, and help. Expecting your help.

Thanks

Justin J Thomas
Ph.D. Research Scholar, Internal Combustion Engineering Division
Department of Mechanical Engineering
College of Engineering Guindy, Anna University
PSR.py

Ray Speth

unread,
Jul 13, 2018, 1:56:54 PM7/13/18
to Cantera Users' Group
Justin,

Can you show us what the expected results are, and what are you are getting instead? Can you provide the input CTI file you're using as well?

The one issue I noticed is that there is nothing in the code which which actually sets the residence time. You set the value of 'tres', but this is never used to determine the mass flow rates and hence the residence time in the reactor.

Regards,
Ray

justin thomas

unread,
Jul 15, 2018, 12:58:32 PM7/15/18
to canter...@googlegroups.com
Sir
I am attaching the .cti file as well as the python code and the expected results and results I obtained from the simulation.
Kindly help with the code, in case of corrections, are needed. I am getting similar graphs but the values are way off the limits.

Justin J Thomas
Ph.D. Research Scholar, Internal Combustion Engineering Division
Department of Mechanical Engineering
College of Engineering Guindy, Anna University


--
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 post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.
PSR3 (1).py
molefraction Vs temperature simulation.png
Npentanol_molefraction_validation_expected.png
chem_mech.cti

Ray Speth

unread,
Aug 14, 2018, 6:24:12 PM8/14/18
to Cantera Users' Group
Justin,

It's difficult to help here because we don't know what it is you're actually trying to simulate. For example, is this supposed to be an adiabatic or an isothermal reactor? Is the temperature in the plot the temperature in the reactor, or the temperature of the reactants? Is there a constant residence time in this system, or is there something else being controlled?

In your code, I do notice a few potential issues. For one, you never set the temperature of the 'air' inlet -- it is left at its default value of 300 K. For another, your "fuel" mixture is actually a mixture of fuel and air, which you then further dilute with additional air, so I doubt you're getting the equivalence ratio you desire. Finally, there doesn't seem to be anything in your code which sets the residence time. You just have the air and fuel mass flow rates multiplied by an arbitrary factor, flowing into a reactor with a volume of 1 m^3.

Rather than trying to immediately reproduce those figures that you attached, I think it would be useful to run a single case and see if the results make sense. For the conditions that you specified, just looking at the time/temperature history shows that all that is happening is that the reaction is being quenched after the initial transient, which is presumably not in line with the conditions you are trying to represent. I hope this helps in debugging your simulation setup.

Regards,
Ray
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages