<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=August_2016%2FCantera_Test</id>
	<title>August 2016/Cantera Test - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=August_2016%2FCantera_Test"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=August_2016/Cantera_Test&amp;action=history"/>
	<updated>2026-06-20T19:19:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=August_2016/Cantera_Test&amp;diff=12063&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;pre&gt; $ cat EthyleneTest.py import cantera as ct  # Set the timestep and total simulation time dt = 0.001 ttotal = 2.0  # Use GRI Mech 3.0 g = ct.Solution(&#039;gri30.xml&#039;)  # Set...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=August_2016/Cantera_Test&amp;diff=12063&amp;oldid=prev"/>
		<updated>2016-08-02T04:51:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; $ cat EthyleneTest.py import cantera as ct  # Set the timestep and total simulation time dt = 0.001 ttotal = 2.0  # Use GRI Mech 3.0 g = ct.Solution(&amp;#039;gri30.xml&amp;#039;)  # Set...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cat EthyleneTest.py&lt;br /&gt;
import cantera as ct&lt;br /&gt;
&lt;br /&gt;
# Set the timestep and total simulation time&lt;br /&gt;
dt = 0.001&lt;br /&gt;
ttotal = 2.0&lt;br /&gt;
&lt;br /&gt;
# Use GRI Mech 3.0&lt;br /&gt;
g = ct.Solution(&amp;#039;gri30.xml&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
# Set the initial state of the gas&lt;br /&gt;
g.TPX = 298.15 + 900, ct.one_atm, &amp;quot;CH4:4.0, O2:1.0, N2:3.762, H:0.00001&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Create a reactor, and a reactor network to simulate it.&lt;br /&gt;
r = ct.Reactor(g)&lt;br /&gt;
n = ct.ReactorNet([r])&lt;br /&gt;
&lt;br /&gt;
# This loop advances the reactor until we&amp;#039;ve reached the final time.&lt;br /&gt;
c = 0&lt;br /&gt;
t = dt&lt;br /&gt;
time_data = []&lt;br /&gt;
temp_data = []&lt;br /&gt;
while True:&lt;br /&gt;
    n.advance(t)&lt;br /&gt;
&lt;br /&gt;
    time_data.append(t)&lt;br /&gt;
    temp_data.append(r.T)&lt;br /&gt;
&lt;br /&gt;
    t = t + dt&lt;br /&gt;
&lt;br /&gt;
    if(c % 10==0):&lt;br /&gt;
        print &amp;quot;Current reactor time:&amp;quot;,t&lt;br /&gt;
    if t &amp;gt; ttotal:&lt;br /&gt;
        break&lt;br /&gt;
&lt;br /&gt;
import matplotlib.pyplot as plt&lt;br /&gt;
plt.plot(time_data,temp_data)&lt;br /&gt;
plt.draw()&lt;br /&gt;
plt.show()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Cantera]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>