MATLAB Code to solve the convection equation

MATLAB code to implement numerical solutions to the two dimensional convection equation using Finite Volume Method
606 Downloads
Updated 14 Apr 2020

View License

This is a MATLAB code that solves the 2D convection equation using Finite Volume Method. Interpolation scheme used is a combination of Central Differencing and Upwind Interpolation and hence is called "Deferred Correction" scheme that uses a blending factor beta. Setting beta =1 uses the second order accurate central differencing while setting beta=0 uses first order accurate upwind differencing. Boundary conditions involve both Dirchlet and Neumann boundary conditions with the scalar field phi set to 1 along the north and 0 along the west, while the east and south boundaries are characterized by setting d(phi)/dx to zero on the west face and d(phi)/dy to zero on the south face. Different plots for the equations can be obtained by tweaking the blending factor.

Cite As

R Surya Narayan (2024). MATLAB Code to solve the convection equation (https://www.mathworks.com/matlabcentral/fileexchange/75001-matlab-code-to-solve-the-convection-equation), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0