Limestone Slurry Pipeline Optimization
Main.LimestoneSlurry History
Hide minor edits - Show changes to output
Changed lines 5-6 from:
to:
(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/rAoDhuOpPf0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
(:htmlend:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/rAoDhuOpPf0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
(:htmlend:)
Added lines 269-270:
%width=550px%Attach:limestone_slurry_pipeline.png
Changed line 7 from:
A slurry pipeline is a type of pipeline used to transport a mixture of materials suspended in a liquid or gas. These materials are usually particles of solid matter, such as sand, clay, and other minerals, suspended in a liquid base, such as water or oil. Slurry pipelines are used in many industries, including mining, oil and gas, and agriculture.
to:
A slurry pipeline transports a mixture of materials suspended in a liquid or gas. These materials are usually particles of solid matter, such as sand, clay, and other minerals, suspended in a liquid base, such as water or oil. Slurry pipelines are used in many industries, including mining, oil and gas, and agriculture.
Changed lines 183-186 from:
fw =
-6.8029e-2*y+0.31078)
to:
ffp = True
if ffp:
y = m.Intermediate(m.log(Rw))
fw = m.Intermediate(-1.5919e-4*y**3+5.5535e-3*y**2\
-6.8029e-2*y+0.31078)
else:
fw1 = 0.3164/(Rw**0.25)
fw2 = 0.0032+0.221*Rw**-0.237
fw = m.if3(Rw-1e5,fw1,fw2)
if ffp:
y = m.Intermediate(m.log(Rw))
fw = m.Intermediate(-1.5919e-4*y**3+5.5535e-3*y**2\
-6.8029e-2*y+0.31078)
else:
fw1 = 0.3164/(Rw**0.25)
fw2 = 0.0032+0.221*Rw**-0.237
fw = m.if3(Rw-1e5,fw1,fw2)
Deleted line 197:
Deleted line 208:
Added line 146:
import numpy as np
Changed lines 180-183 from:
Rw = m.Intermediate(rho_w*V*Dpipe/mu,'Rw')
# Friction factorfor water (fit empirical correlation)
y = m.Intermediate(m.log(Rw),'y')
# Friction factor
y = m.Intermediate(m.log(Rw),'y'
to:
Rw = m.Intermediate(rho_w*V*Dpipe/mu)
# Friction factor
y = m.Intermediate(m.log(Rw))
# Friction factor
y = m.Intermediate(m.log(Rw))
Added line 188:
cspline = True
Changed lines 191-193 from:
Cd = m
to:
if cspline:
# Optimal Power: 286164
import pandas as pd
course = 'http://apmonitor.com/me575/'
url = 'index.php/Main/LimestoneSlurry'
data = pd.read_html(course+url)[0] # read data
lnCdRp2,lnCd,Cd = m.Array(m.Var,3,value=2)
m.Equation(m.exp(lnCdRp2)==CdRp2)
m.Equation(m.exp(lnCd)==Cd)
m.cspline(lnCdRp2,lnCd,
np.log(data['CdRp2'].values),
np.log(data['Cd'].values),False)
else:
# Optimal Power: 276570
x = m.Intermediate(m.log(CdRp2))
Cd = m.Intermediate(m.exp(0.03420*x**2\
-0.98327*x+6.17176))
# Optimal Power: 286164
import pandas as pd
course = 'http://apmonitor.com/me575/'
url = 'index.php/Main/LimestoneSlurry'
data = pd.read_html(course+url)[0] # read data
lnCdRp2,lnCd,Cd = m.Array(m.Var,3,value=2)
m.Equation(m.exp(lnCdRp2)==CdRp2)
m.Equation(m.exp(lnCd)==Cd)
m.cspline(lnCdRp2,lnCd,
np.log(data['CdRp2'].values),
np.log(data['Cd'].values),False)
else:
# Optimal Power: 276570
x = m.Intermediate(m.log(CdRp2))
Cd = m.Intermediate(m.exp(0.03420*x**2\
-0.98327*x+6.17176))
Added line 259:
m.options.SOLVER=1
Changed lines 24-25 from:
<td><b>CdRp2</b></td>
<td><b>Cd</b></td>
<
to:
<th><b>CdRp2</b></th>
<th><b>Cd</b></th>
<th><b>Cd</b></th>
Changed lines 24-25 from:
<td>CdRp2</td>
<td>Cd</td>
to:
<td><b>CdRp2</b></td>
<td><b>Cd</b></td>
<td><b>Cd</b></td>
Added lines 16-17:
Part of the optimization model requires an empirical model of C'_d_' vs. C'_d_'R'_p_''^2^' to correctly size the slurry pump. There are several methods for obtaining a regression model of this relationship including a [[https://apmonitor.com/wiki/index.php/Main/ObjectCspline|cubic spline]] or [[https://apmonitor.com/pds|machine learning regression methods]]. [[https://gekko.readthedocs.io/en/latest/ml.html|Gekko (see documentation)]] imports TensorFlow, Scikit-Learn, and Gaussian Process models.
Changed lines 242-364 from:
to:
(:sourceend:)
(:html:)
<style type="text/css">
div.table-title {
display: block;
margin: auto;
max-width: 600px;
padding:5px;
width: 100%;
}
.table-title h3 {
color: #fafafa;
}
.table-fill {
background: white;
border-radius:3px;
border-collapse: collapse;
height: 320px;
margin: auto;
max-width: 600px;
padding:5px;
width: 100%;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
animation: float 5s infinite;
}
th {
color:#D5DDE5;;
background:#1b1e24;
border-bottom:4px solid #9ea7af;
border-right: 1px solid #343a45;
text-align:left;
vertical-align:middle;
}
th:first-child {
border-top-left-radius:3px;
}
th:last-child {
border-top-right-radius:3px;
border-right:none;
}
tr {
border-top: 1px solid #C1C3D1;
border-bottom-: 1px solid #C1C3D1;
color:#666B85;
font-weight:normal;
}
tr:hover td {
border-top: 1px solid #22262e;
border-bottom: 1px solid #22262e;
}
tr:first-child {
border-top:none;
}
tr:last-child {
border-bottom:none;
}
tr:nth-child(odd) td {
background:#EEEEEE;
}
tr:last-child td:first-child {
border-bottom-left-radius:3px;
}
tr:last-child td:last-child {
border-bottom-right-radius:3px;
}
td {
background:#FFFFFF;
padding:5px;
text-align:left;
vertical-align:middle;
border-right: 1px solid #C1C3D1;
}
td:last-child {
border-right: 0px;
}
th.text-left {
text-align: left;
}
th.text-center {
text-align: center;
}
th.text-right {
text-align: right;
}
td.text-left {
text-align: left;
width: 45%;
}
td.text-center {
text-align: center;
width: 10%;
}
td.text-small {
text-align: center;
width: 10%;
}
td.text-right {
text-align: right;
}
</style>
(:htmlend:)
(:html:)
<style type="text/css">
div.table-title {
display: block;
margin: auto;
max-width: 600px;
padding:5px;
width: 100%;
}
.table-title h3 {
color: #fafafa;
}
.table-fill {
background: white;
border-radius:3px;
border-collapse: collapse;
height: 320px;
margin: auto;
max-width: 600px;
padding:5px;
width: 100%;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
animation: float 5s infinite;
}
th {
color:#D5DDE5;;
background:#1b1e24;
border-bottom:4px solid #9ea7af;
border-right: 1px solid #343a45;
text-align:left;
vertical-align:middle;
}
th:first-child {
border-top-left-radius:3px;
}
th:last-child {
border-top-right-radius:3px;
border-right:none;
}
tr {
border-top: 1px solid #C1C3D1;
border-bottom-: 1px solid #C1C3D1;
color:#666B85;
font-weight:normal;
}
tr:hover td {
border-top: 1px solid #22262e;
border-bottom: 1px solid #22262e;
}
tr:first-child {
border-top:none;
}
tr:last-child {
border-bottom:none;
}
tr:nth-child(odd) td {
background:#EEEEEE;
}
tr:last-child td:first-child {
border-bottom-left-radius:3px;
}
tr:last-child td:last-child {
border-bottom-right-radius:3px;
}
td {
background:#FFFFFF;
padding:5px;
text-align:left;
vertical-align:middle;
border-right: 1px solid #C1C3D1;
}
td:last-child {
border-right: 0px;
}
th.text-left {
text-align: left;
}
th.text-center {
text-align: center;
}
th.text-right {
text-align: right;
}
td.text-left {
text-align: left;
width: 45%;
}
td.text-center {
text-align: center;
width: 10%;
}
td.text-small {
text-align: center;
width: 10%;
}
td.text-right {
text-align: right;
}
</style>
(:htmlend:)
Added lines 15-16:
Attach:limestone_slurry.png
Changed lines 19-122 from:
to:
(:html:)
<table>
<tr>
<td>CdRp2</td>
<td>Cd</td>
</tr>
<tr>
<td>2.4</td>
<td>240</td>
</tr>
<tr>
<td>4.8</td>
<td>120</td>
</tr>
<tr>
<td>7.2</td>
<td>80</td>
</tr>
<tr>
<td>12.4</td>
<td>49.5</td>
</tr>
<tr>
<td>17.9</td>
<td>36.5</td>
</tr>
<tr>
<td>26.5</td>
<td>26.5</td>
</tr>
<tr>
<td>58.4</td>
<td>14.6</td>
</tr>
<tr>
<td>93.7</td>
<td>10.4</td>
</tr>
<tr>
<td>173</td>
<td>6.9</td>
</tr>
<tr>
<td>260</td>
<td>5.3</td>
</tr>
<tr>
<td>410</td>
<td>4.1</td>
</tr>
<tr>
<td>1020</td>
<td>2.55</td>
</tr>
<tr>
<td>1800</td>
<td>2</td>
</tr>
<tr>
<td>3750</td>
<td>1.5</td>
</tr>
<tr>
<td>6230</td>
<td>1.27</td>
</tr>
<tr>
<td>10,700</td>
<td>1.07</td>
</tr>
<tr>
<td>30,800</td>
<td>0.77</td>
</tr>
<tr>
<td>58,500</td>
<td>0.65</td>
</tr>
<tr>
<td>138,000</td>
<td>0.55</td>
</tr>
<tr>
<td>245,000</td>
<td>0.5</td>
</tr>
<tr>
<td>460,000</td>
<td>0.46</td>
</tr>
<tr>
<td>1,680,000</td>
<td>0.42</td>
</tr>
<tr>
<td>3,600,000</td>
<td>0.4</td>
</tr>
<tr>
<td>9,600,000</td>
<td>0.385</td>
</tr>
</table>
(:htmlend:)
<table>
<tr>
<td>CdRp2</td>
<td>Cd</td>
</tr>
<tr>
<td>2.4</td>
<td>240</td>
</tr>
<tr>
<td>4.8</td>
<td>120</td>
</tr>
<tr>
<td>7.2</td>
<td>80</td>
</tr>
<tr>
<td>12.4</td>
<td>49.5</td>
</tr>
<tr>
<td>17.9</td>
<td>36.5</td>
</tr>
<tr>
<td>26.5</td>
<td>26.5</td>
</tr>
<tr>
<td>58.4</td>
<td>14.6</td>
</tr>
<tr>
<td>93.7</td>
<td>10.4</td>
</tr>
<tr>
<td>173</td>
<td>6.9</td>
</tr>
<tr>
<td>260</td>
<td>5.3</td>
</tr>
<tr>
<td>410</td>
<td>4.1</td>
</tr>
<tr>
<td>1020</td>
<td>2.55</td>
</tr>
<tr>
<td>1800</td>
<td>2</td>
</tr>
<tr>
<td>3750</td>
<td>1.5</td>
</tr>
<tr>
<td>6230</td>
<td>1.27</td>
</tr>
<tr>
<td>10,700</td>
<td>1.07</td>
</tr>
<tr>
<td>30,800</td>
<td>0.77</td>
</tr>
<tr>
<td>58,500</td>
<td>0.65</td>
</tr>
<tr>
<td>138,000</td>
<td>0.55</td>
</tr>
<tr>
<td>245,000</td>
<td>0.5</td>
</tr>
<tr>
<td>460,000</td>
<td>0.46</td>
</tr>
<tr>
<td>1,680,000</td>
<td>0.42</td>
</tr>
<tr>
<td>3,600,000</td>
<td>0.4</td>
</tr>
<tr>
<td>9,600,000</td>
<td>0.385</td>
</tr>
</table>
(:htmlend:)
Changed lines 42-43 from:
# Pipeline slurry
to:
# Slurry Pipeline
Changed lines 45-52 from:
L = m.Const(15*5280,'L') # Length of pipeline (ft)
W =m.Const(12.67,'W') # Massflow of limestone (lbm/sec)
a =m.Const(0.01,'a') # Average lump-size before grinding (ft)
pi = m.Const(3.1415927,'pi') # pi
rho_w = m.Const(62.428,'rho_w') # Density of water (lbm/ft^3)
mu = m.Const(7.392e-4,'mu') # Viscosity of water (lbm/ft/sec)
g = m.Const(32.174,'g') # Gravitational constant (ft/sec^2)
W =
a =
pi = m.Const
rho_w = m.Const
g = m.Const(32.174,'g')
to:
L = 15*5280 # Length of pipeline (ft)
W = 12.67 # Massflow of limestone (lbm/sec)
a = 0.01 # Average lump-size before grinding (ft)
pi = 3.1415927
rho_w = 62.428 # Density of water (lbm/ft^3)
mu = 7.392e-4 # Viscosity of water (lbm/ft/sec)
g = 32.174 # Gravitational constant (ft/sec^2)
W = 12.67 # Massflow of limestone (lbm/sec)
a = 0.01 # Average lump-size before grinding (ft)
pi = 3.1415927
rho_w = 62.428 # Density of water (lbm/ft^3)
mu = 7.392e-4 # Viscosity of water (lbm/ft/sec)
g = 32.174 # Gravitational constant (ft/sec^2)
Changed line 54 from:
gc = m.Const(32.174049,'gc')
to:
gc = 32.174049
Changed lines 56-57 from:
gamma_L = m.Const(168.5,'gamma_L')
to:
gamma_L = 168.5
Changed lines 60-62 from:
V = m.Var(value=10 , lb=1 , ub=20 , name='V')
# Volumetric concentration of slurry(Vol limestone/Vol Total)
c = m.Var(value=0.2 , lb=0.01 , ub=0.4 , name='c')
# Volumetric concentration of slurry
c =
to:
V = m.Var(value=10, lb=1, ub=20, name='V')
# Volumetric concentration of slurry
# (Vol limestone/Vol Total)
c = m.Var(value=0.2, lb=0.01, ub=0.4, name='c')
# Volumetric concentration of slurry
# (Vol limestone/Vol Total)
c = m.Var(value=0.2, lb=0.01, ub=0.4, name='c')
Changed line 65 from:
Dpipe = m.Var(value=0.4 , lb=0.01 , ub=0.5 , name='Dpipe')
to:
Dpipe = m.Var(value=0.4, lb=0.01, ub=0.5, name='Dpipe')
Changed lines 67-69 from:
d = m.Var(value=0.008 , lb=0.0008 , name='d')
Pt = m.Var(value=1 , name='Pt')
Pt = m.Var(value=1
to:
d = m.Var(value=0.008, lb=0.0008, name='d')
Pt = m.Var(value=1, name='Pt')
Pt = m.Var(value=1, name='Pt')
Changed lines 76-77 from:
fw = m.Intermediate(-1.5919e-4*y**3+5.5535e-3*y**2-6.8029e-2*y+0.31078,'fw')
to:
fw = m.Intermediate(-1.5919e-4*y**3+5.5535e-3*y**2\
-6.8029e-2*y+0.31078)
-6.8029e-2*y+0.31078)
Changed lines 80-83 from:
CdRp2 = m.Intermediate(4*g*rho_w*d**3*(gamma_L-rho_w)/(3*mu**2),'CdRp2')
x = m.Intermediate(m.log(CdRp2),'x')
Cd = m.Intermediate(m.exp(0.03420*x**2-0.98327*x+6.17176),'Cd')
x = m.Intermediate(m.log(CdRp2),'x')
Cd = m.Intermediate
to:
CdRp2 = m.Intermediate(4*g*rho_w*d**3*\
(gamma_L-rho_w)/(3*mu**2))
x = m.Intermediate(m.log(CdRp2))
Cd = m.Intermediate(m.exp(0.03420*x**2-0.98327*x+6.17176))
(gamma_L-rho_w)/(3*mu**2))
x = m.Intermediate(m.log(CdRp2))
Cd = m.Intermediate(m.exp(0.03420*x**2-0.98327*x+6.17176))
Changed lines 86-87 from:
rho = m.Intermediate((1-c)*rho_w+c*gamma_L,'rho')
to:
rho = m.Intermediate((1-c)*rho_w+c*gamma_L)
Changed lines 89-90 from:
S = m.Intermediate(gamma_L/rho_w,'S')
to:
S = m.Intermediate(gamma_L/rho_w)
Changed lines 92-95 from:
r = m.Intermediate(rho_w/rho,'r')
t = m.Intermediate(g*Dpipe*(S-1)/(V**2*m.sqrt(Cd)),'t')
f = m.Intermediate(fw*(r+150*c*r*t**1.5),'f')
t = m.Intermediate(g*Dpipe*(S-1)/(V**2*m.sqrt(Cd))
f = m.Intermediate(fw*(r+150*c*r*t**1.5)
to:
r = m.Intermediate(rho_w/rho)
t = m.Intermediate(g*Dpipe*(S-1)/(V**2*m.sqrt(Cd)))
f = m.Intermediate(fw*(r+150*c*r*t**1.5))
t = m.Intermediate(g*Dpipe*(S-1)/(V**2*m.sqrt(Cd)))
f = m.Intermediate(fw*(r+150*c*r*t**1.5))
Changed lines 97-98 from:
dp = m.Intermediate(f*rho*L*V**2/(2*Dpipe*gc),'dp')
to:
dp = m.Intermediate(f*rho*L*V**2/(2*Dpipe*gc))
Changed lines 100-101 from:
Area = m.Intermediate(pi*Dpipe**2/4,'Area')
to:
Area = m.Intermediate(pi*Dpipe**2/4)
Changed lines 103-104 from:
Q = m.Intermediate(Area*V,'Q')
to:
Q = m.Intermediate(Area*V)
Changed lines 106-107 from:
mdot = m.Intermediate(rho*Area*V,'mdot')
to:
mdot = m.Intermediate(rho*Area*V)
Changed lines 109-111 from:
Q_L = m.Intermediate(Q*c,'Q_L') # ft^3/sec
mdot_L = m.Intermediate(gamma_L*Q_L,'mdot_L') # lbm/sec = (lbm/ft^3) * (ft^3/sec)
to:
Q_L = m.Intermediate(Q*c) # ft^3/sec
# lbm/sec = (lbm/ft^3) * (ft^3/sec)
mdot_L = m.Intermediate(gamma_L*Q_L)
# lbm/sec = (lbm/ft^3) * (ft^3/sec)
mdot_L = m.Intermediate(gamma_L*Q_L)
Changed lines 114-115 from:
Pf = m.Intermediate(dp*Q,'Pf')
to:
Pf = m.Intermediate(dp*Q)
Changed lines 117-118 from:
Pg = m.Intermediate(218*W*(1/m.sqrt(d)-1/m.sqrt(a)),'Pg')
to:
Pg = m.Intermediate(218*W*(1/m.sqrt(d)-1/m.sqrt(a)))
Changed lines 120-121 from:
Vc = m.Intermediate((40*g*c*(S-1)*Dpipe/m.sqrt(Cd))**0.5,'Vc')
to:
Vc = m.Intermediate((40*g*c*(S-1)*Dpipe/m.sqrt(Cd))**0.5)
Changed lines 129-130 from:
# Velocity must be greater than the critical velocity constraint
to:
# Velocity must be greater than
# the critical velocity constraint
# the critical velocity constraint
Changed lines 3-5 from:
(:description Engineering design and optimization of a heat pump system for pasteurization of milk. Optimization principles are used to design the system.:)
to:
(:description Engineering design and optimization of limestone slurry pipeline. Optimization principles are used to design the system.:)
%width=550px%Attach:limestone_slurry_pipeline.png
%width=550px%Attach:limestone_slurry_pipeline.png
Changed line 1 from:
(:title Limestone Slurry Pipeline Optimization Problem:)
to:
(:title Limestone Slurry Pipeline Optimization:)
Added lines 4-7:
A slurry pipeline is a type of pipeline used to transport a mixture of materials suspended in a liquid or gas. These materials are usually particles of solid matter, such as sand, clay, and other minerals, suspended in a liquid base, such as water or oil. Slurry pipelines are used in many industries, including mining, oil and gas, and agriculture.
The optimization of a slurry pipeline depends on the type of slurry and the application. In general, the goal is to minimize the total cost of the pipeline, which includes capital and operating costs. Optimization may involve adjusting the diameter of the pipeline, the type and number of pumps, the use of valves and other controlling devices, and the installation of strainers and other equipment to filter out solids. Other considerations include the environmental impact of the pipeline, safety, and the ability to handle the slurry without damage to the equipment. In some cases, the optimization process may also include the use of additives to improve the flow characteristics of the slurry.
Changed lines 47-49 from:
gamma_L = m.Const(168.5,'gamma_L')
to:
# Conversion between lbm and lbf (lbm ft / lbf / s^2)
gc = m.Const(32.174049,'gc')
# Density of limestone (lbm/ft^3)
gamma_L = m.Const(168.5,'gamma_L')
gc = m.Const(32.174049,'gc')
# Density of limestone (lbm/ft^3)
gamma_L = m.Const(168.5,'gamma_L')
Changed lines 53-56 from:
c = m.Var(value=0.2 , lb=0.01 , ub=0.4 , name='c') #
Dpipe =
d = m.Var(value=0.008 , lb=0.0008 , name='d')
to:
# Average flow velocity (ft/sec)
V = m.Var(value=10 , lb=1 , ub=20 , name='V')
# Volumetric concentration of slurry (Vol limestone/Vol Total)
c = m.Var(value=0.2 , lb=0.01 , ub=0.4 , name='c')
# Internal pipe diameter (ft)
Dpipe = m.Var(value=0.4 , lb=0.01 , ub=0.5 , name='Dpipe')
# Average particle size after grinding (ft)
d = m.Var(value=0.008 , lb=0.0008 , name='d')
V = m.Var(value=10 , lb=1 , ub=20 , name='V')
# Volumetric concentration of slurry (Vol limestone/Vol Total)
c = m.Var(value=0.2 , lb=0.01 , ub=0.4 , name='c')
# Internal pipe diameter (ft)
Dpipe = m.Var(value=0.4 , lb=0.01 , ub=0.5 , name='Dpipe')
# Average particle size after grinding (ft)
d = m.Var(value=0.008 , lb=0.0008 , name='d')
Changed line 126 from:
(:sourceend:)
to:
(:sourceend:)
Added lines 23-120:
----
'''Solution Help'''
%width=150px%Attach:gekko.png
See [[https://gekko.readthedocs.io/en/latest/|GEKKO documentation]] and [[https://apmonitor.com/wiki/index.php/Main/GekkoPythonOptimization|additional example problems]].
(:source lang=python:)
from gekko import GEKKO
m = GEKKO()
# Pipeline slurry
# Constants
L = m.Const(15*5280,'L') # Length of pipeline (ft)
W = m.Const(12.67,'W') # Massflow of limestone (lbm/sec)
a = m.Const(0.01,'a') # Average lump-size before grinding (ft)
pi = m.Const(3.1415927,'pi') # pi
rho_w = m.Const(62.428,'rho_w') # Density of water (lbm/ft^3)
mu = m.Const(7.392e-4,'mu') # Viscosity of water (lbm/ft/sec)
g = m.Const(32.174,'g') # Gravitational constant (ft/sec^2)
gc = m.Const(32.174049,'gc') # Converstion between lbm and lbf (lbm ft / lbf / s^2)
gamma_L = m.Const(168.5,'gamma_L') # Density of limestone (lbm/ft^3)
# Variables
V = m.Var(value=10 , lb=1 , ub=20 , name='V') # Average flow velocity (ft/sec)
c = m.Var(value=0.2 , lb=0.01 , ub=0.4 , name='c') # Volumetric concentration of slurry (Vol limestone/Vol Total)
Dpipe = m.Var(value=0.4 , lb=0.01 , ub=0.5 , name='Dpipe') # Internal pipe diameter (ft)
d = m.Var(value=0.008 , lb=0.0008 , name='d') # Average particle size after grinding (ft)
Pt = m.Var(value=1 , name='Pt')
# Intermediates
# Reynolds number
Rw = m.Intermediate(rho_w*V*Dpipe/mu,'Rw')
# Friction factor for water (fit empirical correlation)
y = m.Intermediate(m.log(Rw),'y')
fw = m.Intermediate(-1.5919e-4*y**3+5.5535e-3*y**2-6.8029e-2*y+0.31078,'fw')
# Dimensionless numbers to obtain drag coefficient
CdRp2 = m.Intermediate(4*g*rho_w*d**3*(gamma_L-rho_w)/(3*mu**2),'CdRp2')
x = m.Intermediate(m.log(CdRp2),'x')
Cd = m.Intermediate(m.exp(0.03420*x**2-0.98327*x+6.17176),'Cd')
# Slurry density
rho = m.Intermediate((1-c)*rho_w+c*gamma_L,'rho')
# Limestone specific gravity
S = m.Intermediate(gamma_L/rho_w,'S')
# Slurry friction factor
r = m.Intermediate(rho_w/rho,'r')
t = m.Intermediate(g*Dpipe*(S-1)/(V**2*m.sqrt(Cd)),'t')
f = m.Intermediate(fw*(r+150*c*r*t**1.5),'f')
# Pressure drop (lbf / ft^2)
dp = m.Intermediate(f*rho*L*V**2/(2*Dpipe*gc),'dp')
# Pipe cross-sectional area (ft^2)
Area = m.Intermediate(pi*Dpipe**2/4,'Area')
# Slurry flow rate (ft^3/sec)
Q = m.Intermediate(Area*V,'Q')
# Slurry mass flow rate (lbm/sec)
mdot = m.Intermediate(rho*Area*V,'mdot')
# Limestone mass flow rate (lbm/sec)
Q_L = m.Intermediate(Q*c,'Q_L') # ft^3/sec
mdot_L = m.Intermediate(gamma_L*Q_L,'mdot_L') # lbm/sec = (lbm/ft^3) * (ft^3/sec)
# Friction power loss (ft * lbf / sec)
Pf = m.Intermediate(dp*Q,'Pf')
# Grinding power (ft*lbf/sec)
Pg = m.Intermediate(218*W*(1/m.sqrt(d)-1/m.sqrt(a)),'Pg')
# Critical velocity
Vc = m.Intermediate((40*g*c*(S-1)*Dpipe/m.sqrt(Cd))**0.5,'Vc')
# Equations
# Total power (grinding + pumping)
m.Equation(Pt==Pg+Pf)
# Mass flow of limestone
m.Equation(mdot_L==W)
# Velocity must be greater than the critical velocity constraint
m.Equation(V>Vc)
m.Minimize(Pt)
m.solve()
print('Optimal Power: ' + str(Pt[0]))
(:sourceend:)
Deleted lines 22-40:
----
(:html:)
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
Added lines 15-17:
(:html:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/3bWc9RmxCPQ?rel=0" frameborder="0" allowfullscreen></iframe>
(:htmlend:)
<iframe width="560" height="315" src="https://www.youtube.com/embed/3bWc9RmxCPQ?rel=0" frameborder="0" allowfullscreen></iframe>
(:htmlend:)
Changed lines 7-8 from:
[[Attach:limestone_slurry.pdf | Full Slurry Pipeline Assignment]]
[[Attach:limestone_slurry.zip | Slurry Pipeline Data for C'_d_' vs. C'_d_'R'_p_''^2^' in Excel]]
[[Attach:limestone_slurry.zip | Slurry Pipeline Data for C'_d_' vs. C'_d_'R'_p_''^2^' in Excel]]
to:
* [[Attach:limestone_slurry.pdf | Full Slurry Pipeline Assignment]]
* [[Attach:limestone_slurry.zip | Slurry Pipeline Data for C'_d_' vs. C'_d_'R'_p_''^2^' in Excel]]
* [[Attach:limestone_slurry.zip | Slurry Pipeline Data for C'_d_' vs. C'_d_'R'_p_''^2^' in Excel]]
Added lines 8-9:
[[Attach:limestone_slurry.zip | Slurry Pipeline Data for C'_d_' vs. C'_d_'R'_p_''^2^' in Excel]]
Changed lines 16-35 from:
Attach:group50.png This assignment can be completed in groups of two. Additional guidelines on individual, collaborative, and group assignments are provided under the [[Main/CourseStandards | Expectations link]].
to:
Attach:group50.png This assignment can be completed in groups of two. Additional guidelines on individual, collaborative, and group assignments are provided under the [[Main/CourseStandards | Expectations link]].
----
(:html:)
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
----
(:html:)
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
(:htmlend:)
Added lines 1-16:
(:title Limestone Slurry Pipeline Optimization Problem:)
(:keywords mining, slurry, pipeline, nonlinear, optimization, engineering optimization, two-bar optimization, engineering design, interior point, active set, differential, algebraic, modeling language, university course:)
(:description Engineering design and optimization of a heat pump system for pasteurization of milk. Optimization principles are used to design the system.:)
Design a pipeline for transporting crushed limestone from a quarry to a terminal located some distance away, using water as a transporting medium.
[[Attach:limestone_slurry.pdf | Full Slurry Pipeline Assignment]]
Attach:limestone_slurry.png
The limestone is crushed at the quarry, mixed with water to form a slurry, and pumped through the pipe. We would like to minimize the operating cost, which is primarily determined by the grinding power and the pumping power.
This problem is taken from James Siddall, Optimal Engineering Design, Dekker.
----
Attach:group50.png This assignment can be completed in groups of two. Additional guidelines on individual, collaborative, and group assignments are provided under the [[Main/CourseStandards | Expectations link]].
(:keywords mining, slurry, pipeline, nonlinear, optimization, engineering optimization, two-bar optimization, engineering design, interior point, active set, differential, algebraic, modeling language, university course:)
(:description Engineering design and optimization of a heat pump system for pasteurization of milk. Optimization principles are used to design the system.:)
Design a pipeline for transporting crushed limestone from a quarry to a terminal located some distance away, using water as a transporting medium.
[[Attach:limestone_slurry.pdf | Full Slurry Pipeline Assignment]]
Attach:limestone_slurry.png
The limestone is crushed at the quarry, mixed with water to form a slurry, and pumped through the pipe. We would like to minimize the operating cost, which is primarily determined by the grinding power and the pumping power.
This problem is taken from James Siddall, Optimal Engineering Design, Dekker.
----
Attach:group50.png This assignment can be completed in groups of two. Additional guidelines on individual, collaborative, and group assignments are provided under the [[Main/CourseStandards | Expectations link]].