<?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=Cantera%2FAdding_Python_Classes</id>
	<title>Cantera/Adding Python Classes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Cantera%2FAdding_Python_Classes"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;action=history"/>
	<updated>2026-06-20T14:23:02Z</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=Cantera/Adding_Python_Classes&amp;diff=15230&amp;oldid=prev</id>
		<title>Admin at 05:31, 21 March 2017</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;diff=15230&amp;oldid=prev"/>
		<updated>2017-03-21T05:31:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:31, 21 March 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The second, more difficult, but much more flexible, way to add new Python classes to Cantera is to add new classes to Cantera&amp;#039;s C++ interface, then add extra code to allow Python to call the C++ object. This allows you to really dig into Cantera and provides you with much more flexibility, at the cost of more &amp;quot;infrastructure&amp;quot; code written around the new C++ code.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The second, more difficult, but much more flexible, way to add new Python classes to Cantera is to add new classes to Cantera&amp;#039;s C++ interface, then add extra code to allow Python to call the C++ object. This allows you to really dig into Cantera and provides you with much more flexibility, at the cost of more &amp;quot;infrastructure&amp;quot; code written around the new C++ code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Cantera]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Python]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff::1.12:old-15228:rev-15230 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;diff=15228&amp;oldid=prev</id>
		<title>Admin: Admin moved page Cantera/Adding Python Class Via Cpp to Cantera/Adding Python Classes</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;diff=15228&amp;oldid=prev"/>
		<updated>2017-03-21T05:30:48Z</updated>

		<summary type="html">&lt;p&gt;Admin moved page &lt;a href=&quot;/wiki/Cantera/Adding_Python_Class_Via_Cpp&quot; class=&quot;mw-redirect&quot; title=&quot;Cantera/Adding Python Class Via Cpp&quot;&gt;Cantera/Adding Python Class Via Cpp&lt;/a&gt; to &lt;a href=&quot;/wiki/Cantera/Adding_Python_Classes&quot; title=&quot;Cantera/Adding Python Classes&quot;&gt;Cantera/Adding Python Classes&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 05:30, 21 March 2017&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff::1.12:old-15227:rev-15228 --&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;diff=15227&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Adding Python Class via C plus plus  =Two Approaches=  There are two ways to add new Python classes within Cantera. The first is the easy but less flexible Python method, and...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Cantera/Adding_Python_Classes&amp;diff=15227&amp;oldid=prev"/>
		<updated>2017-03-21T05:30:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Adding Python Class via C plus plus  =Two Approaches=  There are two ways to add new Python classes within Cantera. The first is the easy but less flexible Python method, and...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Adding Python Class via C plus plus&lt;br /&gt;
&lt;br /&gt;
=Two Approaches=&lt;br /&gt;
&lt;br /&gt;
There are two ways to add new Python classes within Cantera. The first is the easy but less flexible Python method, and the second is the more difficult but more flexible C++ method.&lt;br /&gt;
&lt;br /&gt;
==Python Approach==&lt;br /&gt;
&lt;br /&gt;
The first, and easiest, is to extend the existing Cantera Python classes using inheritance. This does not modify any of Cantera&amp;#039;s underlying behavior, but allows you to wrap it and extend it. This is the right approach if you&amp;#039;re happy with how Cantera works, and you want to make creating Reactors and Reactor Networks easier.&lt;br /&gt;
&lt;br /&gt;
I illustrate this approach by creating a residence time reactor, which extends the Cantera Reactor class. The residence time reactor takes a residence time as a constructor argument, does some calculations, then initializes the Cantera Reacotr (i.e., itself) with the right parameters: [[Cantera/ResidenceTimeReactor]]&lt;br /&gt;
&lt;br /&gt;
==C++ Approach==&lt;br /&gt;
&lt;br /&gt;
The second, more difficult, but much more flexible, way to add new Python classes to Cantera is to add new classes to Cantera&amp;#039;s C++ interface, then add extra code to allow Python to call the C++ object. This allows you to really dig into Cantera and provides you with much more flexibility, at the cost of more &amp;quot;infrastructure&amp;quot; code written around the new C++ code.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>