 Okay, so now let us begin with the first session and the our first session of the first talk will be taken by Professor Janani Sri Muralidharan. He is a professor in IIT Bombay in the mechanical engineering department. She's also our principal investigator of this project. So over to you ma'am. Thank you, Pail. Hello everyone. Good morning. Welcome. And you are, you know, taking part in this three day workshop, which I hope will be very useful and informative in that sense. Okay, so let me start off with a quick overview of because one of you had asked the question of what background is required knowledge wise and what you would be learning. So a very quick overview of what you would be learning in this workshop. Right. So yes, you will be learning open form the software itself. The other add on takeaways what are you going to use open form for is there's going to be a lot of fluid flow simulation so what you will learn is how to, you know, create a geometry how are we going to mesh the geometry. How are we going to solve flow problems in it. Then how are we going to try and solve heat transfer based problems in it. Maybe we will have one or two sessions on if you can try and code something in open form. So we will take you to the bandwidth of flow and heat transfer problems some very basic ones laminar flow turbulent flow conduction convection problems, and finally finish off with some amount of coding. So as a beginner's workshop this would take you through the general span of CFD. Before I begin, I would like to understand. So a lot of you are students, which is good. But generally, can you tell me if do you have a background in CFD or you can say is why or ends and I do you know what CFD is do you have a background in CFD. You can just type in the chat box. So there's a large mix of yes and no. And that's fine. That's okay. It doesn't work. It's not going to group of you. So does answers count. Well, you probably know the basics of clicking certain things. But what I'm saying by CFD is the background. All right, so I can see a mix, which probably is fine, because we we have factored in that and we intend to do in this first section is give you a overview of what CFD is what exactly does CFD do. Now, the question I have for you is, are you all familiar with the numerics of CFD. Okay, some of you are I can understand. Okay. So, and some of you don't this a lot of ends as well. So today we're going to talk to you a little bit about a little bit background about the numerics of CFD because that becomes very essential for understanding what open form does. Okay. All right. Now, coming back to this question of why open form so like pile told you open form is an open source software. So I go a little bit further, having dealt with this area for a couple of years now. Why do you have to learn open form, I mean, finance open source, but what is what is your takeaway. So the important thing as students you'll have to understand is either going ahead once you graduate you're either going to go in for higher studies, or you want to probably take up a job, maybe have a startup company. So in all these three options open form will play a major role and tell you why. If you're a student, and you're going to be going into probably higher studies with research intentions. A large part of universities are now moving towards open source software's because of course it's free, but also because open form allows you to do a lot of corrections or you know add equations for your advanced applications. And what it already has no does that mean you have to code everything from scratch do you have to write a code from scratch no it has inbuilt solvers in it. And you know you can have add on equations as per your needs so if I'm having a magnetic force added to a flow problem I can take a flow solver and I just have to add a magnetic equation right. So the usability for advanced applications is more. What if you're going to companies, companies have also started taking open form because they need advanced applications right so they can't do in house code writing. They can't probably you know have a lot of commercial code software licenses it's not viable. And with you know make in Bharat and all those kind of a lot of people are developing stuff here. So that means that they have to write new equations for their own applications advanced applications. So the idea here is to have be able to make these modifications and if you are a person who knows open form it's an add on package for your company. And startups of course because of the cost issues you would prefer an open source software and something that you can patent and you can use as your in house code. So across the breadth. I think open form is very very, very important. And I hope as beginners and learning in this you should definitely use these three days of workshop we have experts coming in giving you basic lectures and having some, you know some hands on experience and open form. Okay, so going ahead let me start off so I'm going to talk to you my goal would be in the next say 45 minutes to give you an overview of CFD. Okay, because I see that there are few people who do not know CFD. So let's have a quick overview bird's eye view of what CFD is and how is this kind of mapped on to your open form. So as far as CFD is concerned, okay, and open form is concerned. Let's understand what we do as far as open form is concerned so open form essentially helps you take a problem. Think of it like a flow around an airplane, right. So you will take a problem and you will have to make a geometry of it. And then you would probably create a domain or a mesh, and then you would quickly try and solve this right with some kind of you will if some of you have used commercial software as you will select a laminar flow or a turbulent flow you will set boundary conditions and so on and so forth and you will kind of, you know, say run and then it's going to run. Now that gives you some kind of a picture of fluid behavior afterwards right, but now this is not per se CFD it's the front end but this is not what the back machine does. So what we'll have to learn today is the actual back end what is happening because that becomes very important in open form because open form is a terminal blazed and you have a lot of control in these back end controls. And that's going to help you do your simulations accurately. Okay, so when you're talking about CFD and the back end, then the first thing that's going to matter to you is going to be your governing equations. So can someone just speak up and say what governing equations I probably am talking about. Anyone? Equation of motion, you know. Navier stokes. Okay, yes, Navier stokes. So what constitutes the Navier stokes? Good. Momentum, unity, momentum, continuity equation, momentum equation. Absolutely great. So we have predominantly three equations which is your, so you're going to have your mass, your momentum, which is a bunch of three equations anyway. And then you're looking at energy equation, you're solving for heat transfer. Okay, so now these are the equations you will be solving, right. But let's take a step back because these are equations you're very familiar with, but let's take say probably the momentum equation or what we call as a momentum equation. So the other terminology for this set of equations are called conservation equations, right. So why are they known as conservation equations because they talk about some basic laws, right, mass cannot be created, right, and momentum is F is equal to MA, correct. So when you're talking about these fundamental laws, which is why they're called conservation equations, they talk about some physics, the fundamental physics. Then we need to question where this law or basis what this law has come about. Okay. So if you remember F is equal to MA is something which was developed for the system. Now what do I mean by a system, an apple, right. So it was developed for a system. Okay. Now, fine. But right now I'm trying to use, you know, for maybe a dog or an apple or say a drug, one particular entire system F is equal to MA. I'm trying to apply it for this fluid medium because we're doing computational fluid dynamics, right. So then comes the question, can I how do I apply a very systemic law to say this fluid medium, that's the fundamental question that I will have. So, then what happens is you think about how can I solve these fluid mediums. Okay. So typically, there are two ways of trying to solve fluid dynamic problems. One is your Eulerian method, and the other one is your Lagrangian. Okay. Now, what do I mean by these two? So one one way of solving the fluid problem is I can seed a particle in the fluid, and I can go and travel sit on the particle and travel with the particle and notice what velocity and direction changes the particle has as moving through the fluid. Okay. So what's called the Lagrangian approach. So I think of an imaginary particle, and that's moving along the fluid and I'm tracking it. However, the fluid is made of several such particles, right. So, if the domain is small for certain specifics, you know applications Lagrangian equations are great. On the other hand, I can say, listen, I'm not going to travel with the fluid. I'm going to stand in one location. And let me have a window in front of me. And I'm just going to look at what is going to come in and move out of that particular window. Right. And that's going to tell me what largely happens in this fluid. In that sense, I'm looking at what is called the Eulerian framework. Okay. Or in other words, a control volume framework because I'm having a particular control volume. And I'm only monitoring what is happening in that control volume of this fluid. Okay, a large number of CFD problems. And what we would be doing with open form pertains to the control volume approach or the Eulerian approach. So then the next question comes in. Right. So now I've told you that the fundamental laws are systemic, right. And what we have is a control volume through which fluid moves and moves out. So it's just an empty volume through which fluid is moving. So how do I apply a systemic law to a control volume law becomes the question. I can't use a systemic law directly in its sense into a control volume. How does F is equal to MA apply to this control volume where fluid is moving in and moving out. Okay, so that's where something called the Reynolds transport theorem. Okay, Reynolds transport theorem comes into play a very powerful theorem which has actually done this conversion for you. Okay, so I hope everyone's following me at this point. Right. So now move into this. What is Reynolds transport theorem is don't worry about all this very cryptic math. It's actually very simple. Right. So say you have this space an observation space that I told you. Right. And fluid is entering and leaving the control volume. Okay. So my interest now is what is the event happening inside this control volume. What is happening in this control volume. Okay, because I'm going to consider this control volume as that system. Okay. But the system, usually in an Apple case, you don't have things moving in and moving out. Right. But in this control volume, this is the system but something is moving in and moving out. So what is happening through the system is what I want to say. So I say that in this system, there is a volume. So something that changes with the volume. So essentially, you're having a system in which the control volume, there is some change happening in the control volume, which is volumetric. So for example, you can think of say a nuclear reactor which is generating heat right within the control volume. So that means the heat inside this control volume is just going to increase because of the chemical reactions inside. So we have we say that the change in the system is equal to what is happening inside the control volume. Okay. That's the first term what is happening within the control volume. And what is the net inside and outside of this control volume inside and outside of the control volume. Okay, so you have two terms which say that if I want to quantify what is happening inside the control volume. I will say that it's the sum of the change that is happening inside the control volume, plus what is the net change across the surface. Okay. So this is what the Reynolds transport theorem says. So essentially he says the single value of system dn by dt change in the system is equal to the control volume inside change plus the surface area. Okay, fine. So now if I were to rewrite my main equations, which is your mass saying no mass can be developed on its own. So I say that the net change in the system is zero. Mass can either be created or destroyed. So I'm just saying that. But I'm also saying that that's equal to the change in the density and the inlet and outlet flux say something is becoming from water liquid to gas. Right. So the volume inside will change. And there's going to be some inside outside flux. Correct. So you're saying that that's changed in the control volume plus flux. Okay. So the traditional conservation equations that you have been familiar people who have looked at CFD and looked at those equations. It's a combination of a control volume change, plus a control surface change. Okay. So that's why you are getting this expression. And for example, this is your F is equal to MA. Right. So I'm saying that the change in the system dn by dt, right, is equal to the forces. Right. F is equal to MA. So these are my forces. Okay. And in the change, MA is what? Acceleration. So I need to take care of the acceleration that's happening in this control volume. There are two terms, which is the change in momentum, right, change in momentum within the control volume and across the surface. Okay. All right. So what have we learned to know we have learned that you have basic systemic laws, which are conservation laws. Now these need to be converted into a control volume framework, not one system, but a control volume, which is fluid. So I'm calling all the Reynolds transport theorem, which does this conversion for you. And in this conversion, what happens is this F is equal to MA, this one MA term becomes into two terms. One is to change within the control volume and change across the surface. Okay. So that is where you've got your traditional Navier-Stokes equation because they've been converted into a control volume framework. So now we've come to the control volume framework. We've gotten this standard form of Navier-Stokes equation, which all of you probably are familiar with any fluid dynamics person would know this. Okay. Now, from CFD perspective, from open form perspective, we're going to have a look at a slightly different thing. Okay. So we're going to look at two things. One is the numerical aspect of what I'm showing you these two equations. And the other is the mathematical aspect. Okay. Now, this might sound similar, mathematical and numerical, but there is definitely a difference. Okay. Now, when I talk about mathematical, what I mean by is you can see, say, a ball, a cricket ball that's just moving across in terms of fluid, you can have a fan or a blower and you see air moving past. Right. So you can say that, oh, listen, I'm going to solve that flow field of air movement using the momentum equation. Okay. And it has all these terms that's there in it. There are four terms that you see. But what is important, what I mean by mathematical is there is some kind of physics or physical phenomenon that's happening. The distinction you'll see in the next slide. So if I have a flow through a pipe, right, now if I'm having a flow through the pipe, what drives the flow? Anyone? The pressure difference. The pressure drop. The pressure drop. The pressure difference. Absolutely. It's not just a pressure, but the pressure drop, right. So I do see a term here, which is looking at the pressure gradient, essentially. Okay, so there are terms, each of these terms have a specific meaning and a specific role to add to this effect. So now if I have a pipe that's horizontal versus a pipe that's vertical, I would have an additional gravitational force that's going to be acting on this. Okay. So the top part of the fluid and the bottom part will have different behaviors. Now that is going to be important with the gravitational force term. So each one of these terms are capturing something physical that's happening in your fluid in a mathematical framework. That's where I mean by mathematical framework. Okay. Now, the second part is something called the numerical framework. Now, what I mean by the numerical framework and this has more importance in CFD. I have this kind of equation that's already in place, right, these two equations that are there. Okay, the first equation we'll come back to it later, but these two equations that's there. Now, if you look at the equations, most of them also have four terms. Okay, now I will add a q double prime, which is a generation term so that there's a source term. Okay, now when you look at this, let me try and circle the common terms, right. So apparently there's a divergence kind of a term here. So you have similar constructs, correct, except this is a V term, this is a T term, correct. You probably have a similar construct here, right, and you seem to have a temporal term in both cases. Okay, and maybe some source term or a generation term. So largely this momentum and energy equation seem to have several constructs which are very similar. But I'm talking about in one case a momentum and the other case energy, right, or flow and heat transfer, correct. So they seem to be largely different quantities, but they seem to have similar equations, correct. So then we think about what is common. So what is common, essentially it is transport of some quantity in fluid flow, what is the transport that you're talking about momentum, so there's momentum transport. Okay, and in heat transfer there's temperature or enthalpy transport that's happening, right. So one can quantify those two equations into a single equation, which is called your transport equation. And if you note here, I have replaced either T or, you know, the momentum in terms of fee, a common variable in terms of fee. Okay, so essentially what we're trying to see here in CFD, or in open form is, can I write equations in a common construct, because when you're coding, you don't want to have a full momentum equation, and then pull an energy equation. If I have a transport equation, per se, and I say if P is equal to momentum or if P is equal to temperature, then these are the things that you will have to substitute and do, right. So then I have a common construct called transport equation. So this is the numerical aspect. So you have certain operators which are available for you, which you, which are common and you exploit that. Okay, so categorizing these into common mathematical operators are called numerical aspects of CFD. Mathematical aspects are the physics behind it. So what did I say, there could be a gravity happening, and there could be a pressure drop. Now you see, there are two terms here, right. Okay, now these two, and this we know is a time change. So I have a control volume and there's something changing within this with time, right. So with time, there is something changing within the system, volumetric, and there's a source term say something burning inside grid. Now what are these two terms, that is very key, because those are the transport terms. Okay, now what are the transportations phenomenon we know of anyone. Okay, so one is advection and the other diffusion, right, correct. So let's understand what is advection and diffusion, right. So if I have a very hot body of liquid within a chamber, right, do you think it's going to be stationary, every molecule is going to be vibrating because of the heat energy. Okay, so that is called, so when it's vibrating, every surrounding particle is also going to vibrate and it's going to get that information. So that is called diffusion. Okay, meaning in all directions that energy diffuses from the central point. Now convection means that, say if I have a fan, it's blowing a bulk fluid in a particular direction, there's one significant directional movement. So that's called advection. So I can have a fan blowing and there's just one advective movement, right. Or now in that same advective movement, if I have hot fan, hot air blowing fan coming in, then the surrounding regions I'll find it a little hotter, right. Why does that happen? In addition to this advection, there is also this heat energy transfer, which is a diffusive movement that's happening. So every phenomenon will have two types of transport happening. One is your advection and your diffusion, okay. So typically, this is diffusion, okay, and this is your advective now. So what are you trying to tell everyone? Hey listen, I have this equation and it has four terms. So I have a system. This system change, transport in this system happens by some change within the control volume, some source term like gravity force on this, okay. The fluid is going to be affected by that as well as what is the flow behavior, which is advective and this flow behavior can be, you know, combination of bulk movement plus vibratory movement. That's all those four terms mean, okay. And this is what is central to your CFD equations that you will be solving, okay. So now, once you understood these basic conservation equations, mass, momentum and energy, momentum and energy have a common transport equation formulation. We have learned that. Now how do I apply this in CFD, right. How am I going to go and solve this part, okay. So now let's come to what is called the finite volume method, which is largely what is used. There is finite element method and so on and so forth. We will not go into that, but there's finite volume method, which is what open form is based on. Okay. So now, this is the numerical specifics that I'm talking about, right. So say you have a domain which is a square that you see on this. It's a room, say it's a room, right. And what you're trying to do is divide, you want to try and understand the flow in this room, okay. So imagine there's a fan right in the middle. The flow inside the room is not going to be uniform, correct. Under the fan, it's going to be something different near the door and the window, it's going to be something different. So you have different behaviors. Now I can't look at this room then in one whole box. I probably have to divide under the fan into one zone and look at it near the window separately so that I get more accurate information of the flow. So now dividing this domain into smaller boxes so that I can study it more accurately is a process which is very key to CFD and this process is called meshing, okay. Meshing or grid generation dividing the domain into different boxes. Now what I will do in each of these boxes, I will solve all those equations that we just talked about in each of these boxes so that I know the velocity, the pressure and each of these boxes, okay. Alright, so now I have meshed the domain and what did I say I'm going to use the governing equations in each of these boxes, okay. Now these governing equations are, I told you already for a control volume, correct. But there's a catch there, it's written for an infinitesimal control volume, okay. It's partial differential equation, it's written for an infinitesimal control volume. Now my control volume is going to be bigger and larger, right. So what I will do is I will end up this equations which you have, I will end up integrating it, okay, for this control volume, for every specific control volume, I will integrate it, okay. Now when I integrate it then I will have some expression, correct. But mind you this is computational flow dynamics meaning I am solving it in a computer. So if I am going to solve it in a computer, what do I need? I need it to be an algebraic equation, correct. So I have an algebraic equation that needs to be formed, okay. So this governing equation to a, that is a PDE when I am integrating, it will form an equation and then I make specific choices in that equation to make it algebraic. So there's important choices that you make, okay. Now we will see some examples now very quickly. So you will be making some specific choices for making this algebraic with the goal that the computer should solve this for you, okay. So what is the finite volume method? Why is it called finite volume? I have a control volume, I have a governing equation which is infinite control volume, but I am going to integrate it into a finite control volume, right. So that's called the finite volume method. A domain divided into finite volumes, okay. You have finite volumes and you are solving equations within that which is called the finite volume method. Okay, so let's take an example, okay. So we should take a very simple 1D steady state equation, okay. Steady state conduction. So when you have 1D steady state conduction, say this is a rod, okay. And I'm just going to divide that into, what is the first step? Next shape, right. So I'm taking a rod and I'm dividing it into three boxes. So that's going to be three control volumes, okay. And what was the second thing? You have to write the partial differential equation. So does anyone know the steady state conduction 1D? Okay, let me write it. Yeah, let's go ahead. Yes. So I presume a source term as well at this point, okay. So what we are saying here is that your thermal conductivity gradient, a derivative of that plus s, the source term is equal to zero, okay. So now what do I have to do? I'll have to start integrating this, okay. Integrating this how? Integrating this across this control volumes, okay. So let's look at it a little bit more in detail, okay. So you have the heat conduction equation like I've just mentioned, right. So you have d by dx k dt by dx. So can someone just tell me whether this is the advection or the diffusion term? Anyone? Advection. Let's go back and check what did I write. Okay, so now can everyone tell me? Diffusion. Diffusion, absolutely. So what are we saying conduction heat transfer, conduction heat transfer is a diffusion equation. Did you see that? Right, so what does it mean by heat transfer? What is conduction if I heat one end of the bar, the other hand also slowly sees the heat, right. So how do we say that the molecules within the solid vibrate and then they transfer the heat. So vibration, that means diffusion, right. So diffusion is what we've been seeing and that's your conduction, pure conduction equation. There's no flow happening. So it is diffusion, great. So now I'm going to have to integrate this, right, in a control volume, okay. So now I've divided the rod into three control volumes, okay. So say the central control volume is of my interest, right. So that means that I have to, this control volumes span is from here to here, from between the two yellow lines, right. So that means, let me call this P means the present cell and some cell to my east is E cell, some tell to my left, also the west cell. So this is the east of me and this is the west of my present cell, okay. Now the walls, let me call it small E and small W, okay. So essentially the control volume P which is I'm interested in is I'm going to integrate this equation, integrating the equations from W to E, right, from west to east. Is that fine? Okay, because I'm trying to understand what is happening within that control volume, okay. So when I integrate that, okay, now what I will make a first choice is how do I divide it? See, I can have a rod, right, and I can divide it into 10 parts or I can divide it into three parts. What is the choice I'm making? The size of the cell is something I'm making a choice about, number one, right. So when I integrate it, then the dx is actually x, delta x, that size of the cell. So essentially I integrate it and you will get this. Is everyone okay with this? I've integrated this part and I'll just get k dt by dx, okay, and s delta x. So I've integrated this. Now is this an algebraic equation? Not yet, right. Because I have a gradient term still. So I have to make a choice about this gradient. So let's look at what happens to this gradient term, okay. So when I have this gradient term that is here, right, I need to decide where this gradient term is. So let's look at that equation. I've just rewritten that equation you see here, right. So it says k dt by dx at small e, okay. So that means it says small e is here and small w is here, correct. So at this corner or this face of this control volume, I need to calculate this gradient. So dt by dx, I need to find out in this wall or face, that's what it's called, face of the control volume. Okay. So now then I have to decide what the gradient is taken. Let's say that this cell is about 100 degrees and this is about 50 degrees, okay. Now I can make a choice again. I can say that, hey listen, my cell is going to be fully 100 degrees, okay. And this cell is going to be fully 50 degrees. Then what happens at the wall? There is a discontinuity, correct. So that's not correct. So what we typically do is the center of the cell is what we assign a particular temperature, okay. So this is 100 and this is 50, the center. Now I'm going to say that the variation is continuous. It cannot be discontinuous. So what I say is let me presume a linear variation, okay. So if I make an assumption that it's a linear variation, then I calculate the gradient, right. dt by dx, okay. So then I say delta t by delta x, okay. So this x that you see here is nothing but the distance between the two centers, delta xe, okay. So we say that tp which is temperature of the center of this cell, minus te which is this here. So te minus tp by the distance is what we are saying. So now I've got an algebraic form here. The same thing I do it for this other term, okay. So can I substitute? So what I do is I substitute this and this back into this equation, okay. So now if I substitute that and then what I'm going to do? I'm going to club all common terms, all tp terms together or te terms together or tw terms together, which is what you will see here. I've clubbed all the common terms, all the tp terms together, all the te, tw terms. Why I'm solving for temperature. So I'm only interested in the different temperatures, right. And then what I'm going to do is all these are coefficients. So I'm just going to call it tpka coefficient. I'll call it ap, te coefficient. I'll call it aw and b means source term. That's all. Now I have an equation, right. I have an algebraic equation. There's no problem. If I know my thermal conductivity and the cell size, I can solve this equation, okay. Great. Now we were looking at conduction, which is a diffusion, right. Now we have actually in transport equation, we saw four terms of which two were the transport terms, which was diffusion. And then there was an advection term, correct. So this part, which is the diffusion part, we already I showed you how we did this, right. Now the advection part is similar, okay. Now I won't spend a lot of time, but we make a similar choice about advection to get an algebraic equation, okay. So I will skip that for this moment, okay. Now just assume that we will use a scheme similar to this linear approximation. We will use a central different scheme, okay. And what we will say is, this advection term Fe is equally informed by Fe P plus Fe by 2. So I am saying here, my flux term Fe is a half of these two, okay. We will not go into too many details. The essence that you have to understand is this equation, this partial differential equation I am converting into an algebraic equation. So every term I have to make some approximation and you will get an algebraic equation, which will take this far, okay. All right. So now once I have created that algebraic equation, I need to go further and solve it, okay. Now before we solve it, a quick recap, what would we learn? We said that equations from system, it goes to a control volume form. So the form that you know of is a control volume form. Then we looked at the stages in FVN. What is that? We mesh it to make it into common smaller control volumes, the domain. Then we write the governing equation, right. And then we will integrate the governing equation, fine. Once we have integrated, you will have a gradient term. So you make specific choices like a linear variation or an average and convert it into algebraic form, right. What was the algebraic form that you had? A P T P is equal to A E T E plus A W T W plus B, okay. So how did I get this expression? I took say this cell here. I said this is my P cell, right. This is my P cell. To my P cell, I have a neighbor, east neighbor and a west neighbor. So if I want equations for this particular cell, I need information from my neighbors. Why? Because they are interacting with me. Flow is going to happen from one to the other, right. So for every cell, you will have one equation, correct. So that means for my nine cells, I am going to have nine such equations, correct. If I am solving momentum, right. So then I have a system of algebraic equation, nine such equations on how many of our boxes you have and I have this entire set of equations that I will have to solve, okay. So how do I solve a system of equations? So I have a bunch of equations, okay. And I have nine such equations, okay. Now I remember we said APTP is equal to AETE plus sumon. So I can write this in a matrix form because computers can solve matrices. So I am going to write all the coefficients as A, okay. The unknown, I have to find the temperature, right. The unknown as T is equal to any source term that you might have goes on the right-hand side. So this is in what form? AX is equal to D form, correct. So I club all the coefficients, what all coefficients? All the nine equation coefficients in this form. The unknown here and the source term, okay. Now this is for one equation. I will have how many, so how many unknowns are there? Let's take your momentum equation. So you, what are the unknowns for your Navier-Stokes? Anyone? The answer is there on the board. And velocity, UVW components and also... W, then? And density, temperature? Pressure. Density is quickly known for incompressible flows, okay. So you're talking about UVW and P, right. And temperature if you're solving for the energy equation, that's good. So now I would have a system of equations. So this set that you see here is for say U equation. So I would have three such sets at least, UV and P, if temperature one more, right. And this is an entire set system of equations which you will have to solve, okay. Now you can solve it in one go, okay. But typically it's more stabler to solve one at a time and help feed into the other, okay. Now that is called the segregated approach. Meaning you solve one, then use that to solve the other and then come back, okay. All right, one question I have. So now you have a equation which is your continuity equation, which is your mass conservation equation. And you have the momentum equation, okay. So that means you have a U, this is basically a U equation, right. Momental is also a U equation, right. It just happens to have a pressure term, okay. So what you notice here is there is no explicit equation for pressure, correct. So then how am I going to solve and get pressure solution? I don't know. And it's very important because pressure also drives the flow, right. So here it appears that both these equations are largely U equations. And how am I going to find the pressure is a challenge, okay. So now where have we moved on? We've said algebraic equation I've done. There's a bunch of algebraic equations I have to solve. But you know there is one pressure term there which I don't have an equation for specifically. How will I solve this part? I don't know, right. So now we are looking at solving these equations in a segregated manner one after the other. So let's look at how to do that, okay. So there's a method called simple which is semi implicit method for pressure linked equations, okay. How do we do this? So what I'm going to do first, let me take this equation first, the momentum equation, okay. I will say that let me assume the pressure, okay. I might have an estimate or I might have a previous time step. I'm solving for 10 seconds, I will know what is happening in the 7th second for the 8th second information. So let me assume some value of p, okay. Now if I assume a value of pressure, okay. Then what happens? I can solve this equation, okay. And I will get a velocity, okay. Now unfortunately this velocity because I've assumed the pressure. This velocity is not the perfect velocity, okay. It's going to be some intermediate velocity. Now I have to check, okay. How will I check it? I'm using the mass conservation, okay. So what am I saying here? Okay, I know some velocities, okay. So that means I can calculate continuity, mass flux, right. What is mass flux? Rho u, correct. So if I were to calculate the mass flux in all the four sides of the control volume and look at the continuity value and check whether it is equal to zero. So I will get an intermediate velocity. Using that I will calculate all the mass fluxes using this assumed value u I'm getting. And I'll say listen, is this equal to zero? Most likely it will not because it's based on assumed pressure, okay. So then what will I have to do? I'll have to now change or change this value or tweak this value so that this continuity is balanced back and forth. So I'll do a second iteration. I will tweak the pressure a little bit. I will get the u star then I will check whether all the mass fluxes are balanced and so on and so forth. So that is how, so in a segregated manner I first solve this and I come to this, okay. So this equation is called the pressure correction equation because this is the controlling equation basis which you will correct the pressure. This is a very basic overview. There are different technicalities in this. I'm not going into that. But this is how you will go back and forth and correct your equations and solve it. So what have we seen in this entire spread? We've seen that system equations or system laws are written into control volume. How? Reynolds transport theorem, okay. Then once you've written those conservation equations, you will have to divide the domain into smaller boxes. Once you've divided the domain, that equation you will integrate for that domain. Make some choices like linear variation or averaging and make it into an algebraic equation. Once this algebraic equation is written, there will be several such algebraic equations because of the number of control volumes. Then you will make it into a matrix. Then this matrix you will solve in this particular order. Momentum first and then you will check it with continuity and goes in circles. So once this is done, you get a u, v and p. You will come to the energy equation and just substitute the new values and then you will get the temperature values. So this is what is happening in CFD in the background. So any domain, so you take an aeroplane, right? You would first mesh around it. So you want to see the flow around it. You will mesh the domain and you will select equations and you will say this is my velocity here in this boundary here there. Then what it will do in the background is convert it into algebraic equations. And you will choose the choices, second order and first order up in this numerical scene. You will select that and it will form the equation and keep the matrix ready and you will say run and it will solve and show you this in every box what is the u and p. So this is this entire spread of CFD from start to finish which is what your open form does in the background. Okay. Any questions? You are explaining about the transfer as a diffusion transfer at the area between the cells. On what basis we are assuming the transfer is linear now? That is from the center cell to the right cell that is E cell or the W cell. Right. So basis why we are assuming it to be linear. So we typically do what is called the Taylor series. Do you know that? So there is something called the Taylor series and the Taylor series if you do the first order approximation or the second order approximation in different orders will have different variations. Okay. So the key thing here is if you are solving for temperature typically it takes a linear profile for conduction the gradient. So then you will say let me do a specific order approximation basis the Taylor series which is why you will get a linear series. So those are all technicalities I am not getting into if you are solving some other equation with different physics then you will have to do a different order approximation. So it depends upon the order. It is depending upon your Taylor series approximation and that is a choice that you will have to make again. Okay. Mom, could you explain advection once? Okay. So what in advection did you have problem understanding? Like I didn't get the general idea of what it is to be like diffusion I understood but advection. Okay. So let me do another one. Okay. Say you have particles and there is going to be some kind of flow that's happening as a bulk. So what happens here is that the flow will move as a bulk forward. Okay. Now a good way to think about this is imagine you have a pipe. Okay. And you have say two fluids that's flowing into this pipe. Right. And this is about 500 degree Celsius. Okay. And let me pick another fluid which is going to be at two degrees. Right. So if what would you expect? So this is this arbitrary line that I have. Right. What do you expect the temperature profile to be? So I can have say let me talk about the temperature profile being 100, 500 degrees here and it's just flowing. Right. So two degrees here. So let me say at time t is equal to zero. There is no fluid in this. But then after that I start the pump and then it's pumping these two fluids in here. Right. So slowly in these parts of the zones, you will say 50, 500 degrees and two degrees. Am I correct? So that's effective movement that bulk fluid just moves carrying that energy. Okay. But in ideal conditions, what will you see? Actually you won't see a 502 degree discontinuity here. What will you see? You will see a 500 somewhere here that will drop down to 200. And then this will be somewhere at 50 degrees. Right. So why does that happen? Because here in this part there's going to be diffusion that's happening. Vibratory motion, exchanging information in all directions. So advection is just if it's pure advection and say in this world there was no conduction based or diffusion based transfer, then there will not be any arbitrary movement. There will only be this bulk differentiation that's happening, bulk movement of energy that's happening. Is that here? Yes. Thanks. Yeah. Hello, ma'am. Yeah. Could you explain once ma'am how the conversion into algebraic form that matrix formation takes place ma'am from governing equation? So that is a little bit more complicated. So what you will do here is essentially I will run through. So if I have this control volume like this, right? So how will I access this control volume? I'll do an I and a J. Okay. So I is equal to 1, 2, 3, 4 and J is equal to 1, 2, 3, 4. So I'll start looping. Okay. So I'll say A of 1 comma 1. Okay. And then so if this cell is here, so if this is my interested cell, my neighbor is say, what is I call that? A of 1 comma 2. Right. So A west is 1 comma 2. A east is going to be say 3 comma 2. Right. That's here. So if I'm going to populate in this entire matrix, then I'll know that if I'm interested in this particular cell, then the particular AW, this is AW and EE for that particular AP. So I will populate. Is that quick and easy? Does that make sense? Yes ma'am. This is for complete mesh. So this is for the complete mesh. So I'll start looping in from starting from A11. So I'll go to A11 and I'll say is there any AW? There will be a particular AW. There'll be a particular AE. So I'll start populating that here. Then I'll go to this cell for this particular cell. What is the A1 and A2? Then I'll come to the next cell and say I'll populate it here. So you will get a matrix which is like this. This will be the center value. This will be the surrounding values like this. Something like that. Okay ma'am. Thank you. And ma'am, on the right hand side, there will be the matrix for the unknown. Correct. So you will have this coefficient. This is the unknown and you will have the solution B source term. We calculate the velocity. So we will calculate the velocity and then we will compare it with the continuity. Continuity is the checking. Checking. Thank you. Ma'am, does open form give us a sense of the error introduced by this discrete discretization error? Because we are assuming that the value is constant over the entire grid cell. So from the continuous case, the discrete case will have some sort of error or something. So typically, definitely the discrete case will have error. Now the point is there are two types of errors. One is your numerical error and one is actually this approximation that you choose. Okay. By numerical error, what I mean is in your Taylor series, it's an infinite series. So if I say dt by dx is equal to five terms. So term 1 plus 2 plus, there are three terms. And you will truncate after the first term say. Okay. So then what happens is you have truncated this. So this is going to give a numerical error. Okay. Your conservation of mass or momentum or energy will not get fully solved because you've ruled out these numbers. So that's called a numerical error. The other one is called actually the physical error wherein you make the choice of, say for example, my flow is happening in this direction. Right. Now that means I this cell here, typically if it's advection, it will get complete information from the previous set. Okay. Now I don't do that. I make an approximation that listen, this cell gets information equally from both my side cells. It's a minor error in itself. A minor error. So that means you will have some physical deviations. So the only way you will estimate it is to check something called the residuals. You will have a lecture and I think the second or the third day how to estimate errors. Okay. So one is residuals. The other is you take a parameter of interest. Now how will I check whether say this simulation is correct, pure advection. I will look at this area and I look at the temperature in that area. Is it anything other than 502? Then I know I'm wrong. Right. And the third, so that's very analytical based checking of the physics. The third thing is you take a validation experiment and then you simulate and you compare your errors. That's actually the physics that you're checking. So there are three levels of checking that you would do. Okay. Got it. Thank you. Yes. I mean, my concern was that I guess, so if you check residuals that'll give you some sense of, so my concern was, you know how to interpret the simulation whether we can say that there is any sanity in the simulation. Like some threshold, I mean, you know, if the error is less than this, etc. Then the simulation gives you some representation of reality versus is there a case where it can break down completely? It can absolutely break down. So there are three levels and even in residuals is a rudimentary thing. There are other norms, error norms that you can calculate, but that's too nuanced here. So I don't want to go into that. First, the analytical check and a physics checking validation. Okay. Thank you. Yeah. Ma'am, is there any basis for assuming the initial pressure? Absolutely. So if you're doing something which is approximately atmospheric pressure, you will take something. If you're doing in a pressurized fluidized bed or you know, reactors, you will take that pressure as a standard. So it's typically informed by the application that you're working on. Okay. Then also like at first we assume the pressure, then we check it with the continuity equation. And then we go to the next iteration. Like how do we assume? Like is it an assume pressure again or like is that? So let me quickly explain that. So let me presume a very rudimentary example. Say I have assumed a particular pressure. And that has given me an influx, say based on continuity, I say mass flux of four and four is getting out and two and two is getting in. So this is after the first iteration. Right. So now what it tells me is that I am chucking out more than I'm pulling in, which is not possible. So then what do I do? I actually, I'm hoping you're seeing my screen. Right. So what you see here is there is more going out than coming in. So what do I have to do? I actually have to have slightly more coming in. Correct. So if I have to have slightly more coming in or in other ways, I have to have slightly more going out. Right. So then I will correct the pressure. I will either increase. So once you increase the pressure, what happens? Things will stop coming in. But if you want more to come in, I will drop the pressure. Correct. So if I've assumed the pressure of say two bar, I will drop the pressure by say 0.5. So 1.5. I will say, let me take it as 1.5 bar. Right. So that means more is going to come in. Okay. So in the next iteration basis, this logic, I will decide if I have to drop my pressure or increase my pressure for the next iteration so that I can pull in more. Does that make sense? Yes, ma'am. So we manually give this. No. We can't manually give it to each and every iteration. No. So what we have is something called the pressure correction equation. You would have written in terms of pressure correction and it will correct itself. That's a little bit advanced. I don't want to go in here at this point. Okay, ma'am. Thank you. But the concept is this. Essentially this is what it does. Okay, ma'am. Okay. I think we are a pile. Do you want to take over?