Home » Supplemental Resources » STEM Concept Videos » Videos » Differential Equations » Gradient
Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
This video leads students through an understanding of how the gradient is used in Fick's first law to describe a relationship between the flux of particles and the concentration of particles. This relationship is explored by modeling the process of diffusion using random walkers. Finally, this law is applied to other real-world scenarios involving solid state diffusion and thermodynamics.
After watching this video students should be able to:
Funding provided by the Singapore University of Technology and Design (SUTD)
Developed by the Teaching and Learning Laboratory (TLL) at MIT for SUTD
MIT © 2012
How long after swallowing a pill does it takes for a drug to enter your bloodstream? How long does it take for hot molten glass to cool? In this video, we'll see how the gradient helps us model molecular and thermal diffusion.
This video is part of the Differential Equations video series. Laws that govern a system's properties can be modeled using differential equations.
Hi, my name is Tom Peacock, and I'm a Professor of Mechanical Engineering here at MIT. Today I'd like to talk to you a little bit about the gradient.
Partial differential equations describe the world around us. And partial differential equations often contain grad, div, and/or curl terms. In order to use these operations to describe physical phenomena, the first step is to understand what each mathematical process means geometrically and how it behaves in different examples.
The gradient is an operation that takes in a scalar function and outputs a vector field. Many scalar quantities such as temperature and density have time derivatives that exhibit both a magnitude and a direction. Therefore it makes sense that we would need an operation that turns scalar functions into vector fields.
Before watching this video, you should be familiar with the definition of the gradient, and its connection to the directional derivative.
After watching this video, you will be able to
[Pause]
Imagine what happens when you swallow a pill. Usually the pill contains an active ingredient, or drug, and a mixture of other inactive ingredients, such as binders, flavoring agents, etc. Some pills are coated to make the pill easier to swallow and to control the release of the drug. When you swallow the pill, it starts to dissolve.
It is usually desired for there to be a constant and predictable delivery rate of drug to the body, that is that the diffusion of drug reaches steady state. We need to understand what this steady state amount is to ensure that we are delivering the desired dose.
The equation that describes diffusion is the partial derivative of c with respect to time is equal to D del squared c.
where c is concentration, and D is the diffusion coefficient, which we will assume is constant.
But where does this come from? In order to understand this completely, we will need to combine the divergence and gradient to have a full description of the del squared term. In this video, our goal is to understand how flux is related to the gradient of the concentration.
[Pause]
Let's review the properties and meaning of the gradient. The gradient is a local property of a function. That is, it depends only on points that are near a point of interest.
Given a function f(x,y) of two variables, we can represent this function as a surface in 3-dimensions z=f(x,y)
Or as a collection of level curves.
The gradient at a point (x,y) can be determined by finding a vector in the tangent plane to z=f(x,y) at (x,y) that points in the direction of the steepest slope.
The gradient vector is a vector in the x,y-plane. The direction is found by projecting the vector in the tangent plane down onto the xy-plane.
The magnitude of the gradient is the slope of that vector in the tangent plane.
This vector is always perpendicular to the level curve because along the level curve, the function is constant.
What is the 1-dimensional analogue of the gradient?
Take the tangent line to the graph of the function. Point a vector up the hill, then project down. The direction is either positive or negative. The magnitude is the slope of the graph. But 1-dimensional vectors are scalars. So the gradient is simply the derivative. And we already know that the derivative is a local property of a function: because it is a limit, it depends only on points in a small region near the point at which we are looking for the derivative.
What happens in 3-dimensions? It is somewhat difficult to represent a 3-dimensional function. The best way to represent such a function is through a collection of level surfaces. The gradient field can be computed at every point on the level surface. We know that the gradient vector is a 3-dimensional vector that is normal to this surface. The magnitude of the gradient vector measures the steepest increase of a shape we can't imagine because it is 4-dimensional.
[Pause]
Let's get back to our tablet diffusion example. We aren't going to attack the entire problem all at once. The first thing that we want to try to understand is the movement of drug molecules through any given surface area per unit time, i.e. we want to understand the flux from the pill into its surroundings.
In order to better understand this process, we begin with a demo. Here you see a tank of water and a drop of dye. Initially, the dye is concentrated in a single droplet at the center of the tank. Over time, the dye particles move away from the center, until a point in time when the process reaches steady state.
In order to model what is happening at the atomic level in this demo, we are going to start by making a 1-dimensional discrete model. This one-dimensional model will be simpler, and allow us to describe the flux of particles more easily. Then we will extend the model to 2-dimensions, creating a discrete time step simulation to determine the equation for flux. Then we will look at our 3 dimensional demo and discuss the equation for flux.
In the 1-dimensional model, we are going to model the particles of dye as random walkers on a line. Each random walker has an equal probability of moving one step of length Delta x to the right or to the left during a time step Delta t. The walkers move independently of each other.
We make an assumption that Delta x and Delta t are both small.
In order to understand how the particles are moving, we want to understand the flux through any given point.
Recall that flux is flow per unit "area" per unit time. Our random walk model is one dimensional, so we will define the flow of particles through a single point over a time step Delta t to be flux.
While we can look at the flux through any point, for mathematical convenience, let us determine the flux through the point x + Delta x over 2 at time t. This point is half way between the point x and x+delta x. Because of the hypotheses of our random walk, any particle that is within a step length Delta x to the left or the right of x + Delta x over 2 has a ½ probability of flowing through the point during the next time step. So in order to find the flux, the first step is to determine many particles are within our step distance Delta x from the point x + Delta x over 2.
Let the concentration of particles be denoted by the function c(x,t), which is the number of particles per unit length at a time t. To find the number of particles to the left of x + Delta x over 2, we could integrate the concentration function over the interval of length Delta x centered about the point x. However, because we have assumed that Delta x is small, we can approximate the concentration function by the value of the concentration at x for the whole interval. So the number of particles on the interval of length centered about the point x can be approximated by c(x,t) times Delta x . The number of particles on the interval of length Delta x centered about the point x + Delta x is approximately c(x+Delta x, t) times Delta x particles.
We assume that any particle has 1/2 probability of moving one step to the left or the right. Thus the flux through our point is given by one half times the number of particles to the left minus one half times the number of particles to the right a time t. We divide the entire expression by the time step, which is the unit of time over which we are looking at the motion of particles.
To dig a little deeper into this equation, we can take a Taylor expansion of our concentration function c(x + Delta x, t) about x, holding t fixed. This gives us the following expression, which is a polynomial in Delta x with coefficients given by multiples of sequentially higher partial derivatives of the concentration function c.
Our equation for flux becomes this seemingly more complicated equation.
However, if we make an assumption that Delta x grows proportionally to the square root of Delta t, in other words that Delta x squared is proportional to Delta t:
This simplifies the expression for flux because only the first term has a significant contribution, and we are left with the following expression for flux:
[pause]
You can do a table top experiment by placing a small drop of dye in a narrow test tube and measuring the change in height of dye with respect to the change in time in order to verify that the assumption we made is valid.
Rewriting the constant term in front as some diffusion constant D, this equation is commonly written as flux is equal to negative D times the partial derivative of c with respect to x.
The negative sign in this equation says that the direction of net flux goes from a region of high concentration to a region of low concentration, in the opposite direction as the concentration gradient. Why is this? If there are more particles on one side of a point than the other, we suspect half of them flow through the point on either side, so the net flow through the point is away from the highest concentration.
This behavior is consistent with what we saw with the dye in the fish tank.
Now we want to extend this to 2-dimensions. Here we have modeled a system of 2000 particles walking randomly in the plane. Each particle can move a unit distance away from its current location in any direction with equal probability. A profile of the concentration at each time step is displayed to the right.
We change the view of the concentration to be contour lines, and add some more particles to increase the accuracy of our computation in order to add in the flux vector. In 2D, the flux is a flow per length per unit time, and is a vector quantity. Observe that the flux is everywhere perpendicular to the level sets, or contours of the concentration map, and it points away from the highest concentration. In other words, this simulation suggests that the flux points in the direction of the negative gradient of the concentration.
The equation that describes this says that flux J is equal to some constant, which we will call D, times the negative gradient of the concentration: Compare to the equation we had in the 1-dimensional example. Here the derivative is replaced by the gradient because the derivative is the 1-dimensional analogue of the gradient.
Now let's look back to our 3-dimensional example. The flow profile seems to follow the same basic principles.
Experiments and observations have shown that the flux of particles per unit area is determined by some constant times the negative gradient of concentration, just as in our discrete 2-dimensional model:
This equation is one form of Fick's first law. It says that flux points along the negative gradient of the concentration.
It turns out that this equation describes the flux of many familiar quantities. Let's consider some examples:
When students exit a classroom when class ends shows the flux of people through the doorway points away from the highest concentration of students.
The second law of thermodynamics says that heat flows from high to low temperatures. This says that the flux is proportional (perhaps non-uniformly) to the negative temperature gradient.
Be aware that this is just one form of Fick's first law. The most general form says that flux is proportional to the negative gradient of the chemical potential.
You may see the equation in this form in later courses. In all of the examples that we have considered in this video, the gradient of the concentration and the gradient of the chemical potential pointed in the same direction.
To review:
The gradient is a vector quantity that points in the direction of the maximum slope of a scalar function.
Fick's first law says that flux points along the negative gradient of concentration.
In order to understand Fick's First Law, we first considered models in 1-d and 2-d, before trying to understand the description in 3-d.
It is highly recommended that the video is paused when prompted so that students are able to attempt the activities on their own and then check their solutions against the video.
During the video, students will observe the development of a model using random walkers to explore concentration gradients and diffusion.
MIT OpenCourseWare makes the materials used in the teaching of almost all of MIT's subjects available on the Web, free of charge. With more than 2,200 courses available, OCW is delivering on the promise of open sharing of knowledge.
© 2001–2014
Massachusetts Institute of Technology
Your use of the MIT OpenCourseWare site and materials is subject to our Creative Commons License and other terms of use.