Skip to content

jcchin/pyCycle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This plugin provides basic thermodynamic cycle modeling tools for OpenMDAO. It's main feature is the inclusion of a FlowStation variable that provides access to isentropic flow relationships.

Pre-Reqs

OpenMDAO

This is an OpenMDAO plugin, so we assume you have already installed a version of OpenMDAO.

Mac OS-X Tip

On OS-X it is strongly suggested that you setup Python, and other OpenMDAO pre-reqs with homebrew. You can follow these detailed instructions but once you have homebrew installed and setup, here is the short version:

brew install git
brew tap Homebrew/python
brew install scipy

Cantera

In addition, this plugin requires Cantera and the python wrapper for it. Because of some backwards incompatible changes made to the most recent versions of Cantera, you need to install version 2.0.2, and not the latest version.

You can compile cantera from scratch, or follow the instructions below for a bit easier route on windows.

Windows

Cantera provides pre-compiled binaries that are by far the easiest choice for windows. You should follow their instructions for the best way to install it and make sure it works.

But note that you need to install version 2.0.2 and NOT the 2.1 beta version. Get only the official release version of it!

https://code.google.com/p/cantera/wiki/WindowsInstallation

Mac OS-X

You'll need to compile from source here. Unfortunately, installing Cantera on OS-X is a bit of a mess.
You can use homebrew to get some of the pre-requisites, but at least one of them needs to be downloaded manually first

first brew tap homebrew/science

Next go to the sundials page and download sundials-2.5.0.tar.gz. You need to manually put the zip file you just downloaded in

/Library/Caches/Homebrew/sundials-2.5.0.tar.gz

Now you're ready to install the cantera pre-reqs:

brew install sundials
brew install scons

After that, go unzip the Cantera source code code you downwloaded. GO into that folder and edit a file called cantera.conf with the following lines:

CXX = 'llvm-g++'
CC = 'llvm-gcc'
python_package = 'full'
f90_interface = 'n'
cxx_flags = '-ftemplate-depth-128 -DGTEST_USE_OWN_TR1_TUPLE=1'

Save that file, then run

scons build

If that works, you'll see something like this in the terminal

*******************************************************
Compilation completed successfully.

- To run the test suite, type 'scons test'.
- To install, type '[sudo] scons install'.
*******************************************************

To finish the install,

scons install

Linux

You're best bet is to follow the official instructions.

Installation

Make sure you're in an activated OpenMDAO environment. Then you have two options:

Regular install

This will install the plugin, but you won't have access to the source in order to mess around with it.

plugin install --github pycycle

Source install

If you want to have access to the source and make changes to it while you're working then you should do an install from source. Don't be scared by the cantera source install though, compared to that this is pretty easy! It's only two steps.

1)Clone the repository to your local machine. If you want to clone ours:

git clone https://github.com/OpenMDAO-Plugins/pyCycle.git

Or you can fork it and clone that to your local machine. Either way...

  1. cd into the pyCycle directory

    python setup.py develop

About

Open Source cycle analysis tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%