 So, the next session will be by Mr. Binayak Lohani and on the topic will be scalar transport form, but he is there but we will be playing a video that he has recorded because he was not sure about his presence during this time of the workshop. So, Abhushan, could you please play it and I hope Binayak is there. So, if you have any questions he can answer. Hello everyone. First of all, I'd like to thank the FOSSI team for organizing this workshop on open form and inviting me to conduct this session on scalar transport form. I'm Binayak Lohani. I'm currently pursuing aerospace engineering at Pulso campus in Nepal. I'm also a technical contributor at FOSSI. Talking about my past experience with FOSSI, it's been really wonderful. I did my previous internship at FOSSI where I used the open form to conduct CFT analysis. So, my work also got accepted and I presented my work at fluid mechanics and fluid power conference. So, I'm very grateful to the FOSSI team. Since then I have been using open form to conduct several CFT analysis and two of my case studies have been published in the CFT FOSSI website as well. So, you can check out my work there too. So, let's quickly move towards today's session on scalar transport form. So, this is the outline of today's talk. First of all, we'll see how a scalar transport form transport equation looks like. Then we'll see a scalar transport form solver in open form. Then we'll talk about the limitations of this solver and see how we can modify this solver to incorporate the limitations that we have here. And also see one example for this. So, this is the scalar transport equation. It's also known as the convective diffusive equation. Here, key is the scalar term. The first term is the unsteady term. The second term is the convective term. Ui is the velocity field. The third term is the diffusive term. Df is the diffusivity constant. So, the diffusivity constant, d is the molecular diffusivity. And the ratio of newt and sct is the turbulent diffusivity. So, newt is the turbulent viscosity and sct is the skimit number. So, the skimit number is a constant. We have to pick a particular value to solve for this case. The last term is the source term. And combining all these four terms gives the scalar transport equation. So, the scalar transport form is a basic solver that dissolves the convection diffusion scalar transport equation using a user-specified stationary velocity field. So, user-specified stationary velocity field is needed because in the previous equation we saw the velocity field. We do not solve for the velocity field here, but it needs to be specified and it's stationary throughout the simulation. We'll further talk about this point later also. So, remember this point. The second point is it's transient and incompressible solver. The scalar term is passive. So, the passive scalar means that it does not influence the fluid properties, for example, the viscosity or the density of the fluid. Next, we talk about, we'll see how the scalar transport form is coded in the open form. This is a simple C++ syntax. So, the below one is the actual equation and it's coded in this fashion. So, the unsteady term is DDTK and the convective term is the divergence of phi k, where phi is the flux. So, the third term is the Laplacian DDTK. So, this negative sign is because this term comes to the left-hand side. And the last term is the epimodos.source k. This is the source term. So, we'll see how the case is set up in open form for this solver. We only have one case, pitch-tally case in the tutorials and the folder is present in this directory inside the form tutorials, basic scalar transport form, pitch-tally. So, as we have already known that open form files folder contains three soft folders, zero constant and system. Inside the zero folder, we have to define the initial and boundary conditions. So, here in this case, we have t and u. So, here t is used instead of k. In the previous equation, we have seen k as the scalar, but here t is used as the scalar. It's just an indication, particularly here t is the temperature. So, temperature is also a passive scalar term and u is the velocity field. So, we define the initial and boundary conditions in this case. Inside the constant folder, we have the transport properties file. So, in the transport properties file, we have to define the constant parameters. So, in this case, the only constant parameter is the diffusivity constant. So, since temperature is used here, the diffusivity constant can be referred to as the thermal diffusivity term. So, we define that here. And inside the system folder, we have three files, control date, FB schemes and FB solution. So, all these files are used to define the time control and the discretization schemes, algorithms that I used to solve for the scalar transport equations are defined in these files. We'll see this one by one later. So, this is how the case looks like. It's a 2D case. And this sort of geometry is also known as the backward-facing step. So, this is the inlet, this part only. And this is the step. Okay, these all are the walls. Let me start the walls. And this is the outlet. So, what happens is the flow from the inlet will recirculate in this behind this step and flows towards the outlet. So, that's why it's called the backward-facing step also. It's a 2D case. So, we have to pre-define the velocity field here. Now, it remains constant throughout the simulation. It does not change. The only thing that changes is the scalar term T. That is evolved from inlet to outlet. But velocity field remains constant. It's already defined in the zero-folder. Okay, we'll see this. Next, the passive scalar T field. In the initial time step at zero second, T. It's defined as one at the inlet only. Okay, this is initial condition. So, it's one in the inlet only. And at all other places, it's zero. Okay, you can see here from the color bar also. And this is the last time step. The right-hand side is the last time step. So, we can see here at last time step how the scalar term T evolves or gets transported towards the outlet. Okay, in this fashion, it's transported. Later on, we'll see the animation. Now, we will do one hands-on session to run these cases. It's a simple case now. So, I request all of you to please open your terminal. It can be... You might be using Open2 or WSL. It doesn't matter. For now, I'm using WSL. Okay, so we have to copy the folders, this folder. As I have already shown where the folder is present. So, we have to copy this folder in the present directory. To do this, please follow my command. It's pretty simple case. So, please type CP minus R after here. Then, please type this. The code is case sensitive. So, please take care of the upper and lower case, alphabets. So, form tutorials slash basic. Then after that, scalar transport T capital transport and form F capital. Then, it's deli. So, after writing this command, then we have press and press press. Then press full stop. So, full stop meaning that we have copied the folder from this location to the present location. Present location is indicated by this dot. Okay. So, after typing this command, please type this command. All of you. And then we can type enter. So, after this, we can list the present directory. And you can see this deli is present here. Okay. So, all of you, please write this command and press enter. So, now we can move into this deli case. This deli case. So, now, if we list it, we can see the zero constant and system folder present here. The all run file, all run file is used when we have to run all the commands all at once. So, we'll see this later. First of all, let's see the zero for folder. So, inside the zero folder, we see the T and U files. So, one by one, let's see how the boundary conditions are defined here. So, I use our notepad as a text editor. You might use any text editor of your choice. So, to use the notepad, please type notepad.exe then type T to see the files of T. So, the boundary conditions for the scalar term T is given here in the boundary field. As I already showed you that in the T is defined as one at the inlet and at all other places, outlet, upper wall and lower wall, it's zero gradient. So, if considering T as temperature, the zero gradient means that it's the idea of a condition. Okay, and for the front and back, it's empty because it's a 2D case. So, now let's see the velocity field. Okay, now velocity field. As I already told you that velocity, we don't solve for velocity, but we have to pre-define the initial conditions for all the cells in the domain. Okay, so these internal field are all the internal cells. Now, so we have to define it as a vector in x, y and z directions since velocity is a vector. And we have a long list here for individual cells of the this daily case. And at last we have the boundary conditions as well. So, at the boundary conditions inlet is 10 meters per second in the x direction, outlet is zero gradient and at wall it is no slip condition. Okay, so here we have to define that in boundaries also and also at the internal cells. Okay, so after this let's move on to the constant folder. So, to move backwards of this case since we are in the zero folder now, we have to move one step backwards. So, we have to click CD double dot press enter and then we'll move backwards. And list we have let's move into the constant folder CD constant. So, inside the constant folder we list it as transport properties is only present here. To see the transport properties file, we'll use notepad. notepad.exe then transport properties. So, if we see the contents here, we only have dt this is the diffusivity term. So, since t is the temperature here it's thermal diffusivity and the value is 0.01. Okay, so this square in the square bracket we have the dimensions so and this is the thermal diffusivity value. So, after this, let's say the system folder system folder we can see type this command then we move to the system folder directory. Now, we can see that control dict fb schemes and fb solution. Inside the control dict file let's move to the control dict control dict now we can see the time control is present here. In the application, we have the name of the solver we are using that is scalar transport form and rest are the time control. For example, the start time is 0 second and stop time this end time is 0.1 second so this is the end time and delta t is this. So, rest are the functions for example write for math. We can write it as ASCII or binary and rest are the functions that are required to run the case. After this, let's see fb schemes file. So, inside the fb schemes, we have defined the digitization schemes for various terms. For example the unsteady term for the unsteady term ttt schemes is used as boiler. So, as we know, boiler is a first order accurate term. So, we can increase the order of accuracy to maybe second one maybe backward or crank Nicholson. So, we have we can use that also. So, we have to take care of the stability also if we want to increase the order of accuracy. So, and gradient schemes is Gauss linear, divergence schemes is for phi t is Gauss linear or point grad t. So, we can increase input also but we have to take care take this value carefully. It also depends on case by case basis. Now, next we see the fb solution file. Inside the fb solution file, we have to define the solvers that I used so, iteratively solve the t or the passive scalar term. So, the solver name is pbisc step, preconditioner is used and the tolerance is given and the relative tolerance is also 0. So, these are the input that are necessary to run the cases and simple algorithm is used to solve the transport equation. So, these are all the files present here. In the system folder, we should have extra file also to run the mess. So, we don't have it here but if we look at the all run file if we look at the all run file you can see here these are the commands that will be run if we run directly with the all run file we need to find the block mess file also. The block mess ticked file is present in some other directory of home tutorials resources block mess pbisc daily. So, in this case, we can run this whole command all at once so that block mess ticked file will be copied will be run in this current directory ok. So, if I run this file run this command then block mess ticked file will be run since it's present in some other location ok it's not present here it doesn't matter much we can copy here also so, if we press now enter we will run the block mess file ok now mess is already generated for here. Now, next command we only have two commands the next command is the name of the solver. So, the name of the solver is scalar transport form so, if we click this press enter we will run this case. So, here we can see we are only solving for t we are not solving for u we are not solving for p velocity or pressure. So, we are only solving for t velocity remains constant. So, the n time step is 0.1 second so, it's completed now so, n time we are only solving for t. To see the results as we have already seen some of the results in the slides also. We can see the results in the platform. I will show you the animation now it's done ok. In the platform I think we don't need to run this. I will just show you quickly. So, this is the pitts daily case and if you want to see the first of all the velocity u field. So, ok velocity u field it remains constant throughout this is time 0 second. But if I run this animate button it doesn't change ok. It remains constant throughout as we are not solving for velocity I already told you that but if let's move to the 0 second also now now if we see for this t file it's 1 at the inlet and 0 at all the places in 0 time ok 0 second. Now if I click on play you can see the animation ok how it is transported so you can see how this t is transported in the domain so it's ready now but we need to scale it to see completely if we scale it this is the final time step at 0.1 second now we can see at how this scalar field is transported in time in this domain. So, this is a simple example you can run this on your own and see how the result changes. Now we'll see the limitations of this over in the slides see top of the limitations the an option to solve for the flow coupled with the scalar transport is not available. So we cannot solve for the flow that is the velocity and pressure you only solve for the scalar transport that is t in the previous example ok so that's one limitation now the diffusion coffee center is assumed to be a constant scalar so it's a constant scalar here we cannot change this so there are two limitations the first one is Navier-Stokes equations cannot be solved along with scalar transport equation and second is diffusion coefficient is constant so to overcome the limitations of scalar transport form the transport equation can be coded inside other solvers like simple form that is steady state and pico or pso or pimple form that is transient solutions ok so we can code the scalar transport equation into some other solvers so why do we need to do this because we might need to simultaneously solve for pressure and velocity using Navier-Stokes equation and also want to solve for the scalar transport equation also so for example in the pollutant dispersion so in an urban flow setup we can consider concentration of pollutants concentration of pollutants as a passive scalar quantity and simultaneously we want to solve for pressure and velocity field also so in such cases we might need scalar transport form combined with other solvers like simple form, pimple form, pso form etc ok we'll see this is a basic introduction in such cases we'll see examples of this in the later session where Mr. Krishna Kantas will help with the ICO form solver coded with a scalar transport form ok and the next session ok so this is how the code looks like for a scalar transport equation almost with a simple form so while the simple form solver is running we incorporate this scalar transport equation in this fashion so it's a simple case simple way to illustrate such cases and we define this molecular we define this diffusivity constant in this way a decay is the molecular diffusivity plus newt and skimmed number ok this is the ratio we can use this code so talking about the example this is a street canyon setup so for context a street canyon setup is a place where there is a narrow road narrow road on either side of tall buildings on either side there are tall buildings and there is a narrow road between it so in this case what happens is in a mean wind direction is perpendicular to the street or road or cross section of this case so in mean wind is perpendicular then what happens is recirculation region will be happening here forming the primary vortex so when the pollutants from the vehicles escape from these vehicles and it gets trapped inside this region only ok revolves around this region only in the primary vortex region but cannot escape outside of this region so this creates a problem of pollution pollution will be increased so much that it's one of the major problem of the urban city so for such cases we can optimize the shape of the buildings do that sort of analysis using CFT using such solvers ok using merged solvers of simple scalar transport equation and the pollutants can be considered as the passive scalar term so with a similar intention this is one example where scalar transport equation is used in simple form so this is the domain where pink blocks are the buildings ok are the buildings and between these buildings is the alternate line sources so we consider these line sources as the passive scalar term then we need to see the pressure and velocity equation and solve for it the velocity will be from x along the x direction so that it is perpendicular to the street so here is the result ok this is the cross-sectional view this first one is the velocity contour plot we can see the velocity along the x direction it looks like this and the next one is interesting one this C is the pollutant concentration ok so this from the line sources we can see how this passive scalar term pollutant concentration evolves and we can see that it is unable to escape out of this urban cannon setup so we can optimize the shape of the buildings or the roof so that the pollutants can escape out and does not have the problem of pollution so that's the one main objective for this case so for the codes and the similar case study that is used here you can go on to this link below where we have the codes that most solver but the case study is different here the case study is that we have this red building where the pollutant sources are this red blocks red four blocks so when the flow is along the x direction here along with the flow this pollutant sources also disperses ok to see how is it is dispersed along with the flow we are using this setup so this is the setup from ZVAL A15 building Longo et al 2019 from the wind tunnel experiment so you can go on this link the name of the case study is a walkthrough of solver development in openfoom so this is developed by me you can go through this and if you have any doubts any questions you can contact me on this email contact CFD at fosy.in indicating my name so I'll be happy to help if you have any doubts about it so that's it for today's session for me thank you for being wonderful audience thank you I would like to know if you have any questions about this session I think most of you are wondering how the velocity field will come out of so how we'll get the velocity data to run the scalar transport form solver most of all you will need to solve using another solver for example simple form or potential form without any scalar term in it it's a simple steady state first you run that with the same geometry then extract the data from your last time steps and put that in your initial conditions in the next simulation that you want to run so that's how you will get that and for the next case that we discussed now for the merge solver you don't need to do that we simultaneously run both the equations so that's one advantage of the later version of merge code that we used so any other questions you can ask now or you can also contact by email so Abhin here was asking why internal field for TE0 so in the previous I had told that internal field for temperature must be greater than 0 in that case like in previous case we were actually solving the energy equation that involved temperature but here we are not solving energy equation temperature is just a scalar properties or a scalar parameter that is being transported with the velocity so in this case we need not need to be worried about that Rosnes was asking what if we have analytical solutions for velocity so in that case I think you might have analytical solutions at the inlet so you need to use the coded boundary condition for that and use merge solver to solve this problem another question from Chinthak in the chat box so if there are more than one scalar transport yeah you can use you can solve using scalar transport form or the merge solver if you have more than one so you need to define more than one as separate you need to define the passive scalar separately with separate name for that case one more question in the chat box so in the how does viscosity properties move into it for the merge solver we can use viscosity also in the transport properties file so in that case we can incorporate the viscosity property also while we are solving the flow it's not only for diffusion there is convection also in the flow in that case inside constant folder in transport properties so first case was only for transport form so there was no viscosity included as we are not solving for Navier-Stokes equation or momentum equation but in the next case we are solving for velocity, pressure and transport equation all at once so we need to define viscosity inside that folder constant transport properties any other questions or I think we can move I don't think they have any more questions let's take a break for lunch now