diff --git a/borman-exercise-3-11.ipynb b/borman-exercise-3-11.ipynb index cbd6a5c..ed75998 100644 --- a/borman-exercise-3-11.ipynb +++ b/borman-exercise-3-11.ipynb @@ -83,14 +83,21 @@ "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 CO H2O '))]\n", + "complete_species = []\n", + "for Sname in (str.split(' H2 CO H2O ')):\n", + " complete_species.append(species[Sname])\n", + "\n", "steam = ct.Solution(thermo='IdealGas', species=complete_species)\n", "\n", + "# Load Solid Carbon phase\n", "carbon = ct.Solution('graphite.cti')\n", "\n", + "# Create an Mixture object with gas and solid phases\n", "mix = ct.Mixture([steam, carbon])\n", "\n", "mix()"