CFD03 - Finite Volume Methods

You might also like

You are on page 1of 50

6311271

Computational Fluid Dynamics


03. Finite Volume Methods

Budi Aji Warsiyanto & Muhammad Hadi Widanto


Faculty of Aerospace Technology
Universitas Dirgantara Marsekal Suryadarma
Assignment Review

Given:
• Density of air = 1.225 kg/m3
• = 200 m/s
• = 150 m/s
• Wing area = 350 m2
Introduction
 All of CFD is based on the fundamental governing equations of fluid dynamics – the continuity, momentum,
and energy equations.
 Mass is conserved.
 Newton’s second law, .

 Energy is conserved. 𝒖=( 𝒖 , 𝒗 , 𝒘 )

⃑ ⃑
𝑫𝒖 ⃑
𝝆 =− 𝜵 𝒑 +𝝁 𝜵 𝟐 𝒖+ 𝝆 𝑭
𝑫𝒕

𝜵 𝒑= ( 𝝏 𝒑 𝝏𝒑 𝝏 𝒑
, ,
𝝏 𝒙 𝝏𝒚 𝝏𝒛 ) Force due to
pressure difference
Force due
to friction
Force due
to gravity

( ) [ ]
2 2 2
𝜕𝑢𝑥 𝜕𝑢 𝑥 𝜕𝑢 𝑥 𝜕𝑢𝑥 𝜕𝑝 𝜕 𝑢𝑥 𝜕 𝑢 𝑥 𝜕 𝑢 𝑥
𝒎 𝜌 +𝑢 𝑥 +𝑢 𝑦 +𝑢 𝑧 =− +𝜇 + 2 + 2 + 𝜌 𝑔𝑥
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 2
𝜕 𝑥 𝜕 𝑦 𝜕𝑧

∑𝑭
𝒂
Models of the Flow
 A solid body is rather easy to see and define; on the other hand, a fluid is a “squishy” substance that is hard
to grab hold of.
 If a solid body is in translational motion, the velocity of each part of the body is the same; on the other hand,
if a fluid is in motion, the velocity may be different at each location in the fluid.
 How then do we visualize a moving fluid so as to apply to it the fundamental physical principles?
Infinitesimal Fluid Element
 The fluid element is infinitesimal in the same sense as differential calculus; however, it is large enough to
contain a huge number of molecules so that it can be viewed as a continuous medium.
 The fluid element moves along a streamline with a velocity vector equal to the flow velocity at each point.
 Instead of looking at the whole flow field at once, the fundamental physical principles are applied to just the
infinitesimally small fluid element itself.
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element)
 The motion of fluid element is shown in more detail.
 The fluid element is moving through cartesian space.
 The unit vector along the axes are .
 The vector velocity field in this cartesian space is given by 𝑽 =𝑢 𝐢+ 𝑣 𝐣+𝑤 𝐤
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)
 Where the components of velocity are given, by 𝑽 =𝑢𝐢+𝑣 𝐣+𝑤 𝐤

 Assume an unsteady flow, where are functions of both space and time .
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)
 In addition, the scalar density field is given by 𝝆=( 𝒙 , 𝒚 , 𝒛 , 𝒕 )

 A scalar field associates a scalar value to every point in a space.

 At time , the fluid element is located at point 1. At this point


and time, the density of the fluid element is
𝝆𝟏= 𝝆 ( 𝒙 𝟏 , 𝒚 𝟏 , 𝒛 𝟏 , 𝒕 𝟏 )

 At a later time , the same fluid element has moved to point 2.


Hence, at time , the density of this same fluid element is
𝝆𝟐= 𝝆 ( 𝒙 𝟐 , 𝒚 𝟐 , 𝒛 𝟐 , 𝒕 𝟐 )
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)
 Since , this function can be expand about point 2 as follows:

𝝆𝟐= 𝝆𝟏 + ( )
𝝏𝝆
𝝏𝒙 𝟏
( )
( 𝒙 𝟐 − 𝒙𝟏 ) +
𝝏𝝆
𝝏𝒚 𝟏
( 𝒚 𝟐 − 𝒚 𝟏 )+ ( )
𝝏𝝆
𝝏𝒛 𝟏
( 𝒛𝟐 − 𝒛𝟏 )+ ( ) (𝒕 −𝒕 )
𝝏𝝆
𝝏𝒕 𝟏
𝟐 𝟏

 Dividing by , obtained

( ) ( ) ( ) ( )
𝝆𝟐− 𝝆𝟏 𝝏 𝝆 𝒙 𝟐 − 𝒙𝟏 𝝏 𝝆 𝒚𝟐− 𝒚𝟏 𝝏 𝝆 𝒛𝟐 − 𝒛𝟏 𝝏 𝝆
= + + +
𝒕𝟐 − 𝒕𝟏 𝝏𝒙 𝟏 𝒕𝟐 − 𝒕𝟏 𝝏𝒚 𝟏 𝒕 𝟐 −𝒕 𝟏 𝝏𝒛 𝟏 𝒕 𝟐 −𝒕 𝟏 𝝏𝒕 𝟏

 This is physically the average time rate of change in density of the fluid element as it moves from point 1 to
point 2. In the limit, as approaches , this term becomes
𝝆𝟐 − 𝝆𝟏 𝑫 𝝆
𝐥𝐢𝐦 ≡
𝒕𝟐 → 𝒕𝟏 𝒕 𝟐 −𝒕 𝟏 𝑫𝒕
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)

𝝆𝟐 − 𝝆𝟏 𝑫 𝝆
𝐥𝐢𝐦 ≡
𝒕𝟐 → 𝒕𝟏 𝒕 𝟐 −𝒕 𝟏 𝑫𝒕

 is a symbol for the instantaneous time rate of change of density of the fluid element as it moves through point
1 or the time rate of change of density of the given fluid element as it moves through space.
 Different from , which is physically the time rate of change of density at the fixed point 1. For , it is fix on the
stationary point 1 and the density change due to transient fluctuations in the flow field.
 Thus, and are physically and numerically different quantities.
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)
 Returning to this equation (*), note that

 Thus, taking the limit of the above equation (*) as , obtained


The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)
 An expression for the substantial derivative in cartesian coordinates:

¿
 In cartesian coordinates, the vector operator is defined as

 Above equation (#) can be written as

∗∗ operator in vector notation; thus, it is


 This equation (**) represents a definition of the substantial derivative
valid for any coordinate system.
The Substantial Derivative (Time Rate of Change Following a
Moving Fluid Element) (cont.)

 is the substantial derivative, which is physically that time rate of change following a moving fluid element.
 is called local derivative, which is physically the time rate of change at a fixed point.
 is called the convective derivative, which is physically the time rate of change due to movement of the fluid element
from one location to another in the flow field where the flow properties are spatially different.
 The substantial derivative applies to any flow-field variable, for example, , , , etc., where and are the static pressure
and temperature, respectively. For example:

¿
 Equation (##) states physically that the Local
temperature
Convective of the fluid element is changing as the element sweeps past a
derivative derivative
point in the flow because at that point the flow-field variable temperature itself may be fluctuating with time (the
local derivative) and because the fluid element is simply on its way to another point in the flow field where the
temperature is different (the convective derivative).
Discretization
 Discretization is the process by which a closed-form mathematical expression, such as a function or a
differential or integral equation involving functions, all of which are viewed as having an infinite continuum
of values throughout some domain, is approximated by analogous expressions which prescribe values at only
a finite number of discrete points or volumes in the domain.
 Divide domain into a number of discrete sub-domains; each sub-domain being represented by a
number of discrete points.
 Derive algebraic equations from the governing differential equation; valid at these discrete points.
 Solve the system of algebraic equations to obtain values of the dependent variables at the discrete
points
Discretization: Function
 Characteristics of object when is simulated (structure: strain, displace, stress, etc. & fluid: velocity,
pressure, temperature, turbulent, laminar, etc.)
 Numerical solution can give answer at discrete points in the domain, called grid points.
CFD Process: Pre-Processing
 Setup the geometry.
 Make assumptions and simplifications;
 CAD integration (engineering drawings);
 Coordinates include cartesian (x, y, z), cylindrical (), and spherical
(r, , ) system.
 Discretized equations (divide domain into a number of sub-domains).
 Property data (velocity, temperature, density, etc.).
CFD Process: Pre-Processing (cont.)
 Initial condition (specification of fluid mechanics).
 Boundary condition (inlet, outlet, wall, etc.):
 Inlet: flow direction, mainly flow velocity.
 Outlet: to keep all the properties constant, which means all the gradient are zero.
 Wall: no-slip (zero velocity) or slip-free on the wall.
 Axisymmetric: each flow variable has the same value.
CFD Process: Solution
 Solve the algebraic equations.
 Integration of the governing equations over all the (finite) control volumes of the domain to obtain
temperature or velocity at each point.

𝒖=( 𝒖 , 𝒗 , 𝒘 )

⃑ ⃑
𝑫𝒖 ⃑
𝝆 =− 𝜵 𝒑 +𝝁 𝜵 𝟐 𝒖+ 𝝆 𝑭
𝑫𝒕

𝜵 𝒑= ( 𝝏 𝒑 𝝏𝒑 𝝏 𝒑
, ,
𝝏 𝒙 𝝏𝒚 𝝏𝒛 ) Force due to
pressure difference
Force due
to friction
Force due
to gravity

( ) [ ]
2 2 2
𝜕𝑢𝑥 𝜕𝑢 𝑥 𝜕𝑢 𝑥 𝜕𝑢𝑥 𝜕𝑝 𝜕 𝑢𝑥 𝜕 𝑢 𝑥 𝜕 𝑢 𝑥
𝒎 𝜌 +𝑢 𝑥 +𝑢 𝑦 +𝑢 𝑧 =− +𝜇 + 2 + 2 + 𝜌 𝑔𝑥
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑥 2
𝜕 𝑥 𝜕 𝑦 𝜕𝑧

∑𝑭
𝒂
CFD Process: Post-Processing
 Analysis.
 Graphical representation of the obtained results.
 Calculation of aerodynamic force (lift or drag) and coefficient of lift or drag.
 X-Y plots
 2D contour
 3D contour
 Animations

WHY VELOCITY ???


CFD Considerations
 The accuracy of a CFD solution is governed by the number of sub-domains.
 In general, the more number of sub-domains, the better solution accuracy.
 Solution or computation time and accuracy depending on the size or number of sub-domains and device
specifications.
 Optimal meshes (to keep accuracy and decrease computation time) are often non-uniform: finer in areas
where large variations occur from point to point and coarser in regions with relatively little change.
SOLIDWORKS
 The SOLIDWORKS Flow Simulation is a new class of CFD analysis software that is fully embedded in the
mechanical design environment for all general engineering applications.
 CAD data management;
 Mesh generation;
 CFD solvers;
 Engineering Modelling Technologies;
 Results processing.
 CFD can be used for : 1) gaining insight, 2) design evaluation, 3) what-if Analysis, 4) troubleshooting, 5)
monitoring, and 6) certification.
 Type of simulation:
 Internal/external liquid and gas flow;
 Free surface flow;
 Non-Newtonian flows;
 Low to high speed flows;
 Fans and rotating components;
 Conjugate heat transfer;
 Electronics cooling module.
SOLIDWORKS: Tutorial

 The flow flows in a pipe, if the flow velocity at a large section is 2 m/s, determine the speed at a small
section and compare Analytic calculation and Simulation of CFD !
SOLIDWORKS: Tutorial
 Create part
SOLIDWORKS: Tutorial

 The project wizard guides you through


the definition of a new SolidWorks
Flow Simulation project.
 Choose type simulation internal or
external flow, and then choose type of
fluid on engineering database in
SolidWorks application or you can make
type of fluid by yourself.
 In the Unit System dialog box you can
select the desired system of units for
both input and output. For this project
we accept the default selection of SI.
SOLIDWORKS: Tutorial

 In the Analysis Type dialog box you can


select either Internal or External type
of the flow analysis.
 This dialog also allows you to specify
advanced physical features you want to
take into account: heat transfer in
solids, surface-to-surface radiation,
time-dependent effects, gravity and
rotation.
SOLIDWORKS: Tutorial

 In the Default Fluid dialog box you can


select the fluid type. The selected fluid type
is assigned by default for all fluids in the
analysis.
SOLIDWORKS: Tutorial

 In the Wall Conditions dialog box you


can specify the wall roughness value
and the wall thermal conditions.
SOLIDWORKS: Tutorial

 In the Initial Conditions dialog box specify


initial values of the flow parameters. For
steady internal problems, the values
specified closer to the expected flow field
will reduce the analysis times.
SOLIDWORKS: Tutorial

 The model requires boundary conditions to define the inlets and outlets.
SOLIDWORKS: Tutorial

 Flow Simulation Explore Pane (Setup goal


before calculate the simulation).
SOLIDWORKS: Tutorial

 Setup Goals before calculate the simulation.


SOLIDWORKS: Tutorial
 Result
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial

 Analytic  CFD

 Error Percentage
SOLIDWORKS: Tutorial
 Create part for simulation
SOLIDWORKS: Tutorial
 Create part for simulation
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial
 Result
SOLIDWORKS: Tutorial
 Result
SOLIDWORKS: Tutorial
 Part and Computational domain
SOLIDWORKS: Tutorial
 Mesh Configuration
SOLIDWORKS: Tutorial
 Setup Output
SOLIDWORKS: Tutorial
SOLIDWORKS: Tutorial
SOLIDWORKS: Practice

Angle Lift
0 0.712 N
15 8.575 N
Assignment 2
 Create a group with three members
 Air flow in the pipeline simulations, the specifications of assignment will be given in WhatsApp
group
 Due date: mid-test
 File format: group(n)_assignment2
Thank You

You might also like