diff --git a/borman-exercise-3-10.ipynb b/borman-exercise-3-10.ipynb index a0f59b9..e22b7e5 100644 --- a/borman-exercise-3-10.ipynb +++ b/borman-exercise-3-10.ipynb @@ -1,7 +1,6 @@ { "cells": [ { - "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -55,15 +54,27 @@ "import cantera as ct\n", "\n", "# Get all of the Species objects defined in the GRI 3.0 mechanism\n", - "species = {S.name: S for S in ct.Species.listFromFile('gri30.cti')}\n", + "species = {}\n", + "for S in ct.Species.listFromFile('gri30.cti'):\n", + " species[S.name] = S\n", "\n", "# Create an IdealGas object with selected species\n", - "complete_species = [species[S] for S in (str.split(' H2 O2 N2 CO2 CO '))]\n", + "complete_species = []\n", + "for Sname in (str.split(' H2 O2 N2 CO2 CO ')):\n", + " complete_species.append(species[Sname])\n", + "\n", "cair = ct.Solution(thermo='IdealGas', species=complete_species)\n", "\n", "cair()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Set Initial Condtion and Calculate Equilibrium" + ] + }, { "cell_type": "code", "execution_count": 2, @@ -105,6 +116,13 @@ "cair.equilibrate('TP')\n", "cair()" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {