[MUSIC] Hi and welcome again to the fifth week of our class, Modeling and Simulation of Natural Processes. We have gone through all the theory now of the Lattice Boltzmann method. And together they wrote the pipe and code with the NumPy library. We are ready to run an application and see how this works. Our application in the last module will the flow around an obstacle. This is the complete code, which is just patchwork of all the pieces of code we developed so far in the previous modules. It's a bit small to read and I don't want to go through this code. I just wanted to show you how short it is. With just 100 lines of code, we are able to fully develop an application, able to solve a complex freight dynamics problem. How we just focus on the very first part of this code where we defined some of the constants, because I have not talked about this part in previous modules. In the very beginning of the program, we start by defining the dimensions of this system. The code of which I'm going to show you the results is being run on a system of size 420 by 180. Which means it had a total number of 420 times 180 cells, or a total amount of loaded point variables which is 9 times 420 times 180. We also define in the same units of the lattice, the radius of the obstacle. The obstacle is going to be of a spherical shape, and have a radius which is one ninth of the height of the system. Third, we define the velocity which we are going to impose at the [INAUDIBLE] condition to be 0.04. So how does this work? What you need to do for example, you want to simulate a system for which the velocity of the inlet is one meter per second. What you are going to do is nothing. You're not going to change the inlet velocity from 0 to 04. This value was chosen by numerical criteria which have nothing to do with the physics. Remember that when we do a simulation, we round in different units than when you describe your system in physical units. Physical units are maybe meters and seconds. Our lattice units are a system in which delta x and delta t are equal to 1. All that matters, remember, because of the similarity in the Navier-Stokes equations is that both the systems, the simulation and your physical system have the same Reynolds number. So no mater what inlet velocity you have, don't touch this value 0.04. It was chosen for good reasons. It will just work with the Reynolds number, which is on the next line. The Reynolds number is the only parameter here which has a physical meaning. If the Reynolds number is low, then your system will be dominated by viscous forces. You will have a system which behaves very nicely which is very viscous. If the Reynolds number is big, convective forces are dominating. And you will have non-linear effects, turbulence or other effects. Once we know the Reynolds number and we know the size of the system in lattice units. It is for example the diameter or the radius of the sphere, we know the velocity at the inlet. We can also calculate the viscosity by using the definition of the Reynolds number. The viscosity is the velocity times the size, divided by the Reynolds number. And once we know the viscosity, we can calculate the relaxation parameter because remember, the relaxation parameter is directly related to the viscosity and lattice in this case. The relaxation parameter is the parameter which we need to implement to collision step. It will be the one which determines the viscosity of the fluid in the simulation. Now, with this set up in these parameters, you can take the Python code if they are together and run it. The Python code produces images at regular time steps, which we can put together using your favorite. Your favorite movie manipulation too, to produce an animation. I did this for you. If you use a renal thumper of 10, this is what happens with the constant velocity at inlet. The flow separates to flow around the obstacle and joins again in the wake of the obstacle, but further down. After an initial transient state, in which the system tries to cope with the initial condition, which was not so good, at constant velocity, the system converges to a steady state in which the velocities don't change any longer over time. This is nice, but not very interesting. Let's see what happens if we increase the Reynolds number. For example, with the Reynolds number of 220. Again, after initial transient state, the flow separates. But after some time, it becomes unsteady, the symmetry of the model is broken and you start having an oscillation in the wake of the obstacle. This flow pattern is called a foncarmon vortex tree. It is a very interesting pattern, which actually occurs frequently in nature. For example, a von Karman vortex treat is the reason why you sometimes hear a sound which is emitted by phone lines when there is someone. You can see that with a very simple program, we could solve the creation software dynamics and even exhibit very interesting properties. You will now have the possibility to take the code, change the geometry, change the parameter, and find new interesting properties in fluid dynamics. This ends our last modules on the application of flow around the cylinder. And as a matter of fact, my job is done now. But stay put, because we have many exercises for you. And the future now, to do some work. [MUSIC]