jcaiuwyo / cantera

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

Problem with molecularMasses in python #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a StoichiometricSolid phase containing a species containing more than 
one element
2. Call the .molarMassses() method on that phase

What is the expected output? What do you see instead?
The expected output is an array of length 1 containing the molar mass of the 
species defined in the phase.

Instead, I get an 'Unknown array attribute' error.
Traceback (most recent call last):
  File "withMolarMasses.py", line 10, in <module>
    print phase.molarMasses()
  File "/local/Projects/Canthor/source/CanteraGoogleCode5/cantera-install/lib/python2.7/site-packages/Cantera/Phase.py", line 117, in molarMasses
    mm  = _cantera.phase_getarray(self._phase_id,22)
cantera.error: Unknown array attribute

What version of the product are you using? On what operating system?
Cantera svn r2543, python 2.7.5, linux x86_64

Please provide any additional information below.
See the attached scripts. Using the "legacy" python interface, I get the error 
(oldPythonInterface.py), irrespective of whether phase.molarMasses() or 
phase.molecularWeights() is used. The new interface works fine 
(cythonInterface.py).

Original issue reported on code.google.com by chdoi...@gmail.com on 16 Sep 2013 at 9:59

Attachments:

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

Original comment by yarmond on 19 Sep 2013 at 2:49