Unlock all 54 lessons of Advanced CFD using OpenFOAMFull course ₹40,000 · paid
CFD Course Roadmap and Conservation Laws Behind Navier-Stokes
A free lesson from Skill-Lync's Advanced CFD using OpenFOAM course, on Grow by Skill-Lync · Last updated 16 Nov 2026 · Session: “Week 1 Session 1”
What will you learn in this free Advanced CFD using OpenFOAM lesson?
The lesson outlines the course topics, from meshing with snappyHexMesh to conjugate heat transfer, VOF, compressible flow, turbulence and combustion in OpenFOAM. It then derives the continuity and momentum equations, covering viscous stresses and Newtonian versus non-Newtonian fluids.
- Course plan: meshing, CHT, VOF, compressible flow and combustion
- Continuity equation from mass conservation on a control volume
- Momentum equation, convective flux and viscous stresses
- Newtonian versus non-Newtonian fluids and viscosity
What comes after lesson 1?
The next free lesson is lesson 2, “Simplified Navier-Stokes Models, Convection and Diffusion” (11 min). Later in Skill-Lync's Advanced CFD using OpenFOAM course (paid): lesson 4, Week 2 Session 1 Part 1; lesson 5, Week 2 Session 1 Part 2; lesson 6, Week 2 Session 2 Part 1. The full course has 54 lessons (18 h 30 min of video); see the course overview or its price and syllabus.
Lesson transcript
Machine transcript of the lesson audio (lightly cleaned). Technical terms may contain errors; the video is the reference.
Hello, everyone. Welcome to the course Advanced CFD using Openform. In this course, we will learn about some of the more advanced topics in CFD using the open source software Openform. This week's topic is a basic introduction to CFD using Openform. In this course of Advanced CFD, we will go through some of these course contents. In the initial days, we will focus more on basic introduction to CFD and the open source software Openform. Then we have a good tutorial planned for you for meshing in Openform using Snappy Hex Mesh. Meshing in Openform is done using two specific tools called Block Mesh and Snappy Hex Mesh. We will explore both of them. Right afterwards, we have our advanced topics lined ahead. The first one being a CST theory or conjugate heat transfer theory. We'll go through a bunch of tutorials simulation simulation problems and try to explain how conjugate heat transfer is simulated in Openform. Then we have VOF theory or volume of fluid theory. VOF theory is essentially simulation of multi-phase flows. We'll go through a bunch of very interesting examples and their applications using Openform. Later, we have a course on compressible flow and turbulence.
To be fair, compressible flow being the major focus on compressibility is also explored in CST theory and VOF theory. But we are going to focus more on high-speed compressible flows around bodies in this particular week of lecture. Also, turbulence is present in both of the CST theory and VOF theory. Also, turbulence is present in both of the CST theory and VOF theory sample problems, but it will be given much more importance in this particular week. In the end, we have a kind of a difficult topic using Openform. We have a combustion and a bunch of very good examples to explain how it is done using Openform.
In this week, we will initially try to focus on bare basics of CST. What exactly is CST? How it is achieved? How it is translated from paper to your code? And then we have, in the end, a brief introduction to Openform. So, this week, we will learn about the governing equations, basics of CFD and its individual components, and just a basic brief introduction to Openform. Governing equations. Governing equations. Unlike any other mathematical equation, a governing equation is a set of sort of rules, and they essentially tell how your fluid is flowing in your domain.
Governing equations are conservation laws of fluid motion. By that, we mean these are based on three fundamental principles. The first being conservation of mass of fluid, second being conservation of momentum, and third being conservation of energy. But what exactly do we mean by each of these? So, conservation of mass of fluid essentially means that while you are calculating the flow path inside your domain, your mass can neither be created nor can it be destroyed. And the same goes for momentum and the same goes for momentum and energy as well, momentum being the rate of change of momentum equals the sum of forces that are acting on the fluid particle.
This is based on the Newton's second law of motion. And the next, conservation of energy. This is based on the first law of thermodynamics, which essentially means the rate of change of energy is equal to sum of the rate of heat addition. In any CFD study, we always regard a fluid as a continuum medium. By that, we mean that there is no discontinuity between one region and another. And we always consider them at macroscopic lengths. That is to say, the length is always greater than one micrometer.
Then, we also describe the behavior of a fluid in terms of averaged macroscopic properties. By that, we mean that when we look at flow in a pipe, for example, when flow is flowing inside the pipe, we measure one of these properties such as velocity or pressure at a particular point. And at that point, we average it based on the area at which we are measuring it and with which we are measuring it. So, essentially, every property that we measure for explaining the behavior of fluid is an averaged macroscopic property.
Navier-Stokes equations. Navier-Stokes equations are a very generalized form of expressing our governing equations. The Navier-Stokes equations are essentially made for Newtonian fluids. Newtonian fluids mean any fluid that follows the Newton's laws of motions. In case of a Newtonian fluid, the viscous stresses relations are all valid. We can compress the conservation equations into sort of a compact matrix form. While doing so, we introduce some viscous stress components called tau, i and j being the rotational vectors. These originate from friction between fluid and surface of an element.
The stress components are expressed as functions of a local deformation rate or sometimes called as strain rate. Navier-Stokes equations are really very flexible and compatible. These can either be written in integral form or the differential form based on the user's requirement. This is a very crude example of how we can sort of compress the Navier-Stokes equations into an integral form. And we can write the individual components as in described here into a neat little matrix. As we saw earlier with the governing equations, let's have a quick recap of the equations themselves.
So for Navier-Stokes equations, we have written them in sort of a very compact form in the integral form. As you can see here, the time derivative of the first change of sort of our variables, which are depicted here. The density fluxes and energy fluxes and then we have integral over the entire control volume of the convective and viscous sort of forces. Right here we have the individual components of Fc and Fv, the flux of density, then the pressure forces that occur, then the viscous stresses which occur.
Then we have for the energy, this theta component, which is also described right here. This is transport of our viscous stresses and the conductivity that is done through temperature changes, the transport of that as well. And in the end, if we have any sort of source terms that occur in our flow, those can also be described here. Let's go through these one by one viscous stress terms that we see right here, the toe terms. These originate from the friction between fluid and surface of an element.
And these are described as stress tensors. This notation x and x means that by convention that this particular stress component affects a plane perpendicular to the x-axis and in direction of the x-axis. Or in simpler terms, if we see right here, this particular stress component acts in the plane perpendicular to x-axis and in direction of y-axis. So this goes the same for every single stress tensor perpendicular to x-axis and in direction of z and so on and so forth. Then we have our theta term as explained before.
This is for depicting the heat conduction in the energy equation. For this right here, rho, h, and v. This is described as the transport of total enthalpy, capital H. Capital H is essentially the general relation of total enthalpy, that is, total energy plus pressure. Then in the end, we have some of these source terms. The F variable that you see right here. These are all body forces that may act upon your fluid. By body forces, we mean anything that is external to our fluid element, such as gravity, magnetic forces, or electrostatic forces.
And in the end, we have q dot h, which is heat supplied, or something that is being added to your flow by virtue of some external thing, not generated by the fluid itself. So once we are sort of comfortable with these definitions, let's try and understand exactly the bare basics of how this is computed in a finite volume environment. I am sure that you guys must have seen. This several times in many of the fluid dynamics books, but it's really important that you understand this and you are able to relate to this mathematically and you are able to sort of picture it in your mind that this is what is really happening, like you are able to physically represent it in your minds.
Let's consider some control volume that you see right here. Let's consider some arbitrary control volume that you see right here of some random shape. Let's say this particular volume is depicted by omega right here. Then if we see the surface around it is depicted by this dou omega, then this particular particle is traveling at a velocity v bar. If we consider a very minuscule part of this surface, let's say it's called ds and the normal vector that is perpendicular to this surface is n cap, whatever you want to call it.
So for this particular control volume, if we want to implement our sort of conservation laws, let's say we want to conserve our mass initially. So for mass, we are conserving essentially density. If we recall the law of conservation of mass, mass can neither be created nor can be destroyed. Also one thing important to notice is that there is no diffusive flux contribution in the continuity equation, since if a fluid is at rest, any variation of mass would imply just displacement of fluid particles, your mass is not diffusing.
So in order to derive this sort of continuity equation, at this particular control volume, let's say this particular volume is fixed in space and at this particular point, the velocity is v. Then we are considering a very minuscule surface, ds, elemental surface area, and its normal vector is n cap or n bar. So for our mass conservation, our conserved quantity is density. Now, essentially what we are saying is, if it makes sense, time rate of change of the total mass inside the finite volume is time rate of change of integral of density over the entire control volume.
And this should be equal to the mass that is going out of this particular fixed space, that is negative. And by this, we mean the integral over this entire surface area. This circle integral is what that means. Flux of our density. And v bar is our velocity, and v bar is our velocity with the normal vector over this entire surface. So effectively, what we are saying is, the time rate of change of the total mass inside the finite volume is equal to whatever mass is going out of this particular control volume's surface.
And this is our continuity equation. Now for our momentum. So momentum equation is a little more complicated than that. We start our momentum equation by just recalling a very particular form of Newton's second law. The Newton's second law that states that the variation of momentum is caused by the net force acting on a mass element. So for the same case of our control volume, let's say, the variation in time of momentum, that is density times velocity, is the same as above with the addition of velocity over the entire control volume.
And here, the v sort of vector consists of all the three velocity vectors, that is, in the x, y, and z direction, that is, u, v, and w. So for this case, the sort of velocity depicts all three directions of the velocity. Then we have our convective flux tensor. This is what describes the transfer of momentum across the boundary of the control volume. So the same principle as earlier, the density flux or mass flux that we saw right here. The same thing we apply right here, the momentum flux, which is again given by rho v times our velocity vector in the direction where we consider our flux over our surface.
Now this is going out of the body. So let's say this is negative. Next, we have, since momentum is a quantity that cannot be diffused, it can only be transported from one point to another. We just say that diffusive flux is zero. Therefore, the question remains that what other forces are sort of acting on the fluid element. By other forces, we can say either they are some external body forces or forces that are acting upon the surface. By external body forces, we mean usually the gravitational forces, buoyancy, or magnetic forces, so on and so forth.
Moving on to surface forces, these are the forces that act directly on the surface of the control volume. And these arise due to two main sources. First being the pressure distribution that is imposed by the fluid around this control volume. And shear forces, shear forces, shear and normal stresses, so called, which result from friction between the fluid and surface of this volume. So if two sort of fluid particles interact with themselves and sort of create a shear force amongst themselves, this sort of cause what is called shear stress or normal stresses.
So, knowing what we know right now, let's try to sort of understand how these forces can be included in our governing equations. So, first let's say the contribution of body forces. So, body forces per unit volume can be denoted by the term as we saw right here, the rho F E terms. Right here. So, for our case, we'll just say integral of rho F E bar over the entire, sorry, over the entire control volume. So, um, then we have our surface forces. These surface forces, as we saw, are originating from two particular sources, the pressure and shear stresses.
These are depicted by, so, as we saw, this means acting over the entire surface. So, force acting upon entire surface is given by, oh, sorry, this is pressure forces acting upon entire fluid surface. So, what we have right here is, this is given by, this is given by, this is given by, this is given by, this is given by, this is given by, over this entire. So, what we have right here is derivation of the momentum equation. Let's recap through this again. The conservation of momentum is based on Newton's second law, a particular form of Newton's second law.
That usually says that variation of momentum is caused by net forces acting. on a mass element. Now, for the broad view, the time rate of change of momentum across this particular control volume is given by this first relation. Then we have flux of our momentum across the surface. So what is entering that is going to exit that flux is given by this relation. Later, we have definitions of three forces that are going to be acting upon the fluid element. First being the body forces by virtue of any external forces that may act upon our fluid element. For instance, gravity, buoyancy, or magnetic forces. These act entirely upon the volume. So we integrate these over the entire volume.
Then we have pressure forces that act upon the surface of this fluid element by virtue of other fluid elements. This is given by this relation. And this is given by motion. And this is given by motion. And this is given by motion. And this is given by motion of two fluid particles in different directions or in the same direction. This is given by this relation. And there we have it, the momentum equation. In the end, we have our energy equation. So underlying principle for energy equation is the first law of thermodynamics, which essentially means the changes in time of total energy inside the volume is essentially caused by the volume is essentially caused by the rate of work forces acting on the volume and by the net heat flux into it.
That is to say that the time rate of change of total energy is essentially equal to rate of work forces acting on the volume and the net heat flux provided to the volume. Here we introduce a variable, total energy per unit mass given by capital E. This is obtained by the addition of internal energy per unit mass, small e, and the kinetic energy per unit mass. So E is equal to E plus B plus B square by 2. Essentially, E plus B square, B square and W square by 2.
This conserved quantity, in this case, the total energy per unit volume, is rho times e, the variation of which, over time, is given by the same relation as we saw earlier integral rho e over the control volume times d omega. Now flux of this energy component is again given by a similar relation over the surface to omega rho e times v bar over the entire surface. Again to reiterate this is the flux of energy that is coming into the body and moving out of the body over the surface of this control volume hence we have this relation. In contrast to the continuity and momentum equation energy has an inherent sort of diffusive property to it so there is a diffusive flux that is involved. This diffusive flux is a sort of proportional to the gradient of conserved quantity e right here per unit mass.
This is sometimes called the fixed long. So for our purposes the diffusion flux represents one part of heat flux into the control volume that is diffusion of heat due to molecular thermal conduction. This is just heat transfer due to temperature gradient. So this essentially sort of becomes over the surface of conduction of heat k times delta t in the different direction over the surface. Then here the k term is defined as a thermal conductivity coefficient and t here is a absolute static temperature. temperature. Then the other part of net heat flux into the finite control volume is volumetric heating due to absorption or emission of any sort of radiation that may occur due to chemical reactions. These sort of heat sources are denoted by the variables that we described right here qh. To denote this we write this as our integral over our entire control volume of body forces plus the heat addition over the entire control volume.
Now as we stated in the first law the time rate of change of heat transfer per unit mass is given by our qh dot right here. Now together with the rate of work done by the body forces Fe this completes the sort of volumetric sources of net heat flux right here. So essentially body forces work done by the body forces plus the heat supplied is the entire contribution of heat flux into the finite control volume. In the end we have one more term. These are the surface sources.
These correspond to the time rate of work done by pressure and the shear and normal stresses on the fluid element. To denote these we have the surface integrals over the surface pressure flux over the surface and the shear stress. There we have it the derivation of energy equation. In cases where the sort of equations can be reduced with assumptions should always be made so as to reduce these equations. Viscous stresses originate from the friction between fluid and surface of an element. These are described by the stress tensors tau as we saw earlier in cartesian coordinates.
Form now it is given in the matrix form of legs the diagonal elements are given by this xy xz and so on so forth as you can probably guess. As I said before the notation of the tau and its two subscripts means by convention that the particular stress component affects a plane perpendicular to the first subscript and in the direction of the second. So double x double y and double z components represent the normal stresses stresses. And the other components xy xz and yz so on so forth these represent the shear stresses.
To better explain these let's say this is a cuboid fluid element in our domain. I'm not very good at drawing. So for our purposes right now let's say this is y this is x and so for our purposes the double x double y double z are the normal stresses. This being double x this being double x this being double y and this being double z. Similarly we want to see the shear stresses say again this is x this is y and this is z. And for our purposes is we are very good at playing the whole う this is by another root connection we are Shear stress acting, again for our case, shear stress, that is perpendicular to Y and acting in the Z direction, is YZ, perpendicular to X acting in the Z direction, XZ in the direction of Z, then we have, in this plane, perpendicular to Y, acting in X direction, perpendicular to Z acting in X direction, and again right here, ZY and Z, sorry, and XY. So if you can envision it, so as we saw, these are the normal stresses, the double X, double Y, and double Z components, and these are the shear stresses, shear being, the sort of stresses, that try to share, our element, by convention, the, first, sort of subscript, is depicting, that this particular stress component, affects, a plane perpendicular, to the Y axis, and, then, second subscript, says that, it is in the, direction, of the, X axis.
It may be a little confusing, but, once you understand it, once you see it, try to, physically represent it, then you will understand. And, so, after defining, these sort of, viscous stresses, shear and normal stresses, that, act on a fluid element, let's try to see, how these are evaluated. Now, first of all, they depend on the dynamical, sort of, properties, of the medium. Fluids, like air or water, have a relationship, that Newton said, that the shear stress is proportional to velocity gradient, and the proportionality constant being the viscosity of that particular fluid.
So, for any fluid, that follows this relation, is deemed a Newtonian fluid. On the other hand, fluids such as, let's say, blood, or a melted plastic, they behave in a very different manner, and they are called non-Newtonian fluids. For vast majority of practical problems, our fluids can be assumed Newtonian. And, they are represented by these relations. The normal stress is given by, similarly, the shear component is given by U by Y. Now, in these relations, the constant, mu, is called dynamic viscosity. Lambda, constant, is called a second viscosity coefficient.
And then, kinematic viscosity, mu, is sometimes used, which is, lambda viscosity divided by R density. To, sort of, solve, these expressions for normal stresses, there is a relation called, lambda plus 2 by 3 times density, is equal to 0. This was Stokes hypothesis, and sometimes this relation is called, bulk viscosity. Bulk viscosity is a property that represents energy dissipation in a fluid of uniform temperature. And, by virtue of this hypothesis, we can write our normal stresses as, this is viscosity, the kinematic viscosity. By virtue of a flow being, let's say, incompressible with a constant density, this term becomes 0, and hence it is easier to, sort of, solve for R stresses.
In the end, once we have derived all of these relations, we are ready to, sort of, write these equations into a compact form, of this sort of form, in an integral form. And, the set of these equations, with the stresses, shear, and normal, in this compact form, is essentially called, the Davies-Stokes equations. In the 90s. In the 90s. 2.