<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Oil_shale_pyrolysis_%28GEKKO%29</id>
	<title>Oil shale pyrolysis (GEKKO) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mintoc.de/index.php?action=history&amp;feed=atom&amp;title=Oil_shale_pyrolysis_%28GEKKO%29"/>
	<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;action=history"/>
	<updated>2026-06-09T08:07:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2285&amp;oldid=prev</id>
		<title>JohnHedengren at 02:06, 15 March 2019</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2285&amp;oldid=prev"/>
		<updated>2019-03-15T02:06:33Z</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 02:06, 15 March 2019&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-l95&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&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;[[File:Oil_Shale_Pyrolysis_GEKKO.png]]&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;[[File:Oil_Shale_Pyrolysis_GEKKO.png]]&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;Thanks to [https://www.linkedin.com/in/junho-park-90b86967/ Junho Park] for providing the solution.&lt;/ins&gt;&lt;/div&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;   &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;   &lt;/div&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;[[Category:Gekko]]&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;[[Category:Gekko]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JohnHedengren</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2284&amp;oldid=prev</id>
		<title>JohnHedengren at 02:04, 15 March 2019</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2284&amp;oldid=prev"/>
		<updated>2019-03-15T02:04:03Z</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 02:04, 15 March 2019&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-l92&quot;&gt;Line 92:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 92:&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;&amp;lt;/source&amp;gt;&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;&amp;lt;/source&amp;gt;&lt;/div&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;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; 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A solution is calculated with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;1&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;349497&lt;/del&gt;&amp;lt;/math&amp;gt;.&lt;/div&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;A solution is calculated with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;35062&lt;/ins&gt;&amp;lt;/math&amp;gt;.&lt;/div&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;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;[[File:Oil_Shale_Pyrolysis_GEKKO.png]]&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;[[File:Oil_Shale_Pyrolysis_GEKKO.png]]&lt;/div&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;   &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;   &lt;/div&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;[[Category:Gekko]]&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;[[Category:Gekko]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JohnHedengren</name></author>
	</entry>
	<entry>
		<id>https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2282&amp;oldid=prev</id>
		<title>JohnHedengren: Oil shale pyrolysis solution in GEKKO</title>
		<link rel="alternate" type="text/html" href="https://mintoc.de/index.php?title=Oil_shale_pyrolysis_(GEKKO)&amp;diff=2282&amp;oldid=prev"/>
		<updated>2019-03-15T02:02:52Z</updated>

		<summary type="html">&lt;p&gt;Oil shale pyrolysis solution in GEKKO&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page contains a solution of the [[Oil Shale Pyrolysis]] problem in [https://gekko.readthedocs.io/en/latest/ GEKKO] Python format. The model in Python code for a fixed control discretization grid uses orthogonal collocation and a simultaneous optimization method. The GEKKO package is available with &amp;#039;&amp;#039;&amp;#039;pip install gekko&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;Python&amp;quot;&amp;gt;&lt;br /&gt;
from gekko import GEKKO&lt;br /&gt;
import numpy as np&lt;br /&gt;
import matplotlib.pyplot as plt  &lt;br /&gt;
&lt;br /&gt;
m=GEKKO()&lt;br /&gt;
&lt;br /&gt;
nt = 101&lt;br /&gt;
m.time = np.linspace(0,1,nt)&lt;br /&gt;
&lt;br /&gt;
# Constants&lt;br /&gt;
R = m.Const(value=1.9858775e-3) # Gas constant [kcal/mol*K] &lt;br /&gt;
&lt;br /&gt;
# Final Time = FV&lt;br /&gt;
tf = m.FV(value=1,lb=0.1,ub=20)&lt;br /&gt;
tf.STATUS = 1&lt;br /&gt;
&lt;br /&gt;
# MV&lt;br /&gt;
T = m.MV(value=425, ub=475, lb=425) # degC&lt;br /&gt;
T.STATUS = 1&lt;br /&gt;
T.DCOST = 0&lt;br /&gt;
&lt;br /&gt;
# Variables&lt;br /&gt;
x1 = m.Var(value = 1) # kerogen&lt;br /&gt;
x2 = m.Var(value = 0) # pyrolytic bitumen&lt;br /&gt;
x3 = m.Var(value = 0) # oil and gas&lt;br /&gt;
x4 = m.Var(value = 0) # carbon residue&lt;br /&gt;
&lt;br /&gt;
p = np.zeros(nt)&lt;br /&gt;
p[-1] = 1.0&lt;br /&gt;
final = m.Param(value=p)&lt;br /&gt;
&lt;br /&gt;
# Parameters&lt;br /&gt;
# Frequency factor&lt;br /&gt;
a1 = m.Param(value=np.exp(8.86))&lt;br /&gt;
a2 = m.Param(value=np.exp(24.25))&lt;br /&gt;
a3 = m.Param(value=np.exp(23.67))&lt;br /&gt;
a4 = m.Param(value=np.exp(18.75))&lt;br /&gt;
a5 = m.Param(value=np.exp(20.7))&lt;br /&gt;
# Activation envergy [Kcal/g-mole]&lt;br /&gt;
b1 = m.Param(value=20.3)&lt;br /&gt;
b2 = m.Param(value=37.4)&lt;br /&gt;
b3 = m.Param(value=33.8)&lt;br /&gt;
b4 = m.Param(value=28.2)&lt;br /&gt;
b5 = m.Param(value=31.0)&lt;br /&gt;
&lt;br /&gt;
# Intermediates&lt;br /&gt;
k1 = m.Intermediate(a1 * m.exp(-b1/(R*(T+273.15))))&lt;br /&gt;
k2 = m.Intermediate(a2 * m.exp(-b2/(R*(T+273.15))))&lt;br /&gt;
k3 = m.Intermediate(a3 * m.exp(-b3/(R*(T+273.15))))&lt;br /&gt;
k4 = m.Intermediate(a4 * m.exp(-b4/(R*(T+273.15))))&lt;br /&gt;
k5 = m.Intermediate(a5 * m.exp(-b5/(R*(T+273.15))))&lt;br /&gt;
&lt;br /&gt;
# Equations&lt;br /&gt;
m.Equation(x1.dt()/tf == -k1*x1 - (k3 + k4 + k5) * x1*x2)&lt;br /&gt;
m.Equation(x2.dt()/tf == k1*x1 - k2*x2 + k3*x1*x2)&lt;br /&gt;
m.Equation(x3.dt()/tf == k2*x2 + k4*x1*x2)&lt;br /&gt;
m.Equation(x4.dt()/tf == k5*x1*x2)&lt;br /&gt;
&lt;br /&gt;
# Objective function&lt;br /&gt;
m.Obj(-final*x2)&lt;br /&gt;
&lt;br /&gt;
m.options.SOLVER = 3&lt;br /&gt;
m.options.IMODE = 6&lt;br /&gt;
m.solve()&lt;br /&gt;
&lt;br /&gt;
plt.figure(1)&lt;br /&gt;
&lt;br /&gt;
tm = m.time * tf.value[0]&lt;br /&gt;
&lt;br /&gt;
plt.subplot(3,1,1)&lt;br /&gt;
plt.plot(tm,x1.value,&amp;#039;k:&amp;#039;,LineWidth=2,label=r&amp;#039;$x_1$=Kerogen&amp;#039;)&lt;br /&gt;
plt.plot(tm,x2.value,&amp;#039;b-&amp;#039;,LineWidth=2,label=r&amp;#039;$x_2$=Pyrolytic Bitumen&amp;#039;)&lt;br /&gt;
plt.ylabel(&amp;#039;Fraction&amp;#039;)&lt;br /&gt;
plt.legend(loc=&amp;#039;best&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
plt.subplot(3,1,2)&lt;br /&gt;
plt.plot(tm,x3.value,&amp;#039;g--&amp;#039;,LineWidth=2,label=r&amp;#039;$x_3$=Oil &amp;amp; Gas&amp;#039;)&lt;br /&gt;
plt.plot(tm,x4.value,&amp;#039;r-.&amp;#039;,LineWidth=2,label=r&amp;#039;$x_4$=Carbon Residue&amp;#039;)&lt;br /&gt;
plt.ylabel(&amp;#039;Fraction&amp;#039;)&lt;br /&gt;
plt.legend(loc=&amp;#039;best&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
plt.subplot(3,1,3)&lt;br /&gt;
plt.plot(tm,T.value,&amp;#039;r-&amp;#039;,LineWidth=2,label=&amp;#039;Temperature&amp;#039;)&lt;br /&gt;
plt.legend(loc=&amp;#039;best&amp;#039;)&lt;br /&gt;
plt.xlabel(&amp;#039;Time&amp;#039;)&lt;br /&gt;
plt.ylabel(r&amp;#039;Temp ($^o$C)&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
plt.show()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A solution is calculated with an objective function value of &amp;lt;math&amp;gt;x_2(t_f) = 1.349497&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Oil_Shale_Pyrolysis_GEKKO.png]]&lt;br /&gt;
 &lt;br /&gt;
[[Category:Gekko]]&lt;/div&gt;</summary>
		<author><name>JohnHedengren</name></author>
	</entry>
</feed>