0% found this document useful (0 votes)
29 views23 pages

Lecture-4 CFD

Lecture 4 on Computational Fluid Dynamics by Dr. Tariq Talha focuses on the Finite Control Volume Method, detailing its basic methodology, discretization examples, and solution techniques for conservation equations. The lecture emphasizes the importance of grid generation, interpolation methods for face values, and iterative solution processes, including relaxation techniques for convergence. Additionally, it covers the application of the method to steady diffusion equations and the inclusion of source terms, providing examples and comparisons with analytic solutions.

Uploaded by

Aminah Farooq
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)
29 views23 pages

Lecture-4 CFD

Lecture 4 on Computational Fluid Dynamics by Dr. Tariq Talha focuses on the Finite Control Volume Method, detailing its basic methodology, discretization examples, and solution techniques for conservation equations. The lecture emphasizes the importance of grid generation, interpolation methods for face values, and iterative solution processes, including relaxation techniques for convergence. Additionally, it covers the application of the method to steady diffusion equations and the inclusion of source terms, providing examples and comparisons with analytic solutions.

Uploaded by

Aminah Farooq
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/ 23

Computational Fluid Dynamics, Lecture-4

Dr. Tariq Talha

College of EME, NUST

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Basic Methodology

Divide the domain into control volumes

Integrate the governing equations over the control volume and apply the
Gauss divergence theorem to convert volume integrals into surface
fluxes.

To evaluate derivative terms, values at the control volume faces are


needed.
Several ways to calculate values at cell faces which include the upwind
scheme, central difference scheme, power law scheme, QUICK scheme..

Result is a set of linear algebraic equations: one for each control volume
for each property.

Solution of set of algebraic equations directly or iteratively.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: 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.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Notations
A typical control volume in Cartesian coordinates is as shown:

The net flux through the control volume boundary is the sum of integrals
over the four control volume faces (six in 3D). The control volumes do
not overlap.
The value of the integrand is not available at the control volume faces and
is determined by interpolation.
Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Discretization Example
In order to demonstrate finite volume solution methodology, the transport
of chemical species in a two-dimensional incompressible flow is considered.
The species transport equation (incompressible flow) is given by:

Here c is the concentration of the chemical species and D is the diffusion


coefficient. S is a source term.
Finite volume discretization of the above equation (steady-state
condition) would be performed to obtain set of algebraic equations on the
following 2D Cartesian grid.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Discretization Example
The balance over the control volume is given by:

This contains values at the faces, which need to be determined from


interpolation from the values at the cell centers.

The simplest way to determine the values at the faces is by using first
order upwind differencing.
In this method, it is assumed that the value at the face is equal to the
value in the center of the cell upstream of the face; i.e. ce = c p , cw = cW
Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Discretization Example
Using this method, the previous equation becomes:

This equation can then be rearranged to provide an expression for the


concentration at the center of cell P as a function of the concentrations in
the surrounding cells, the flow field, and the grid.

This equation can now be simplified to:

Here nb refers to the neighboring cells. The coefficients anb and b will be
different for every cell in the domain at every iteration. The species
concentration field can be calculated by recalculating cP from this
equation iteratively for all cells in the domain
Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Solution
Likewise, as shown in the previous example, all the conserved properties
(momentum, energy, temperature) can be discretized to form algebraic set
of equations (one for each control volume for one property).
In general terms, for a conserved property φ , the finite volume
discretization involves:
Integration of conservation equations in each cell.
Calculation of face values in terms of cell-centered values.
Collection of the central node, P, values on left hand side while the
contribution from neighboring nodes, nb and source terms, S, on the right
hand side .
The result is the following discretization equation (with nb denoting cell
neighbors of cell P):

The above algebraic set of equations (one for each cell for one conserved
property) is normally solved iteratively.
At each iteration, at each cell, a new value for variable φ in cell P can
then be calculated from the above equation.
It is common to apply relaxation as follows:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Convergence

Here U is the relaxation factor:


U < 1 is under-relaxation. This may slow down speed of convergence but
increases the stability of the calculation, i.e. it decreases the possibility of
divergence or oscillations in the solutions.
U = 1 corresponds to no relaxation. One uses the predicted value of the
variable.
U > 1 is over-relaxation. It can sometimes be used to accelerate
convergence but will decrease the stability of the calculation.
Under-relaxation factors are there to suppress oscillations in the flow
solution that result from numerical errors.
The iterative process is repeated until the change in the variable from one
iteration to the next becomes so small that the solution can be considered
converged.
Residuals measure imbalance (or error) in conservation equations.
The absolute residual at point P is defined as:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Residuals

Residuals are usually scaled relative to the local value of the property φ in
order to obtain a relative error

Residuals can also be normalized, by dividing them by the maximum


residual that was found at any time during the iterative process.
An overall measure of the residual in the domain is:

It is common to require the scaled residuals to be on the order of 1E − 3


to 1E − 4 or less for convergence.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Finite Control Volume Method: Residuals
A typical residual history graph of a turbulent flow CFD simulation using
ANSYS FLUENT.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
General Transport Equation
In integral form (finite control volume approach):

Gauss divergence theorem:

Final equation becomes:

Physically,

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation
Consider a steady incompressible diffusion equation:

Grid generation: five interior nodes

Notation conventions:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation
Finite volume discretization:

Calculation of diffusion coefficient and diffusive flux at cell face:

Linear representation of source term:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation
Substitution of the linear relation of source term:

Rearrangement of the above term in terms of nodal contribution:

The generic form of the equation:

where

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Example
One-dimensional heat conduction in an insulated rod, for which
k = 1000W /m.K, A = 0.01 m2 , δx = 0.1 m:

Mesh for the computational domain:

Finite volume discretization of an interior node:

Comparing it with generic equation

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Example
No source term for the discretized equation for an interior node.
Discretization of the boundary node 1:

Rearrangement of the above equation in nodal contribution form:

Comparison with the generic nodal contribution equation:

The generic form of the equation for node 1:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Example
Similarly the discretized equation for node 5.

The generic representation of the above equation

Contribution of different terms for the five nodes

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Example

The five equations for the interior nodes:

Writing in the matrix form:

Solution using TDMA!!

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Example

Comparison with the analytic solution: [T (x) = 800x + 100]

Linear temperature distribution inside the rod.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Inclusion of Source Term
One-dimensional heat conduction with internal heat generation:

Following the same procedure, discretization of interior node results:

The general nodal contribution equation for steady diffusion problem:

Comparing the second equation with the third equation:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Inclusion of Source Term
For left boundary node:

The general nodal contribution equation for steady diffusion problem:

Coefficients for left boundary node by comparing first equation with the
second equation:

Similarly, coefficients for right boundary node:

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST
Solution of Steady Diffusion Equation: Inclusion of Source Term

Again TDMA solution for the matrix.


Analytic solution:

Comparison with the generic nodal contribution equation:

Quadratic temperature distribution with inclusion of source term.

Dr. Tariq Talha Computational Fluid Dynamics, Lecture-4: College of EME, NUST

You might also like