dbirch997 / cantera

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

Error in phase.molarMasses() when the phase contains more elements than species. #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a phase where the number of elements is higher than the number of 
species
2. call phase.molarMasses()

What is the expected output? What do you see instead?
The expected output is an array with the molar masses of each species in the 
phase. 

What I see instead is: 
Traceback (most recent call last):
  File "....py", line xx, in <module>
  File "...python2.7/site-packages/Cantera/Phase.py", line 117, in molarMasses
    mm  = _cantera.phase_getarray(self._phase_id,22)
cantera.error: Unknown array attribute

If I catch the exception and getCanteraError(), I get:
************************************************
                Cantera Error!
************************************************

Procedure: checkElementArraySize
Error:

What version of the product are you using? On what operating system?
SVN r1999 on linux, python 2.7.3.

Please provide any additional information below.

I attached a script that reproduces the error. Thanks for looking into this!

Original issue reported on code.google.com by chdoi...@gmail.com on 20 Dec 2012 at 12:30

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2023.

Original comment by yarmond on 2 Jan 2013 at 6:09