## 07-05 Fluid Dynamics

• 0:00 - 0:05
A topic highly related to the finite element method is computational fluid dynamics--CFD--
• 0:05 - 0:08
the study of gases and liquids with the help of the computer.
• 0:08 - 0:14
For instance, to find the optimum shape of an airfoil or the optimum shape of a car body
• 0:14 - 0:16
or to design hydraulic machinery.
• 0:16 - 0:19
I've titled this section "Why CFD is hard,"
• 0:19 - 0:21
so now let's look into that.
• 0:21 - 0:26
If we were looking at a single particle of mass m that is subject to a force F
• 0:26 - 0:30
Then the rate of change of the velocity would be proportional to that force.
• 0:30 - 0:34
That's one of Newton's laws--force equals mass times acceleration,
• 0:34 - 0:37
which is the rate of change of velocity,
• 0:37 - 0:40
the derivative of velocity with respect to time.
• 0:40 - 0:43
For the fluid, something similar has to happen,
• 0:43 - 0:46
but now we're not dealing with a single particle.
• 0:46 - 0:49
We're dealing with a virtually infinite amount of particles.
• 0:49 - 0:54
What we are working with is not the velocity of the particle.
• 0:54 - 0:56
It's the velocity field.
• 0:56 - 0:59
For every position in space, we specify the velocity,
• 0:59 - 1:03
so the velocity that we specify is the velocity of that particle
• 1:03 - 1:05
at that instant of time.
• 1:05 - 1:09
Before and after, most probably, this location is going to be occupied
• 1:09 - 1:12
by other particles at other times.
• 1:12 - 1:16
When we write down Newton's equation for this particle--
• 1:16 - 1:20
force equals mass times the derivative of velocity with respect to time--
• 1:20 - 1:22
We have to be a little careful.
• 1:22 - 1:25
Let's look at what happens after a very short time step.
• 1:25 - 1:28
It's mass times 1 over the time step,
• 1:28 - 1:33
and now we have to form the difference of the velocity after that time step
• 1:33 - 1:36
minus the velocity before that time step.
• 1:36 - 1:38
The before part is easy.
• 1:38 - 1:43
That's simply our velocity field at the current time and the current location.
• 1:43 - 1:45
The tricky thing is the after part.
• 1:45 - 1:50
It's the velocity field at the later time--t plus time step.
• 1:50 - 1:54
Now we have to take care of the fact that our particle has moved a little.
• 1:54 - 1:58
We don't need the velocity field at that later time.
• 1:58 - 2:02
At position x it has to be a slightly different position,
• 2:02 - 2:04
namely, how far did we advance?
• 2:04 - 2:08
We advanced by time step times velocity.
• 2:08 - 2:10
Now, this is going to make things ugly.
• 2:10 - 2:15
The velocity field of something that includes the velocity field.
• 2:15 - 2:17
A function applied to itself.
• 2:17 - 2:19
This is what makes things ugly and eventually leads to computational fluid dynamics
• 2:19 - 2:22
and eventually leads to computational fluid dynamics being hard.
• 2:22 - 2:25
If we do the math right, this becomes the following.
• 2:25 - 2:29
First we have to look into the change of the velocity field with time,
• 2:29 - 2:33
so we get its partial derivative with respect to time.
• 2:33 - 2:36
But then we also have to look into its change with position,
• 2:36 - 2:40
which is the partial derivative with respect to x, for instance.
• 2:40 - 2:44
The larger the velocity is, the more effect the spatial derivative has.
• 2:44 - 2:50
What we get in the end is the x component of the velocity times the partial derivative
• 2:50 - 2:52
of the velocity with respect to x.
• 2:52 - 2:55
Of course, the same happens with y and z.
• 2:55 - 2:58
This is going to be the acceleration,
• 2:58 - 3:00
and this is inherently nonlinear.
• 3:00 - 3:05
We have a product of a function that we're looking for--the velocity field--with itself.
• 3:05 - 3:10
This is going to make solving the differential equation that results from this really hard.
• 3:10 - 3:13
Finally, however, even though the resulting equation--
• 3:13 - 3:17
the so-called Navier Stokes equation--is going to look pretty complex,
• 3:17 -
it's nothing else but Newton's law applied to the velocity field.
Cím:
07-05 Fluid Dynamics
Team:
Udacity
Projekt:
CS222 - Differential Equations
Duration:
03:21