Finite Difference Method (FDM)
This section describes the formulation and methodology of finite difference method to solve the governing equations on a computational domain.
The finite difference method is the oldest method for the numerical solution of partial differential equations. It is also the easiest to formulate and program for problems which have a simple geometry.
The preceding expression is commonly referred to as the forward difference approximation. This derivative can have more refined approximations using a number of approaches such as truncated Taylor series expansions and polynomial fitting.

The finite difference formulation generally employs a structured grid. The most commonly used indices are i , j and k for the grid lines at x=xi , y=yj and z=zk , respectively. The function value at such a grid point is expressed as fi,j,k≡fijk≡f(xi,yj, zk) .
where u is the specified velocity, ρ is the density of the fluid and ϵ is the diffusivity.
If the domain is defined by the boundary x=0 and x=L and the boundary conditions by φ(0)=φ0 and φ(L)=φL , the domain can be discretised (non-uniformly) by a total of N+1 grid points for the finite difference solution of the problem.
The resulting set of linear algebraic equations can be solved to get the values of at the grid points.
Finite difference methods are advantageous for the numerical solution of partial differential equations because of their simplicity, efficiency and low computational cost. Their major drawback is their geometrical inflexibility, such as application on an unstructured grid or moving boundaries. Their formulation increases in complexity as the complexity of the domain increases.
The restrictions resulting from the above mentioned geometrical complexities can be alleviated by the use of methods such as grid transformation and immersed boundary techniques.