WEBVTT

00:00:03.330 --> 00:00:08.250
How long after swallowing a pill does it takes
for a drug to enter your bloodstream? How

00:00:08.250 --> 00:00:13.599
long does it take for hot molten glass to
cool? In this video, we'll see how the gradient

00:00:13.599 --> 00:00:17.110
helps us model molecular and thermal diffusion.

00:00:17.110 --> 00:00:21.270
This video is part of the Differential Equations
video series. Laws that govern a system's

00:00:21.270 --> 00:00:24.570
properties can be modeled using differential
equations.

00:00:24.570 --> 00:00:31.570
Hi, my name is Tom Peacock, and I'm a Professor
of Mechanical Engineering here at MIT. Today

00:00:31.689 --> 00:00:35.479
I'd like to talk to you a little bit about
the gradient.

00:00:35.479 --> 00:00:40.120
Partial differential equations describe the
world around us. And partial differential

00:00:40.120 --> 00:00:47.120
equations often contain grad, div, and/or
curl terms. In order to use these operations

00:00:47.330 --> 00:00:52.400
to describe physical phenomena, the first
step is to understand what each mathematical

00:00:52.400 --> 00:00:57.610
process means geometrically and how it behaves
in different examples.

00:00:57.610 --> 00:01:04.250
The gradient is an operation that takes in
a scalar function and outputs a vector field.

00:01:04.250 --> 00:01:09.850
Many scalar quantities such as temperature
and density have time derivatives that exhibit

00:01:09.850 --> 00:01:15.789
both a magnitude and a direction. Therefore
it makes sense that we would need an operation

00:01:15.789 --> 00:01:19.750
that turns scalar functions into vector fields.

00:01:19.750 --> 00:01:24.890
Before watching this video, you should be
familiar with the definition of the gradient,

00:01:24.890 --> 00:01:28.030
and its connection to the directional derivative.

00:01:28.030 --> 00:01:30.810
After watching this video, you will be able
to

00:01:30.810 --> 00:01:35.700
Recognize that the gradient vector points
in the direction of the maximum slope of a

00:01:35.700 --> 00:01:40.310
scalar function and has magnitude equal to
that slope.

00:01:40.310 --> 00:01:46.880
Describe the physicality of Fick's First Law
as it applies to concentration gradients.

00:01:46.880 --> 00:01:49.190
[Pause]

00:01:49.190 --> 00:01:55.090
Imagine what happens when you swallow a pill.
Usually the pill contains an active ingredient,

00:01:55.090 --> 00:02:02.090
or drug, and a mixture of other inactive ingredients,
such as binders, flavoring agents, etc. Some

00:02:03.360 --> 00:02:07.440
pills are coated to make the pill easier to
swallow and to control the release of the

00:02:07.440 --> 00:02:12.380
drug. When you swallow the pill, it starts
to dissolve.

00:02:12.380 --> 00:02:17.120
It is usually desired for there to be a constant
and predictable delivery rate of drug to the

00:02:17.120 --> 00:02:24.120
body, that is that the diffusion of drug reaches
steady state. We need to understand what this

00:02:24.540 --> 00:02:30.110
steady state amount is to ensure that we are
delivering the desired dose.

00:02:30.110 --> 00:02:36.579
The equation that describes diffusion is the
partial derivative of c with respect to time

00:02:36.579 --> 00:02:40.800
is equal to D del squared c.

00:02:40.800 --> 00:02:47.790
where c is concentration, and D is the diffusion
coefficient, which we will assume is constant.

00:02:47.790 --> 00:02:52.459
But where does this come from? In order to
understand this completely, we will need to

00:02:52.459 --> 00:02:59.170
combine the divergence and gradient to have
a full description of the del squared term.

00:02:59.170 --> 00:03:06.170
In this video, our goal is to understand how
flux is related to the gradient of the concentration.

00:03:06.170 --> 00:03:07.340
[Pause]

00:03:07.340 --> 00:03:12.610
Let's review the properties and meaning of
the gradient. The gradient is a local property

00:03:12.610 --> 00:03:19.610
of a function. That is, it depends only on
points that are near a point of interest.

00:03:19.630 --> 00:03:25.730
Given a function f(x,y) of two variables,
we can represent this function as a surface

00:03:25.730 --> 00:03:31.900
in 3-dimensions z=f(x,y)

00:03:31.900 --> 00:03:34.930
Or as a collection of level curves.

00:03:34.930 --> 00:03:41.930
The gradient at a point (x,y) can be determined
by finding a vector in the tangent plane to

00:03:41.959 --> 00:03:48.959
z=f(x,y) at (x,y) that points in the direction
of the steepest slope.

00:03:49.579 --> 00:03:56.190
The gradient vector is a vector in the x,y-plane.
The direction is found by projecting the vector

00:03:56.190 --> 00:04:01.580
in the tangent plane down onto the xy-plane.

00:04:01.580 --> 00:04:07.849
The magnitude of the gradient is the slope
of that vector in the tangent plane.

00:04:07.849 --> 00:04:13.160
This vector is always perpendicular to the
level curve because along the level curve,

00:04:13.160 --> 00:04:19.659
the function is constant.

00:04:19.659 --> 00:04:23.559
What is the 1-dimensional analogue of the
gradient?

00:04:23.559 --> 00:04:30.300
Take the tangent line to the graph of the
function. Point a vector up the hill, then

00:04:30.300 --> 00:04:37.300
project down. The direction is either positive
or negative. The magnitude is the slope of

00:04:37.960 --> 00:04:44.960
the graph. But 1-dimensional vectors are scalars.
So the gradient is simply the derivative.

00:04:46.469 --> 00:04:53.139
And we already know that the derivative is
a local property of a function: because it

00:04:53.139 --> 00:04:58.659
is a limit, it depends only on points in a
small region near the point at which we are

00:04:58.659 --> 00:05:00.699
looking for the derivative.

00:05:00.699 --> 00:05:07.619
What happens in 3-dimensions? It is somewhat
difficult to represent a 3-dimensional function.

00:05:07.619 --> 00:05:14.619
The best way to represent such a function
is through a collection of level surfaces.

00:05:14.759 --> 00:05:21.029
The gradient field can be computed at every
point on the level surface. We know that the

00:05:21.029 --> 00:05:26.520
gradient vector is a 3-dimensional vector
that is normal to this surface. The magnitude

00:05:26.520 --> 00:05:32.558
of the gradient vector measures the steepest
increase of a shape we can't imagine because

00:05:32.558 --> 00:05:33.099
it is 4-dimensional.

00:05:33.099 --> 00:05:33.169
[Pause]

00:05:33.169 --> 00:05:34.240
Let's get back to our tablet diffusion example.
We aren't going to attack the entire problem

00:05:34.240 --> 00:05:35.449
all at once. The first thing that we want
to try to understand is the movement of drug

00:05:35.449 --> 00:05:36.449
molecules through any given surface area per
unit time, i.e. we want to understand the

00:05:36.449 --> 00:05:36.930
flux from the pill into its surroundings.

00:05:36.930 --> 00:05:41.839
In order to better understand this process,
we begin with a demo. Here you see a tank

00:05:41.839 --> 00:05:48.180
of water and a drop of dye. Initially, the
dye is concentrated in a single droplet at

00:05:48.180 --> 00:05:53.169
the center of the tank. Over time, the dye
particles move away from the center, until

00:05:53.169 --> 00:05:56.990
a point in time when the process reaches steady
state.

00:05:56.990 --> 00:06:01.259
In order to model what is happening at the
atomic level in this demo, we are going to

00:06:01.259 --> 00:06:08.259
start by making a 1-dimensional discrete model.
This one-dimensional model will be simpler,

00:06:09.009 --> 00:06:15.399
and allow us to describe the flux of particles
more easily. Then we will extend the model

00:06:15.399 --> 00:06:20.740
to 2-dimensions, creating a discrete time
step simulation to determine the equation

00:06:20.740 --> 00:06:25.789
for flux. Then we will look at our 3 dimensional
demo and discuss the equation for flux.

00:06:25.789 --> 00:06:31.389
In the 1-dimensional model, we are going to
model the particles of dye as random walkers

00:06:31.389 --> 00:06:38.159
on a line. Each random walker has an equal
probability of moving one step of length Delta

00:06:38.159 --> 00:06:45.159
x to the right or to the left during a time
step Delta t. The walkers move independently

00:06:46.529 --> 00:06:48.159
of each other.

00:06:48.159 --> 00:06:54.929
We make an assumption that Delta x and Delta
t are both small.

00:06:54.929 --> 00:07:00.110
In order to understand how the particles are
moving, we want to understand the flux through

00:07:00.110 --> 00:07:01.800
any given point.

00:07:01.800 --> 00:07:08.800
Recall that flux is flow per unit "area" per
unit time. Our random walk model is one dimensional,

00:07:11.710 --> 00:07:17.809
so we will define the flow of particles through
a single point over a time step Delta t to

00:07:17.809 --> 00:07:19.550
be flux.

00:07:19.550 --> 00:07:24.800
While we can look at the flux through any
point, for mathematical convenience, let us

00:07:24.800 --> 00:07:31.800
determine the flux through the point x + Delta
x over 2 at time t. This point is half way

00:07:31.909 --> 00:07:38.159
between the point x and x+delta x. Because
of the hypotheses of our random walk, any

00:07:38.159 --> 00:07:44.550
particle that is within a step length Delta
x to the left or the right of x + Delta x

00:07:44.550 --> 00:07:51.039
over 2 has a ½ probability of flowing through
the point during the next time step. So in

00:07:51.039 --> 00:07:56.800
order to find the flux, the first step is
to determine many particles are within our

00:07:56.800 --> 00:08:03.050
step distance Delta x from the point x + Delta
x over 2.

00:08:03.050 --> 00:08:10.050
Let the concentration of particles be denoted
by the function c(x,t), which is the number

00:08:10.119 --> 00:08:16.959
of particles per unit length at a time t.
To find the number of particles to the left

00:08:16.959 --> 00:08:23.509
of x + Delta x over 2, we could integrate
the concentration function over the interval

00:08:23.509 --> 00:08:30.509
of length Delta x centered about the point
x. However, because we have assumed that Delta

00:08:30.709 --> 00:08:37.709
x is small, we can approximate the concentration
function by the value of the concentration

00:08:37.830 --> 00:08:44.810
at x for the whole interval. So the number
of particles on the interval of length centered

00:08:44.810 --> 00:08:51.810
about the point x can be approximated by c(x,t)
times Delta x . The number of particles on

00:08:53.820 --> 00:09:00.820
the interval of length Delta x centered about
the point x + Delta x is approximately c(x+Delta

00:09:02.150 --> 00:09:08.560
x, t) times Delta x particles.

00:09:08.560 --> 00:09:15.190
We assume that any particle has 1/2 probability
of moving one step to the left or the right.

00:09:15.190 --> 00:09:20.880
Thus the flux through our point is given by
one half times the number of particles to

00:09:20.880 --> 00:09:27.880
the left minus one half times the number of
particles to the right a time t. We divide

00:09:28.320 --> 00:09:33.990
the entire expression by the time step, which
is the unit of time over which we are looking

00:09:33.990 --> 00:09:36.580
at the motion of particles.

00:09:36.580 --> 00:09:42.010
To dig a little deeper into this equation,
we can take a Taylor expansion of our concentration

00:09:42.010 --> 00:09:49.010
function c(x + Delta x, t) about x, holding
t fixed. This gives us the following expression,

00:09:52.950 --> 00:09:58.930
which is a polynomial in Delta x with coefficients
given by multiples of sequentially higher

00:09:58.930 --> 00:10:03.160
partial derivatives of the concentration function
c.

00:10:03.160 --> 00:10:08.290
Our equation for flux becomes this seemingly
more complicated equation.

00:10:08.290 --> 00:10:15.290
However, if we make an assumption that Delta
x grows proportionally to the square root

00:10:18.500 --> 00:10:23.130
of Delta t, in other words that Delta x squared
is proportional to Delta t:

00:10:23.130 --> 00:10:30.130
This simplifies the expression for flux because
only the first term has a significant contribution,

00:10:32.860 --> 00:10:38.870
and we are left with the following expression
for flux:

00:10:38.870 --> 00:10:39.530
[pause]

00:10:39.530 --> 00:10:44.970
You can do a table top experiment by placing
a small drop of dye in a narrow test tube

00:10:44.970 --> 00:10:49.910
and measuring the change in height of dye
with respect to the change in time in order

00:10:49.910 --> 00:10:54.250
to verify that the assumption we made is valid.

00:10:54.250 --> 00:11:00.990
Rewriting the constant term in front as some
diffusion constant D, this equation is commonly

00:11:00.990 --> 00:11:07.880
written as flux is equal to negative D times
the partial derivative of c with respect to

00:11:07.880 --> 00:11:09.100
x.

00:11:09.100 --> 00:11:15.500
The negative sign in this equation says that
the direction of net flux goes from a region

00:11:15.500 --> 00:11:22.500
of high concentration to a region of low concentration,
in the opposite direction as the concentration

00:11:22.580 --> 00:11:29.580
gradient. Why is this? If there are more particles
on one side of a point than the other, we

00:11:31.590 --> 00:11:38.470
suspect half of them flow through the point
on either side, so the net flow through the

00:11:38.470 --> 00:11:40.700
point is away from the highest concentration.

00:11:40.700 --> 00:11:43.010
This behavior is consistent with what we saw
with the dye in the fish tank.

00:11:43.010 --> 00:11:50.010
Now we want to extend this to 2-dimensions.
Here we have modeled a system of 2000 particles

00:11:51.340 --> 00:11:58.340
walking randomly in the plane. Each particle
can move a unit distance away from its current

00:11:58.560 --> 00:12:05.560
location in any direction with equal probability.
A profile of the concentration at each time

00:12:06.610 --> 00:12:08.690
step is displayed to the right.

00:12:08.690 --> 00:12:15.650
We change the view of the concentration to
be contour lines, and add some more particles

00:12:15.650 --> 00:12:22.650
to increase the accuracy of our computation
in order to add in the flux vector. In 2D,

00:12:23.430 --> 00:12:30.430
the flux is a flow per length per unit time,
and is a vector quantity. Observe that the

00:12:31.380 --> 00:12:38.380
flux is everywhere perpendicular to the level
sets, or contours of the concentration map,

00:12:38.560 --> 00:12:45.150
and it points away from the highest concentration.
In other words, this simulation suggests that

00:12:45.150 --> 00:12:52.150
the flux points in the direction of the negative
gradient of the concentration.

00:12:54.180 --> 00:13:01.180
The equation that describes this says that
flux J is equal to some constant, which we

00:13:02.550 --> 00:13:08.410
will call D, times the negative gradient of
the concentration: Compare to the equation

00:13:08.410 --> 00:13:14.770
we had in the 1-dimensional example. Here
the derivative is replaced by the gradient

00:13:14.770 --> 00:13:18.460
because the derivative is the 1-dimensional
analogue of the gradient.

00:13:18.460 --> 00:13:25.380
Now let's look back to our 3-dimensional example.
The flow profile seems to follow the same

00:13:25.380 --> 00:13:26.490
basic principles.

00:13:26.490 --> 00:13:33.490
Experiments and observations have shown that
the flux of particles per unit area is determined

00:13:39.270 --> 00:13:46.270
by some constant times the negative gradient
of concentration, just as in our discrete

00:14:02.580 --> 00:14:09.040
2-dimensional model:

00:14:09.040 --> 00:14:16.040
This equation is one form of Fick's first
law. It says that flux points along the negative

00:14:22.330 --> 00:14:23.820
gradient of the concentration.

00:14:23.820 --> 00:14:30.820
It turns out that this equation describes
the flux of many familiar quantities. Let's

00:14:32.279 --> 00:14:34.260
consider some examples:

00:14:34.260 --> 00:14:41.260
When students exit a classroom when class
ends shows the flux of people through the

00:14:44.110 --> 00:14:51.110
doorway points away from the highest concentration
of students.

00:14:58.290 --> 00:15:03.390
The second law of thermodynamics says that
heat flows from high to low temperatures.

00:15:03.390 --> 00:15:10.390
This says that the
flux is proportional (perhaps non-uniformly)
to the negative temperature gradient.

00:16:21.790 --> 00:16:28.520
Be aware that this is just one form of Fick's
first law. The most general form says that

00:16:28.520 --> 00:16:34.800
flux is proportional to the negative gradient
of the chemical potential.

00:16:34.800 --> 00:16:41.800
You may see the equation in this form in later
courses. In all of the examples that we have

00:16:43.690 --> 00:16:48.880
considered in this video, the gradient of
the concentration and the gradient of the

00:16:48.880 --> 00:16:53.330
chemical potential pointed in the same direction.

00:16:53.330 --> 00:16:55.470
To review:

00:16:55.470 --> 00:17:00.950
The gradient is a vector quantity that points
in the direction of the maximum slope of a

00:17:00.950 --> 00:17:02.850
scalar function.

00:17:02.850 --> 00:17:08.609
Fick's first law says that flux points along
the negative gradient of concentration.

00:17:08.609 --> 00:17:15.049
In order to understand Fick's First Law, we
first considered models in 1-d and 2-d, before

00:17:15.049 --> 00:17:17.439
trying to understand the description in 3-d.