<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Kitchin Research Group</title>
<link>https://kitchingroup.cheme.cmu.edu/posts/</link>
<atom:link href="https://kitchingroup.cheme.cmu.edu/posts/index.xml" rel="self" type="application/rss+xml"/>
<description>Chemical Engineering at Carnegie Mellon University</description>
<generator>quarto-1.10.19</generator>
<lastBuildDate>Wed, 14 Oct 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>A new home for the blog</title>
  <dc:creator>John Kitchin</dc:creator>
  <link>https://kitchingroup.cheme.cmu.edu/posts/new-site/</link>
  <description><![CDATA[ 

Skip to main content




<!-- SAMPLE POST: shows how code-heavy posts work. Edit or delete it. -->
<p>The blog ran on blogofile for many years, and that software is long past maintained. The 623 posts written with it are still at their original addresses, with their original look, in the <a href="../../blog/">archive</a>. New posts live here under <code>/posts/</code>.</p>
<p>Posts are Quarto documents (<code>.qmd</code>) or Jupyter notebooks (<code>.ipynb</code>). Code runs on my machine when I render, and the results are saved with the post, so the site builds without re-running anything.</p>
<section id="a-small-example" class="level2">
<h2 class="anchored" data-anchor-id="a-small-example">A small example</h2>
<p>Here is the first-order reaction <img src="https://latex.codecogs.com/png.latex?A%20%5Crightarrow%20B"> in a batch reactor, <img src="https://latex.codecogs.com/png.latex?%5Cfrac%7BdC_A%7D%7Bdt%7D%20=%20-k%20C_A">, solved numerically and compared with the analytical solution.</p>
<div id="8738bae6" class="cell" data-execution_count="1">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> numpy <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> np</span>
<span id="cb1-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">from</span> scipy.integrate <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> solve_ivp</span>
<span id="cb1-3"></span>
<span id="cb1-4">k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.23</span>   <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 1/min</span></span>
<span id="cb1-5">Ca0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.0</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># mol/L</span></span>
<span id="cb1-6"></span>
<span id="cb1-7">sol <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> solve_ivp(<span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">lambda</span> t, Ca: <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> Ca, (<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>), [Ca0], dense_output<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">True</span>)</span>
<span id="cb1-8">t <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.linspace(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">200</span>)</span>
<span id="cb1-9">Ca <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> sol.sol(t)[<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>]</span>
<span id="cb1-10"></span>
<span id="cb1-11"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">print</span>(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f"C_A(20 min) = </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>Ca[<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>]<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:.4f}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> mol/L (exact </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>Ca0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> np<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">.</span>exp(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:.4f}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">)"</span>)</span></code></pre></div></div>
<div class="cell-output cell-output-stdout">
<pre><code>C_A(20 min) = 0.0201 mol/L (exact 0.0201)</code></pre>
</div>
</div>
<div id="cell-fig-batch" class="cell" data-execution_count="2">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb3-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> matplotlib.pyplot <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> plt</span>
<span id="cb3-2"></span>
<span id="cb3-3">fig, ax <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> plt.subplots(figsize<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3.5</span>))</span>
<span id="cb3-4">ax.plot(t, Ca, label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"solve_ivp"</span>)</span>
<span id="cb3-5">ax.plot(t[::<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>], Ca0 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> np.exp(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> t[::<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>]), <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"o"</span>, label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"exact"</span>)</span>
<span id="cb3-6">ax.set_xlabel(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"t (min)"</span>)</span>
<span id="cb3-7">ax.set_ylabel(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"$C_A$ (mol/L)"</span>)</span>
<span id="cb3-8">ax.legend()</span>
<span id="cb3-9">plt.tight_layout()</span></code></pre></div></div>
<div class="cell-output cell-output-display">
<div id="fig-batch" class="quarto-float quarto-figure quarto-figure-center anchored" alt="Line plot of the concentration of A falling exponentially from 2 mol/L toward zero over 20 minutes, with the numerical solution passing through the exact-solution markers.">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-batch-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="https://kitchingroup.cheme.cmu.edu/posts/new-site/index_files/figure-html/fig-batch-output-1.png" alt="Line plot of the concentration of A falling exponentially from 2 mol/L toward zero over 20 minutes, with the numerical solution passing through the exact-solution markers." width="568" height="326" class="figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-batch-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Concentration of A in a first-order batch reaction.
</figcaption>
</figure>
</div>
</div>
</div>
<p>Figure&nbsp;1 shows the two agree. Equations, figures and cross-references all come from Quarto, and code blocks have a copy button.</p>


</section>

 ]]></description>
  <category>blog</category>
  <category>python</category>
  <guid>https://kitchingroup.cheme.cmu.edu/posts/new-site/</guid>
  <pubDate>Wed, 14 Oct 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Posts from notebooks</title>
  <dc:creator>John Kitchin</dc:creator>
  <link>https://kitchingroup.cheme.cmu.edu/posts/notebook-posts/</link>
  <description><![CDATA[ 

Skip to main content




<!-- SAMPLE POST: shows a notebook post. Edit or delete it. -->
<p>A notebook in <code>posts/&lt;slug&gt;/index.ipynb</code> is a post. Quarto renders it from the outputs already saved in the notebook and does not run it, so code that needs a GPU, a DFT code or a license still works here. Write the post in org-mode and export it with <code>ox-ipynb</code>, or write it in Jupyter directly.</p>
<div id="9e5896ea" class="cell" data-quarto-private-1="{&quot;key&quot;:&quot;execution&quot;,&quot;value&quot;:{&quot;iopub.execute_input&quot;:&quot;2026-10-14T17:22:50.342749Z&quot;,&quot;iopub.status.busy&quot;:&quot;2026-10-14T17:22:50.342351Z&quot;,&quot;iopub.status.idle&quot;:&quot;2026-10-14T17:22:52.643882Z&quot;,&quot;shell.execute_reply&quot;:&quot;2026-10-14T17:22:52.368674Z&quot;}}" data-execution_count="1">
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> numpy <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> np</span>
<span id="cb1-2"></span>
<span id="cb1-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Arrhenius rate constants</span></span>
<span id="cb1-4">Ea <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">75e3</span>   <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># J/mol</span></span>
<span id="cb1-5">A <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1e13</span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># 1/s</span></span>
<span id="cb1-6">R <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">8.314</span></span>
<span id="cb1-7">T <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.array([<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">300</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">400</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">600</span>])</span>
<span id="cb1-8">k <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> A <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> np.exp(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span>Ea <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> (R <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> T))</span>
<span id="cb1-9"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> Ti, ki <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">zip</span>(T, k):</span>
<span id="cb1-10">    <span class="bu" style="color: null;
background-color: null;
font-style: inherit;">print</span>(<span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;">f'</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>Ti<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> K: k = </span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span>ki<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:.3e}</span><span class="ss" style="color: #20794D;
background-color: null;
font-style: inherit;"> 1/s'</span>)</span></code></pre></div></div>
<div class="cell-output cell-output-stdout">
<pre><code>300 K: k = 8.727e-01 1/s
400 K: k = 1.606e+03 1/s
500 K: k = 1.461e+05 1/s
600 K: k = 2.954e+06 1/s</code></pre>
</div>
</div>
<p>The rate constant goes up by more than six orders of magnitude between 300 K and 600 K.</p>



 ]]></description>
  <category>jupyter</category>
  <category>emacs</category>
  <category>org-mode</category>
  <guid>https://kitchingroup.cheme.cmu.edu/posts/notebook-posts/</guid>
  <pubDate>Tue, 13 Oct 2026 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
