One dimensional Combustion CODE file

221 views
Skip to first unread message

M. Moshfeghi

unread,
Apr 27, 2021, 9:37:22 AM4/27/21
to Cantera Users' Group
Dear all,

Firstly, I hope you are all doing well.
Secondly, I am wondering if anybody has the Python (or any other language) file fir 1D-Combustion.

I would be very grateful.

Best wishes,


Bryan Weber

unread,
Apr 27, 2021, 9:38:36 AM4/27/21
to Cantera Users' Group
Hi,

We have a set of 1-D examples on our website: https://cantera.org/examples/python/index.html#python-example-onedim

If those do not meet your needs, can you please clarify what you mean by the "file for 1D-Combustion"?

Best,
Bryan

M. Moshfeghi

unread,
Apr 27, 2021, 10:41:52 AM4/27/21
to canter...@googlegroups.com
Thanks a lot for your reply. I will check it asap and will inform you.

Best regard,
Mohammad 

--
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/dae55ea8-189e-4076-a57d-9f278b6bb38bn%40googlegroups.com.

Furkan Yildirim

unread,
Jul 28, 2021, 8:28:12 AM7/28/21
to Cantera Users' Group
Hello Bryan,

I am looking for an adiabatic flame temperature of methane and air. I cannot see such a case on the website. Am I wrong? In the case that I am right, do you have any suggestions to find the flame temperature of a 10/1 volume ratio of air-methane combustion? The air at 25 degree celcius. Do you have a sample also for this combustion type. I am working on Matlab.

27 Nisan 2021 Salı tarihinde saat 16:38:36 UTC+3 itibarıyla bryan....@gmail.com şunları yazdı:

Steven DeCaluwe

unread,
Jul 28, 2021, 9:03:03 AM7/28/21
to Cantera Users' Group
Hi Furkan,

1. If you simply want the adiabatic flame temperature (i.e. not a 1D simulation), then you can set the initial gas state and then the gas.equilibrate(‘HP’) function.

If you are looking for a 1D adiabatic flame simulation, the link that Bryan provided below has an example called `adiabatic_flame.py`

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.

Furkan Yildirim

unread,
Jul 29, 2021, 2:27:34 AM7/29/21
to Cantera Users' Group
Hello Steven, thank you so much for your help.

When I tried to what you suggested, I faced an error like this; 
**
Error using ctmethods

***********************************************************************
CanteraError thrown by findInputFile:

Input file gri30.yaml not found in directories
'.',
'C:\Program Files\Cantera\data',
'C:\Program Files\Cantera\data'

To fix this problem, either:
    a) move the missing files into the local directory;
    b) define environment variable CANTERA_DATA to
         point to the directory containing the file.
***********************************************************************


Error in XML_Node (line 20)
    x.id = ctmethods(10, 15, 0, src);

Error in Solution (line 47)
doc = XML_Node('doc', src);

Error in A (line 12)
   gas = Solution('gri30.yam);
**

Do you have an idea why I face something like this? I just found sample code "equil.m", and I wanted to proceed from this code. As I mentioned I am a very new user, I may miss out on something very obvious. I am sorry if it is.

Thanking you in advance.

28 Temmuz 2021 Çarşamba tarihinde saat 16:03:03 UTC+3 itibarıyla S. DeCaluwe şunları yazdı:

Steven DeCaluwe

unread,
Jul 29, 2021, 10:34:26 AM7/29/21
to Cantera Users' Group
Hi Furkan,

My guess is that you are not on the most recent version of Cantera, based on the error code.

I would either update to the most recent version, or just change ‘gri30.yaml’ in the ‘equil.m’ file you are running to ‘gri30.cti'.  The main hang-up is that starting with Cantera 2.5, the input file is based on the yaml input syntax, rather than the cti syntax.  The code you are running is looking for `gri30.yaml`, which does not exist on your machine.

Best,
Steven

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

Twitter: @CORESresearch
He / Him / His





Furkan Yildirim

unread,
Jul 30, 2021, 3:04:07 AM7/30/21
to Cantera Users' Group
Hello sir,

Actually, I tried what you suggested but after following all steps that are listed on the website https://cantera.org/install/windows-install.html, I couldn't see the Cantera folder in my program files. When I searched where it is, it was in the python39 folder and does not include the matlab\toolbox folder. I gave up and try the one that is on Youtube.  I am a very new user and I don't know what should I do. Do you have an idea what is/are the possible reason/s for this situation? Since I don't have that folder I cannot set my MatLab path according to it.

Thank you so much for your help.

29 Temmuz 2021 Perşembe tarihinde saat 17:34:26 UTC+3 itibarıyla S. DeCaluwe şunları yazdı:

Furkan Yildirim

unread,
Jul 30, 2021, 4:35:49 AM7/30/21
to Cantera Users' Group
Hello, again sir,

Because of my limited time, I tried your second suggestion which was changing input syntax and it worked. Thank you so much :))

29 Temmuz 2021 Perşembe tarihinde saat 17:34:26 UTC+3 itibarıyla S. DeCaluwe şunları yazdı:
Reply all
Reply to author
Forward
0 new messages