[MUSIC] Hi, welcome to the fifth week of our class. Assimilation and modeling of natural processes. My name is Jonas Latt, and I will be your host for today's lesson. I'm a researcher in numerical analysis and computational flow dynamics. One of my specialties is the so-called Lattice Boltzmann method, which is going to be the topic of today's lesson. I'm also the manager of a software project for the simulation of fluid flow. The project, which you have met before in the introductory session to high-performance computing. We will use again today to illustrate some of the introduced topics. Today's lesson will first give you an overview over the topic of fluid flow and computational fluid dynamics. We will then go back to one of the models you have met before, cellular lattice gas automata, which you can use to simulate fluid flow. We will extend lattice gas automata to a more general and more widely used model, the Lattice Boltzmann method. Today's lesson will be very practical, because together, we will develop a Python code which is able to simulate fluid flow from A to Z step by step. The first module gives you an overview of the topic of computational fluid dynamics. What's a fluid? A fluid is a substance that deforms continually under the application of shearing stresses. Fluids are opposed to solids, which oppose stresses. And in the case of elastic solids, they can turn back to their original state once the stress is released. Fluids, on the other hand, resist deformations only very lightly on the PF effect of viscosity. Fluids can adopt the shape of any container into which they are placed. Fluids include liquids, gases and plasmas. The most widely known fluids in everyday life are air, gas, and water, a liquid. Fluids are investigated with a branch of physics which is called fluid dynamics. It is a discipline of a much broader field called continuum mechanics. In which matter is modeled from a microscopic standpoint in which the molecular nature of the matter is being neglected. We have learned before with cellular automata that it is possible and it makes sense to model continuum matter with approach with particles, which are somewhere between the molecular nature of the actual matter and the continuum approach. Today, however, we will extend lattice gas automata and move from the mesoscopic approach to a continuum approach. To gain numerical efficiency fluid dynamics makes it possible to understand in which way objects interact with a moving fluid. It makes it possible for example to find an answer to questions like why do airplanes fly? To find such an answer, you need to understand the detailed flow patterns of the air around the airplane, which can be a very difficult task. You may have learned at school that airplanes fly because there's a pressure difference between the lower and the upper part of the wings due to Bernoulli's Law. But Bernoulli's Law is really nothing else than an oversimplification of the actual physics. To really understand why an airplane flies, you will need to understand, to solve the equations of the air in a full 3D volume around the airplane. In most cases for interest in engineering it is not possible to find simple explicit solutions of the flow equations like Bernoulli's Law. You really need to go into the complexity of the equations and computers are very useful to find approximate numerical solutions of these complex equations. Fluid dynamics is a fascinating field because you can find fluids in virtually any field of science and engineering. You find the domains as well as physics, biology, medical physics, chemistry, geology, and many more. To illustrate the variety of fluid dynamics, we will go through a set of examples of numerical simulation of fluid flow in different domains. All these examples were assimilated with help of the Lattice Boltzmann method, with the library parables. For the first example, imagine that you enter a hot conference room and try to cool it down as fast as possible. The air conditioner consists of the fan, which is mounted on the wall right below the roof. The fan can work in two ways, either by injecting the air with a constant, rigid angle, as on the right part of the simulation which right now started, or it can sweep up and down. So, the left part shows the rigid motion, and the right part, the up and down sweeping motion. Simulation, computer simulation can give you an answer to the question, how much time does it take to cool down the conference room right away? It turns out that the up and down sweeping motion is more efficient, as it manages to cool down more parts, like the dead spot right below the air conditioner. Which the steady motion cannot reach. This seems like a trivial statement because that sweeping air conditioners are more efficient. But the take home message here is that with computer simulation, you can find out where and how to place heating and cooling systems in a building or in a room without having actually to try it out. Computer simulation and computational fluid dynamics are also extremely important in biology and medical physics because our body mainly consists of fluids. In this example, we simulated the blood flow inside an artery. The artery has a deformation, a bulge-like deformation, on the top which is called an aneurysm. It is most often caused by disease, and it has a high risk of rupture. Sometimes, however, the blood can coagulate inside the aneurysm. In this case it sterilizes the aneurysm, and decreases a lot the risk of rupture. In this simulation the red color represents the density of red clot cells. But in the actual simulation we simulate all the individual, approximately 1 billion part red blood cells, which are in this section of an artery. When the red blood cells coagulate they stick to the artery wall and the change to geometry of the simulation which we are running. This kind of complex interaction between the fluid and particles or other complex objects is typical. It's one of the major challenges we face in computational fluid analysis. One of the big difference is between a liquid and a gas is that liquids can form a so called free surface which a surface which is not conditioned by the container in which liquid is placed. We have such an example here. In this case, the setup of our problem is a water column placed on the right hand side of a container, and placed behind the membrane. At the beginning of the simulation, we remove the membrane, and the water column collapse, and it splashes against an obstacle which is placed on the bottom of the container. Doing so, it creates a complicated flow pattern. And in particular, it creates many small droplets which splash away. Simulating such a system is highly complex. Imagine the need to find a data structure when you program this problem which is able to trace the shape of the droplets which coalesce, which separate again, and you need to do this in a way that's very efficient and at that same time also, solve the complex equations of fluid motion. For our fourth and last example, I would like to show you that fluid dynamics occurs at the most unexpected locations. Here for example, we simulated a washing machine. It is a top loader, one of these models in which the central agitator is rotating back and forth to avoid ripping apart clothes which are placed inside the washing machine. The question is, do they succeed at not ripping or not damaging the tissues? To know the answer to this question, you need to simulate everything. The motion of the rotating agitator, the fluid flow dynamics of the water in the washing machine, and the physics of the tissue placed in the machine. It is a very difficult problem because the coupling between the tissue goes in two ways. The water feels the effect of the tissue and the tissue feels the effect of the water. This 2-way coupling needs to be put on top of the physics of the tissue which [INAUDIBLE] is complicated on the basics of the fluid. Fluid dynamics is an answer to finding the answers to these kind of problems. With fluid dynamics you can have insights which you do not have when you do an experiment in the lab. Here, for example, we have plotted the velocity field. On the slides which go through the washing machine. The colors represent the magnitude of the velocity, and it gives us an awesome understanding of what structures and what patterns are present inside the fluid, and in which way they interact with the tissue. I'd like to thank all people who helped to produce these movies or to run the simulations which led to these movies. Orestis Malaspinas from the University of Geneva Set up and ran the example of blood flow simulation in a human artery. Dimitrios Kontaxakis from the company FlowKit, ran the example of the washing machine and indeed the corresponding visualization. Andrea Parmigiani, from the University of Geneva, with the help of Andrea Di Blasio from the company FlowKit, set up and ran the example of a collapsing water column. This ends our module, an Overview of the Computational Fluid Dynamics. Stay tuned for the next module. [MUSIC]