Hello and Welcome!
The focus of this lesson is on
one of the critical components of any CFD simulation,
the Boundary conditions!
Here, we will understand
what boundary conditions do,
their classification,
various options to specify boundary values
and the importance of defining
well posed boundary conditions in a simulation.
Without any further delay, let’s get started.
let’s get started.
CFD simulation involves
solving equations for mass, momentum, energy and so on
and the CFD solution within the computational domain
depends on flow conditions or the flow variables
defined at the boundary of the computational domain.
Therefore, the use of appropriate boundary conditions
is essential to the accuracy of the CFD solution.
Defining boundary conditions includes
assigning values,
choosing what boundary type to use
and where to locate the boundary.
These choices are important, and they depend on
various factors including geometry,
the known flow values at the location of the boundaries
and some numerical considerations
related to the way the different boundary types work.
Let us now look at how
boundary conditions can be defined in Ansys Fluent.
Let’s open Ansys Fluent in Solution mode
and load the provided case file.
Once the case file is loaded,
go to the Zones group in the Physics tab
and click on Boundaries
to open the Boundary Conditions Task Page.
This Task Page has options to display boundaries
in List View, or group them by Name or Zone Type.
Let’s arrange the boundaries by Zone Type.
You can also filter them using Filter Text.
Boundary Conditions are also available
under the Outline View.
Right clicking on a boundary
brings up a context menu
with options similar to that of
Boundary Conditions Task page.
Click on Edit to open boundary conditions panel.
Boundaries are classified into two main categories,
external boundaries, and internal boundaries:
External boundaries are those where
the mesh cells are attached to only one side of the boundary.
These boundaries include
various kinds of flow inlets and outlets, external walls,
symmetry or periodic boundaries and some special types
which are intended to act as simplified representations
of fans or vents.
At the inlet and outlet boundaries,
we normally specify either the total pressure
or the mass flow rate,
or if the flow is incompressible,
mass flow rate can be replaced with velocity.
The most commonly used inlet and outlet boundary types
are pressure inlet, pressure outlet,
mass flow inlet and velocity inlet.
The pressure far field boundary condition can be used
to define free stream boundary conditions
for external compressible flows,
and outflow only applies
if the flow is both incompressible and fully developed
at the location of the boundary.
Internal boundaries are those where there are
cells attached to both sides of the boundary faces.
The most commonly used internal boundary types are
interior and wall boundaries.
When there is a wall that is an internal boundary,
Ansys Fluent automatically creates a shadow wall zone
when the mesh file is read,
and this can be identified by the name
which includes “shadow” with it.
This is done for a two-sided wall
as it makes it easier for the solver internally
to keep track of the applied boundary conditions
on either side of the walls.
There are no explicit conditions applied at interior boundaries
and the flow passes freely through it.
You can also assign names to an interior boundary
just by selecting a boundary and clicking on the Edit button.
It's not required to assign a name to an interior boundary,
but sometimes,
it can be convenient to do so to use it for post processing.
The other three internal boundary types are
porous jump, fan and radiator
but they're much less commonly used.
You can change the Boundary Type just by selecting a boundary
and choosing a different Type from the list.
In this demo, the Inlet is set to Velocity-inlet,
all internal boundaries to interior,
and the outlet is set to Pressure-outlet type.
We have one Symmetry boundary
and three Wall boundaries defined.
To open the boundary conditions panel,
select a boundary from the Boundary Conditions Task Page.
Let’s say Inlet and now click on the Edit button.
The boundary conditions panel contains many inputs
depending on the type of boundary selected,
physics models activated in the simulation,
and many other factors.
For the purpose of this lesson, we will limit ourselves
to discussing how to input values wherever needed,
without getting into other specific details.
Since the Inlet boundary is defined as a velocity-inlet boundary type,
the default option is to specify constant or uniform values.
Let’s enter Velocity Magnitude of 1 m/s.
Non-uniform boundary values can be specified using Expressions.
An expression is a string with values, variables, functions and units.
To specify an expression, select Expression
from the drop down in the boundary conditions panel
and now you can type the Expression
or open Expression Editor by clicking on the Function symbol
next to the input field.
The Expression Editor panel has more room to type,
and there are context menus to choose Functions and Variables.
It also features syntax highlighting and profile plotting
to make it easier to ensure that the correct expression is entered.
Expressions can also be defined in the Outline View
by right clicking on Named Expressions and then click New.
After the expression is created,
you can directly use Named Expressions in the entry field.
For a detailed discussion on the usage of expressions,
please refer to our lesson on Expressions.
Another way to enter Boundary Conditions
is to left click on a boundary in the Graphics window.
This opens a Quick Property Editor panel
which includes entries for most important settings
making it easy to type in values.
Note that the values entered here
are immediately reported in the Console.
There is no Undo button for these values,
it reports both old and new values in the Console
to help revert changes if required.
You can also click on more button to open the boundary conditions panel.
Boundary Conditions for multiple boundaries
of the same type can be defined at the same time
using Multi Edit feature.
You can use the Control key and select multiple boundaries
of the same type in the Outline View.
Here let’s select walls, then right click
and select Multi Edit from the context menu.
This opens a Multi Edit panel
where you can define the desired boundary conditions
for all the boundaries that are selected in the Zone List.
Let’s say we want to modify temperature values for both
wall-1 and wall-2, for that let’s click on Thermal tab,
select Temperature under thermal conditions,
set temperature to 0° C,
select wall-1 and wall-2 under the Zone list and click Apply.
To revert changes, you can click on the green check mark
before clicking Apply.
Boundary Conditions can be copied by clicking on the Copy button.
This only works between Boundary conditions of the same type.
Let’s say we want to copy wall-1 boundary conditions to wall-2.
In the Copy conditions panel
select wall-1 under ‘From Boundary Zone’,
wall-2 under ‘To Boundary Zones’.
Now click Copy and select Ok.
Boundary conditions can also be transferred
from one case to another case using Copy to Clipboard feature.
Right click on the Boundary Conditions in the Outline View
and select Copy to Clipboard from the context menu.
And then navigate to other case,
right click on the Boundary Conditions in the Outline View
and say Paste.
You can also copy and paste this to Excel
or to use it as text file right click on Boundary Conditions
and select ‘Export to File’ option.
Fluent uses a tab-separated values format, or TSV,
and you can just enter a name for the file and then click Ok.
Now navigate to the other case,
right click and select ‘Import from File’,
and then the TSV file is available to select.
If you have two Fluent sessions open at the same time,
then it is possible to drag and drop the boundary conditions
from one case onto another case,
and there are two different methods for doing so.
In the first one,
click and hold the boundary conditions branch
and drag it onto the other case
and click Ok to perform this drop operation
on the boundary conditions.
Boundary conditions are applied to boundaries in the target session
that have names which match exactly with the names
of boundaries from the source session.
If there are boundaries in the source model which are named differently,
or there are more boundaries, or any other differences,
those boundaries will be ignored in the drop operation.
It only works for boundaries with identical names,
and the changes are shown in the Console.
Note that before copying boundary conditions from one case to another,
it is recommended to activate all relevant physical models
before performing the copy operation.
If a model is not enabled in the receptor case,
its related boundary conditions will not be copied.
The second method is to drag one boundary onto another,
which will force both the boundary type
and the settings onto the boundary where it is dropped,
but the names do not have to match.
We can see this by dragging one of the walls onto the inlet.
The inlet is now changed to wall
with the same wall thermal boundary condition applied to it.
So far, we discussed the various ways to specify values at boundaries.
Another important aspect when specifying boundary conditions
is defining well-posed boundary conditions.
The Boundary Conditions applied should be both
physically meaningful and consistent
with mathematical formulation of the applied boundary type.
For example, when defining a pressure-outlet boundary
for flows involving recirculation zones
near the outlet boundary,
the ideal location for the boundary would be
downstream of the recirculation zone
and not in the recirculation zone,
due to the mathematical formulation
of the pressure-outlet boundary condition.
Here are some of the well posed combinations of boundary conditions
for simulations involving one inlet and one outlet.
For an incompressible flow,
the combinations of velocity inlet and pressure outlet,
or mass flow inlet and pressure outlet provide robust convergence.
For a compressible flow,
the combination of mass flow inlet and pressure outlet
provides robust convergence.
In any of these cases, the mass flow rate is directly or indirectly specified
and the total pressure at the inlet adjusts
to accommodate the specified value.
Note that the combination of pressure inlet and pressure outlet
can be used for any flow,
and in this case the mass flow rate through the inlet
adjusts to accommodate the specified total pressure.
In some cases, using this combination
leads to the rate of convergence being
sensitive to the initial condition.
There are also some combinations to avoid.
These include the combination of pressure inlet with outflow,
which does not guarantee a unique solution.
For the same reason, the combination of outflow and mass flow inlet
should not be used unless the density is constant.
It's also not recommended to use velocity at both the inlet and the outlet
because the system could become numerically unstable
if the resulting flow rates do not match identically.
Let’s summarize what we learnt in this video.
We discussed what boundary conditions are, their classification
and the need to define appropriate Boundary Conditions
in the computational domain.
We learnt how to access the boundary conditions panel,
how to copy boundaries, change boundary type,
specify boundary values using Expressions
and Quick Property Editor panel.
We explored the Multi Edit feature
and the different ways of transferring boundary conditions
from one case to another.
Lastly, we also discussed the importance of defining
well posed boundary conditions
and the recommended combinations.
With this, let’s wrap up the lesson!