Professional Documents
Culture Documents
CFD Assignment 2D Incompressible Flow
CFD Assignment 2D Incompressible Flow
CFD Assignment 2D Incompressible Flow
INSTITUTE OF ENGINEERING
PULCHOWK CAMPUS
AN ASSIGNMENT REPORT
ON
A Report on CFD Tutorial for a 2D Incompressible Flow
PROBLEMS
1. Visit the following web site and download ANSYS Student 2019 R2 and install it on
your own computer.
http://www.ansys.com/academic/free-student-products
Ans: Installed
2. Ans: Everything was clear and I did not notice any mistakes.
1
3. a) PROBLEM STATEMENT
Solve the tutorial problem using air with the following properties defined in Fluent’s database
METHODOLOGY
RESULTS
The fluid properties are given as:
𝜌𝑎𝑖𝑟 = 1.225 kg/m3, 𝜇𝑎𝑖𝑟 = 1.7894 × 10−5 Pa ⋅ s and Re =25
The value of uniform inlet velocity (Uin) is obtained as;
𝜌𝑈𝑖𝑛 𝐻
𝑅𝑒 =
𝜇
25×1.7894×10−5
𝑜𝑟, 𝑈𝑖𝑛 = = 0.00365 𝑚/𝑠.
0.1×1.225
2
The pressure variation along the channel centerline is shown by the graph below obtained
using ANSYS fluent.
Figure 1 Static Pressure variation using air as fluid element along the centerline
From the plot, the static pressure drop (Δp) along the channel flow is found to be 8.0782
× 10-5 Pa.
The non-dimensional Δ𝑝∗ can be calculated as shown below:
Δ𝑝 0.000080782𝑃𝑎
Δ𝑝∗ = 2 = = 9.90 (≈ 9.92)
𝜌𝑈𝑖𝑛 /2 1.225 × 0.003652 × 0.5
Therefore, it matches the one calculated in the tutorial.
3 b) PROBLEM STATEMENT
This time use glycerin (a very viscous liquid) with the following properties defined in Fluent’s
database
𝜌 𝑔 𝑙 𝑦 𝑐 𝑒 𝑟 𝑖 𝑛 =1259.9 kg/m3, 𝜇 𝑔 𝑙 𝑦 𝑐 𝑒 𝑟 𝑖 𝑛 =0.799 Pa⋅s
3
Solution
The fluid properties are given as:
𝜌 𝑔 𝑙 𝑦 𝑐 𝑒 𝑟 𝑖 𝑛 =1259.9 kg/m3, 𝜇 𝑔 𝑙 𝑦 𝑐 𝑒 𝑟 𝑖 𝑛 =0.799 Pa⋅s and Re =25
The pressure variation along the channel centerline is shown by the graph below obtained
using ANSYS fluent.
Figure 2 Static Pressure variation using air as fluid element along the centerline
From the plot, the static pressure drop (Δp) along the channel flow is found to be 156.638
Pa.
The non-dimensional Δ𝑝∗ can be calculated as shown below:
Δ𝑝 156.638𝑃𝑎
Δ𝑝∗ = 2 = = 9.898 (≈ 9.92)
𝜌𝑈𝑖𝑛 /2 1259.9 × 0.15852 × 0.5
4
Therefore, it matches the one calculated in the tutorial.
d) Why is similitude and dimensional analysis more critical for experimental studies
compared to CFD simulations?
Ans: Similitude and dimensional analysis are more critical for experimental studies compared to
Computational Fluid Dynamics (CFD) simulations due to the need to accurately scale and
reproduce physical properties, forces, and phenomena in the laboratory setup. Experimental
studies rely on real-world interactions, where dimensional analysis helps identify relevant
parameters, scaling laws, and validate empirical correlations.
CFD ensures the accuracy and validity of results by accounting for physical properties and
forces, while CFD simulations offer more flexibility in adjusting parameters numerically.
However, for experimental studies, similitude and dimensional analysis play a crucial role in
ensuring the accuracy, relevance, and applicability of the findings as compared to CFD
simulations
5
4) PROBLEM STATEMENT
Let’s add a second inlet to the channel problem of the first tutorial as follows
Solution
Setup and Solution
The analysis in ANSYS FLUENT involved the use of a Pressure-based solver with an absolute
velocity formulation. The study focused on steady, planar 2D flow without considering
gravitational effects. The analysis was specific to a single-phase, laminar flow with no heat
transfer, and all other model settings were turned off except for the laminar model.
To simulate the flow, a new fluid material with a density of 1 kg/m³ and a viscosity of 0.0001
Pa.S was created and employed. The named sections or zones in the domain were assigned with
the appropriate boundary conditions based on the given problem statement. There were two
inlets as shown in the figure. The inlet sections were set as a Velocity-inlet type boundary with a
specified velocity magnitude of 0.025 m/s and 0.1 m/s respectively. The outlet section was
assigned as a Pressure-outlet type boundary with a default pressure of 0 Pa. The walls of the
domain were defined as Wall type boundaries with stationary wall conditions and no-slip.
For the solution process, a default pressure-velocity coupling method was used, along with
default relaxation factors. The report definitions were set to obtain the x-component of velocity
at the midpoint of the outlet edge, referred to as "outlet-velocity." The residual tolerance values
were set to 0.001, and the solution was initialized using Hybrid Initialization. Subsequently, the
calculations were performed for 1000 iterations, with convergence monitored. Scaled residuals
and outlet-velocity plots were obtained to analyze the solution. These plots are shown below:
6
Figure 3: Console data 1
The solution converged at the iteration number of 33. As soon as the residuals of all three
equations (continuity, x-velocity, and y-velocity) drop below the specified tolerance (0.001),
solution is considered to be converged and it is terminated. The final value of the x-velocity at
the mid-point of the exit plane is reported as 0.112 m/s.
7
Residual plot is given above. These are scaled (the default option), but not normalized residuals.
They are a measure of how good the calculated approximate solution satisfies the continuity, x-
momentum, y- momentum equations that are solved. There is one curve for each of the solved
equations. Blue curve is for the continuity equation and it is the one that converges the slowest.
This is typically the case for most incompressible flows, i.e. continuity equation is the hardest to
satisfy.
The plot for the monitored x-velocity at the center of the outlet plane is shown above. It starts
from the initial value of 0.0856 m/s and reaches the stabilized speed of 0.112 m/s at 28th
iterations.
❐ Contour plot of velocity magnitude. Discuss the flow physics you see in the plot.
8
Figure 6: Velocity magnitude Contour
The velocity magnitude contour plot was generated to distinguish between the developing and
fully developed regions at both inlets. In the plot, the flow velocity predominates at the bottom
inlet, although it is overshadowed in the contour. The legend indicates that red color represents
high-speed regions, while blue color represents low-speed regions. As the flow develops, fluid
particles near the walls experience deceleration, indicated by the presence of green and blue
colors, due to the no-slip condition. Conversely, fluid particles closer to the channel centerline
accelerate, represented by the presence of orange and red colors, to conserve mass.
Furthermore, the contour plot reveals the mixing of the initially low-speed flow from one inlet
with the high-speed flow from the bottom inlet. This mixing results in a rapid jump in fluid
velocity at the center of the channel, while the flow along the walls remains slower due to the
application of the no-slip boundary condition.
9
❐ Contour plot of the static pressure. Discuss the flow physics you see in the plot.
The static pressure contour plot provides valuable insights into the pressure distribution within
the system. It is observed that the pressure is highest at the inlets, as depicted by the red color. As
the flow progresses along the channel, the pressure gradually decreases, eventually reaching a
value of zero at the outlet. This pressure decrease is represented by the color gradient shifting
towards blue.
By examining the pressure contour figure shown below, the iso-pressure lines at the
inlets become more apparent. These lines represent regions with constant pressure, and their
distribution can be clearly seen in the plot. The colors assigned to these lines indicate the
corresponding pressure values, offering a visual representation of the pressure distribution
throughout the domain.
Notably, the curved contour lines at the inlets demonstrate the impact of the flow interacting with
the no-slip walls. This interaction causes a sudden deceleration of the flow at the corners, leading
to changes in the pressure distribution in those areas. Consequently, the pressure contours
provide valuable information about the flow behavior and the effects of wall boundaries on the
pressure distribution.
10
Figure 8: Static Pressure contour lines along the channel flow
Moreover, the contour plot allows for the observation of pressure contours resulting from the
mixing of different flow streams. These contours enable us to analyze the pressure distribution
and variations within the flow region, giving further insights into the flow behavior and its
interaction with the boundaries.
❐ Contour plot of the stream function. What information does this plot tell us?
The streamlines obtained from the inlets reveal important flow characteristics within the channel.
It can be observed that as the fluid enters the channel near the corners, it experiences
deceleration due to the application of the no-slip condition at the walls. Consequently, the fluid
redirects towards the centerline, resulting in an increase in velocity along the centerline before
the mixing region. Within the flow mixing region, a notable sudden increase in velocity occurs
11
along the central region. This can be attributed to the combination of different flow streams
coming from the inlets and their interaction within this region.
These streamlines provide valuable insights into the flow behavior, illustrating how the fluid
undergoes changes in velocity and direction as it moves through the channel.
❐ 𝑢 velocity plot along the main channel centerline. Discuss what happens physically in
different parts of the plot.
In the initial inlet region, the flow velocity experiences a significant increase as it develops along
the channel. This can be observed between the region from 0 to 0.2. As the flow progresses,
there is a subsequent jump in velocity at the mixing point where it interacts with the flow from
the high-speed bottom inlet. This mixing process and flow development result in another velocity
jump at the entrance region. Following the mixing and development, the flow velocity
experiences a slight drop before stabilizing to an approximate value of 0.112 m/s as it propagates
further through the channel section. This stabilization indicates that the flow has reached a
relatively steady state, with the velocity maintaining a relatively constant value.
12
Analyzing the variations in flow velocity along the channel provides valuable insights into how
the flow evolves and develops as it interacts with different inlet streams. Understanding these
velocity changes is essential for comprehending the flow behavior and its impact on the overall
fluid dynamics within the channel.
❐ Pressure plot along the main channel centerline. Discuss what happens physically in
different parts of the plot.
The plot depicting the static pressure along the center line of the flow reveals interesting pressure
variations. Initially, within the developing region influenced by the first inlet, a slight excessive
pressure drop is observed. However, this pressure drop gradually stabilizes and exhibits a linear
behavior until approximately 0.2 along the center line. Between the region of 0.2 and 0.3, a rapid
pressure drop occurs, primarily attributed to the mixing of different flow streams. Subsequently,
the pressure drop undergoes further development and tends to follow a near-linear trend.
Eventually, as the flow reaches the outlet, the pressure drops to 0 Pa, aligning with the expected
behavior for a pressure outlet boundary condition.
13
❐ 𝑢 profile plot at the outlet. What is the maximum speed? What should be the maximum
speed of the analytical fully developed profile?
14
Figure 13: Velocity vectors at the outlet plane
The velocity profile along the outlet exhibits parabolic shape, which is a characteristic feature in
fluid dynamics. The maximum velocity, approximately 0.112 m/s, is observed at the center line
of the outlet. This parabolic velocity profile signifies the distribution of velocities within the flow
as it exits the channel. The highest velocity occurs at the center line, while the velocities decrease
gradually towards the channel walls. This pattern is commonly observed in fully developed flows
and is a result of the interaction between the fluid and the channel boundaries.
15
Figure 14: Conservation of mass report
Also, for the conservation of mass, the difference between mass coming out from the inlets and
the mass going out of the outlets is in the order of 10-8 indicating high level of accuracy which
concludes that the mass is conserved.
Defining the Reynolds number based on the channel length is not meaningful. Why?
Solution
Reynolds number defined by channel length is not meaningful because the diameter of the
channel represents a characteristic dimension of flow geometry and is directly related to the flow
area. Also, diameter provides a convenient and practical measure for characterizing pipe flow. It
allows for easy comparison of flow condition in different pipes of varying sizes and ensures
consistency in interpolation of flow regimes and transition points. Also, diameter is easily
measurable parameters in pipe flow.
We know that if the Reynolds number is high enough the flow turns into turbulent. For a
circular pipe the critical Reynolds number for transition to turbulence is about 2300. At
what Reynolds number do you think the flow in our 2D channel will turn into turbulent?
Solution
If the Reynolds number > 4000, the flow in our 2D channel will be turbulent.
To Do: Change the Mesh Metric to other available options, such as aspect ratio or
orthogonal quality and examine the mesh quality in terms of them. Read the related parts
of Fluent’s User Guide and learn how they are calculated, what their numerical values
correspond to and what their acceptable ranges are.
16
Solution
Aspect Ratio
The aspect ratio is a measure of the stretching of a cell. It is computed as the ratio of the
maximum value to the minimum value of any of the following distances: the distances between
the cell centroid and face centroids, and the distances between the cell centroid and nodes. For a
unit cube (see Figure below), the maximum distance is 0.866, and the minimum distance is 0.5,
so the aspect ratio is 1.732. This type of definition can be applied on any type of mesh, including
polyhedral.
The plot above shows that our mesh have the minimum aspect ratio of 1.003 which is fairly
perfect and excellent. The maximum aspect ratio is 2.4682, which is good. The average Aspect
ratio of our mesh is 1.2458 which is excellent. Overall, the mesh quality is excellent, and this can
produce accurate results.
18
Figure 20: Elements with Aspect ratio 1
This is the mesh showing elements having aspect ratio of 1 in our flow channel. The figure
below shows the closeup view of the mesh having aspect ratio 1. The mesh is equilateral triangle.
Orthogonal Quality
An important indicator of mesh quality is an entity referred to as the orthogonal quality. The
worst cells will have an orthogonal quality close to 0 and the best cells will have an orthogonal
quality closer to 1.
Mesh orthogonality is the angular deviation of the vectors S (located at the face center f) from
the vector d connecting the two cell centers P and N. In this case is 20 degrees.
19
Figure 23: Orthogonal quality of 2D flow channel
The graph shows the orthogonal quality of our mesh. The plot describes that the
maximum orthogonal quality is 0.999999 which is nearly equal to 1. The minimum
orthogonal quality is 0.65841 which is good. The average mesh quality is 0.95438. This
indicates the excellent mesh quality. Our mesh is highly accurate.
This is the mesh in a 2D flow channel having orthogonal quality of 1. The figure below
shows the closeup views of mesh having orthogonal quality 1
20
Figure 26: Closeup view of mesh having orthogonal quality 1
To Do: After finishing this tutorial you can come back to this step and play with
other mesh generation and mesh sizing options.
Firstly , automatic meshing was done using ANSYS solver. Then, the edge sizing was
done on left and right edge with the element size of 0.001m. The bottom and top edges
were given the number of divisions of 150. The figure below shows meshing before
applying quadrilateral face meshing. The figure above shows the refine mesh after
applying quadrilateral face meshing. The number of nodes and elements were 1661 and
1500 respectively.
21
Figure 30: Mesh quality (Element quality)
The statistics above shows mesh quality of our meshing. The element quality has
an average mesh metric of 0.92255. Similarly, the average orthogonal quality of
our meshing is 1 which is perfect. This concludes that the mesh quality of our 2D
channel flow is excellent.
To Do: When you are done with this tutorial, go back to the Meshing
application, make the mesh finer close to the outlet, re-solve the problem and
see if these unphysical oscillations disappear or not.
First the automatic meshing was done by ANSYS solver. Then, we did face
meshing on the frontal area (front face) of the 2D flow channel. The quadrilaterals
method was selected in face meshing.
22
Figure 33: Statistics on Meshing
The number of nodes and elements were 3042 and 2856 respectively.
By doing so, the centerline velocity throughout the channel after the position 0.2m
was stable with no oscillations throughout the channel which can be seen in the
figure below
REFERENCES
[1] Pradip Niyogi, Sunil Kumar Chakrabartty, and Manas Kumar Laha, Introduction to
Computational Fluid Dynamics: Pearson Education India.
[2] J. Tu, Guan Heng Yeoh, and Chaoqun Liu, Computational fluid dynamics a practical
approach. Oxford Butterworth-Heinemann, 2018.
[3] ThéveninD. and JanigaG., Optimization and computational fluid dynamics. Berlin: Springer
Verlag, 2008.
***
24