Computational Fluid Dynamics (CFD): Introduction

Free

  • This is the first session of a Computational Fluid Dynamics (CFD) course, focusing on equations and numerical methods for discretization and solving them in detail.
  • The course is designed by the Mister CFD team to help students and engineers understand the numerical techniques used in software like Ansys Fluent, rather than focusing on fundamental coding.
  • It introduces CFD as a method for solving nonlinear partial differential equations (Navier-Stokes equations) through numerical techniques, since general analytical solutions aren’t available.
  • The document covers three main numerical methods: Finite Difference Method (FDM), Finite Volume Method (FVM), and Finite Element Method (FEM), with their advantages and limitations.
  • It explains different types of Partial Differential Equations (PDEs) including their classifications based on order, linearity, and behavior (Elliptic, Parabolic, and Hyperbolic).
  • The content concludes with detailed explanations of conservation equations, numerical errors in CFD, and the importance of Taylor series in discretization processes.
Click on Add To Cart and obtain the Geometry file, Mesh file, and a Comprehensive ANSYS Fluent Training Video.

To Order Your Project or benefit from a CFD consultation, contact our experts via email (info@mr-cfd.com), online support tab, or WhatsApp at +44 7443 197273.

There are some Free Products to check our service quality.
If you want the training video in another language instead of English, ask it via info@mr-cfd.com after you buy the product.

Special Offers For Single Product

If you need the Geometry designing and Mesh generation training video for one product, you can choose this option.
If you need expert consultation through the training video, this option gives you 1-hour technical support.
The journal file in ANSYS Fluent is used to record and automate simulations for repeatability and batch processing.
editable geometry and mesh allows users to create and modify geometry and mesh to define the computational domain for simulations.
The case and data files in ANSYS Fluent store the simulation setup and results, respectively, for analysis and post-processing.
Geometry, Mesh, and CFD Simulation methodologygy explanation, result analysis and conclusion
The MR CFD certification can be a valuable addition to a student resume, and passing the interactive test can demonstrate a strong understanding of CFD simulation principles and techniques related to this product.
Enhancing Your Project: Comprehensive Consultation and Optimization Services
Collaborative Development of a Conference Paper on Cutting-Edge Topics with MR CFD
Collaborative Publication Opportunity: Contribute to an ISI Article and Get Featured in Scopus and JCR-Indexed Journals
If you want training in any language other than English, we can provide you with a subtitled video in your language.

Description

Hello, and welcome to the first session of the Computational Fluid Dynamics (CFD) course. Let me discuss the course and provide a summary of the materials covered in the upcoming chapters.

In this course, we will focus on equations and various numerical methods for discretization and solving them in detail. Many students and engineers working in applied CFD lack information about the numerical techniques used by software like Ansys Fluent. The Mister CFD team, with extensive experience in simulating academic and industrial projects as well as training in CFD software, has decided to offer a different course to fill this knowledge gap. This course is designed for those already working in this field, as well as those interested in entering it.

While we will cover the details of equation discretization, the purpose of this course is not fundamental coding. Instead, as applied CFD engineers, we will become familiar with the equations behind the Fluent solver. The course covers all the necessary materials for entering the field of CFD and provides a detailed presentation of the various options Ansys Fluent uses for numerically solving equations. By the end of this course, you will be expected to set up your simulations more wisely.

If you are confused about different discretization methods, under-relaxation factors, solver types, or other related topics, this course is specifically designed for you.

Okay, let’s start with the question: ‘What is CFD?’

Computational Fluid Dynamics (CFD) provides numerical techniques for solving the governing equations of fluid dynamics. But why do we need to solve these equations numerically? The fundamental equations, known as the Navier-Stokes equations, are nonlinear partial differential equations (PDEs) for which a general analytical solution has not yet been found. While there are analytic solutions for specific problems, achieving those requires making numerous assumptions and simplifications.

In CFD, we aim to transform these nonlinear PDEs into a set of linear algebraic equations. This is done through a process known as discretization, where we use a Taylor series expansion of functions and truncate higher-order terms. However, there are several methods for performing this task, and here we will focus on the finite volume method used by Ansys Fluent.

If I were to describe CFD academically, I would say:

Computational Fluid Dynamics (CFD) is the analysis of systems involving fluid flow, heat transfer, and associated phenomena, such as chemical reactions, through computer-based simulations. This technique is a powerful tool for simulating a wide range of phenomena and problems. Here are some examples:

  • Aerodynamics of aircraft and vehicles: Studying lift and drag
  • Hydrodynamics of ships
  • Power plant engineering: Analysis of combustion in internal combustion engines and gas turbines
  • Turbomachinery: Understanding flows inside rotating passages and diffusers
  • Electrical and electronic engineering: Cooling of equipment, including microcircuits
  • Chemical process engineering: Mixing and separation processes, polymer molding
  • Building engineering: Assessing wind loading and heating/ventilation systems
  • Marine engineering: Evaluating loads on offshore structures
  • Environmental engineering: Studying the distribution of pollutants and effluents
  • Hydrology and oceanography: Analyzing flows in rivers, estuaries, and oceans
  • Meteorology: Predicting weather patterns
  • Biomedical engineering: Examining blood flow through arteries and veins

CFD allows us to simulate and gain insights into these complex phenomena, providing valuable information that can be used to improve designs, optimize processes, and enhance our understanding of fluid dynamics. By incorporating CFD into various fields, engineers and scientists can predict how fluids will behave under different conditions without the need for costly and time-consuming physical experiments. This makes CFD an indispensable tool in research, development, and innovation across multiple industries.

To reach the numerical solution of a problem using CFD, we need to follow several essential steps:

  1. Comprehend the Real Flow in Nature:
    • The first step is to thoroughly understand the basic principles of the real flow problem in nature that you are trying to model. For example, consider a natural phenomenon like a whirlpool in a body of water, where rotating fluid masses create complex flow patterns.
  1. Develop a Physical Model:
    • Next, we need to develop a physical model that represents the flow characteristics and boundary conditions of the problem. In the whirlpool example, you might model this using a vortex within a free stream, assuming an incompressible flow.
  1. Mathematical Modeling:
    • From the physical model, derive the mathematical equations that govern the flow, typically involving the Navier-Stokes equations for most fluid flow problems. These equations account for conservation of mass, momentum, and energy.

In this step we can simplify the equations as much as possible. For the whirlpool, you might derive simplified potential flow equations, which apply when the fluid is inviscid and irrotational.

  1. Numerical Solution through Discretization:
    • Discretize the continuous mathematical equations using numerical methods such as Finite Difference, Finite Volume, or Finite Element Methods. This step transforms the equations into a system of algebraic equations, solvable by computers.
  1. results:
    • The results then will found. And then we should analyze the simulation output carefully, and verify the results against expected physical behavior or experimental data. This step ensures that the numerical solution is accurate and reliable.

In this simulation we will look at these sections in more detail.

Here are some of the most popular CFD methods, along with their key advantages and limitations. These brief comparisons can help you decide which method might be best suited for a particular problem. For more detailed information, you can refer to specialized resources.

first one is Finite Difference Method (FDM):

The FDM involves discretizing the continuous partial differential equations (PDEs) using grid points and approximating the derivatives with difference equations. It is typically used for simpler geometries and structured grids.

  • The Finite Difference Method typically uses a “structured” grid, meaning the computational domain is divided into a regular grid of points. These grid points are aligned in a structured pattern, often rectangular or cubic, which simplifies the computational process.
  • Each grid point corresponds to a specific location in the fluid domain, and the solution (e.g., velocity, pressure) is computed at these discrete points.

The core idea of Finite Difference Method is to approximate the derivatives in PDEs with difference equations. This involves replacing the continuous derivatives with algebraic expressions based on the values at nearby grid points.

For example, a first-order derivative of a function ( F ) with respect to ( x ) can be approximated by: value of function F at point (x + delta x) mines value of F at point (x) divide by delta x. This is known as the forward difference approximation. Similar expressions exist for backward and central differences.

The discretized equations form a large system of linear or nonlinear algebraic equations. This system is solved using iterative or direct methods, depending on the problem size and resources.

from Advantages of this method we can mention that The FDM is relatively easy to implement and understand, especially for problems with simple domains and boundary conditions. but It might not be suitable for complex geometries or unstructured grids often encountered in practical engineering applications.

the second one is Finite Volume Method (FVM):

The Finite Volume Method (FVM) is a popular numerical approach used in Computational Fluid Dynamics (CFD) for solving partial differential equations (PDEs) that describe fluid flow. It is particularly well-suited for complex geometries and is widely used in engineering and scientific computations.

  • Finite Volume Method can utilize both structured and unstructured grids, making it highly flexible for applications involving complex geometries.
  • In a structured grid, the computational domain is divided into a regular arrangement of control volumes with a predictable connectivity pattern.
  • In an unstructured grid, the domain is divided into arbitrary polyhedral cells to conform to irregular shapes, which is advantageous for modeling intricate boundaries and interfaces.

Unlike the Finite Difference Method (FDM), which directly discretizes differential equations, Finite Volume Method starts with the integral form of the conservation laws (mass, momentum, energy). The equations are integrated over each control volume (or cell), ensuring that the conservation principle is maintained across cell boundaries.

For example you can see the integral form of conservation equation. In this equation the first term represents the mass change inside the control volume and the second term represents the net mass the passes through boundary of the control volume.

  • The fundamental step in FVM is calculating fluxes—quantities passing through the faces of each control volume. Faces separate adjacent volumes, and flux calculations are crucial for evaluating how properties like mass, momentum, and energy are transferred between cells.
  • Numerical fluxes are often approximated using methods like upwind schemes, central differencing, or more advanced schemes like the Roe solver and Godunov’s method to enhance accuracy and stability.

For example if we want to calculate mass flux in surface that is between to cell, in the forward scheme we will use the velocity at the next cell and the normal surface.

The conservation equations are broken into surface integrals (to handle interface fluxes between volumes) and volume integrals (for source terms and accumulation within the cell). Discretization involves converting these integrals into algebraic equations.

This method ensures local conservation and handles discontinuities, such as shock waves, better than some other numerical methods.

FVM’s flexible grid approach simplifies the implementation of boundary condition.

the other method is Finite Element Method (FVM):

The FEM divides the domain into elements and uses variational methods to minimize an error function. The variational principle transfers Partial Differential Equation to an equivalent problem. The solution is approximated through a set of basis functions defined over these elements.

FEM is well-suited for complex geometries and is widely used in structural and continuum mechanics, as well as fluid dynamics. But It can be more computationally intensive and requires more sophisticated mathematical formulations compared to FDM and FVM.

Each method has its own strengths and is chosen based on the problem requirements, computational resources, and desired accuracy. In practical applications, the finite volume method is very popular in the CFD community due to its ability to handle complex geometries and ensure the conservation laws are satisfied across control volumes. When choosing a method, factors such as the nature of the problem, the available computational resources, and the specific requirements of the solution accuracy and precision need to be considered.

OK, now let’s look at different types of partial differential equations.

Partial Differential Equations (PDEs) are equations that involve rates of change with respect to continuous variables. They are fundamental in describing various physical phenomena such as heat, sound, fluid dynamics, and electromagnetic fields. PDEs can be categorized based on the phenomena they describe or their mathematical properties. Here are the different types of PDEs:

We can classify the PDEs by their Order into the first order and second order partial differential equations:

First order PDEs, that involve the first derivative of the unknown function. Here there is an example for first order partial differential equation.

second order PDEs, Involve the second derivative and are the most common in physics and engineering. Examples include the heat equation, wave equation, and Laplace’s equation.

In another view we can classify the PDEs to linear and non-linear partial differential equations:

In Linear PDEs, unknown function and its derivatives appear linearly. Superposition of solutions applies to these equations. Common examples include the heat equation and Laplace’s equation.

In Non-Linear PDEs, unknown function or its derivatives appear in a nonlinear manner (in the other word; unknown function or its derivatives multiplies). These equations can be much more complex and harder to solve. Examples include the Navier-Stokes equations for fluid flow and the Einstein field equations in general relativity.

Also, partial differential equations can be classified by behavior:

We can classify PDEs in three group: Elliptic PDEs, Parabolic PDEs and Hyperbolic PDEs.

By considering the general form of partial differential equation as this equation that A, B, C and D can be constant or can be function of (x, y, U or first derivative of U respect to x or y). If value of B in the power of 2 minus 4 multiply A and C became negative the PDE is elliptic, if exactly became zero, PDE is parabolic and if the result became positive PDE is hyperbolic.

  1. Elliptic PDEs:

Elliptic PDEs Characterized by no real characteristic lines, often used to describe steady-state processes. So, properties of flow at any point are dependent to all domain and have influence on all domain in other word information propagates in every directions. Elliptic PDEs don’t involve time as a variable and for this type of equations we only need boundary conditions and sometimes called boundary value problems. Laplace’s equation and Poisson’s equation are classic examples.

  1. Parabolic PDEs:
    • Describe phenomena involving diffusion-like processes that evolve over time. Parabolic PDEs have one characteristic line. Information travels one particular direction. Usually. this characteristic line in the parabolic PDEs is time. So, in a domain of x-t the flow properties at each point are dependent of past time and can influence the future. A classic example is the heat equation, which describes the distribution of temperature over time.
  2. Hyperbolic PDEs:
    • Characterize wave propagation and dynamic systems, often relating to changes over time that propagate through a medium. Hyperbolic PDEs have more than one characteristic lines. and information transfer along this lines. At this problems, properties of flow at any point in dependent of only a small region in past time and can influence only a small region in the future. The wave equation is a fundamental example, describing vibrations and acoustics.

And now let’s explain another mathematical toll that we need in this course.

The Taylor series is a powerful mathematical concept used to approximate functions using polynomials. It is based on the idea of expanding a function into an infinite sum of terms, calculated from the function’s derivatives at a single point.

So, how we can use the Taylor series to convert the derivatives to algebraic relations?

Consider the Taylor series of function F at x plus delta x till first order derivative and truncate higher order terms.

Now, by difference the function at point x and x plus delta x we can find the F prime.

In fact, with this tool, we discretize the PDEs. Obviously with truncate higher order terms of Taylor series some error rises.

This is not the only source of numerical error in CFD.

In Computational Fluid Dynamics (CFD), numerical error refers to the inaccuracies that arise during the numerical solution of the governing equations, such as the Navier-Stokes equations. Understanding and managing these errors is crucial for ensuring the reliability and accuracy of CFD simulations. Numerical errors in CFD can be categorized into several types:

  1. Round-off Error:
    • Round-off errors occur due to the finite precision of numerical representations in computer calculations. Computers represent numbers with a finite number of digits, which can lead to small discrepancies.
    • For example, if our memory cell that we allocate to a variable has capacity for only Three decimal places and its value calculated 1.25328 computer will save 1.253. so, one source of numerical error is because of memory limits.
    • These errors are usually very small but can accumulate, especially in large-scale simulations with many iterative steps.
    • Using double precision instead of single precision can help reduce round-off errors.
  1. Truncation Error:
    • As we saw truncation errors occur when a mathematical process is approximated by a finite number of terms.
    • Truncation errors can significantly affect the accuracy of a solution, particularly in regions with high gradients or non-linearities.
    • Increasing the order of the numerical method (using higher-order schemes for discretization) typically reduces truncation errors.
    • Refining the mesh or grid to capture gradients more accurately can also help.
  1. Modeling Error:
    • Modeling errors occur due to the simplifications and assumptions made in the mathematical models used in CFD, such as turbulence models and boundary conditions.
    • These errors can be significant in cases where models are not representative of the actual physical processes, leading to inaccurate predictions.

Refining the grid sizes and time steps can reduce the truncation error but increases the truncation error so, in our simulation finding the ideal grid size is very important because by reducing grid size in some cases in addition to increasing computational cost may even have a negative effect on accuracy.

Now I think we reach to a point that we can take a look to conservation equations:

The general form of transport equations represented here. This equation widely used in the fluid dynamics.

This equation is the so-called transport equation for property φ. It clearly highlights the various transport processes:

on the left-hand side, the first term is the rate of change of φ with time

and the second term is convective term. calculating the property φ transfer with the bulk flow.

And on the right hand, first term is the diffusive term (Γ is diffusion coefficient) and the last one is source term.

In order to bring out the common features we have, of course, had to hide the terms that are not shared between the equations in the source terms.

Φ can be any quantity for example if we replace φ with 1 the result will be Continuity equation.

And if φ replace with x velocity and add source terms, x-momentum equation will results. The diffusion coefficient for momentum equation is µ. Also, pressure term and some viscous stress terms is added as source term.

if φ replace with concentration and add source terms, species equation will results. The diffusion coefficient for species equation is Di (diffusion coefficient). Also, amount of species that consume or produce by reactions added as source term.

In this way we can add transport equation for other variables like temperature, radiation, etcetera.

But, what would be integral form of conservation equation. As we discussed starting point for computational procedures in the finite volume method is integral form of conservation equation. The key step of the finite volume method, is the integration of differential conservation equation over a three-dimensional control volume. So, let’s integrate the general form of transport equation over control volume term by term (control volume in computation fluid dynamics is grid cell).

By using Gauss’s divergence theorem, we can convert volume integrals to surface integrals.  Gauss’s divergence theorem states that the surface integral of a vector field over a closed surface is equal to the volume integral of the divergence of vector over the volume enclosed by the closed surface.

Vector n is unity vector in the direction of normal to surface dA.

The volume integrals in the second term on the left-hand side, the convective term, and in the first term on the right-hand side, the diffusive term, are rewritten as integrals over the entire bounding surface of the control volume.

The order of integration and differentiation has been changed in the first term on the left-hand side of equation to illustrate its physical meaning. This term signifies the rate of change of the total amount of fluid property φ in the control volume. The product n dot ρ, φ, u expresses the flux component of property φ due to fluid flow along the outward normal vector n, so the second term on the left-hand side is the convective term, therefore is the net rate of decrease of fluid property φ of the fluid element due to convection.

A diffusive flux is positive in the direction of a negative gradient of the fluid property φ, in other word, along direction [minus gradient φ]. For example, heat is conducted in the direction of negative temperature gradients. Thus, the product n dot (negative Γ multiply to gradient φ) is the component of diffusion flux along the outward normal vector, so out of the fluid element. Similarly, the product n dot (Γ multiply to gradient φ), which is also equal to Γmultiply to (negative n dot (negative gradient φ)), can be interpreted as a positive diffusion flux in the direction of the inward normal vector minus n, into the fluid element. The first term on the right-hand side, the diffusive term, is thus associated with a flux into the element and represents the net rate of increase of fluid property φ of the fluid element due to diffusion. The final term on the right-hand side of this equation gives the rate of increase of property φ as a result of sources inside the fluid element.

In steady state problems the rate of change is equal to zero. This leads to this integrated form of the steady transport equation.

In time-dependent problems it is also necessary to integrate with respect to time t over a small interval delta t from t until t plus delta t. This yields the most general integrated form of the transport equation:

Well, in the first session we review the essential fundamental material for entering the CFD. From next session, we will start the fluent formulation. So, stay with me to find out what is going on  behind the graphical layout of fluent software.

Reviews

There are no reviews yet.

Leave a customer review

Your email address will not be published. Required fields are marked *

Back To Top
Search
Whatsapp Call On WhatsApp