s-amouyal12 / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Reads in reaction incorrectly causing number of reactions to be huge (among other issues) #237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I am trying to make a new material .cti file and I am having issues loading the 
reactions. There are three reactions total (its a reduced mechanism similar to 
Westbrook and Dryer) I have tracked the problem down to the reaction shown 
below.

reaction( "CH4 + 1.5 O2 => CO + 2 H20",   [1.5291E+013, 2.3077, 60031])

When I load the mechanism and ask for the number of reactions, or a reaction 
list, or try to do any operation that involves reactions I get errors or 
incorrect results. It is only this reaction that gives issues. I have tried 
reformatting it many different ways and the problem persists. Any ideas would 
be extremely helpful!

What is the expected output? What do you see instead?

I expect to see the number of reaction as 3. But instead I am getting 
4.2950e+09.

What version of the product are you using? On what operating system?

Using 2.1 on Windows 7

Original issue reported on code.google.com by allener...@gmail.com on 15 Sep 2014 at 5:22

GoogleCodeExporter commented 9 years ago
Hello,

It will be very difficult to reproduce this issue without some more 
information. In particular, please post the complete CTI file you're using. 
Also, please let us know which interface you are using and post any scripts 
that you're using to run your analysis.

Best,
Bryan

Original comment by bryan.w....@gmail.com on 16 Sep 2014 at 12:08

GoogleCodeExporter commented 9 years ago
Hi, thanks for the quick response. I am interfacing with Matlab for this 
problem but I believe I have also had the same issue when using Python (I need 
to search around more for my script for that and will post the results when I 
find it later today). Attached is my Matlab code as well as the CTI file that I 
have been using. Everything seems to work fine except for when I include what I 
have called Reaction 1. The line calling for the number of reactions returns 
4.2950e+09 and the line calling for the reaction equations returns an error 
since the variable storing the equations is too large. If you can use any more 
information I am happy to share it.
Thanks for your help,
Allen

Original comment by allener...@gmail.com on 16 Sep 2014 at 3:03

Attachments:

GoogleCodeExporter commented 9 years ago
In the file you uploaded, you have a typo. In your example reaction water is 
input as H20 instead of H2O (zero instead of O as in onion). If I fix this 
error, I have no problem outputting the correct number of reactions in the 
Python interface with 2.1.1 or in the MATLAB interface with the developer's 
version. If I don't fix the error, I get an error that the mechanism could not 
be loaded. Please check if this fixes your problem.

Original comment by bryan.w....@gmail.com on 16 Sep 2014 at 7:17

GoogleCodeExporter commented 9 years ago
I just found the same issue and it resolves it just fine in both environments. 
Wow do I feel dumb. Thank you for your help and quick replies!

Original comment by bigpowli...@tamu.edu on 16 Sep 2014 at 8:03

GoogleCodeExporter commented 9 years ago
Hi Allen,
No problem, my pleasure! In the future, we'd prefer to keep the issue tracker 
here for reproducible bug reports. If you need support, please post on the 
Google Group (https://groups.google.com/forum/#!forum/cantera-users). You'll 
probably get a faster response there anyways because many more people read the 
Group than the issue tracker (in this case, I just happened to see this issue 
quickly).

Best,
Bryan

Original comment by bryan.w....@gmail.com on 17 Sep 2014 at 11:32