Input File in Cantera

144 views
Skip to first unread message

fawzy

unread,
Jan 29, 2018, 9:08:55 AM1/29/18
to Cantera Users' Group
, ,Hi all 

?I need to add file in Cantera from this Website (http://www.cerfacs.fr/cantera/docs/mechanisms/propane-air/) .How can I do that 

Thanks
 

Bryan W. Weber

unread,
Jan 29, 2018, 11:09:46 AM1/29/18
to Cantera Users' Group
What do you mean, add a file in Cantera? You need to convert the Chemkin format to CTI format? See here: http://cantera.org/docs/sphinx/html/cti/input-files.html#converting-ck-format-files

Best,
Bryan

fawzy

unread,
Jan 30, 2018, 8:55:55 AM1/30/18
to Cantera Users' Group
Hi Bryan

I need to input the propane mechanism for
(http://www.cerfacs.fr/cantera/docs/mechanisms/propane-air/) and then I want to run then in Cantera , I use pythone interface.
How can I do this task ?

Thanks

Fawzy

Bryan W. Weber

unread,
Jan 30, 2018, 8:59:36 AM1/30/18
to Cantera Users' Group
Fawzy,

What format is that mechanism? Is it Chemkin or CTI? Have you looked at any of the examples (http://cantera.org/docs/sphinx/html/cython/examples.html) or the documentation I linked to before? Are you having a specific error message appear? If you have done any of this, please include that.

In general, in Python, you would import a CTI file by

gas = ct.Solution('your-mechanism.cti')

but without further information, I have no idea what help you need.

Regards,
Bryan

Steven DeCaluwe

unread,
Jan 30, 2018, 8:59:46 AM1/30/18
to canter...@googlegroups.com
Fawzy,

You need to download one of the cti files, and either:

1.  put it in Cantera’s data folder and then reference that cti file when you create the phase, 

     gas = Solution(‘1S_C3H8_CM1.cti’)

or

2. put it in any folder of your choosing and just provide the path to its location

     gas = Solution(‘path/to/file/etc/1S_C3H8_CM1.cti’)

Hope this helps,
Steven

----------------------------------------------------------
Steven DeCaluwe, Ph.D.
Assistant Professor of Mechanical Engineering
Colorado School of Mines
G. Brown Hall, W410 B
Golden, CO, 80401

email: deca...@mines.edu
ph: (303) 273-3666
Twitter: @DrDeCaluwe

--
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.

fawzy

unread,
Jan 30, 2018, 1:12:38 PM1/30/18
to Cantera Users' Group

Hi all , 
 
I download one of the file cti and put it in Cantera's data folder ,but I have error ,kind of error shown below 
Thanks 




 
 

Steven DeCaluwe

unread,
Jan 30, 2018, 1:18:41 PM1/30/18
to canter...@googlegroups.com
Hi Fawzy:

1.  Please cut and paste the error directly into your message.  For future users looking for help with a similar error, search algorithms cannot search the text of a screenshot.  

2.  Please also attach the cti file you are using.

Thanks,
Steven

——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup

fawzy kahkouh

unread,
Jan 31, 2018, 9:26:59 AM1/31/18
to canter...@googlegroups.com


Hi Pr.steven

This is of the error and cti file user .

Thanks, 

Fawzy



2018-01-30 16:18 GMT-02:00 Steven DeCaluwe <deca...@mines.edu>:
Hi Fawzy:

1.  Please cut and paste the error directly into your message.  For future users looking for help with a similar error, search algorithms cannot search the text of a screenshot.  

2.  Please also attach the cti file you are using.

Thanks,
Steven

——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup
On Jan 30, 2018, at 10:29 AM, fawzy <fawzyk...@gmail.com> wrote:


Hi all , 
 
I download one of the file cti and put it in Cantera's data folder ,but I have error ,kind of error shown below 
Thanks 




 
 

--
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-users+unsubscribe@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.

--
You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/uWCZbROCME0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-users+unsubscribe@googlegroups.com.
C3H8.cti

Bryan W. Weber

unread,
Jan 31, 2018, 9:31:17 AM1/31/18
to Cantera Users' Group
Fawzy,

The problem is that there are no line breaks in the file, so the file format is not correct. How did you download the file? Did you Right Click->Save Link As... or did you copy-paste from the website? I would recommend you do the former (right click on the file link, choose "Save Link As...")

Best,
Bryan

Steven DeCaluwe

unread,
Jan 31, 2018, 9:42:53 AM1/31/18
to canter...@googlegroups.com
Hi Fawzy,

It looks like Bryan already answered your question, but just to clarify on copy-paste of your error message:  what I meant is that you should highlight the error message with your cursor, copy the text, and paste it into your email. 

Again: an image file with the error message in it (i.e. one that is not editable) is not searchable, and so anyone looking to figure out how to fix a similar error message will not be able to find it in the user group message history.

Thanks and good luck,
Steven

——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup
On Jan 31, 2018, at 7:27 AM, fawzy kahkouh <fawzyk...@gmail.com> wrote:



Hi Pr.steven

This is of the error and cti file user .

Thanks, 

Fawzy
<11.jpg>

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.
<C3H8.cti>

Reply all
Reply to author
Forward
0 new messages