"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"## One dimensional steady-state finite-volume approximation\n",
"\n",
"### Summary to this point\n",
"\n",
"We have developed a 1-D stencil for a gridblock C to generate an steady-state equation for each interior gridblock:\n",
"\\begin{align*}\n",
"\\left(J_{EC}+J_{WC}\\right) &= 0 \\\\\n",
"\\end{align*}\n",
"\n",
"\n",
"\n",
"\n",
"where the gridblocks are sized $\\Delta x$, $\\Delta y$, $\\Delta z$\n",
"\n",
"\n",
"\n",
"We use the stencil to generate the equations for a simple 5 - gridblock example:\n",
"\n",
"\n",
"\n",
"\n",
"We generated the following equations:\n",
"\n",
" | Gridblock | Equation |\n",
" |:----------:|:--------------:|\n",
" | 1 | $$c_1 = 2000$$|\n",
" | 2 | $$\\left(J_{12}+J_{32}\\right) = 0$$|\n",
" | 3 | $$\\left(J_{23}+J_{43}\\right) = 0$$|\n",
" | 4 | $$\\left(J_{34}+J_{54}\\right) = 0$$|\n",
" | 5 | $$c_5 = 93$$|\n",
"\n",
" Recall, the equations for gridblock 1 and 5 came from the boundary conditions.\n",
"\n",
" **Next**: we need to represent the fluxes such as $J_{12}$ in terms of the dependent variable of interest - concentration. We do that with Fick's law of diffusion."
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Fick's law of diffusion\n",
"\n",
"**Concept**: solutes (dissolved substances) move from areas of high concentration to areas of low concentration. (Why?)\n",
"\n",
"\n",
"\n",
"Intuition:\n",
"* rate of diffusion is proportional to gradient in concentration\n",
"* mass flows from high concentrations towards lower concentrations\n",
"\n",
"\n",
"$$ flux \\propto {dc\\over dx}~\\left[{M/L^3 \\over L}\\right]$$\n",
"\n",
"***Fick's law*** (the x component)\n",
"\n",
"\\begin{align*}\n",
"j_x = - D {\\partial c\\over \\partial x}\\\\\n",
"\\end{align*}\n",
"\n",
"where\n",
"* $j_x~\\left[{M\\over L^2 T}\\right]$ is the x-component of the **specific mass flux**,\n",
"* $D$ is the **diffusion coefficient** and\n",
"* $\\partial c\\over \\partial x$ is the x-component of the gradient in concentration.\n",
"\n",
"\n",
"### Your turn\n",
"\n",
"Why the minus sign in Fick's law?\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Your turn\n",
"What are the dimensions of the diffusion coefficient?"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Your turn\n",
"\n",
"What is the magnitude (value) of the concentration gradient?\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Your turn\n",
"\n",
"1. What is the direction of the concentration gradient?\n",
"2. What is the direction in which solutes are diffusing?"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answers here."
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"\n",
"### Fick's law of diffusion of solutes in porous media\n",
"\n",
"We have to modify Fick's law slightly to apply porous media. We need to introduce **porosity** to account for the fact that diffusion only occurs in the pore space.\n",
"\n",
"\\begin{align*}\n",
"j_x = - D {\\partial (c\\theta) \\over \\partial x}\\\\\n",
"\\end{align*}\n",
"\n",
"where\n",
"* $\\theta ~\\left[{\\cdot}\\right]$ is the **porosity** (dimensionless)\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Your turn\n",
"\n",
"Now let's compute the flux. Consider the same problem as above, where the diffusion coefficient is $D=10^{-10}~m^2/s$, and the porosity is $\\theta = 0.3$.\n",
"\n",
"If the area perpendicular to this flux direction is $4\\times10^4~m^2$ (the area of the bottom of a modest tailings pond), how much mass is transported by diffusion in one day?\n",
"\n",
"\n",
"Recall, that the specific flux $j$ is the mass flux of solute per unit area per unit time and that $J=jA$, where $A$ is the area normal to (perpendicular to) the component of flux.\n",
"\n",
""
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here."
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"#### Aside: Gradients in 3 dimensions\n",
"\n",
"The gradient is a vector that points in the direction that a function is *increasing*. In cartesian coordinates, it has $x$, $y$ and $z$ components. The diffuse flux is a gradient that points in the direction that concentration is *decreasing*. Hence the minus sign in Fick's law. So the diffusive flux is also a vector:\n",
"\\begin{align*}\n",
"j_x &= - D {\\partial (c\\theta) \\over \\partial x}\\\\\n",
"j_y &= - D {\\partial (c\\theta)\\over \\partial y}\\\\\n",
"j_z &= - D {\\partial (c\\theta)\\over \\partial z}\\\\\n",
"\\end{align*}\n",
"\n",
"We've switched to partial derivatives only to indicate that the concentration is a function of several independent variables ($x$, $y$, and $z$). We'll be pretty loose with our partials and non-partials (impartials??!), but it is almost always clear from the context what is meant.\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Gridblock fluxes in terms of concentrations\n",
"\n",
"We'll do this in three steps:\n",
"1. We'll write the total fluxes in terms of specific fluxes.\n",
"2. We'll write specific fluxes in terms of Fick's law.\n",
"3. We'll introduce a discrete approximation for Fick's law.\n",
"\n",
"#### 1 Total fluxes as specific fluxes\n",
"\n",
"Let's look at our stencil equation:\n",
"$$\n",
"J_{WC}+J_{EC} =0\n",
"$$\n",
"\n",
"First, let's express the total fluxes in terms of specific fluxes:\n",
"\n",
"$$J_{WC}=j_{WC}A$$\n",
"\n",
"### Your turn\n",
"\n",
"\n",
"\n",
"What is the correct value of the area $A$ to write $J_{WC}$ in terms of $j_{WC}$ for this example?\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here:\n",
"\n",
"$A= $"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"### Your turn\n",
"\n",
"\n",
"\n",
"\n",
"What is the correct value of the area $A$ to write $J_{WC}$ in terms of $j_{WC}$ for the general case above?\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Your answer here:\n",
"$ A = $\n",
"\n",
"(remember to write $\\Delta$ use `$\\Delta $` - or don't bother with math type."
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"#### 2 Specific fluxes in terms of Fick's law\n",
"\n",
"For a gridblock C oriented as below, what is the appropriate component of Fick's law?\n",
"\n",
"\n",
"\n",
"Choose one of (erase the two that are incorrect):\n",
"\\begin{align*}\n",
"j_x &= - D {\\partial (c\\theta) \\over \\partial x}\\\\\n",
"j_y &= - D {\\partial (c\\theta)\\over \\partial y}\\\\\n",
"j_z &= - D {\\partial (c\\theta)\\over \\partial z}\\\\\n",
"\\end{align*}\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"#### 3 Discrete approximation for Fick's law\n",
"\n",
"We need a way to approximate specific fluxes such as $j_x = - D {\\partial (c\\theta) \\over \\partial x}$ in terms of concentrations at nodal values in the centre of gridblocks as shown below.\n",
"\n",
"\n",
"\n",
"#### What is a reasonable way to do this?"
]
},
{
"cell_type": "markdown",
"metadata": {
"lines_to_next_cell": 0
},
"source": [
"Describe in words how you would approach this."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Putting it all together\n",
"\n",
"Can you use the three steps above to re-write the stencil\n",
"\n",
"$$\n",
"J_{WC}+J_{EC} =0\n",
"$$\n",
"\n",
"In terms of concentration? We'll reveal the answer next...\n",
"\n",
"\n",
"### Reflection\n",
"\n",
"What have you learned? What have you struggled with? Some thoughts below. Reflect on anything else you have learned or struggled with and write it here.\n"
]
}
],
"metadata": {
"jupytext": {
"cell_metadata_filter": "all",
"formats": "",
"notebook_metadata_filter": "all",
"text_representation": {
"extension": ".py",
"format_name": "percent",
"format_version": "1.2",
"jupytext_version": "1.0.0-rc2"
}
},
"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"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": true,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": true
}
},
"nbformat": 4,
"nbformat_minor": 2
}