0% found this document useful (0 votes)
25 views31 pages

CFD Assignment - Extra Notes (2) - 1

This document provides information about computational fluid dynamics (CFD) assignments and simulations. It discusses topics like the CFD assignment requirements, geometry modelling of an aerofoil, meshing examples, boundary conditions, Reynolds number, turbulence models, wall modelling strategies, and mesh resolution near walls.

Uploaded by

Ebaad shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views31 pages

CFD Assignment - Extra Notes (2) - 1

This document provides information about computational fluid dynamics (CFD) assignments and simulations. It discusses topics like the CFD assignment requirements, geometry modelling of an aerofoil, meshing examples, boundary conditions, Reynolds number, turbulence models, wall modelling strategies, and mesh resolution near walls.

Uploaded by

Ebaad shah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

PUBLIC / CYHOEDDUS

NG3S238 Engineering Computational Analysis –


Computational Fluid Dynamics (CFD)

CFD Assignment -
Extra Notes

Dr. Shee Meng Thai


Faculty of Computing, Engineering and Science
E-mail: [email protected]
Room: TR G207
PUBLIC / CYHOEDDUS

Learning Schedule (Autumn Term)


Uni. Week (w/c) Lecture Topic Notes
th
2 (26 Sep 22) Module Overview & Introduction to CFD
rd
3 (3 Oct 22) Introduction to ANSYS Workbench & ANSYS DesignModeler – Basic
th
4 (10 Oct 22) Introduction to ANSYS DesignModeler – Geometry Modelling Assignment Hand Out
th
5 (17 Oct 22) Introduction to ANSYS Meshing – Methods
th
6 (24 Oct 22) Introduction to ANSYS Meshing – Global and Local Mesh Controls
st
7 (31 Oct 22) Introduction to ANSYS Fluent - Boundary Condition
th
8 (7 Nov 22) Lab Session
th
9 (14 Nov 22) Introduction to ANSYS Fluent - Solver Settings
st
10 (21 Nov 22) Case Study – CFD Modelling of Aerofoil
th
11 (28 Nov 22) Turbulence Model
th
12 (5 Dec 22) CFD Result and Post-processing
th
13 (12 Dec 22) Review Assignment Hand In
14-16 Christmas Vacation
2
PUBLIC / CYHOEDDUS

Report 2 – CFD Assignment


• Carry out a 2-dimensional CFD analysis on a NACA0012 aerofoil using ANSYS
Fluent.
• Analyse the CFD results for Coefficient of lift (𝐶𝐶𝐿𝐿 ), Coefficients of Drag (𝐶𝐶𝐷𝐷 ),
and Coefficient of Pressure (𝐶𝐶𝑃𝑃 ) with respect to a range of angles of attack
(𝐴𝐴𝐴𝐴𝐴𝐴).
• A practical test on the same NACA0012 aerofoil using TecQuipment’s
subsonic open circuit wind tunnel located in TR G236 will be carried out.
• Test results will be collected and used to validate the CFD results for 𝐶𝐶𝐿𝐿 , 𝐶𝐶𝐷𝐷
and 𝐶𝐶𝑃𝑃 .
• You are required to submit a 3000-word report based on your findings. 3
PUBLIC / CYHOEDDUS

Coordinate File for 3D Curve


A coordinate file must be a simple text file in
the following format:
 The # sign indicates a comment
 Empty lines are ignored
 Data consists of five fields, all on one line,
separated by spaces and/or tabs:
 – Group number (integer)
 – Point number (integer)
 – X coordinate
 – Y coordinate
 – Z coordinate
 A data line cannot contain the same Point
number as a previous data line. 4
PUBLIC / CYHOEDDUS

Coordinate File for 3D Curve - Example


Data Source: Airfoil Tools; UIUC Applied Aerodynamics Group

Beginning End Rows


Rows

5
PUBLIC / CYHOEDDUS

NACA 0012 DesignModeler Example

6
PUBLIC / CYHOEDDUS

NACA 0012 Meshing Example - Structured Mesh

7
PUBLIC / CYHOEDDUS

NACA 0012 Boundary Conditions Example

Upper
Aerofoil Wall

Velocity Pressure
Inlet Outlet
Lower
Aerofoil Wall

8
PUBLIC / CYHOEDDUS

Reynolds Number (Re)


 The Reynolds number is the criterion used to determine whether the flow is
laminar or turbulent Where: 𝜌𝜌 = density (kg/m3)
𝑈𝑈 = mean velocity (m/s)
𝝆𝝆𝝆𝝆𝝆𝝆 𝑼𝑼𝒍𝒍 𝑙𝑙 = linear dimension (m)
𝑹𝑹𝑹𝑹𝒍𝒍 = or 𝑹𝑹𝑹𝑹𝒍𝒍 =
𝝁𝝁 𝜇𝜇 = dynamic viscosity (kg/ms)
𝝂𝝂 𝜈𝜈 = kinematic viscosity (m2/s)
 The Reynolds number is based on the length scale of the flow:

𝒍𝒍 = 𝒙𝒙, 𝒅𝒅, 𝒅𝒅𝒉𝒉 , etc.


 Transition from laminar to turbulence varies depending on the type of flow:
 External flow
• along a surface : 100 000 > 𝑅𝑅𝑅𝑅𝑥𝑥 > 500 000 Other factors such as free stream turbulence,
surface conditions, blowing, suction, and other
disturbances etc. may cause transition to
 Internal flow : 2300 > 𝑅𝑅𝑅𝑅𝑑𝑑𝑑 > 4 000 turbulence at lower Reynolds numbers
9
PUBLIC / CYHOEDDUS

Turbulence Boundary Layers


 A turbulent boundary layer consists of
distinct regions

 For CFD, the most important are the viscous


sublayer, immediately adjacent to the wall
and the log-layer, slightly further away from
the wall

 Different turbulence models require


different inputs depending on whether the
simulation needs to resolve the viscous
sublayer with the mesh
 This is an important consideration in a
turbulent flow simulation and will be
described in the next few slides
10
PUBLIC / CYHOEDDUS

Turbulence Model Selection: A Practical Approach


 Fluent offers the choice of many turbulence models
 Some are used only for very specific applications
 For getting started
 The Realizable k-ε or SST k-ω models are recommended
choices for standard cases
 Where highly accurate resolution of boundary layers is
critical, such as applications involving flow separation or
finely resolved heat transfer profiles, SST k-ω is preferred
 If only a crude estimate of turbulence is required, the
standard k-ε model can be used
 For SST k-ω Low-Re Corrections may be applied when
dealing with transition between laminar and turbulence
flow regime.
11
PUBLIC / CYHOEDDUS

Wall Modelling Strategies

 In the near-wall region, the solution gradients are very high, but
accurate calculations in the near-wall region are paramount to the
success of the simulation. The choice is between:

A. Using Wall Functions

B. Resolving the Viscous Sublayer

(details on next slide)

12
PUBLIC / CYHOEDDUS

Wall Modelling Strategies: Using Wall Functions


Using a Wall Function:
 First grid cell needs to be 30 < 𝑦𝑦 + < 300 and should be located in the log-layer.
 This is a very general guideline, not an absolute rule
 For very high 𝑅𝑅𝑅𝑅, 𝑦𝑦 + can be higher if still in log layer.

 For very low 𝑅𝑅𝑅𝑅 (but still turbulent), the log-layer may not extend far enough away from
the wall for the use of wall functions to be valid.

 Wall functions should never be used if 𝑦𝑦 + < 30

 Generally speaking, this is the approach if you are more interested in the
mixing in the middle of the domain, rather than the forces on the wall.
13
PUBLIC / CYHOEDDUS

Wall Modelling Strategies: Resolving the Viscous Sublayer


Resolving the Viscous Sublayer:
 First grid cell needs to be at about 𝑦𝑦 + ≈ 1.
 These are not magic numbers – this guideline ensures the mesh will be able to adequately
resolve gradients in the viscous sublayer.
 This will add significantly to the mesh count (see next slide).
 Use a low 𝑅𝑅𝑅𝑅 turbulence model (i.e. SST k-ω).
 Generally speaking, if the forces on the wall are key to your simulation
(aerodynamic drag, turbomachinery blade performance, heat transfer) this is the
approach you will take.
 The recommended turbulence model for most cases is SST k-ω.

14
PUBLIC / CYHOEDDUS

Mesh Resolution Near the Wall


 Fewer nodes are needed normal to the wall when wall functions are used
(compared to resolving the viscous sublayer with the mesh)

Wall functions used to resolve Viscous sublayer resolving approach


boundary layer used to resolve boundary layer

Boundary layer First node wall distance is reflected by 𝑦𝑦 + value


15
PUBLIC / CYHOEDDUS

Example in Predicting Near-wall Cell Size - y+ Value


 During the pre-processing stage, you will need to know a suitable size for the first layer of grid cells
(inflation layer) so that it is in the desired range
 The actual flow-field will not be known until you have computed the solution (and indeed it is
sometimes unavoidable to have to go back and remesh your model on account of the computed 𝑦𝑦 +
values)
 To reduce the risk of needing to remesh, you may want to try and predict the cell size by
performing a hand calculation at the start, for example:
The question is what height (𝑦𝑦)
should the first row of grid cells
be. We will use “Resolving the
Viscous Sublayer” and are aiming
for 𝑦𝑦 + ≈ 1.

𝜌𝜌𝑈𝑈𝑈𝑈 1.225 × 20 × 1 6
 For a flat plate, Reynolds number ( 𝑅𝑅𝑅𝑅𝑙𝑙 = ) gives: 𝑅𝑅𝑅𝑅𝑙𝑙 = = 1.36 × 10
𝜇𝜇 1.8 × 10−5
 Recall from earlier slide, flow over a surface is turbulent when 𝑅𝑅𝑅𝑅𝑙𝑙 > 5 × 105
16
PUBLIC / CYHOEDDUS

Calculating Wall Distance for a Given y+


1. Begin with the definition of 𝑦𝑦 + and rearrange: 5. 𝑅𝑅𝑅𝑅 is calculated in previous page (i.e. 𝑅𝑅𝑅𝑅 = 1.36 × 106 ), so
𝑦𝑦𝑢𝑢𝜏𝜏 𝜌𝜌 use the definitions to calculate the first cell height:
𝑦𝑦𝑢𝑢𝜏𝜏 + 𝑦𝑦 + 𝜇𝜇
𝑦𝑦 + = or 𝑦𝑦 = ⟺ 𝑦𝑦 = −0.2
𝑣𝑣 𝜇𝜇 𝑢𝑢𝜏𝜏 𝜌𝜌 𝐶𝐶𝑓𝑓 = 0.058𝑅𝑅𝑅𝑅𝑙𝑙−0.2 = 0.058 × 1.36 × 106 = 0.00344
2. The target 𝑦𝑦 + value and fluid properties are
known, so we need 𝑢𝑢𝜏𝜏 , which is defined as: 1 1
𝜏𝜏𝑤𝑤 = 𝐶𝐶𝑓𝑓 𝜌𝜌𝑢𝑢∞ = × 0.00344 × 1.225 × 202 = 0.8428 𝑘𝑘𝑘𝑘/𝑚𝑚𝑠𝑠 2
2
2 2
𝜏𝜏𝑤𝑤
𝑢𝑢𝜏𝜏 = 𝜏𝜏𝑤𝑤
𝜌𝜌 0.8428
𝑢𝑢𝜏𝜏 = = = 0.829 𝑚𝑚/𝑠𝑠
3. The wall shear stress, 𝜏𝜏𝑤𝑤 , can be found from 𝜌𝜌 1.225
the skin friction coefficient, 𝐶𝐶𝑓𝑓 :
1 2 6. We know we are aiming for 𝑦𝑦 + of 1, hence:
𝜏𝜏𝑤𝑤 = 𝐶𝐶𝑓𝑓 𝜌𝜌𝑢𝑢∞
2
4. A literature search suggests a formula for the 𝑦𝑦 + 𝜇𝜇 1 × 1.8 × 10−5
∴ 𝑦𝑦 = = = 1.77 × 10−5 𝑚𝑚
skin friction on a plate1 as: 𝑢𝑢𝜏𝜏 𝜌𝜌 0.829 × 1.225
𝐶𝐶𝑓𝑓 = 0.058𝑅𝑅𝑅𝑅𝑙𝑙−0.2 7. Our first cell height 𝑦𝑦 should be approximately 𝟎𝟎. 𝟎𝟎𝟎𝟎𝟎𝟎𝟎𝟎 𝒎𝒎𝒎𝒎
1 An equivalent formula for internal flows, with Reynolds number based on the pipe diameter is 𝐶𝐶𝑓𝑓 = 0.079𝑅𝑅𝑅𝑅𝑑𝑑−0.25
17
PUBLIC / CYHOEDDUS

Orthogonal Quality and Skewness


Mesh quality recommendations
 Low Orthogonal Quality or high skewness values are not recommended
 Generally try to keep minimum orthogonal quality > 0.1
 And also keep maximum skewness < 0.95
 However these values may be different depending on the physics and the location of the cell

Orthogonal Quality
mesh metrics
spectrum

Skewness
mesh metrics
spectrum
18
PUBLIC / CYHOEDDUS

Mesh Sensitivity Study


 Errors in a converged solution arise from:
 Numerical Errors
E.g. round-off errors, truncation error etc.
 Model Errors
E.g. accuracy of boundary conditions, physical models
 Discretization Errors
Errors arising from converting the continuous governing equations into a discrete form that
can be solved on a computer
 Discretization errors decrease with mesh spacing
 Mesh refinement studies are used to estimate the significance of discretization
errors on your solution
 Mesh refinement studies are recommended for each new type of simulation you
perform 19
PUBLIC / CYHOEDDUS

Mesh Sensitivity Study


 A mesh sensitivity study consist of solving the same case on progressively finer
meshes
 Each mesh should be significantly finer than the previous,
e.g. 100k nodes, 200k nodes, 400k nodes
 The quantities of interest should be evaluated and compared for each mesh
 When the quantity reaches a steady value discretization errors are no longer significant

20
PUBLIC / CYHOEDDUS

Operating Pressure

 Absolute pressure = operating pressure + gauge pressure.


 For incompressible flows it is normal to specify a large
operating pressure (typically atmospheric pressure) and
let the solver work with smaller gauge pressures for the
boundary conditions, to reduce round-off errors.
 For compressible flows, the solver needs to use absolute
values in the calculation. Therefore, with compressible
flows, it is sometimes convenient to set the operating
pressure to zero, and input/output absolute pressures.

21
PUBLIC / CYHOEDDUS

Wind Tunnel Test - Useful Information


Air Properties at 20°C:

 Air velocity, 𝑈𝑈 = 32 𝑚𝑚/𝑠𝑠 (please use the value being set in the wind tunnel test)

 Air density, 𝜌𝜌 = 1.2 𝑘𝑘𝑘𝑘/𝑚𝑚3

 Air dynamic viscosity, 𝜇𝜇 = 1.825 × 10−5 𝑘𝑘𝑘𝑘/𝑚𝑚𝑚𝑚

 Charateristic length, 𝑙𝑙 = 0.15 𝑚𝑚

 Area of aerofoil aerofoil chord 0.15 𝑚𝑚 × wing span 0.3 𝑚𝑚 = 0.045 𝑚𝑚2
22
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 1


 Boundary Conditions
 Velocity Inlet:
• Velocity Specification Method: Magnitude and Direction
• Reference Frame: Absolute
• Velocity Magnitude (m/s): Values from wind tunnel test
• Supersonic/Initial Gauge Pressure (pascal): 0
• X-Component of Flow Direction: cos θ
• Y-Component of Flow Direction: sin θ
 Turbulence:
• Specification Method: Intensity and Viscosity Ratio
• Turbulent Intensity (%): 5
• Turbulent Viscosity Ratio: 10
23
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 1


 Boundary Conditions
 Velocity Inlet:
• Velocity Specification Method: Magnitude and Direction
• Reference Frame: Absolute
• Velocity Magnitude (m/s): Values from wind tunnel test
• Supersonic/Initial Gauge Pressure (pascal): 0
• X-Component of Flow Direction: cos θ
• Y-Component of Flow Direction: sin θ
 Turbulence:
• Specification Method: Intensity and Viscosity Ratio
• Turbulent Intensity (%): 5
• Turbulent Viscosity Ratio: 10

θ = Angle of Attack 24
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 2


 Reference Values
 Compute from: Inlet
• Area (m2): 0.045
• Depth (m): 0.3
• Length (m): 0.15
 Methods:
 Pressure-Velocity Coupling:
• Scheme: SIMPLE
 Spatial Discretization:
• If simulation is unstable, start with First Order Upwind and change to
Second Order Upwind after simulation becomes stable to get more
accurate results.
25
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 3


 Controls:
 Under-Relaxation Factors:
• If simulation is unstable, reduce both Pressure and Momentum values and
increase them after simulation becomes stable to speed up the
calculations. Please note converged solution is independent of these
settings.

 Report Definitions:
 Coefficient of Drag (CD):
• Force Vector: X = cos θ; Y = sin θ
 Coefficient of Lift (CL):
• Force Vector: X = -sin θ; Y = cos θ
26
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 4


 Monitors:
 Residuals:
• Options: Select both Print to Console and Plot
• Equations: For Continuity change Absolute Criteria to 1e-5
 Report Files:
• Coefficient of Drag (CD): Select Print to Console
• Coefficient of Lift (CL): Select Print to Console
 Report Plots:
• Coefficient of Drag (CD): Select Print to Console
• Coefficient of Lift (CL): Select Print to Console 27
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 5


 Initialization:
 Initialization Methods:
• Choose Hybrid Initialization
• Click Initialize button

 Calculation Activities:
 Autosave Every (Iterations): i.e. 100
 Retain Only the Most Recent Files: Set Maximum Number of Data Files to 1
 Run Calculation:
 Click Check Case
 Number of Iterations: Please insert big number (i.e. 20,000) in order to
make sure simulation doesn’t stop prematurely. You can stop it early if you
observe the solution is converged. 28
PUBLIC / CYHOEDDUS

Steps to be Taken when Changing Angle of Attack 6

 Lastly please make sure you save individual Files/Analysis


Systems for each angle of attack so that you can always go
back to these files to extract data or carry out further analysis
in Fluent.
 Please make sure you have these files ready when requested
by me during the marking of your CFD assignment.

29
PUBLIC / CYHOEDDUS

NACA 0012 Aerofoil


Upper Surface Distance From
Tapping Leading Edge
1 0.76
3 3.81
5 11.43
7 19.05
9 38.00
11 62.00
13 80.77
15 101.35
17 121.92
19 137.16

Lower Surface Distance From


Tapping Leading Edge
2 1.52
4 7.62
6 15.24
8 22.86
10 41.15
12 59.44
14 77.73
16 96.02
18 114.30
20 129.54
35
PUBLIC / CYHOEDDUS

Example (Comparison of Pressure Coefficient)


CFD & Wind Tunnel Results - 8˚ Angel of Attack
1.5
1
0.5
Pressure Coefficient

0
-0.5
-1
-1.5
-2
-2.5
-3
-3.5
-4
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16
Position (m)

CFD Bottom CFD Top Wind Tunnel Bottom Wind Tunnel Top 36

You might also like