# Propulsion

## Notes, Solutions

Propulsion.pdf on wordpress.com

Propulsion.tex LaTeX file on github

Propulsion.py Main, accompanying Python script as a “playground” on github for Propulsion.pdf

FluidMechanics.pdf on wordpress.com

FluidMechanics.tex LaTeX file on github

thermo.pdf on github repository Propulsion

thermo.tex LaTeX file on github

thermo.py Main, accompanying Python script as a “playground” on github for thermo.pdf

## Liquid-Vapor Equilibrium; Clausius-Clapeyron relation and Antoine Equation from NIST Chemistry Webbook

LiquidVaporEq.py, in github repository ernestyalumni:Propulsion: Web-scrape directly the National Institute of Standards and Technology (NIST) Chemistry Webbook for the Phase change data, and “clean” or format the data into the Antoine Equation and Clausius-Clapeyron relation.

Uses only the packages Requests, BeautifulSoup, sympy.

You’ll be able to make plots of the Antoine Equation and Clausius-Clapeyron relation like this, in this case for methane, $CH_4$:

## Cantera

CANTERA Object-Oriented Software for Reacting Flows – This is a “Powerpoint” presentation of Cantera with lucid diagrams that makes understanding the “structure” of Cantera – just note that it’s about 10 years old and some of the syntax has changed. It also has a slide showing the author’s benchmark kinetics performance vs. Chemkin II for Constant P, H Problem with Sensitivity Analysis showing

• Chemkin II taking ~170 sec while
• Cantera taking ~40 sec(!!!)

### PRF_171.cti added in cantera_stuff directory: .cti Cantera file for n-heptane, along with its Chemical Kinetics (!!!)

cf. Oku Nyong posted this file in his question on Autoignition of Heptane in RCM. I posted this same file on my github Propulsion/cantera_stuff/

### Installing Cantera (on Mac OS X, El Capitan)

While hanging out at my alma mater, I did notice that some of my peers had difficulties installing Cantera. I’ll try to remember the steps I took for a successful install.

brew tap homebrew/science
brew update
brew install python icons sundials

homebrew made the installation of those above easy. I also ran this command at the command prompt of Terminal:

pip install python numpy

and it checked my python and numpy installation out (whether it needed an upgrade or not).

Then on one Mac, (2014 13” MacBook Pro, Mac OS X El Capitan), I successfully installed Cantera with brew

brew install cantera

on another Mac, (2011 MacBook Air), I successfully installed Cantera with MacPorts (i.e. port)

sudo port install cantera

and so either way should work.

The folder cantera_stuff in the repository Propulsion contains examples (of usage) and implementations (in Python) of Cantera that I use for calculations for liquid rocket propulsion.

First, I provide the Python version of the Matlab tutorial .m files in the Cantera Matlab Toolbox (compare that page with the github folder cantera_stuff page):

• tut1.py
• tut2.py
• tut3.py
• tut4.py
• tut5.py
• tut6.py
• tut7.py

• equil.py

### My own (EY’s) Cantera Examples

• LOXmeth_eq.py

LOXmeth_eq.py calculates, as a function of oxidizer/fuel O/F mass ratio, the adiabatic flame temperature, equilibrium molecular composition, mean molecular weight, ratio of specific heats, and characteristic velocity, of the combustion of oxidizer oxygen (O2) and methane (CH3). This function is further generalized (called equil_general) to make other species be the oxidizer and fuel, such as dinitrogen tetraoxide (N2O4) and hydrazine (N2H4).

### Cantera’s examples in github

Let me also highlight the Python examples already in the github repository for Cantera, which is apparently in the folder Cython. Note that, as of right now, I couldn’t find these examples in my MacPorts install of Cantera.

In cython/cantera/examples are the folders

• kinetics
• multiphase
• onedim
• reactors
• surface_chemistry
• thermo
• transport

## Simple Droplet Model

Simple Fuel Droplet model for combustion in ambient molecular oxygen (as the oxidizer), based on Chapter 10 of Turns’ An Introduction to Combustion (2011).

### Results

I was able to make these plots:

## JANAF tables

PyPDFOCR API Reference (version 0.8.2)

### pypdfocr – Installation is nontrivial(!!!)

First,
pip install pypdfocr

#### External Dependencies

PyPDFOCR relies on the following (free) programs being installed:

You do this by the following (on a Mac OS X):

brew install tesseract
brew install ghostscript
brew install poppler
brew install imagemagick

Otherwise, I received errors as the following, where I didn’t install Poppler:

WARNING: Could not execute pdfimages to calculate DPI (try installing xpdf or poppler?), so defaulting to 300dpi

Example usage

pypdfocr JANAFC01-05.pdf

## Electromagnetism

I’ll put a new blog post, here, Electromagnetism for my exploration of electromagnetism and its application to electric propulsion, as I was reviewing EM, at its deepest, theoretical, levels, in thinking about propulsion.