Reg: Two step mechanism

70 views
Skip to first unread message

Thamarai Kannan

unread,
Sep 23, 2021, 6:11:14 AM9/23/21
to Cantera Users' Group
Hello everyone,
I am new to CANTERA and like to use it with C++(on Ubuntu). I want to start learning Cantera by solving two step mechanism of Methane. Can you help me with  where should I start?. since there is no user manual finding it very difficult. Thank you.


TWOstep mechanism.png

Kind regards,
ThamaraikannanM

Ingmar Schoegl

unread,
Sep 23, 2021, 10:37:21 AM9/23/21
to Cantera Users' Group
Hello

You probably want to convert these reaction steps to a YAML input file, where the manual is found here: https://cantera.org/tutorials/yaml/defining-phases.html. (Note that there is an older CTI/XML input format, but it is currently phased out).

It is true that there is some learning curve, but you should be able to put this into place relatively quickly. The best starting point is to look at some of the "easier" input files that ship with the standard Cantera distribution. One of the less complicated ones is `h2o2.yaml` (see also here: https://github.com/Cantera/cantera/blob/main/data/h2o2.yaml), which is a subset of the (still) common GRI-Mech 3.0. Something that is really helpful is the ability to import species information from another mechanism, as done by many of the input files used for testing (a good example is https://github.com/Cantera/cantera/blob/main/test/data/kineticsfromscratch.yaml). All the species you have in your problem are part of `gri30.yaml`, so you mainly need to manually code three equations using the standard Arrhenius form (see "# Reaction 1" in `kineticsfromscratch.yaml).

You'll likely have to read up some in the manuals, but once you see how things fit together, it should be relatively straight-forward. Hope this helps,

-ingmar-

Thamarai Kannan

unread,
Oct 6, 2021, 6:46:40 AM10/6/21
to Cantera Users' Group
Dear Ingmar,

Thank you so much for your mail. Now I understood where to start. I created a Yaml input file for my case as you mentioned but didnt know how to use this file. I tried to save this file in the same directory where Cantera is installed but I couldn't save it. Then I also tried to save it in home location and mentioned the location in compiler but system could find the file. Can you please help me in this. 


Thank you,
Kind Regards,
Thamaraikannan M

Steven DeCaluwe

unread,
Oct 6, 2021, 8:46:45 AM10/6/21
to Cantera Users' Group
Dear Thamaraikannan,

When Cantera throws the error that it cannot locate your input file, the error message should include the locations where it is searching.

For instance, if I try to import a non-existent yaml file ‘bogus.yaml’, I get this error message:

Input file bogus.yaml not found in directories 
'.', 
'/Users/decaluwe/opt/anaconda3/envs/cantera/lib/python3.6/site-packages/cantera/data', 
'/Applications/Cantera/data', 
'/Users/decaluwe/opt/anaconda3/envs/cantera/share/cantera/data

If you get a similar message, try saving your file in one of the suggested locations.

Hope this helps,
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/ea4cbed7-2002-4a2c-adcf-e4c55cf0da0bn%40googlegroups.com.

Thamarai Kannan

unread,
Oct 9, 2021, 12:03:47 AM10/9/21
to Cantera Users' Group
Dear Steven,

Thanks for you help. I was able to run my program. while running this two step mechanism I am getting an error message that duplicate equation. But when I delete one of the equation (2b) , The program is running very well.

Thank you,

Kind Regards,
Thamaraikannan M

 

Ingmar Schoegl

unread,
Oct 12, 2021, 5:14:43 PM10/12/21
to Cantera Users' Group
Hi Thamaraikannan,
You need to mark equations that have the same reactant/product list as 'duplicate' in the YAML input file. (see for example reactions 25 and 26 in h2o2.yaml - lines 256ff in the file)
-ingmar-

Thamarai Kannan

unread,
Oct 13, 2021, 3:50:40 AM10/13/21
to Cantera Users' Group
Dear Ingmar,

Thanks you once again!!!. I got it.

Regards,
Thamaraikannan M

Reply all
Reply to author
Forward
0 new messages