A simple MATLAB solver for the Falkner–Skan equation, which describes laminar boundary-layer flows over wedge-shaped surfaces. This is an educational code suitable for an introductory course in fluid mechanics or boundary layers.
The Falkner–Skan equation is a third-order nonlinear ODE:
f''' + ((n+1)/2) * f * f'' − n * f'^2 + n = 0
where n is the pressure-gradient parameter. The classical Blasius flat-plate solution is the special case n = 0. Positive values of n correspond to accelerating (favorable pressure gradient) flows over a wedge of included half-angle β π, with n = β / (2 − β).
Reference: Kundu, P. K. and Cohen, I. M., Fluid Mechanics, 4th edition.
| File | Description |
|---|---|
f_falkner_skan_function.m |
Core solver — integrates the Falkner–Skan ODE using a shooting method with ode113. |
s_example_code.m |
Example script — solves for Blasius (n = 0) and a mild favorable pressure gradient (n = 0.05), then plots the results. |
- Clone or download this repository.
- Open MATLAB and navigate to the project folder.
- Run the example script:
This will print convergence information to the command window and produce a figure comparing velocity and integral-thickness profiles for two values of
s_example_coden.
The boundary-value problem is converted into an initial-value problem by guessing the wall shear stress f''(0). The solver then:
- Integrates the ODE from
η = 0toη = η_maxusing MATLAB'sode113. - Checks whether the outer boundary condition
f'(η_max) = 1is satisfied. - Updates the shear-stress guess with a secant method and repeats until the error is below
1 × 10⁻⁸.
- The shooting method is sensitive to the initial guess. When sweeping over a range of
n, use the converged wall shear stress from the previous solution as the starting guess for the next. η_max(calledymaxin the code) should be large enough that the velocity profile reaches the free-stream value. A value of 8 works well for moderaten.
This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.