You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Blasius boundary layer
(named after Paul Richard Heinrich Blasius)
describes the steady two-dimensional laminar boundary layer that forms on a semi-infinite plate
which is held parallel to a constant unidirectional flow.
Blasius obtained an exact solution for the
Boundary Layer Equations
by assuming a zero-pressure gradient.
Where: $\quad \quad \quad \quad \delta (x)$ is the boundary layer thickness, $\quad \quad \quad \quad \psi$ is the stream function, and $\quad \quad \quad \quad U$ denotes the freestream velocity, and $u$ the local velocity.
The Blasius similarity equation is given by:
$$ff'' + 2f''' = 0$$
The Boundary conditions are given as:
The dimensionless velocity $\dfrac{u}{U}$ can be expressed at any location $x$
as a function of the dimensionless distance from the wall $\dfrac {y}{\delta}$.
The partial differential of the stream function with respect to $x$
gives the velocity in the $Y$-direction (generally taken as negative),
and its partial differential with respect to $y$ gives the velocity
in the $X$-direction:
$$
u = \dfrac {\partial \psi}{\partial y}; \quad \quad
v = \dfrac {\partial \psi}{\partial x}
$$
Inserting the values of $u, \dfrac {\partial u}{\partial x}, \dfrac {\partial u}{\partial y}$,
$\dfrac {\partial ^2 u}{\partial x^2}$ and $v$ from eqns. $(8), (9),$$(10),$ and $(11)$ in eqn $(1)$, we get
The physical and transformed boundary conditions are:
Physical boundary conditions
Transformed boundary conditions
at $y = 0, \quad u = 0$
at $\eta = 0, \quad \dfrac {df}{d\eta} = f'= 0$
at $y = 0, \quad v = 0$
at $\eta = 0, \quad f = 0$
at $y = \infty, \quad u = U$
at $\eta = \infty, \quad \dfrac {df}{d\eta} = f'= 1$
Implementation summary
The Blasius equation (eqn. $13$) is decomposed to a system of coupled 3 linear ODEs:
$$
f' = f_1 $$
$$
f_1' = f_2 $$
$$
f_2' = - \dfrac {f \cdot f_2}{2}
$$
This system of equation is then solved numerically using
the fourth-order Runge-Kutta (RK4) numerical scheme.
A random number is used as the initial guess for $f''(0)$ in this project.
The guss is then adjusted
until the boundary condition $f'(\infty) = 1$ is satisfied (with a tolerance of ${10}^{-12}$).
The data is written to a file, which can be accessed and evaluated.
Running the solution
Manual compilation
The code in this project requires at least C++17 to run.
Compile with flag -std=c++17.
Using the shell scripts (Linux/macOS)
You can run the run.sh script
from the project root to run the solution,
or with CMake and Ninja build using run_with_cmake.sh.
The script requires CMakeversion $\ge$ 3.20 and a decent C++ compiler.
Both scripts compile and run the solution in the
/solution/ directory in the working directory, but should be executed
from the project root.
clean.sh can be used to clean the compiled files and results.
About
A simple Numerical solution to the Blasius Similarity Boundary Layer equation.