hkmoffat / cantera

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

Canera 2.0 problem with reaction syntax #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
With the new (2.0 Version) of Cantera an error is raised due to the following 
reaction formulation (imported initially from Chemkin), it was working with 
earlier versions:

#  Reaction 5
# Marinov 1995a 
# Marinov 1995a 
falloff_reaction( "h + o2 (+ n2) <=> ho2 (+ n2)",
         kf = [4.52000E+013, 0, 0],
         kf0   = [2.03000E+020, -1.59, 0],
         options = ["duplicate"])

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

The error output is the following:

------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 479, in runfile
    execfile(filename, namespace)
  File "C:\Users\Atakan\Dropbox\Python\Cantera\Polygeneration\EthanolEq.py", line 10, in <module>
    ph2=importPhase("ethanol_mech.cti")
  File "C:\Python27\lib\site-packages\Cantera\importFromFile.py", line 18, in importPhase
    return importPhases(file, [name], loglevel, debug)[0]
  File "C:\Python27\lib\site-packages\Cantera\importFromFile.py", line 25, in importPhases
    s.append(solution.Solution(src=file,id=nm,loglevel=loglevel,debug=debug))
  File "C:\Python27\lib\site-packages\Cantera\solution.py", line 54, in __init__
    Kinetics.__init__(self, xml_phase=s, phases=ph)
  File "C:\Python27\lib\site-packages\Cantera\Kinetics.py", line 54, in __init__
    p0, p1, p2, p3, p4)
error: 

************************************************
                Cantera Error!                  
************************************************

Procedure: getEfficiencies
Error:   Encountered third-body efficiency for undefined species ")"
while adding reaction 5.

What version of the product are you using? On what operating system?
Cantera 2.0, Windows 7(Pythonxy 2.7)

Please provide any additional information below.

Original issue reported on code.google.com by Burak.At...@gmail.com on 28 Aug 2012 at 9:12

GoogleCodeExporter commented 9 years ago
This should be fixed in r1815. The actual problem was in the CTI to XML 
converter and how it handles falloff reactions with specific third bodies. This 
bug was introduced in the commit dated "Wed Jul 30 20:56:57 2003" (see the old 
CVS repository), and causes the third body species to always be incorrectly 
written as ")" in the XML input file.

The error message that is shown here is a result of the additional checks on 
third-body efficiencies introduced in r1350. Prior to that point, Cantera would 
have computed incorrect rates for this reaction.

Original comment by yarmond on 28 Aug 2012 at 11:11