We will learn how to estimate the physical wall distance
for a given value of y+,
and how to use Ansys Fluent’s post-processing tools
to check and confirm the y+ values.
We are going to learn how to set boundary conditions for turbulence.
Previously, we discussed the mesh resolution requirements
for the different near wall modeling approaches.
These requirements are expressed in terms of y+,
which is a dimensionless quantity.
Because the mesh resolution and near wall modeling approach
are closely coupled,
we need to choose which approach to use before creating a mesh
and this means that, we will have a target value
for y+ in the wall adjacent cells.
Now, y+ is dimensionless,
but the meshing program needs us to enter
the actual physical distance from the wall,
so that means we need to be able to estimate
the wall distance that corresponds to the target value of y+,
so let’s see a quick example of how to do this.
Imagine we are going to calculate air flow
over a one meter long flat plate.
The air velocity is 20 m/s and it has the density
and viscosity values that you see on the page.
The Reynolds number for these conditions is
1.4 times ten to the sixth,
so the flow is definitely turbulent
and for this problem we will use the wall function approach
and try to have y+ = 50 at the first grid point.
To start with, take the definition of y+
and rearrange it so the wall distance, y,
is on the left of the equals sign.
We know what value we want for y+
and we know the fluid properties,
so all that is missing is the friction velocity.
To get the friction velocity, we need to know the wall shear stress
and this can be found from the skin friction coefficient.
For the flow over a flat plate, there is a formula for
the skin friction coefficient as a function of Reynolds number,
which we already know, so we just need to plug that
into the formula and work backwards.
So the value of the skin friction coefficient is .0034
which gives the wall shear stress as 0.83 kilograms
divided by meters times seconds squared,
or in other words 0.83 Pascals, and the friction velocity is 0.82 m/s.
So after all that, we find that
y should be 9 times 10 to the minus fourth meters,
or approximately one millimeter.
In Ansys Fluent y+ is based on
the distance from the wall to the cell centroid,
so if you are using Ansys meshing or Fluent meshing
you would enter twice this value
for the height of the first inflation layer or prism layer.
Now, unless you're literally solving for flow over a flat plate,
the wall distance calculation we have just done here
only provides an estimate,
and the actual value of y+ will only be known
when the solution is calculated.
That means in most cases, it will be necessary to check
the solution values of y+
to make sure they are in the appropriate range.
In a 3D case, you can display y+ contours on walls.
Just choose turbulence and then scroll down
near the bottom of the list to find "Wall Yplus".
For y+ contours, I like to unselect node values
so that I can see what the actual solver values on the wall
without any interpolation,
but many people also prefer node values,
so as you get used to working with Ansys Fluent
you can figure out what works best for you.
If you are running a 2D case,
then while it is possible to use contours,
most people prefer to use xy plot,
so again, you just open the panel,
and find y_plus in the turbulence category
and select the wall where you want to plot the y+.
Now, we are going to learn how to set
boundary conditions for turbulence.
As we have seen earlier, when you activate a turbulence model,
Ansys Fluent solves a number of
additional transport equations for that model.
For instance if you are using the SST k-omega model,
it will solve one additional transport equation
for the turbulent kinetic energy, k,
and a second additional equation
for the specific dissipation rate, omega.
You need to set boundary conditions for these equations
at all inlet boundaries,
and you also need to set values at outlet boundaries
in case there is backflow.
Let’s look at an inlet boundary condition panel to see how this works.
This is a velocity inlet,
but it works the same way for any kind of inlet.
The turbulence settings can always be found
near the bottom of the panel in the momentum tab.
First, you choose the specification method
and then you enter appropriate inlet values for that method.
You can see in the panel that there are four different methods,
so there is a bit of flexibility,
and I want to briefly discuss each of the methods
so that you know what they are.
The default method is turbulent intensity and viscosity ratio.
Turbulent intensity is a measure of the strength
of the turbulent fluctuations.
A value of .05 means that
the velocity of the turbulent fluctuations is 5% of the mean velocity.
The turbulent viscosity ratio is defined as the ratio of
the turbulent viscosity to the fluid viscosity.
The default values of turbulent intensity equal to 5 percent
and turbulent viscosity ratio equal to 10
are reasonable values for cases where you may have
no other information about the turbulence at an inlet.
In many cases, you will have some information
and we’ll talk more about these cases in just a bit.
If you prefer, you can still use the turbulent intensity
but instead of viscosity ratio,
you can use either the turbulent length scale or the hydraulic diameter.
The turbulent length scale is related to the size of the large,
turbulent eddies which bear most of the turbulent kinetic energy.
In a boundary layer, a reasonable value for this input
might be about 40 percent of the boundary layer thickness,
which is denoted here by delta 99.
The other choice is turbulent intensity and hydraulic diameter,
and this is particularly convenient for internal flows,
which makes it a natural choice for this model here
where both the inlets are pipes.
In this case, the diameter of the large inlet is 10 cm
and the small one is 2.5 cm.
The reason there are choices like this
instead of just entering values for k and epsilon, or k and omega,
is that variables like epsilon or omega are often
not physically intuitive and they can be difficult to measure,
so instead of asking you to enter these directly,
Ansys Fluent calculates what the values should be
based on your inputs of more familiar quantities
like length scale or hydraulic diameter.
However, you do have the option to specify these values explicitly,
and the most common reason for doing so
would be when you want to input non-uniform
turbulence profiles at an inlet.
Profiles like this would normally be obtained by first doing a separate,
precursor calculation of the flow upstream of the inlet
and using those results for the inlet profiles.
This can help to improve the accuracy of the CFD results
in cases where it is desired to perform a high fidelity simulation,
and the boundary of the computational domain
is located very close to an area of interest.
You will eventually learn the best inlet values
for a given application from experience,
but there are some guidelines
that might help when you are just starting out.
In the absence of any better estimates,
here are some values you can try:
Normal turbulent intensities range from 1 to 5%.
And anything higher than 10 or 15 percent would probably be unusual,
although there are cases,
for instance if the inlet is located immediately
downstream of a turbine or compressor stage,
where intensity can be a little higher.
For external aerodynamics flows,
turbulent intensity is normally 1% or lower
and turbulent viscosity ratio values in the range of 1 to 10
would be common.
The default intensity of 5% is a good estimate
for turbulence through a circular inlet
and for internal flows,
a turbulent viscosity ratio of 10 to 100 would typically be a good value.
Finally, if you are uncertain about the sensitivity of your results
to the turbulence boundary conditions,
it is recommended to do a sensitivity study,
recalculate the flow using one or more
additional sets of boundary values.
This is normally pretty easy to do
because you can just start with the previous solution
and then change just the turbulence boundary conditions
and the solution will normally converge again
in a small number of iterations.