File Exchange

image thumbnail

FDM solution to flow through a square pipe

version 1.0.0 (43.3 KB) by R Surya Narayan
A MATLAB code that solves the velocity diffusion equation for the flow of a viscous fluid through a rectangular pipe


Updated 14 Apr 2020

View License

This is a MATLAB code that uses Finite Difference Method to solve the Poisson's equation for the velocity potential across the cross section of a rectangular pipe. Contours of the velocity are obtained using the contourf function. While earlier a matrix method was adopted to generate a coefficient matrix and solve the system of equations resulting from the discretized Poissions, this code uses a Gauss-Siedel iterative method by initializing the north-south-east-west coefficients for given grid-point.

Cite As

R Surya Narayan (2020). FDM solution to flow through a square pipe (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

inderpreet singh

Dear Sir you have done excellent work .I have doubts in same driven cavity with heating from one side to other, Adding energy equation .Hope you may help in this matter

MATLAB Release Compatibility
Created with R2019b
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!