0% found this document useful (0 votes)
128 views39 pages

CFD Lab 1

1) The document discusses computational fluid dynamics (CFD) and CFD simulations using Ansys. It describes the governing equations of CFD, including the Navier-Stokes equations. 2) It explains the procedure for solving CFD problems, including choosing equations, boundary conditions, discretization, mesh generation, and code validation. 3) Examples of CFD simulations discussed include internal flows like pipe flow and external flows like flow over a flat plate or cylinder. Steps for setting up these examples in Ansys are provided.

Uploaded by

avxfgj gjkouy
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)
128 views39 pages

CFD Lab 1

1) The document discusses computational fluid dynamics (CFD) and CFD simulations using Ansys. It describes the governing equations of CFD, including the Navier-Stokes equations. 2) It explains the procedure for solving CFD problems, including choosing equations, boundary conditions, discretization, mesh generation, and code validation. 3) Examples of CFD simulations discussed include internal flows like pipe flow and external flows like flow over a flat plate or cylinder. Steps for setting up these examples in Ansys are provided.

Uploaded by

avxfgj gjkouy
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/ 39

Computational Fluid Dynamics

Laboratory (ME4371)

Kishore Singh Patel


Assistant Professor
Mechanical Engg. Dept.
NIT-Rourkela
What is CFD
• Set of governing equations
 We get using the control volume analysis
 Integral form :– Raynolds Transport Theorem (RTT)

 Differential form:- Navier-Stokes eqns.

RTT

 Here b --> flux ---> property / mass, (B/m)


 Here b can be scaler, vector, tensor
 Continuity Eq., b -->1
 Momentum eqns., b ---> u,
 Energy eq., b ---> E = e + 1/2 u^2
Navier-Stokes Equations
Why do we need CFD?
 Fluid flow can be analysed using two method
1) Theoretical/Analytical approach
2) Using experimental setup
 Suitable for low Mach number flows
 Table-top setup.
 Fabrication need to be easy.
 Expensive and required rapid-prototyping for destructive tests
 Most for the simulations cannot be experimented
 Simulation of explosions etc.

2) Computer simulations

The need originally felt to simulate flows:


 High Mach number: -
 Transonic to Supersonic flows --> flow over a gas turbine blades

 Very high temperature ---> combustion chambers, nozzle and afterburner of jets
 Simulation of explosions.
CFD solvers
 Commercial software
 Ansys-fluent

 CFD++

 COMSOL etc.

 You cannot see their source code

 So never openly come to know how accurate their solvers are.

 Open source codes or solvers


 Many research group develop and share it for free.

 Gerris, Basilisk --> Multiphase solver based on Volume of Fluid interface capturing methods

 OpenFoam ---> Multi-domain solver.

 SU2 --> turbulent flow solver, LES, RANS

 code_saturne ---> Multi-domain solver

 Write your own solver


 If you have specific CFD problem for which exact solvers are not available.

 Write using C, C++, Fortran etc. ---> generate binary executable file.

 MATLAB, python, Mathematica or any other user friendly languages are not very useful.
Videos

Hypersonic Flow over 2D Cylinder M=7.5 in a Pipe

Crown formation

Simulation of red blood cells in a retina capillary


Procedure of Solving
1)Choose the governing equations

1)No energy equation ---> No significant change in temperature

2)Extra governing eq for multiphase flows, etc.

2)Simplify the governing equations as per need

1)2D, 3D

2)Compressible, Incompressible etc.

3)Inviscid flow, Creeping flow, etc.

3)Boundary Conditions

4)Discretization

1)FDM, FVM, FEM

5)Create the computational domain or geometry


Procedure of Solving
6) Mesh generation

1) Structured mesh

2) Unstructured mesh

3) In some exceptional cases e.g. moving domain or multiphase flows --> Dynamic grid
redistribution or refinement might be required.

1)Write solver using any of the previously explained coding language

1)First step ----> serial code

2)Code parallelization

2)Code parallelization ---> CPU based parallelization, such as MPI, OpenMP

3)Code parallelization ---> GPU based parallelization, such as CUDA, OpenGL

4)Validation of your solver using different standard test cases


Previously
Current simulations on Ansys

 Internal flows
 Laminar flow in a pipe
 Turbulent flow in a pipe
 Flow in a pipe with heat transfer

 External flows
 Flow over a flat plate
 Steady flow over a cylinder
 Unsteady flow over a cylinder
Revisit the solving procedure for present cases

1) Internal flows --> Flow in a pipe

Wall
R

outlet
inlet
D

Line of
symmetry
L Structured grid

2D Axisymmetric governing equations in (r, z) coordinates


 Only continuity and momentum equations, (for last case need to solve energy eq.)
The turbulent flows are inherently 3D, but the RANS (Reynolds Averaged Navier-Stokes)
equations ignore spanwise (or azimuthal) direction for 2D flows in the mean
Therefore 2D geometry will prevail, even for the turbulent cases in RANS solution
2) External flow --> Flow over a flat plate (Only Laminar flow presently)
Laminar flow

Height of
first cell
2) External flows --> Flow over a cylinder
(r, θ) direction, 2D governing equations in cylindrical coordinate

Structured Radial grid,


Body-fitted followed by
Unstructured grid
Block structured grid
1. Problem statement
Compressible / Incompressible flows
Defined on the basis of Mach number (M = v/c), c --> velocity of sound in a fluid medium

Incompressibility factor Incompressible --> approx up to 0.6-0.7

Compressible flows
 The mass conservation is a transport equation for density
 Density based solver in Ansys
 Equation of state give explicit relationship for pressure

Incompressible flows
 Density not a function of pressure
 Pressure based solver in Ansys
 No equation of state
 Need to derive extra relationship for pressure using Projection steps
Governing equations
3D incompressible N-S eqs.

2D incompressible N-S eqs.

Axisymmetric, not planar


Basics of discretization Finite Difference Method (FDM),

Taylor series expansion

Backward step discretization

Forward step discretization Central differencing discretization

Order of convergence
Finite Volume Method (FVM)
Projection Method Incompressible N-S

Compressible N-S

There is no direct governing equation


for Pressure
Helmholtz–Hodge decomposition

Equation of state give direct


relationship for “P”
Different types of projection methods
 Chorin’s first order projection method
 SIMPLE: Semi-Implicit Method for Pressure-Linked Equations
 SIMPLEC: SIMPLE Corrected/Consistent

SIMPLE, SIMPLEC & PISO - Comments

Under-relaxation increase
stability (smoothing)

 SIMPLEC and PISO do not need under-relaxation


 SIMPLEC/PISO allow faster convergence than SIMPLE
 PISO is useful for irregular cells
Boundary Conditions Wall

Inlet:- Flow
Inlet Outlet
 Velocity based inlet boundary condition
 Define the angle of incidence
 Magnitude of velocity (u = 1 m/s, v = 0 ) Center

Wall:-
 No slip and no penetration boundary condition
 At r = R ( u = 0, v = 0 )
 Homogeneous Neumann for pressure

Outlet:-
 Pressure based outlet boundary condition
 Define the atmospheric pressure
Staggered grid layout

Centre:-
 Axisymmetric
 Slip boundary condition
Solving steps in Ansys-Fluent
Ansys Workbench
1) Draw Geometry
2)Mesh the geometry
1)Just define the boundary condition, No
values
3)Setup
1)2D
2)Rest all is as it is
Keep
• Δx
=0.01

• Δy =
0.001

• Growth
of 1.2
from the
wall

• Give
names
to sides
 Inlet
wall
Outlet
and axis
Check mesh  there should be no negative
volume
Air

Density =
1kg/m3

Viscosity =
2.0E-3
Inlet velocity magnitude = 1 m/s
• Compute from Inlet
• Area  Area of pipe inlet
• = Pi* (0.1*0.1) = 0.03142
• Density = 1 kg/m3
• Length = 10m
• Pressure = 0 Pascal (Gauge
pressure)
• T = same
• Velocity  inlet velocity = 1 m/s
• Viscosity  2x10^(-3)
• Specific heat  unchanged
(default specific heat of fluid)
SIMPLE [Semi-Implicit Method for Pressure-
Linked Equations]

Pressure-Velocity Coupling
Type of Projection method to solve incompressible
N-S eq.

Green-Gauss / least square  won’t affect


solution much

Keep rest default


Initialize from Inlet

Pressure  make sure that you keep


uniformity while using gauge or absolute
atm. Pressure

Compute from Inlet

Velocity  Axial velocity at inlet 1m/s

Radial velocity  0

Keep standard initialization.

Hybrid Initialization is useful at the time of


turbulent flows

Press  Initialize
You can increase the iteration to
achieve convergence

Keep 10000

Press  Calculate

If solution won’t converge in 10000


iteration  You need to restart
calculation

Don’t press initialization

You might also like