Lecture 55 : LES/DNS

IIT Kanpur July 201
20 followers
2 Video Views·Oct 5, 2024
Hello everyone, welcome back. In the last class, we saw that how the Euler equations
in one dimension can be written in the characteristic form, and that makes the equations decoupled.
So, this analysis is necessary, because when you try to apply the boundary condition for
compressible flow, you know that these are kind of hyperbolic equations, and the information
travels in the form of waves, right. We saw that the different kind of information,
wave packets travel at different wave speeds. So, if you can look at this characteristic
equation, so these are the kind of different information which are travelling at wave speed
of u minus a, u and u plus a. So, this we looked at in the last class.
So, this can also be written as basically different notations like v minus v 0 and v
plus, which represent u minus a and u and u plus a. So, basically what it says that
this characteristic d u minus d p by rho a, this is a formation, this will be not changing
along the characteristic line u minus a. So, this is also the wave speed or you can
call it characteristic line. And similarly, d rho minus d p by a square equal to 0, this
does not change around at the speed of u, right. And if you can look at closely, this
is nothing but a square equal to d p by d rho, and which is true only when the flow
is, the entropy remains constant, right. So, this we had derived. This is an value,
I mean this can be derived only when the flow is isentropic. So, this also can be written
as s equal to constant or d s equal to 0. The second relation is also equal to d s equal
to 0. And third, we had this u plus a, which is travelling at higher than the flow velocity
and the value that remains constant or the value which does not change is d u plus d
p by rho a. Now, look at the implication of these different
waves in your boundary conditions. So, one thing you can see is that, let me make this
is t and this is x, and let me draw these characteristics. So, you have, let us say
the flow is supersonic, right. If the flow is supersonic, then u is greater than a, ok.
I am saying it u here, but actually when you implement in your code and the flow may be
two dimensional or three dimensional, we will be discussing u perpendicular, ok. This is
basically u perpendicular is greater than a, ok. Or in this case, in fact, you can just
take that magnitude of u is greater than a. So, when u is greater than a, yes, u plus
a is positive, greater than 0, u is positive and u minus is positive. So, all three waves
are positive, ok. So, you can write this. So, this will be may be u plus a, because
the slope is 1 by u plus a. So, this is travelling at highest speed, this is u and this is u
minus a, ok. And you can say that, my v plus is travelling here, v 0 is travelling here,
v minus is travelling here. So, these are also called Riemann invariants. We will come
to that later. So, this is for the supersonic flow, because all the slopes are positive.
This is for the supersonic. If the flow is subsonic, then what will happen? Let us say
the flow is subsonic here. So, your u is now less than a, u is positive and u minus u plus
a is also positive, but u minus a is negative, right. You can also call it mod a u. We are
talking about the magnitude of the velocity, right. So, if you want to make this diagram,
what will happen is that your u plus a is positive, u is positive, but u minus a, you
see this is u minus a, this is negative, right. So, two on the right, so two waves are travelling.
So, these are called the right running waves and this one is the left running wave, right.
Now, this has got implications in your inlet outlet boundary conditions. Why? Because let
us see the situation at inlet and outlet, ok. So, let us say this is my flow domain
and this is my inlet. Now, the flow is going from left to right and this is your outlet,
right and let us say you have got, you have made grids here. These are your grids and
let us say you have another line on top of this, ok and then you have got this. So, now
if you draw the characteristic, so if it is supersonic, so what will happen is that at
the inlet 1, 2 and 3, this is u plus a, u and u minus a, right. So, what you can see
that all the waves are right running, right. So, when the all the waves are right running
that means your information is travelling from left to right, right. So, you have to
basically give at this boundary. If you look at this boundary, you have to give all the
information because all the information is coming from left to right. So, you have to
provide all the boundary conditions need to be, right. On the other hand, if you go
on the right hand side, look at here. So, everything is going out again here also because
all the waves are positive. So, u plus a, u and u minus a, right. So, you are seeing
that all the information is just going out, right. There is nothing going in. So, then
what you can say that all boundary condition need to be circulated from the interior, right.
So, here you have to give all the boundary conditions. Let us say if you are giving the
free stream condition or whatever conditions you have, the infinity condition for all the
quantities u, p and rho you have to give from the outside and here you do not have to do
give anything from outside. So, whatever information you have in the interior, let us say this
is the first interior point, you just use those interior points and then you can write
your u, p and rho in terms of the interior points. So, here everything will be u i, p
i and rho i at the boundary and here everything will be u infinity, p infinity and rho infinity
at the boundary. Now, the case becomes tricky when you have a subsonic flow, right.
So, then let us make the same inlet and outlet. Now, you draw the same line. I am not going
to draw the grid points now, but just look at the waves here. This is u plus a u and
this will go to u minus a, right. So, here two are right running and one is left running.
So, you have two information coming from the infinity condition or the free stream condition
or whatever condition you have before the boundary, right. So, you have to have two
information that needs to be given because there are two right running waves and one
information has to come from inside to out, right. So, this is u minus a. So, if you have
some information available, let us say somewhere here or somewhere here that will go out, but
just one information you cannot give more than one information. Typically, that information
is your pressure from your inside. Similarly, if you look at the outside here,
so you have two basically going out and one going in, right. So, going in means something
coming from outside to inside. So, here you have to give this condition for this particular
wave. You have to give a condition and typically what you give is your back pressure like we
saw in the incompressible and all other information has needs to be basically extrapolated from
the interior, right. So, two need to be extrapolated from interior and one need to be provided.
Remember, we have three quantities u, p and rho. So, typically you provide the pressure
and you extrapolate the velocity and density and here basically two need to be provided.
So, typically what you provide is p naught and d naught and one need to be extrapolated
from interior, right because one left running wave is going from the inside the domain to
outside in the atmosphere or in the free stream, right. So, typically you can start
with p or you can also take velocity here, but normally p is taken here, right. So, once
you have this information, now you can go back and see our pressure inlet and outlet
look like. So, the one more comment I want to make it here is that typically when we
do the characteristic analysis, we want to have this quantity which are basically v 0,
v 1 and v minus, v plus and v 0, right. So, the quantity is what we saw earlier, right.
So, the quantities are d u minus d p by rho a d rho minus d p by a square and so on and
so forth, but you can be a simple minded and you can just go by the logic that I need two
information for the subsonic flow here and one from the interior. So, you can choose
two values p 0 and t 0 and just basically extrapolate these values directly. A more
systematic and more physical approach is that you do not extrapolate these values directly,
but use the characteristic equation. You basically use these values to formulate the characteristic
and make sure that those characteristic equations are satisfied along those lines, right. So,
both works.
So, let us look at the first approach which is the pressure inlet and outlet as it is
implemented in many software. So, this is just the details of that for supersonic flow
all from outside to interior, subsonic flow most from outside to interior and one information
from inside to out which is pressure related information. So, subsonic outflow only pressure
related information from outside to interior and supersonic outflow, you have basically
you do not need any information, any boundary condition at the outlet. Everything goes from
interior to outside. So, you do not need any information from outside to interior, no boundary
condition necessary. The same thing shown in the chart, here what I want to say that
I am showing here p 0 and t 0 or p t and t t, the total pressure, total temperature,
but that is not necessary. You can have may be p 0 and density, may be you can have u
and density, but not both p and u. This is not allowed. You can have some pressure related
information, some density related information or density and density or pressure and temperature
or velocity and temperature, but not pressure and velocity both because they are coupled
systems. If you provide both of them, then you are going to basically over specify the
boundary conditions and your code will blow up.
Typically, on the outside you give the pressure, the outlet pressure, the back pressure. So,
how does it work? Now, let us look at a pressure inlet. So, in the case of as a incompressible
flow, what we did if you recall, so we had given only the p naught and then we had taken
the pressure from the interior. Then, we had this relation p naught equal to p plus half
rho u square and from that we calculated the u and gave the value of, I mean this was
the value assigned at inlet because your code runs on basically u v p rho. So, even if you
give the total pressure, you have to convert it to the velocity. So, the p is taken from
c f d. This is p c f d from the interior and this gets updated and because of the back
pressure also, this will keep on getting adjusted. Finally, when the solution converges,
you get the right pressure at the inlet. So, now let us look at what happens when the flow
is compressible. So, when the flow is compressible, you not only have to give the p naught, but
also have to give the p naught. Remember, we need to give two conditions here and the
relation we know. So, we had given the relation for p naught and t naught. This is total pressure
and total temperature. I hope you know the relation from a gas dynamics. So, you can
say that if you let us take the example of t naught. So, what is the stagnation condition
or the total condition? So, let us say something is moving at a certain speed and then you
suddenly make it to stop. So, all your kinetic energy gets converted to your potential energy
or the thermal energy and you basically get that condition there. So, for example, if
you talk about thermal energy, your c p t naught is equal to c p t plus half u square.
So, there was something which is moving at the speed of u and then you suddenly make
it to stop. So, all the energy got absorbed into this and then you can use this relation.
So, t naught equal to t plus half u square by c p. I think this will be just may be rho
will not be there. So, you have to make it dimensionally consistent and then what you
can do t plus half u square and c p is gamma r by gamma minus 1. So, this will become gamma
r by gamma minus 1 and then you can multiply by t on both on top and bottom. So, this gamma
r t is nothing but your a square. So, you can take the t out become 1 by 2 gamma minus
1 and this u square by a square is mark square. So, this is your relation between t naught
and t and then you can use the relation of basically isentropic condition and similarly,
you can get the relation for p naught and p also and that will become you will have
a factor gamma by gamma minus 1. So, now what we do you give the value of p
naught take the p from the c f d static pressure take from the c f d just the value in the
previous iteration and from that you calculate m like gamma is known for your gas. We have
discussed this that will be 1.4 for example, for a diatomic gas like here you can take
it 1.4 right. So, you got this value of m now use this value of m and use this relation
and get the value of t. So, from there this we are getting m from this we are getting
t right. Now, we need to get velocity right. So, mark number is u by square root of gamma
t. So, we know the value of t you know the value of m. So, we will get the value of u
w assign that value there and then you basically calculate keep on running this simulation
right. So, you got the value of u p is there from the previous iteration t you got from
this relation. So, all these things you got and then you just keep on doing this operation
and then your code will run. So, this is your u p t this is how we do in the subsonic flow.
Now, in the subsonic flow or even in incompressible flow your pressure at the outlet affects the
pressure at the inlet not true for the supersonic flow as we saw that all the waves are basically
right running. So, your conditions at the outlet do not affect the inlet right. So,
what you need to do you need to basically give everything at the inlet only nothing
you need to give at the outlet. So, there are two things here one is that at the inlet
you need to specify all the conditions at the outlet you need to specify any condition
right. So, here we have to give both pressure and
static pressure also we need to give the t naught here everything at the inlet itself
you calculate a velocity like we did for the subsonic flow. So, the relation we will be
using is the for the compressible flow these conditions and then pressure at the outlet
if you can give some value, but it is not assigned it is not taken into account and
you can also employ a non-reflective boundary condition which we will see shortly.
So, this is the comparative table. So, in the incompressible you assign p naught in
the subsonic or supersonic you assign p naught I should write t naught also here may be t
naught also you assign here there is no t naught necessary for incompressible. So, you
here you give the inlet p naught outlet is p right here you do not give anything in the
outlet in the supersonic flow, but give both provide I mean p naught and p at the inlet
itself use this p naught and p to get the value of your mach number and hence the velocity
by considering this p naught condition to get the velocity it is like a fixed value
this is not changing because your both p naught and p are fixed right.
So, your velocity is fixed here. So, it is like a fixed velocity boundary condition on
the other hand if you see in the case of incompressible and subsonic flow your u i your inlet velocity
changing every iteration because you are using a fixed p naught, but adjusted right. So,
your inlet velocity changing every time it is like also I mean the velocity boundary
condition, but the only caveat is that your velocity has to vary every time. So, that
it can satisfy the fixed the total pressure value at the inlet total pressure total temperature
value and here it is fixed because your both p naught and p are fixed outlet you do not
need any boundary condition you need to extrapolate everything from the interior right.
So, this is how the pressure inlet and pressure outlet works for different kind of flow if
it is incompressible again you just need p naught at the inlet p at the outlet you do
this relation total pressure relation for the incompressible flow and p is getting adjusted
every time from the c f d from that you calculate u i as the velocity boundary condition and
simulate it in the case of supersonic you are going to use this relation, but then I
mean if the flow is completely supersonic then you have to give both p naught and p
at the inlet and u i is fixed if it is subsonic then you only p naught p is taken from the
c f d get the mach number from the t naught get the velocity and get the u i, but that
u i will be varying every iteration right. This is how it is typically implemented, but
remember we have not used of the not made use of the characteristic equation here we
have used the concept that you have u plus a u minus a and u there are three waves, but
we have just used that information that we need two boundary conditions at the inlet
for the subsonic flow and one at the outlet for the supersonic flow we need all three
at the inlet and zero at the outlet. So, we have used that much of information,
but not gone into the details of the characteristic equation. So, we can make use of that also
and that makes it a more physical approach and they are also called the non effective
boundary conditions because in this we will make sure that the solver follows the characteristic
lines. So, there are two ways to basically do this one is called the characteristic weight
other is basically Riemann solver based Riemann invariant based rather and they are also
used in the as the far field boundary condition. Let us look at these two conditions now.
So, this is once again for supersonic there is no issue whether you use characteristic
or not. So, because anyway you have to give all the information. So, if it is inflow.
So, you have three characteristic V plus V 0 and V minus all three will be. So, again
once again. So, if it is outlet you are extra plotting from the interior. So, you are basically
using all three relations at the outlet and inlet will be assigning all the values. So,
all three values are assigned here. So, you cannot use all the three characteristic at
both the points. So, you may use let us say two characteristic here and one here or two
here and one here or may be three here and zero here if you again use like you use three
here and three here that will be over specification right.
So, in the case of supersonic flow at the inlet we are using zero equations and here
we are using all the three equations. So, here we just assign whatever value you have
from the infinity and here we will just use the value using the characteristic relations
to get the values outside from the interior point right. So, in the outflow you just use
the value from interior we can also use the characteristic equation, but because you are
anyway extra plotting all the interior it will come back to this relation directly.
So, you do not have to do anything for the supersonic flow problem is when you are when
you are doing the subsonic flow. So, when you have you are doing the subsonic flow.
So, then you have two going out one coming in here and here two coming in at the inlet
and one going out. So, you have to use this characteristic equations carefully here. So,
here you can use probably this is going out. So, this will you can use v 0 v plus and v
0 basically u plus a and u and here you can use v minus. So, again I as I told that the
number of characteristic that you have to use at between inlet and outlet should be
the maximum number of characteristic you cannot if you have used v plus and v 0 you should
not be using that at the inlet. So, let us say that we are going to use v
minus at the inlet you have to use the pressure related information from the interior from
here you have to get this relation somehow to p b you can either take the interior directly
or you can probably take an interpolation between the p infinity and p i and get the
value of pressure at the boundary. So, I am using this b as the boundary i in interior
and infinity as your conditions outside at the inlet. So, this is your inlet at outlet
it will be just reverse this will be interior this is infinity and this is a boundary right.
So, we are talking about inlet. So, use this v minus relation. So, that was d u minus d
p by rho a equal to 0. So, take this use this relation directly for at the infinity and
at the boundary. So, boundary we are taking the information rho infinity infinity, but
p is taken from inside or a combination of inside and the boundary right. So, you manipulate
that and you will get the velocity of u b from this and if you have 2 d or 3 d flow
then you have to basically take this the different components. So, basically instead of just
p infinity minus p b you multiply by this normal n x and n y and you can get those relations
and you can use the relation in the characteristic between the rho b and p b to get this density.
So, you got all the values at the boundary in the inflow p b is taken from inside u b
calculated and rho b calculated. So, you can also directly use rho infinity it will not
matter that much. Now, let us go to the outflow. So, outflow we are we have to go use basically
the v 0 and v plus let us use the v 0 first. So, in the outflow you are only giving the
pressure and all other let us call it p static may be. So, this is your boundary this is
infinity and this is interior. So, all other things are taken from the interior. So, this
I call as p b to use this relation which is related to v 0 v rho minus t p by a square.
So, you can do it between the interior and the boundary and then you can get the value
for the rho b and then you also need the value of velocity. So, you can use this relation
corresponding to v plus and that will give you the relation between the interior and
the boundary and then using this information you can get the value of u b. So, this is
how you do between inflow and outflow for the subsonic flow using the characteristic
relation for v plus v 0 and v minus. Now, different code has got different implementation.
So, as I told you that one implementation is very simple minded use the information
as it is like we did for the pressure inlet and outlet this p 0 t 0 and so on and so forth
and use the relation to the isentropic relation to get it. Other way is to use this characteristic
relation to get different things like u and density and let us say if you want to get
the pressure at the boundary at the inlet in the case of subsonic flow one is to just
use this p i value the interior value or the previous iteration value other is like you
use p infinity and p i to get this p v value. So, the idea is to make this boundary condition
more and more robust. So, you can use either of these two, but let us say if the domain
is small you are not really going to the far field then you have to use statistic base
because that is more stable and that is what you do when you use the non-effective boundary
condition. Let us say the outlet you shift to the statistic
base definition of the extrapolation of variable rather than just using the isentropic relation
that is what we mean when we say non-effective boundary condition. The last part I want to
discuss is the Iman based boundary condition which is implemented directly in far field
also in some of the solvers like. So, what we do here? So, this is also based on your
characteristic form. So, this we have already seen along three waves u minus a u plus a
what we do we will basically integrate it and I will get the analytical solution here
and we the assumption is that my entropy is constant everywhere. So, here this entropy
is constant along a line u, but let us say our entropy is constant everywhere those kind
of flows are called momentropic flows. This is not a bad assumption if your field
of far field is very, very far then there is no source of entropy generation there.
So, the entropy is not changing everywhere. So, you can use this relation. So, let us
integrate these things, but ultimately this is available in any text book. Only assumption
that you have to make is that this is momentropic flow. You have to probably use this relation
p to the power minus comma equal to constant. I think that is the relation that you will
use here and then you will get this relation not this equal to r t. So, then you will get
this Riemann invariance r minus and r plus and the idea is that this Riemann invariance
remain constant. So, you can use this relation. So, if I am
saying that my r plus is constant here. So, you can calculate it the r plus and r minus
across the boundary this invariance going in and going out and from this you can calculate
the value of u infinity and a using this incoming invariant and outgoing invariant. So, this
is how you calculate the values at the boundary. So, from the infinity value you calculate
this r minus for example, for the boundary and then from the interior value you calculate
the r plus. So, this wave is going out from the interior and something is coming in from
the outside. This is infinity and then you know this value r minus r plus. Then if you
add this to r minus and r plus, this is also is equal to u b n minus 2 a b by gamma minus
1. So, you can use this I mean manipulate this. This will also be the same thing. You
can manipulate this and you can get the value of u b n from here. You just need to add these
two and you will get the value of this multiply by I mean divide by minus half and when you
subtract it you will get the value of speed of sound.
Finally, you need to get the density and the pressure also. So, if it is outflow then you
extrapolate the entropy from the interior value. If it is inflow then you extrapolate
the entropy from the outside. Then again you use in those isentropic relations between
the density, your entropy and the speed of sound. Then you can get this density from
here. This is using the isentropic relation and finally, you can get the pressure because
you know the density, you know the speed of sound and gamma is known. So, you can get
the pressure. So, this is another approach where you can use to get those values of rho
b, u b and p b at the boundary using the Riemannian. So, this is used let us say if
you want to do a power field simulation. So, let us say this is your aerofoil and this
is your power field. So, you can give the value of whatever some value from the inside
I, some value from the infinity and you can use manipulate these values to get the values
at the boundary. The advantage of this boundary condition is that let us say the power field
is not very far. You could have directly used the infinity value also, but in that case
your boundary should be really very fast. So, if you want to do an aerofoil then you
have to probably use 50 times the chord length or 100 times the chord length. So, then you
will be ensure that there is no spurious wave which is coming in. Everything is going out,
but let us say you are doing it for 10 times the chord length or 15 times the chord length
which is not sufficiently far for the all the vertices to die out. In those cases you
have to use this characteristic based power field. So, that no waves are getting in, no
spurious waves are getting in and they follow the law of characteristics. Basically, the
rules of characteristics and then it goes according to the characteristics. So, that
is the advantage of the characteristic based power field. It can be used at the inlet also
and outlet also. These measurements can be used mainly in the customized code or if you
are developing code you can use this kind of idea to write your boundary condition.
So, now we have covered the boundary conditions. There are many other boundary conditions also
in the literature. For example, you may have the fan boundary condition. There may be interface.
Let us say if you have a two fluids with different density and viscosity, then there
will be something like the interface where the stress will go to 0. So, there will be
you have to have stress free boundary condition. So, fan boundary condition let us say if you
have propeller in front of a body and you want to find out what the jump across the
propeller or across the fan, then you have to need this kind of fan boundary conditions.
You can have the moving grid also. Let us say if you are simulating a car where the
wheels are moving. So, then you have to have some boundary condition for the moving grid
also. So, there are some other boundary conditions which are necessary in certain kind of flows,
but we will not be covering those because that will not be in the scope of this course,
but as you start using CFD and you will see that if you have the proper understanding
of the boundary condition, this I mean implementation of this boundary condition will not be very
critical. So, this finishes the boundary conditions discussion for the flow which are you can
call it a mean flow or the flow at low Reynolds number.
If the flow is turbulent, then you have to discuss what are the boundary conditions for
the turbulence parameters like the rho prime, u prime, g prime or may be the kinetic energy,
dissipation rate and so on and so forth. So, that we will discuss in the next class.
Thank you very much.
