Change Generator to Loop in 3-11
This commit is contained in:
parent
7f8183b804
commit
5c2946622f
1 changed files with 9 additions and 2 deletions
|
|
@ -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()"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue