File Exchange

image thumbnail

Boundary Layer App

version (63.7 KB) by

This MATLAB App provides a GUI to study laminar boundary layer problem of flow over a flat plate.



View License

This is the 1st MATLAB App in the Virtual Thermal/Fluid Lab series.
This MATLAB App allows you to:
1. Visualize a boundary layer
2. Study the growth of boundary layer thickness in response to free-stream velocity
3. Visualize streamlines and velocity profile
4. Learn how to solve boundary layer problem numerically with TDMA
5. Look at the GUI source code and see how it is created

Check out the webinar on virtual fluid mechanics and heat transfer labs with MATLAB:

Comments and Ratings (15)

Haris Fattah



PRANAV (view profile)

Hi, Great work!, I am trying to model Shock wave boundary layer interaction, can u plz help me the built the Matlab code. my


MT (view profile)

Hi Ye Cheng, Excellent work! Wondering if you can please solve this velocity profile/boundary layer problem numerically using finite different methods? Can you please share the Matlab code for that?

kolla VASU

can u plz give me the equations what u used in the boundary code

kolla VASU

can u plz give me the code for unsteady flow about a stagnation point on a stretching sheet in the presence of variable free stream

kolla VASU

plz give me code for this.
(X1')^(R+1)=(X2)^(R+1);(X2')^(R+1)=(X3)^(R+1);A(X2^(R+1))(I+1)+B(X2^(R+1))(I)+C(X2^(R+1))(I-1)=D;(X4')^(R+1)=(X5)^(R+1);E(X4^(R+1))(I+1)-F(X4^(R+1))(I)+G(X4^(R+1))(I-1)=0;where A=(2*lamda+eta/2*alpha_star*h+(X1^(R)(i)*h);B=2*h^2*alpha_star-4*lamda;C=(2*lamda-eta/2*alpha_star*h-((X1)^R)(i)*h);D=4*h^2*(X2^(2R+1))(I)-2*(X2^(2R))(I)*h^2-2*(lamda^2)*h^2+2*lamda*h^2*alpha_star;E=(2*lamda*h+pr*h*((X1)^R)(I)-h/2*eta*alpha_star*pr);F=4*(lamda+(h^2)*alpha_star*pr);G=(2-h*pr*((X1)^(R))(I));
boundary conditions are X2^(R+1)(0)=1;X2^(R+1)(@)=lamda;X4^(R+1)(0)=1;X4^(R+1)(@)=0;X1^(R+1)(0)=0;
where pr=0.72,h=0.01,lamda=0.1,alpha_star varies from 0 to 1.8@0.0001,eta will end when X2=lamda,X4=0;R is iteration and i is position
plz help me in this writing code

Ye Cheng

Ye Cheng (view profile)

@kolla VASU, you can download all code by clicking on the "Download Zip" button.

kolla VASU

plz send the matlab code for this

kolla VASU

i have some equations how can i solve by TDMA solver code plz


Silvio (view profile)

Ahmad Kassaee

The idea is conveyed perfectly! This demo convinces one that teaching fluid mechanics, heat transfer and other similar courses without help of matlab could be deficient.

Great job Ye.

Ye Cheng

Ye Cheng (view profile)

Click on the 'Open Code' button in the app, and you will see a script (boundaryLayerScript.m) that shows the algorithm behind and how A,B,C,D are constructed based on the x-momentum equation. This topic can be found in many textbooks, such as Computational Heat Transfer by Yogesh Jaluria (page 244, similar but not identical).

Hi, I would like to know what are the equations that you use to fill each diagonal A, B and C and also the RHS vector D.


Selcuk Fidan


Updated license


Updated webinar link



MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video