Hello everyone, I'm having some trouble running the Hyperloop plugin for Open MDAO 0.13.0 on a Mac OS X system. I've successfully installed Open MDAO 0.13.0 and all of the required prerequisites, and I am also using the anaconda bundle for python 2.7 as the homebrew installation had caused some trouble in the installation previously. Now, when I attempt to run the hyperloop_sim.py script from within an activated openmdao environment, the script is receiving an Import Error when calling Cantera. I had installed Cantera previously along with the pyCycle plugin using the instructions on the gitHub page. https://github.com/OpenMDAO-Plugins/pyCycle

Unfortunately, it doesn't appear that Cantera ended up in the correct directory for it to be read by the pyCycle plugin from within the Hyperloop plugin. The resulting output from the error is shown below:

(openmdao-0.13.0)MacBook-Pro:hyperloop Kyle$ python hyperloop_sim.py 
Traceback (most recent call last):
  File "hyperloop_sim.py", line 8, in <module>
    from cycle.compression_system import CompressionSystem
  File "/Users/Kyle/Hyperloop/src/hyperloop/cycle/compression_system.py", line 7, in <module>
    from pycycle.api import (FlowStartStatic, SplitterW, Inlet, Compressor, Duct,
  File "/Users/Kyle/pyCycle/src/pycycle/api.py", line 1, in <module>
    from splitter import SplitterBPR, SplitterW
  File "/Users/Kyle/pyCycle/src/pycycle/splitter.py", line 4, in <module>
    from pycycle.flowstation import FlowStation, FlowStationVar
  File "/Users/Kyle/pyCycle/src/pycycle/flowstation.py", line 8, in <module>
    from Cantera import *
ImportError: No module named Cantera

Anyone have any ideas? Thanks in advance! - Kyle

asked 01 Sep '15, 23:20

kylez86's gravatar image

kylez86
1223


You'll need to recombile/rebuild cantera from source, but do it after you've activated the openmdao anaconda env.

That way it will install the Cantera package into your new python install.

The same goes with any other packages you installed previously, they will have to be re-installed as well (except for the OpenMDAO dependencies, which were installed for you during our install process).

link

answered 02 Sep '15, 07:28

justingray's gravatar image

justingray ♦♦
1.8k113

Ugh..ok...I can't seem to find a good method for recompiling cantera from source on Mac OS X terminal while using anaconda for python and Open MDAO. Also, Is it cantera 2.0.2 that I need? Do you have any good suggestions?

(02 Sep '15, 21:27) kylez86 kylez86's gravatar image

I don't have any suggestions beyond what the docs in the pycycle readme say (https://github.com/JustinSGray/pyCycle). Sorry. Cantera is a pain ... 2.0.2 is the one you need though.

(02 Sep '15, 22:11) justingray ♦♦ justingray's gravatar image

I wasn't able to install cantera 2.0.2 into the anaconda environment for Mac OSX. The only version available within the anaconda repository was for the Win32 operating system. Therefore, I reverted back to using the homebrew install of python and the go-openmdao-0.13.0.py script instead of anaconda and voila! ...the cantera issue was resolved. Also, when I ran the openmdao test this time, it came back as OK instead of failed...another good sign.

Now, I am able to run the plotting scripts within the Hyperloop model just fine (i.e. mach_vs_area_plot.py, battery_plot.py, tube_wall_temp.py), but it seems I am running into one more issue. When I run the hyperloop_sim.py script, I am running into issues importing the geometry for the pod. See below for output:

(openmdao-0.13.0)MacBook-Pro:hyperloop Kyle$ python hyperloop_sim.py 
Traceback (most recent call last):
  File "hyperloop_sim.py", line 10, in <module>
    from geometry.pod import Pod
  File "/Users/Kyle/Hyperloop/src/hyperloop/geometry/pod.py", line 5, in <module>
    from openmdao.lib.components.api import GeomComponent
ImportError: cannot import name GeomComponent

Any ideas for this one?

link

answered 09 Sep '15, 10:53

kylez86's gravatar image

kylez86
1223

I've found an answer to my installation troubles. The Hyperloop plugin doesn't work on Open MDAO 0.13.

It looks like the latest version of the Hyperloop plugin was designed for Open MDAO 0.10.0. Once I deleted Open MDAO 0.13.0 and reverted back to Open MDAO 0.10.0, I was able to make the plugin work!

For future users, you can access the archive of Open MDAO versions at the link below: http://openmdao.org/downloads/archive/

Now onto the real challenging part of trying to make all of this great analysis I've dug up useful..

Thanks for you help JustinGray!

link

answered 15 Sep '15, 19:27

kylez86's gravatar image

kylez86
1223

edited 15 Sep '15, 19:28

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×67
×39
×9
×6

Asked: 01 Sep '15, 23:20

Seen: 3,821 times

Last updated: 15 Sep '15, 19:28

powered by OSQA