{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "*This notebook contains course material from [CBE20255](https://jckantor.github.io/CBE20255)\n", "by Jeffrey Kantor (jeff at nd.edu); the content is available [on Github](https://github.com/jckantor/CBE20255.git).\n", "The text is released under the [CC-BY-NC-ND-4.0 license](https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode),\n", "and code is released under the [MIT license](https://opensource.org/licenses/MIT).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [General Mass Balance on a Single Tank](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/04.03-General-Mass-Balance-on-a-Single-Tank.ipynb) | [Contents](toc.ipynb) | [Reactors](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/05.00-Reactors.ipynb) >
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Unsteady-State Material Balances"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Summary\n",
"\n",
"This [Jupyter notebook](http://jupyter.org/notebook.html) demonstrates the application of the general material balance equations to a variety of example problems."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Unsteady-State Material Balances"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The general principle of material balances is stated in words as \n",
"\n",
"Accumulation = Inflow - Outflow + Generation - Consumption\n",
"\n",
"An equation like this can be written for any conserved quantity, whether it is chemical species that chemical or bio engineers work with, or moeny in the case of finance, or populations for social scientists. Whenever terms on the right-hand side of the equation do not yield a zero result we are left with an _unsteady-state_ balance, which are some of the most fascinating and challenging problems in engineering practice."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1: Population Growth"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The first example concerns population growth. Looking birth and death rates in various countries around the globe, one comes across the following data maintained by the World Bank.\n",
"\n",
"For Afghanistan (the first country on the World Bank charts), the 2011 population was estimated to be 29,105,480 with a [birth rate of 37.0 births per year per 1,000 people](http://data.worldbank.org/indicator/SP.DYN.CBRT.IN), and a [death rate as 8.0 per year per 1,000](http://data.worldbank.org/indicator/SP.DYN.CDRT.IN). Assuming there is no in-migration or out-migration, can we predict the population in 2014?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Population Balance Equation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Writing out the balance equation, we get\n",
"\n",
"$\\underbrace{\\mbox{Accumulation}}_{\\frac{dP}{dt}} = \\underbrace{\\mbox{Inflow}}_{=0} - \\underbrace{\\mbox{Outflow}}_{=0} + \\underbrace{\\mbox{Generation}}_{births=\\frac{37}{1000}P} - \\underbrace{\\mbox{Consumption}}_{deaths=\\frac{8}{1000}P}$\n",
"\n",
"the algebraic combination of the two terms on the left leaves us an equation for the rate of change of population\n",
"\n",
"$\\frac{dP}{dt} = 0.029\\,P$\n",
"\n",
"with an initial condition $P(2011) = 29,105,480$. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Calculus Solution"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We'll use the shorthand notation $t_0 = 2011$ and $P(t_0) = 29,105,480$. Then separating the variables\n",
"\n",
"$\\int_{P(t_0)}^{P(t)}\\frac{1}{P}\\,dP = 0.029\\,\\int_{t_0}^t dt $\n",
"\n",
"Doing the integrals (if this is the first time you've seen this, be sure you do this by hand!) leads to\n",
"\n",
"$P(t) = P(t_0)\\,e^{0.029(t-t_0)}$\n",
"\n",
"This solution demonstrates the exponential growth of populations in circumstances where growth rate is constant and there are no other factors to consider."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
" "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}