SIMPLE Algorithm CFD Code for Laminar Pipe Flow Simulation

Computational Fluid Dynamics MATLAB code for simulating incompressible laminar pipe flow using the Finite Volume Method and SIMPLE algorithm
69 Downloads
Updated 11 May 2024

View License

This MATLAB script simulates fluid flow using the SIMPLE (Semi-Implicit Method for Pressure Linked Equations) algorithm based on the Finite Volume Method, particularly tailored for laminar pipe flow predictions. The code solves the Navier-Stokes equations for incompressible fluid flow.
Governing Equations:
  • Continuity equation for incompressibility:
∇·u = 0
  • Momentum equations (Navier-Stokes Equations):
ρ(∂u/∂t + u·∇u) = -∇p + μ∇²u + f
where:
u = velocity field vector
p = pressure field
ρ = fluid density
μ = dynamic viscosity
f = external forces (if any)
The SIMPLE algorithm facilitates the coupling of pressure and velocity calculations,
iteratively refining the pressure field to satisfy mass conservation and momentum balance.
Features of the Script:
- Utilizes the finite volume method on a staggered grid to calculate velocities.
- Incorporates robust boundary conditions suitable for laminar flow in pipes.
- Provides real-time residual tracking to monitor convergence.
- Includes comprehensive post-simulation visualization tools for analysis of the velocity field.
Customizing the Simulation:
- Modify boundary conditions in the 'Boundary Conditions Setup' section to tailor simulations
for different fluid dynamics scenarios, such as open channel flow, flow around objects, or
different pipe configurations.
- Configure simulation parameters in the 'Initial Setup' section.
- Run the script in MATLAB to perform the simulation and visualize results.
- Adjust grid resolution and physical properties as needed to explore different scenarios.
------------------------------------------------------------------------
Author: Dr. Abdelhamid BOUHELAL
Affiliation: National Polytechnic of Algeria
Contact: https://www.abdelhamid-bouhelal.net/
Date: May 11, 2024
------------------------------------------------------------------------

Cite As

abdelhamid bouhelal (2024). SIMPLE Algorithm CFD Code for Laminar Pipe Flow Simulation (https://www.mathworks.com/matlabcentral/fileexchange/165781-simple-algorithm-cfd-code-for-laminar-pipe-flow-simulation), MATLAB Central File Exchange. Retrieved .

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