# Understanding The Finite Difference Method by Solving Unsteady Linear Convection Equation

Solving differential equations are always been challenging for engineers. This is because there is a lot of variants to differential equations and also the complexity of these equations varies with respect to a number of variables involved and order of the equation. A differential equation which describes a physical problem is very complex and cannot be solved by an analytical approach. So, studying numerical methods is important for an engineer. In this project, you will learn the Finite Difference Method (Numerical Method) by solving a Linear Convection equation.

Looking to build projects on Mechanical?:

Mechanical Kit will be shipped to you and you can learn and build using tutorials. You can start for free today!

Finite Difference Method is the simplest numerical method which one can learn as a gateway for exploring more about numerical methods. Infinite difference method, the values are assigned to node points only. This is the limitation of FDM as we cannot determine the values between node points.

In the FDM we can discretize both space and time in 3 ways as follows,

• FTFS (Forward in Time Forward in Space)
• FTBS (Forward in Time Backward in Space)
• FTCS (Forward in Time Centre in Space

While solving Linear Convection equation you will use the above type of discretization and compute the result. You have to observe how result varies with a change in discretization technique.

## Problem Description:

In a one dimension inviscid, constant pressure, isothermal fluid flow, the length of the pipe is 1 meter. U is any conserved variable of the flow which is transporting at 7m/s. The value of U is -1.0unit from 0mm to 0.33mm and 0.66mm to 1.0mm. Find out the value of U in the domain at time t=1.0 sec.

Did you know

Skyfi Labs helps students learn practical skills by building real-world projects.

You can learn from experts, build working projects, showcase skills to the world and grab the best jobs.
Get started today!

## Project Description:

1. Linear Convection Equation: The simplest form of the differential equation is a one-dimensional Linear Convection equation, which can be derived from the Navier-Stokes equation. By solving this differential equation, one can determine how a property of fluid convecting along the domain.
2. FDM: This is one of the discretization techniques used in numerical analysis to solve differential equation by approximating the derivatives. Here we discretize both space and time into N no of data points, where we store the data and keep updating as we move forward in time.
3. Taylors Series Expansion: To implement the finite difference method, Taylor series representation of a function should be known. In mathematics, Taylor series is a representation of a function as an infinite sum of terms that are calculated from the values of the function’s derivatives at a single point. That is, if a function is continuous and we know its derivative at a point, then we can easily determine its value on the next neighboring point in the domain by using Taylor series.

## Project Implementation:

1. At first, learn basic of numerical methods. Learn how FDM is different from other methods, what is a node, discretization, errors in numerical methods, truncation error, stability and convergence.
2. Then learn the significance of Taylor series expansion. Use truncated Tayler series to discretise the differential equation in 3ways (FTFS, FTCS, FTBS).
3. Find a Numerical solution to that equation using FDM. In this step, consider the flow to be left to right (+ve direction) and write codes to discretize the domain and interact the solution for a number of times until you get an accuracy of 10e-5 and achieve timestep 1s. Save the result data in a text file.
4. After that consider the flow to be coming from right to left (-ve direction) and perform the task written in step 3.
5. After solving the above two cases you will end up with 6 result data. Plot those result data using Gnuplot or Minitab and compare them.

Project Brief: By observation you can see, use of FDM is dependent on the direction of information flow, as FTFS discretization can only produce a result when information is coming from the right side (-ve direction) similarly, FTBS will produce a result when information coming from the left side (+ve direction). FTCS will produce oscillating result irrespective of the direction of information flow because it takes information from the wrong side also.

## Software requirements:

1. Dev-C++: You will be needing Dev-C++ software to write logic and interact the solution for a number of times.
2. Gnuplot: Also, you will be needing plotting software such as Gnuplot to plot the result data and compare the solution.

Programming language: C

## Latest projects on Mechanical

Want to develop practical skills on Mechanical? Checkout our latest projects and start learning for free

Kit required to develop Understanding The Finite Difference Method by Solving Unsteady Linear Convection Equation:
Technologies you will learn by working on Understanding The Finite Difference Method by Solving Unsteady Linear Convection Equation:
###### Understanding The Finite Difference Method by Solving Unsteady Linear Convection Equation
Skyfi Labs Last Updated: 2022-04-18

Join 250,000+ students from 36+ countries & develop practical skills by building projects

Get kits shipped in 24 hours. Build using online tutorials.

## Subscribe to receive more project ideas

Stay up-to-date and build projects on latest technologies