[go: up one dir, main page]

0% found this document useful (0 votes)
8 views34 pages

Lecture (5)

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 34

CFD Lecture (5)

Introduction to Solution Methods


Prof.Dr/ Hagar Alm ElDin Mohamad
Tanta University
2024
Discretize governing equations and solve by computers
CFD
Discretization
Basic aspects of Discretization
• Discretization:
Basic aspects of Discretization
There are various methods of discretization, which can broadly
be classified into mesh (grid) methods and mesh-free methods.
Currently (as of 2018), mainly mesh methods are being used.
Mesh Methods
These methods involve two steps:
• Meshing - divide the region ("domain") into smaller regions. These
smaller regions may be triangles and rectangles (in 2D) and tetrahedrons,
hexahedrons (in 3D) and other types of geometric entities. Discretization
of the governing equations over the mesh
Basic aspects of Discretization
Mesh Terminology
Discretization Methods

Finite Difference Finite Element Finite volume


Method Method Method
Finite difference method
(FDM)
Discretization methods (Finite Difference,
introduction)

• First step in obtaining a numerical solution is to


discretize the geometric domain to define a numerical
grid
• Each node has one unknown and need one algebraic
equation, which is a relation between the variable value
at that node and those at some of the neighboring
nodes.
• The approach is to replace each term of the PDE at the
particular node by an approximation.
• Numbers of equations and unknowns must be equal
• Applied to structured grids 11
Components of numerical methods (Discretization
Methods)
Finite Difference Method
1. Introduced by Euler in the 18th century.

2. Governing equations in differential form domain with

grid replacing the partial derivatives by approximations

in terms of node values of the functions one algebraic

equation per grid node linear algebraic equation

system.

3. Applied to structured grids


12
Finite difference: basic methodology
• The domain is discretized into a series of grid points.
• A “structured” (ijk) mesh is required.

• The governing equations (PDE)(in differential form) are


discretized (converted to algebraic form).(FDE)
• First and second derivatives are approximated by
truncated Taylor series expansions.
• The resulting set of linear algebraic equations is solved
either iteratively or simultaneously.
13
Procedure for Finite Difference
Method
1- Replace object with set of nodes.
2- Formulate the physical -mathematical model
equation in the finite difference forum.
3- Handle the boundary conditions.
4-Apply the finite difference equation to each
node
5- numerically solve linear algebraic equation by
matrix techniques
Finite difference: basic methodology

15
Errors in the Finite difference
method
• The error in a method's solution is defined as the
difference between the approximation and the
exact analytical solution. The two sources of
error
• In finite difference methods are round-off error,
the loss of precision due to computer rounding of
decimal quantities,
• and truncation error or discretization error,
the difference between the exact solution of the
original differential equation and the exact
quantity assuming perfect mathematics.
Finite Element Method
(FEM)
Finite element method (FEM)
• Earliest use was by Courant (1943) for solving a
torsion problem.
• Clough (1960) gave the method its name.
• Method was refined greatly in the 60’s and 70’s,
mostly for analyzing structural mechanics
problem.
• FEM analysis of fluid flow was developed in the
mid- to late 70’s. coextrusion
metal insert
18
contours of velocity magnitude
Finite element method (FEM)
• Two interpretations
1. Physical Interpretation:
The continous physical model is divided into finite
pieces called elements and laws of nature are
applied on the generic element. The results are then
recombined to represent the continuum.

2. Mathematical Interpretation:
The differetional equation reppresenting the system
is converted into a variational form, which is
approximated by the linear combination of a finite
set of trial functions.
Finite element method (FEM)

FEM is a numerical method for solving a system of


governing equations over the domain of a continuous
physical system, which is discretized into simple
geometric shapes called finite element.

Continuous system Discrete system


Time-independent PDE Linear algebraic eq.
Time-dependent PDE ODE
Analysis procedures of linear static
structural analysis

A. Build up geometric model


a. 1D problem
line
b. 2D problem
surface
c. 3D problem
solid
B. Construct the finite element model
a. Discretize and select the element types
(a) element type
1D line element
2D element
3D brick element

(b) total number of element (mesh)


1D:
2D:
3D:
b. Select a shape function
1D line element: u=ax+b
c. Define the compatibility and constitutive law

d. Form the element stiffness matrix and equations


(a) Direct equilibrium method
(b) Work or energy method
(c) Method of weight Residuals

e. Form the system equation


• Now the task is to assemble the elements into the
whole system in fact we have to sum each integral
over all the elements
C. Solve the system equations
a. elimination method
Gauss’s method (Nastran)
b. iteration method
Gauss Seidel’s method

Displacement field strain field stress field

D. Interpret the results (postprocessing)


a. deformation plot b. stress contour
Applications of Finite Element Method

Structural Problem Non-structural Problem


Stress Analysis Heat Transfer
- truss & frame analysis Fluid Mechanics
- stress concentrated problem Electric or Magnetic
Buckling problem Potential
Vibration Analysis
Impact Problem
Finite element method (FEM)
• Advantages: highest accuracy on coarse grids.
Excellent for diffusion dominated problems
(viscous flow) and viscous, free surface
problems. Flexible for complex geometries

• Disadvantages: slow for large problems


and not well suited for turbulent flow
Conservation is not guaranteed in the solution.
Higher computational efforts
Finite Volume Method
(FVM)
Finite volume method (FVM)
• First well-documented use was by Evans and Harlow (1957) at Los Alamos and
Gentry, Martin and Daley (1966).
• Was attractive because while variables may not be continuously differentiable
across shocks and other discontinuities mass, momentum and energy are
always conserved.
• FVM enjoys an advantage in memory use and speed for very large problems,
higher speed flows, turbulent flows, and source term dominated flows (like
combustion).
• Late 70’s, early 80’s saw development of body-fitted grids. By early 90’s,
unstructured grid methods had appeared.
• Advantages: basic FV control volume balance does not limit cell shape; mass,
momentum, energy conserved even on coarse grids; efficient, iterative
solvers well developed.
• Disadvantages: false diffusion when simple numerics are used.
28
Finite volume: basic methodology
• Divide the domain into control volumes.
• • • •
• • • • • • •
• • • • • • •
• • •

• Integrate the differential equation over the control


volume.
• To evaluate derivative terms, values at the control
volume faces are needed: have to make an assumption
about how the value varies.
• Result is a set of linear algebraic equations: one for each
control volume.
• Solve iteratively or simultaneously.
29
Cells and nodes
• Using finite volume method, the solution domain is
subdivided into a finite number of small control volumes
(cells) by a grid.
• The grid defines the boundaries of the control volumes while
the computational node lies at the center of the control
volume.
• The advantage of FVM is that the integral conservation is
satisfied exactly over the control volume.
Boundary node

Control volume

Computational node

30
Objective of the F-V Formulation

• Represent the integral equation as an ordinary


differential equation (then eventually an algebraic
equation) amenable to a solution using
computational (numerical) methods.

• Thus, we need to approximate the volume


integrals and the surface integrals to form
algebraic expressions.

• Prior to discussing these approximations, lets


examine the control volumes on which the
integrals will be approximated… 31
Location of the Solution in the Cell

The location of the flow solution and geometry of the finite


volume cell with respect to the grid can be of two types:

• Cell-Vertex (Node-Centered) Cell. The flow solution is located at the


vertices of the grid. The finite-volume cell is formed about the vertex.

• Cell-Centered Cell. The flow solution is located at the centroid of the


cell volume defined by the grid lines (primary grid).

Each approach has its advantages and disadvantages, but if things are
done right, both approaches do well.

32
Finite volume method (FVM)
References
• Carlos Felippa
http://caswww.colorado.edu/courses.d/IFEM.d/IFEM.Ch06.d/I
FEM.Ch06.pdf

• Joseph E Flaherty,Amos Eaton Professor


http://www.cs.rpi.edu/~flaherje/FEM/fem1.ps

• http://machinedesign.com/fea-and-simulation/what-s-
difference-between-fem-fdm-and-fvm.

You might also like