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.
R Surya Narayan (2020). FDM solution to flow through a square pipe (https://www.mathworks.com/matlabcentral/fileexchange/74998-fdm-solution-to-flow-through-a-square-pipe), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!