Next Article in Journal
Perspective on the Response of Turbulent Pipe Flows to Strong Perturbations
Next Article in Special Issue
Open Water Flume for Fluid Mechanics Lab
Previous Article in Journal
The Seasonal Variability of the Ocean Energy Cycle from a Quasi-Geostrophic Double Gyre Ensemble
Previous Article in Special Issue
Teaching and Learning Floating and Sinking: Didactic Transformation in a Density-Based Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A CFD Tutorial in Julia: Introduction to Laminar Boundary-Layer Theory

School of Mechanical and Aerospace Engineering, Oklahoma State University, Stillwater, OK 74078, USA
*
Author to whom correspondence should be addressed.
Fluids 2021, 6(6), 207; https://doi.org/10.3390/fluids6060207
Submission received: 13 May 2021 / Revised: 27 May 2021 / Accepted: 28 May 2021 / Published: 3 June 2021
(This article belongs to the Special Issue Teaching and Learning of Fluid Mechanics, Volume II)

Abstract

:
Numerical simulations of laminar boundary-layer equations are used to investigate the origins of skin-friction drag, flow separation, and aerodynamic heating concepts in advanced undergraduate- and graduate-level fluid dynamics/aerodynamics courses. A boundary-layer is a thin layer of fluid near a solid surface, and viscous effects dominate it. Students must understand the modeling of flow physics and implement numerical methods to conduct successful simulations. Writing computer codes to solve equations numerically is a critical part of the simulation process. Julia is a new programming language that is designed to combine performance and productivity. It is dynamic and fast. However, it is crucial to understand the capabilities of a new programming language before attempting to use it in a new project. In this paper, fundamental flow problems such as Blasius, Hiemenz, Homann, and Falkner-Skan flow equations are derived from scratch and numerically solved using the Julia language. We used the finite difference scheme to discretize the governing equations, employed the Thomas algorithm to solve the resulting linear system, and compared the results with the published data. In addition, we released the Julia codes in GitHub to shorten the learning curve for new users and discussed the advantages of Julia over other programming languages. We found that the Julia language has significant advantages in productivity over other coding languages. Interested readers may access the Julia codes on our GitHub page.

1. Introduction

Computational fluid dynamics (CFD) simulation is one of the vital steps of the design of a product that includes fluid motion. Since fluid dynamics are extremely complex and the motion equations have nonlinear terms, usage of numerical approaches is inevitable to simulate or predict fluid motion. Predictions can also be done with experiments. However, it is usually costlier than a regular CFD simulation. On the other hand, fundamental knowledge about the flow, that is planned to simulate, is necessary because of the required numerical approach decision. Learning the canonical flows well is extremely important in this point because most of the complex flow consists of a combination of a couple of canonical flows. An airfoil CFD simulation can consist of boundary-layer flow over the smooth part of the airfoil, mixing layer flow where the tail ends, and blunt body flow in the wake region. One airfoil simulation consists of three different canonical flows. A full understanding of the canonical flows is extremely important to model an accurate airfoil simulation.
Prandtl [1] stated that some of the terms in the Navier–Stokes equations can be neglected for the boundary-layer flows. As a result of this assumption, well-known boundary-layer equations arose. These approaches are still valid after a century and the resultant system of equations inspired lots of researchers in their studies. One of them was Blasius who is the Ph.D. student of Prandtl. Blasius [2] worked on the same problem as Prandtl did. However, he aimed to overcome the enigma of turbulence by considering the phenomenon of boundary-layer flow explained by Hager [3]. He further simplified the boundary-layer equations for a flat plate. He assumed that the flow is parallel. In other words, the velocity component in the parallel direction is not zero and the velocity in the transverse direction is zero. Moreover, he represented the resultant system of equations with a third-order ordinary differential equation, which is known as the Blasius similarity solution.
The Falkner–Skan similarity solution is another laminar similarity solution. Cebeci [4] explains the Falkner–Skan equations named after V. M. Falkner and Sylvia W. Skan. Falkner and Skan generalized the Blasius similarity solution for non-parallel flows, such as wedge flows and corner flows. The resultant equation can be used to predict the boundary-layer thickness for wedge flow. It has to be noted that these assumptions are available in the laminar region. Once the turbulence occurs, both of these similarity solutions will be inaccurate. In the incompressible region, the Falkner–Skan equation can be used without additional equation; however, after the compressibility limit, the temperature effect must be introduced to the system as an additional equation. If the Falkner–Skan equation is solved with the energy equation, the boundary-layer profile can be obtained in the compressible region.
One of the other Ph.D. students of Prandtl is Karl Hiemenz who worked on Hiemenz flow which is a type of stagnation point flow. Hiemenz [5] formulated and calculated the stagnation point problem as explained in the Schlichting [6]. The problem was a special case of the Falkner–Skan similarity solution. Howarth [7] also worked on the same problem and concluded similar results. Another Ph.D. student of Prandtl, Fritz Homann [8] worked on the same problem for axisymmetric bodies as Schlichting [6] explains. Homann’s similarity formulation was for a sphere while Hiemenz’s similarity formulation was for a cylinder. Both similarity solutions are being widely used for stagnation flows.
The aforementioned papers are the origins of the boundary-layer theory. As it is mentioned, the boundary-layer theory is the origin of many problems, such as the laminar to turbulent boundary-layer transition and flow separation. The main concern of these researches is to increase the performance of the vehicle because the transition increases the heat transfer and the vehicle requires a better thermal protection system at high speeds due to increased heat transfer rate. On the other hand, flow separation may lead to a lift force loss on the wing as a result, the performance of aircraft decreases. Since the focus of the present paper is the fundamentals of laminar boundary-layer theory, the details will not be provided about advanced researches. However, readers who are interested in details may check [9,10,11,12] for subsonic boundary-layer transition, Refs. [13,14,15,16,17,18,19,20,21] for supersonic/hypersonic boundary-layer transition, and Refs. [22,23,24] for flow separation. The other researches where boundary-layer flow is involved are [25,26,27,28,29,30].
Understanding the aforementioned fundamental flows are crucial for a senior undergraduate student or a graduate student in order to simulate more complex flows. However, modeling these equations in a computer environment requires more than knowledge about canonical flows instead it requires knowledge about programming languages as well. There are several learning modules and papers [31,32,33,34,35] for computational fluid dynamics simulation coding; however, there is not enough publication for Julia language [36]. It is a relatively new coding language among the other coding languages such as Fortran, C/C++, Python, and MATLAB but it is getting popular fast because it is trying to fill the gap between the language of the state-of-art CFD codes, Fortran and C/C++, and straight-forward/user-friendly languages, Python and MATLAB. Most of the state-of-art CFD codes are written in Fortran and C/C++ because it is so fast and random access memory usage (RAM) can be reduced drastically. On the other hand, MATLAB and Python have user-friendly and easy syntax which makes them favorites of students, with a price, which is the speed of computation. Julia is a language that tries to fill this gap between two different coding styles. It has a user-friendly environment, while also being fast. It provides a working space that helps users to write clear, high-level, generic code that resembles mathematical formulas. Julia’s ability to combine high-performance with productivity makes it a great choice for researchers working in different areas.
In this paper, fundamental flow problems such as Hiemenz flow, Homann flow, Blasius flow, and Falkner–Skan flow will be derived from scratch and modeled in the Julia environment. The finite-difference discretization in space with Thomas algorithm as linear system solver is used. Outputs of the code are provided and they are compared with the literature. Additionally, the advantages of the Julia language over other languages will be discussed. The computer codes and the implementation instructions will help students to understand the fundamental flows which will provide insight for student’s course work and researches. Using these examples, they can solve more complex flow types and develop their own codes. We make all these codes available on GitHub and they are accessible to everyone. We provide installation instruction for Julia and the required packages in Appendix A. The GitHub link of the codes also can be found in Appendix A.

2. Laminar Boundary-Layer Theory

Understanding canonical flows is crucial to understanding more complex flows such as flow over a wing or an airfoil. Hosseini et al. [37] studied flow over a wing section with a direct numerical simulation (DNS) study. They created a great video about how flow is formed over the aircraft. The video shows the development of the boundary-layer, how the trailing edge looks like a mixing-layer flow, and how Karman vortex street type of wake structures occurs. If the pre-study work is examined, it can be seen that the mesh structure is built on the flow prediction. Using a finer mesh on the critical regions is a key point of the CFD and it requires predictions about the possible flow behavior. The boundary-layer is the origin of many engineering problems in aerodynamics, including wing stall, the skin friction drag on an object, and the heat transfer that occurs in high-speed flight. In this present paper, boundary-layer theory will be examined under two subsections, which are laminar boundary-layer problems and stagnation point problems. In this present paper, fundamental fluid dynamics problems related to boundary-layer theory will be derived and implemented in a relatively new programming language, Julia. The contribution is employing the Julia language. The governing equations and solution methodologies are already published in the literature. The interested reader should refer to the additional references [6,38] for detailed derivations. The manuscript may enable students to adopt the programming language easily.

2.1. Laminar Boundary-Layer Flow Problems

Velocity distribution over a flat plate can be represented with a similarity solution. In this subsection, Blasius and Falkner–Skan similarity solutions will be derived from scratch and they will be solved numerically in the Julia environment. The Julia codes will be available to shorten the learning curve.

2.1.1. Blasius Flow Problem

Schematic description of flow over a flat plate, in other words, Blasius boundary-layer flow can be illustrated as in Figure 1. The governing equations for Blasius flow are boundary-layer equations. These equations can be obtained by non-dimensionalizing the two-dimensional Navier–Stokes equations that are:
u x + v y = 0
u u x + v u y = 1 ρ p x + ν 2 u x 2 + 2 u y 2
u v x + v v y = 1 ρ p y + ν 2 v x 2 + 2 v y 2 ,
where u and v are the velocities in the x-direction and y-direction, respectively. p is the pressure, ν is the kinematic viscosity, ρ is the density. If Equations (1)–(3) are non-dimensionalized with:
u * = u U , v * = v U , p * = p ρ U 2 ,
x * = x L , y * = y L ,
where L is the plate length and U is the free-stream velocity. The two-dimensional, incompressible non-dimensional Navier–Stokes equations can be shown as:
u * x * + v * y * = 0
u * u * x * + v * u * y * = p * x * + 1 R e 2 u * x * 2 + 2 u * y * 2
u * v * x * + v * v * y * = p * y * + 1 R e 2 v * x * 2 + 2 v * y * 2 .
Star superscript ( [ ] * ) corresponds to non-dimensional variable. In a boundary-layer flow, some variables are smaller than others. For example, u * = O ( 1 ) and x * = O ( 1 ) so u * x * = O ( 1 ) . In the continuity equation, two terms must be in the same order to obtain 0 so v * y * = O ( 1 ) . It can be seen that from Figure 1, y = O ( δ * ) where δ * is the non-dimensionalized boundary-layer thickness. From here, it can be concluded that v = O ( δ * ) . It has to be noted that δ * < < 1 . If the same approach is applied to momentum equations, the final system of equations will be:
u * x * + v * y * = 0
u * u * x * + v * u * y * = p * x * + 1 R e 2 u * y * 2
p * y * = 0 .
For an inviscid flow, where the Reynolds number is so high, the viscous term can be neglected. The pressure is constant as obtained in the Equation (11) and v = 0 . Equation (10) will be:
d P e * d x * = U e * d U e * d x * ,
where U e and P e are the inviscid velocity and pressure. Finally, the two-dimensional boundary-layer equations in the dimensionless form can be written as:
u x + v y = 0
u u x + v u y = U e d U e x + ν 2 u y 2 .
It has to be noted that star superscript is suppressed to avoid confusion. In order to solve this problem, similarity transformation can be used. The similarity parameter ( η ) can be chosen as:
η = y ν x U .
After that, velocity components can be shown as:
u ( x , y ) = U F ( η )
v ( x , y ) = G ( η ) x U ν .
If Equations (13) and (14) are rearranged with the given velocities, the boundary-layer equations will be:
G = η 2 F
F = 1 2 η F F + G F .
In order to make the next procedure easier, it can be assumed that F = f . After that, Equation (18) can be integrated and put into Equation (19). The final ordinary differential equation can be obtained as:
2 f + f f = 0 .
The boundary conditions of the system will be:
u ( x , 0 ) = U F ( η = 0 ) = 0 F ( 0 ) = f ( 0 ) = 0
v ( x , 0 ) = G ( η = 0 ) x U ν = 0 G ( 0 ) = f ( 0 ) = 0
u ( x , y ) = U F ( η ) = 1 F ( ) = f ( ) = f ( ) = 1 .
The given assumptions reduced the system of second-order partial differential equations into a third-order ordinary differential equation. The computational approach will be examined in the Julia framework.

2.1.2. Numerical Solution of Blasius Flow Problem

In this computational section, the solution of the third-order ordinary differential equation will be transformed into two equations and they will be solved with Thomas algorithm [39] which is one of the best methods for the tridiagonal matrices. It has to be noted that the same equations can be solved with any other methods such as Runge-Kutta, Runge-Kutta-Fehlberg, compact finite difference, high-order finite-difference; however, in this present paper, authors used the finite difference method for spatial discretization with the Thomas algorithm for the linear system solution. If it is assumed that f = h and f = p in Equation (20), the system of equations will be:
2 h + p h = 0
p h = 0 ,
with the following boundary conditions:
p ( 0 ) = 0
h ( 0 ) = 0
h ( ) = 1 .
If the second-order central finite difference method is applied to h variable:
h n = h n + 1 2 h n + h n 1 ( Δ η ) 2 + O ( ( Δ η ) 2 )
h n = h n + 1 h n 1 2 Δ η + O ( ( Δ η ) 2 ) .
In this paper, details of the finite difference and derivation of it from Taylor’s series will not be covered. If the reader is curious about the derivation of them, the book of Moin [40] can be checked. If the finite difference approach for h is substituted into the Equation (24), the final equation will be:
A n h n + 1 + B n h n + C n h n 1 = 0 ,
where the A n , B n , and C n are:
A n = 2 Δ η 2 + p n 2 Δ η
B n = 4 Δ η 2
C n = 2 Δ η 2 p n 2 Δ η ,
with the boundary conditions for the system the tridiagonal system ( A x = b ) can be shown as:
1 0 0 0 0 A 2 B 2 C 2 0 0 0 0 A N 2 B N 2 C N 2 0 0 0 0 A N 1 B N 1 C N 1 0 0 0 0 0 1 A h 1 h 2 h N 2 h N 1 h N x = 0 0 0 0 1 b
It has to be noted that the first and last rows of the matrix are known and they are coming from the boundary conditions. In order to solve this problem, the Thomas algorithm can be applied. If relation between h n and h n 1 is:
h n = G n + H n h n + 1
h n 1 = G n 1 + H n 1 h n .
If Equation (37) is substituted into Equation (31), the final equation will be:
h n = C n G n 1 B n + C n H n 1 + A n B n + C n H n 1 h n + 1 .
If Equations (36) and (38) are compared, G n and H n coefficients can be found as:
G n = C n G n 1 B n + C n H n 1
H n = A n B n + C n H n 1 .
The problem here is that one has to know G 1 and H 1 in order to start the calculation. H 1 can be assumed as 0 and the G 1 can be calculated as 0 from the boundary conditions. Once G 1 and H 1 are calculated, G n and H n can be calculated from Equations (39) and (40). The given formulations can be implemented as it is shown in Listing 1.
The problem in Listing 1 is the usage of the p and h values which are not defined yet. In order to start to iteration, the initial assumption for h must be given. Most of the time, the linear assumption is the best assumption. Figure 2 shows the schematic of the profile transformation after some iterations. Once the initialization of h is done, p can be calculated from the integration of p = h . The discrete integration of p can be written as:
p n = p n 1 + η n 1 η n h d η .
Listing 1. Implementation of Thomas algorithm for Blasius profile.
Fluids 06 00207 i001
If the integration is done numerically with the trapezoidal rule [41], the initial guess for h and p can be calculated in Julia as shown in Listing 2.
After the initialization is done, Listing 1 can be run with p calculation of Listing 2, until the change in h is smaller than an arbitrary parameter ϵ which can be taken as 1 × 10 8 . The final profile will be as shown in Figure 3. The profile is also compared with Schlichting [6] in order to validate the results. It has to be noted that, Schlichting used η = y 2 ν x U as similarity coordinate so the figure is plotted according to this nondimensionalization.
Listing 2. Implementation of initial velocity guess and initial p for Blasius profile.
Fluids 06 00207 i002

2.1.3. Falkner–Skan Flow Problem

The Falkner–Skan similarity solution can be considered as a family of the similarity solutions since it is a general solution that includes Blasius flow, Hiemenz flow (see Section 2.2.1), and more. Falkner–Skan equation cannot represent Homann flow (see Section 2.2.3) because Homann flow is an axisymmetric flow. On the other hand, Falkner–Skan flow is a two-dimensional flow. The name ‘similarity solution’ arises from the solutions at two arbitrary stations which are related to one another by means of a scale factor. A flow that can be represented with boundary-layer Equations (13) and (14), and satisfies the following equation:
u ( x 1 ) , y g ( x 1 ) U e ( x 1 ) = u ( x 2 ) , y g ( x 2 ) U e ( x 2 ) ,
can be considered as self-similar. If boundary-layer Equations (13) and (14) are considered and similarity a transformation is assumed as:
u ( x , y ) = U e ( x ) f ( ξ ) , ξ = y g ( x ) .
If the continuity equation of boundary-layer Equation (13) is modified with the given transformation, the final equation will be:
v ξ = U e f g + U e f g ξ .
If Equation (44) is integrated over ξ to find the velocity v, the v velocity will be:
v ( x , ξ ) = ( U e g ) f + U e ξ g f + H ( x ) .
H ( x ) can be calculated from the boundary conditions on the wall where ξ is zero and correspondingly, velocities and f ( 0 ) are zero. H ( x ) will be 0 if f ( 0 ) is chosen as 0. If calculated derivatives and velocities are substituted into Equation (14), after some simplification, the final equation will be:
f + g ν ( U e g ) f f + g 2 U e ν ( 1 f ) = 0 .
Since f must be the function of ξ only and must not be a function of x, the coefficients of second and third terms must be constant. The final Falkner–Skan equation for the family of self-similar solutions:
f + α f f + β ( 1 f 2 ) = 0 ,
where α = g ν ( U e g ) and β = g 2 U e ν . The α and β can be further solved for the velocity scale and length scale. If the following consideration is applied:
α * = g ( U e g )
β * = g 2 U e .
If ( U e g 2 ) is written in terms of α * and β * , the obtained equation integrated with respect to x, the resultant equation will be:
U e g 2 = ( 2 α * β * ) x + c .
The constant of the integration represents a shift in the origin on x. Hence it doesn’t affect the result and it also can be calculated from the stagnation point where x = 0 and U e = 0 as a result, c = 0 . If relation of β * = g 2 U e is divided by Equation (50) and integrated with respect to x, U e can be calculated as:
U e = c 1 x m ,
where m = β * 2 α * β * and c 1 is a positive or negative constant which depends on the sign of U e . It can be concluded from these calculations that similar solutions exist when the inviscid velocity is proportional to x raised to some power. Next, Equation (50) can be used by taking c = 0 to calculate the g which is:
g = 2 α * c 1 ( 1 + m ) x 1 m .
Self-similar boundary-layers occur when the external velocity is the simple power law ( U e = U 0 ( x / L ) m ), where the arbitrary constants U 0 and L have the same sign as U and x. The similarity variable for these kinds of flows can be written as:
η = y δ = y ± ν x U e = y ± ν L U 0 ( x L ) 1 m .
When U e and x have the same signs, the Falkner–Skan equation can be written as:
f + 1 2 ( m + 1 ) f f + m ( 1 f 2 ) = 0 .
The two arbitrary constants α and β have been reduced to one constant m by fixing the scale for the function δ ( x ) . The boundary conditions of the equation are:
f ( 0 ) = 0
f ( 0 ) = 0
f ( η ) = 1 .
If the Falkner–Skan Equation (54) is carefully examined, it can be seen that when the constant m is 0, the equation will be Blasius flow. Moreover, if the constant m is 1, the equation will be Hiemenz flow (see Section 2.2.1). This important point is stated before and it is emphasized one more time after the derivation. Another great usage of the Falkner–Skan equation is to simulate the boundary-layer over a wedge with half-angle θ = m π m + 1 when the m is between 0 and 1. If the m is in between 1 and 2, the Falkner–Skan equation will solve a corner flow with θ > π 2 . The visual schematic of four different physical flows that can be calculated from the Falkner–Skan equation can be seen in Figure 4. One interesting point of the equation is that when m = 0.0904 , the obtained profile will have zero-shear at the wall which corresponds to the verge of the separation point for all x stations.

2.1.4. Numerical Solution of Falkner–Skan Flow Problem

In this section, the Falkner–Skan equation will be solved with the Thomas algorithm and central finite difference scheme. In order to do that, the third-order ordinary differential equation should be reduced to second-order and first-order differential equations as it is done in Blasius flow. If it is assumed that f = h and f = p in Equation (54), the system of equations will be:
h + 1 2 ( m + 1 ) p h + m ( 1 h 2 ) = 0
p h = 0 ,
where the boundary conditions of the system are:
p ( 0 ) = 0
h ( 0 ) = 0
h ( ) = 1
If finite difference scheme is applied to h variable, the final system of equations will be:
A n h n + 1 + B n h n + C n h n 1 + D n = 0 ,
where the A n , B n , C n , and D n are:
A n = 1 Δ η 2 + ( m + 1 ) p n 4 Δ η
B n = 2 Δ η 2 m h n
C n = 1 Δ η 2 ( m + 1 ) p n 4 Δ η
D n = m .
The relation between h n and h n 1 is taken as it is done in Blasius flow. When Equation (37) is substituted into Equation (63), the final G n and H n will be:
G n = C n G n 1 + D n B n + C n H n 1
H n = A n B n + C n H n 1 .
The implementation of these variables in the Julia environment can be seen in Listing 3.
Listing 3. Implementation of the Thomas algorithm for the Falkner–Skan profile.
Fluids 06 00207 i003
The final profiles for the varying m values can be seen in the Figure 5. The profiles are also compared with Schlichting [6] in order to validate the results. It has to be noted that, Schlichting used η = m + 1 2 y ν x U as similarity coordinate so the figure is plotted according to this nondimensionalization.

2.2. Stagnation Point Flow Problems

Boundary-layer velocity distribution over a wall that is perpendicular to the flow velocity vector can be represented with a similarity solution. In this subsection, Hiemenz and Homann similarity solutions will be derived from scratch and they will be solved numerically in the Julia environment. The Julia codes will be available to shorten the learning curve.

2.2.1. Hiemenz Flow Problem

This problem is that of a fluid flow that is parallel to the y-axis in the far-field impinging on a wall that coincides with the x-axis. The flow which is perpendicular to a cylinder can be assumed as the Hiemenz flow around the stagnation point. The schematic description of the Hiemenz flow can be seen in Figure 6. In the Hiemenz flow, viscous forces away from the wall become so small in comparison with the inertia forces, particularly when the Reynolds number is large. In this case, inviscid irrotational flow assumption ( ξ = × U = 0 ) can be done. The velocity can be represented with a scalar function, ϕ , which is the velocity potential. The velocities in the x-direction and y-direction can be written as:
u = ϕ x , v = ϕ y .
If the dimensional Navier–Stokes equations (Equations (1)–(3)) are considered for this flow as well, and the continuity equation becomes:
2 ϕ x 2 + 2 ϕ y 2 = 0 .
On the wall, in the absence of viscosity, the flow can slip in the x-direction but in y-direction the velocity must be zero ( ϕ y | y = 0 = 0 ) because of the no-penetration boundary condition. The inviscid flow solution for the potential function was found to be:
ϕ ( x , y ) = a 2 ( x 2 y 2 ) ,
where a is a constant that depends on the freestream flow and the body shape. This solution satisfies the governing equations for inviscid, irrotational flow, and the boundary conditions which can be shown as:
u = ϕ x = a x , v = ϕ y = a y .
Since potential the function is obtained, the stream-function can be calculated from the potential function. The velocity components, in terms of stream-function, ψ ( x , y ) :
u = a x = ψ y , v = a y = ψ x .
If Equation (74) is integrated for x and y, the stream function can be found as:
ψ = a x y + c .
In order to find the pressure in the inviscid flow, Bernoulli equation [42] can be used. The pressure from the Bernoulli equation is:
p 0 p = a 2 ρ 2 ( x 2 + y 2 ) ,
where p 0 is the stagnation pressure and ρ is the density. So far, flow is assumed as inviscid flow; however viscous forces will modify the inviscid solution, in particular in the y-direction. Hence, the viscous velocity components can be assumed as:
u ( x , y ) = x g ( y )
v ( x , y ) = f ( y )
If Equations (77) and (78) are substituted in the Navier–Stokes equations (Equations (1)–(3)), the final system of equations will be:
g = f
x g 2 x f g = 1 ρ p x + ν x g
f f = 1 ρ p y + ν f .
Once Equation (79) is substituted into Equations (80) and (81), two non-linear ordinary differential equations can be obtained as:
x f 2 x f f = 1 ρ p x + ν x f
f f = 1 ρ p y + ν f
It has to be noted that these two equations are coupled, which means they have to be solved together. If the x-momentum and y-momentum are solved for pressure, it can be seen that the pressure will be in the form of:
p ( x , y ) = 1 2 x 2 ( c o n s t a n t ) + H ( y ) ,
where H ( y ) is a function depends on only y. On the other hand, if the inviscid pressure compared with the viscous pressure as y , the pressure gradient in x-direction and y-direction can be found as:
p x = a 2 ρ x
p y = a 2 ρ 2 F ( y ) .
If the pressure gradients are substituted into Equations (82) and (83), the resultant system of ordinary differential equations can be found as:
f 2 f f = a 2 + ν f
f f = a 2 2 F ν f .
Momentum equations are decoupled in this system of equations so once, f ( y ) is calculated from Equation (87), F ( y ) in the Equation (88) can be solved. The boundary conditions of the system are:
u ( x , 0 ) = 0 f ( y = 0 ) = 0
v ( x , 0 ) = 0 f ( y = 0 ) = 0
u ( x , y ) = a x f = a
v ( x , y ) = a y f = 0
Additionally, F ( y ) = y 2 can be obtained from y-momentum equation as y . The final Equations (87) and (88) can be solved with the given boundary conditions; however, it is possible to get rid of the dependence on a. In order to do that, affine transformation [43] can be used. If it is assumed that f ( y ) = A φ ( η ) and y = B η where A and B are constant to be determined, the f derivative functions can be calculated as:
f = A B φ
f = A B 2 φ
f = A B 3 φ
If Equations (93)–(95) substituted into the Equations (87) and (88) and assume that ν A B = 1 and a 2 B 2 A 2 = 1 , the A and B coefficients can be calculated as:
A = a ν
B = ν a
The given transformation allows to reduce two ordinary differential equations into one third-order ordinary differential equation as:
φ + φ φ φ 2 + 1 = 0
where the boundary conditions are:
f ( 0 ) = 0 φ ( 0 ) = 0
f ( 0 ) = 0 φ ( 0 ) = 0
f ( ) = a φ ( ) = 1
and the velocities:
u = a x φ ( η )
v = a ν φ ( η )
the resultant equation along with the boundary conditions can be solved with different numerical approaches such as Runge-Kutta, Runge-Kutta-Fehlberg, compact finite difference, high-order finite difference; however, in this present paper, the Thomas algorithm with finite difference discretization will be used to solve the Hiemenz profile in the Julia framework.

2.2.2. Numerical Solution of Hiemenz Flow Problem

The computational approach for the Hiemenz flow is similar to the Blasius solution since the final ordinary equation of the Hiemenz flow (Equation (98)) is similar to the Blasius similarity solution (Equation (20)). If it is assumed that φ = h and φ = p in Equation (98), the system of equations will be:
h + p h h 2 + 1 = 0
p h = 0 ,
where the boundary conditions of the system are:
p ( 0 ) = 0
h ( 0 ) = 0
h ( ) = 1 .
If finite difference scheme is applied to the h variable as in Blasius flow. The final system of equations will be:
A n h n + 1 + B n h n + C n h n 1 + D n = 0 ,
where the A n , B n , C n , and D n are:
A n = 1 Δ η 2 + p n 2 Δ η
B n = 2 Δ η 2 h n
C n = 1 Δ η 2 p n 2 Δ η
D n = 1 .
The relation between h n and h n 1 is taken as it is done in Blasius flow. When Equation (37) is substituted into the Equation (109), the final G n and H n coefficients can be found as:
G n = C n G n 1 + D n B n + C n H n 1
H n = A n B n + C n H n 1 .
In order to start the calculation, H 1 can be assumed as 0 and the G 1 can be calculated as 0 from the boundary conditions. Once G 1 and H 1 are calculated, G n and H n can be calculated from Equations (114) and (115). p can be calculated as it is done for Blasius flow:
p n = p n 1 + η n 1 η n h d η .
The system of equations can be implemented in the Julia environment as it is shown in Listing 4. The linear profile assumption is taken as the initial condition of h (see Figure 2) as it is done for the Blasius solution. The reason h p and e r r o r P r o f i l e variables are used in the Listing 4 is that the linear profile converges to the Hiemenz profile in each iteration so in order to check the difference between previous and present profiles, the solution vector from the previous iteration is copied and it is compared with the new solution vector. If the difference between these two solution vectors is less than ϵ , which is an arbitrary limit and can be taken as 1 × 10 8 , then it can be said that the solution has converged. It has to be noted that ϵ can be taken as any number; however, if it is small, the solution will be more accurate. The final result of the Hiemenz flow can be seen in Figure 7. The results are also validated with White [44].

2.2.3. Homann Flow Problem

Homann flow is similar to Hiemenz flow. The only difference is that Homann flow is an axisymmetric version of the Hiemenz flow. The same schematic (Figure 6) can represent this flow as well; however, in this flow, the circle is the projection of a sphere. On the other hand, it was the projection of a cylinder in Hiemenz flow. Derivation of the Homann similarity solution has the almost same procedure as well but it uses cylindrical coordinates instead of Cartesian coordinates. The velocity components of the flow can be shown as:
v r = v r ( r , z )
v θ = 0
v z = v z ( r , z )
p = p ( r , z ) .
As axisymmetric assumptions, derivative with respect to θ ( θ ) and v θ can be assumed as zero. The Navier–Stokes equations in cylindrical coordinates can be written as:
v r r + v r r + v z z = 0
v r v r r + v z v z z = 1 ρ p r + ν 2 v r r 2 + 1 r v r r v r r 2 + 2 v r z 2
v r v z r + v z v z z = 1 ρ p z + ν 2 v z r 2 + 1 r v z r + 2 v z z 2 .
If the same procedures applied to Navier–Stokes in Cartesian coordinates for Hiemenz flow, are applied in cylindrical coordinates, the final potential function and stream function will be:
ϕ ( r , z ) = k ( r 2 2 z 2 )
ψ ( r , z ) = k z r 2 ,
where k is a constant which depends on the freestream flow and the body shape. The corresponding velocities are:
v r = ϕ r = 1 r ψ z = k r
v z = ϕ z = 1 r ψ r = 2 k z .
Once velocities are calculated, the pressure from the Bernoulli can be calculated as:
p 0 p = 1 2 ρ k 2 ( r 2 + 4 z 2 ) .
The viscous velocity components and pressure can be calculated as:
v r = r g ( z )
v z = 2 f ( z )
p 0 p = 1 2 ρ k 2 ( r 2 + F ( z ) ) .
Listing 4. Implementation of Thomas algorithm for Hiemenz profile.
Fluids 06 00207 i004
After the affine transformation, the final ordinary differential equation will be:
φ + 2 φ φ φ 2 + 1 = 0 ,
where the boundary conditions of the equation is:
φ ( 0 ) = 0
φ ( 0 ) = 0
φ ( ) = 1
If one compares Hiemenz and Homann similarity solutions (see Equations (98) and (132)) the only difference is the 2 in the second term. In the same manner, the computational process will be the same except for two lines of code.

2.2.4. Numerical Solution of Homann Flow Problem

Since equations of Hiemenz and Homann similarity solutions are the same except one coefficient, procedures for the solution are also the same, except for two lines of code. If it is assumed that φ = h and φ = p in Equation (132), the system of equations will be:
h + 2 p h h 2 + 1 = 0
p h = 0 ,
where the boundary conditions of the system are:
p ( 0 ) = 0
h ( 0 ) = 0
h ( ) = 1
If the finite difference scheme is applied to the h variable, the final system of equations will be:
A n h n + 1 + B n h n + C n h n 1 + D n = 0 ,
where the A n , B n , C n , and D n are:
A n = 1 Δ η 2 + p n Δ η
B n = 2 Δ η 2 h n
C n = 1 Δ η 2 p n Δ η
D n = 1 .
The final G n and H n coefficients are the same as Hiemenz flow as well and they are:
G n = C n G n 1 + D n B n + C n H n 1
H n = A n B n + C n H n 1 .
The final code can be seen in Listing 5. If the Hiemenz code (4) and Homann code (5) are compared, the only difference is in the A and C and it is because of the finite difference approach for the h .
Listing 5. Implementation of Thomas algorithm for Homann profile.
Fluids 06 00207 i005
The final solution profile can be seen in Figure 8. The results are also validated with White [44]. One can use these results to validate their own codes. Reference data will be shared on GitHub as well.

3. Discussion

Fast computational fluid dynamics solvers are crucial for engineers because the design process requires a lot of simulations to reach the final and optimized design. One of the most important factors that make a solver fast is the language itself. Writing almost the same script in different languages may give different solution central processing unit (CPU) times. For instance, a script that uses long and complex for loops in both Julia and Python environments will result in different solution times because Python is slower with for loops in general. The reasons that cause this slow behavior will not be covered in this paper since it is out of the scope of this paper. However, it is important to state these differences in order to decide which coding language is proper for the simulation that is planned.
Sometimes, some other criteria, such as a user-friendly environment, might be the critical condition. The easy matrix–matrix multiplication and backslash linear system solver can be some of the user-friendly examples. In CFD, the usage of vectors and matrices is so common. Most of the time, it is required to multiply or add vectors or matrices with one another. Fortran, which is one of the fastest languages and also one of the fundamental languages in the CFD industry, does not have a built-in element-wise vector or matrix multiplication feature. This requires the use of for loops for each element-wise matrix and vector operation. As a result of this, every time, one needs to use a for loop to do these operations. This ends up with hard-to-read codes and also excessive usage of indices is another source of possible mistakes that will cause trouble during the debugging. However, in the Julia environment, it can be done in one line without any trouble. Listing 6 is showing the two for loop usage. Both of them use Julia syntax in order to prevent confusion; however, it is required to state that Fortran has a different syntax than this but, logically, the for loops are the same with Fortran logic.
Another user-friendly feature of Julia over Fortran is to plot a vector in the code with built-in functions. However, in Fortran, it is not possible to do it with built-in functions so one needs to extract the solution vector or matrix to an external file to visualize it. As it is stated before, coding language selection can be an important topic. In this section, the strong sides of the Julia environment will be stated. One of the user-friendly features of Julia is compact for loop syntax. Listing 7 shows the traditional way and compact way to use a for loop in the Julia environment.
Listing 6. Comparison of the element-wise and compact matrix-matrix multiplication.
Fluids 06 00207 i006
Listing 7. Comparison of the traditional and compact way of for loop usage.
Fluids 06 00207 i007
The readability of the code is also extremely important in order to explain the code to others or provide it as open-source code. Julia is so strong in this topic because it allows the usage of LATEX language within the code. It is one of the unique abilities of this language. If you are writing a formula that is full of Greek letters and regular letters, it is inevitable to use complex variable names. Comparison of the usage of Greek letters and regular formula writing can be seen in Listing 8.
Listing 8. Comparison of the Greek letter usage and conventional formula writing in Julia.
Fluids 06 00207 i008
The last advantage of Julia stated in this present paper is the ability to do both dynamic and static RAM allocations. It may be important to manually allocate the variable sizes and types for optimized code. However, sometimes it is easier to use just variables without any initializing. Initializing differences in the Julia environment can be seen in Listing 9.
Listing 9. Different initializing methods in Julia environment.
Fluids 06 00207 i009
As it is seen from the example scripts, Julia is a user-friendly, fast, open-source, and free language which can increase productivity drastically [36]. It is a great choice both for those who are new to coding and coding experts. Julia also can call the C, Fortran, and Python libraries so it is great for experienced engineers who think their previous code in other coding languages will be useless.

4. Conclusions

In the computational fluid dynamics industry, it is crucial to have some predictions about the flow that will be simulated. It helps to spot the location at which finer mesh is required. Fundamental knowledge about canonical flows is crucial in this point because most of the complex flow consists of a combination of a couple of canonical flows. For example, an airfoil CFD simulation can consist of boundary-layer flow over the smooth part of it, mixing layer flow where the tail ends, and blunt body flow in the wake region. In other words, one airfoil simulation consists of three different canonical flows. A full understanding on canonical flows is extremely important in order to simulate similar flows accurately and cheaply. In this paper, boundary-layer theory is introduced and boundary-layer flows are derived from scratch. The Blasius flow, Hiemenz flow, Homann flow, Falkner–Skan flow are the focus of this paper. Once the derivations of them are completed, derived forms are implemented in the Julia environment. In order to model the equations, a finite difference scheme for space discretization is used and the Thomas algorithm is used for the linear system solution. It has to be noted that other methods such as Runge-Kutta, Runge-Kutta-Fehlberg, compact finite difference, high-order finite difference can also be used to solve the given ODEs; however, in this present paper, authors preferred the finite difference method and Thomas algorithm. The authors further discussed the advantages of the Julia language over some other coding languages available in the literature. It is shown that Julia syntax is so straightforward, easy, and user-friendly. Strong sides of the Julia environment are stated with the given comparisons as well. The popularity of Julia may drastically increase in the near future because of its potential.

Author Contributions

Code generation, F.O. and K.K.; validation, F.O. and K.K.; writing—original draft preparation, F.O.; writing—review and editing, F.O. and K.K.; visualization, F.O. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All the data used and generated in this study is available in the GitHub link provided in Appendix A.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

Julia setup files can be downloaded from their website (https://julialang.org/downloads/ (accessed on 1 June 2021)). The website also includes instructions on how to install Julia on Windows, Linux, and mac operating systems. Some of the useful resources for learning Julia are listed below:
It is common to use external packages for Julia. In order to do that, Pkg, which is Julia’s built-in package manager, can be used. Once Julia is opened, Pkg can be activated with the “]” button in Windows. In Linux, calling “julia” in the terminal will open it. After that “Pkg.add(“Pluto”)” will trigger the setup process for that package. In here, we used Pluto as an example because, in GitHub, our codes are developed in the Pluto environment. After Pluto is installed. Pluto can be run with “Pluto.run()”. This command will open a new tab in the browser which you can run your Julia codes. After that, the “using Pluto” line must be placed to the top of the file. For “Plots” package, the commands will be “Pkg.add(“Plots”)” and “using Plots”. Since the Plots package does not have a GUI, there is not a command called “Plots.run()”.
Other than Pluto, JuliaPro which includes Julia and the Juno IDE (https://juliacomputing.com/products/juliapro/ (accessed on 1 June 2021)) can be used as an editor and compiler. This software contains a set of packages for plotting, optimization, machine learning, database, and much more. Pluto is appropriate for small scripts while JuliaPro is better for more complex codes. The GitHub link of the codes used in this paper is:

References

  1. Prandtl, L. Über Flüssigkeitsbewegung bei sehr Kleiner Reibung, Verh 3 int; English Translation; Math-Kongr: Heidelberg, Germanty, 1904; Available online: http://homepage.ntu.edu.tw/~wttsai/Adv_Fluid/NACA_TM-452.pdf (accessed on 1 June 2021).
  2. Blasius, H. Grenzschichten in Flüssigkeiten mit kleiner Reibung. Z. Math. Phys. 1908, 60, 397–398. [Google Scholar]
  3. Hager, W.H. Blasius: A life in research and education. Exp. Fluids 2003, 34, 566–571. [Google Scholar] [CrossRef] [Green Version]
  4. Cousteix, T.; Cebeci, J. Modeling and Computation of Boundary-Layer Flows; Springer: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
  5. Hiemenz, K. Die Grenzschicht an einem in den gleichformigen Flussigkeitsstrom eingetauchten geraden Kreiszylinder. Dinglers Polytech. J. 1911, 326, 321–324. [Google Scholar]
  6. Schlichting, H.; Gersten, K. Boundary-Layer Theory; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
  7. Howarth, L. On the Calculation of Steady Flow in the Boundary Layer Near the Surface of a Cylinder in a Stream; Technical Report; Aeronautical Research Council London: London, UK, 1934.
  8. Homann, F. Der Einfluss grosser Zähigkeit bei der Strömung um den Zylinder und um die Kugel. ZAMM-J. Appl. Math. Mech. Für Angew. Math. Und Mech. 1936, 16, 153–164. [Google Scholar] [CrossRef]
  9. Brennan, G.; Gajjar, J.; Hewitt, R. Tollmien–Schlichting wave cancellation via localised heating elements in boundary layers. J. Fluid Mech. 2021, 909, A16-1. [Google Scholar] [CrossRef]
  10. Brennan, G.S.; Gajjar, J.S.; Hewitt, R.E. Cancellation of Tollmien–Schlichting waves with surface heating. J. Eng. Math. 2021, 128, 1–23. [Google Scholar] [CrossRef]
  11. Corelli Grappadelli, M.; Sattler, S.; Scholz, P.; Radespiel, R.; Badrya, C. Experimental investigations of boundary layer transition on a flat plate with suction. In Proceedings of the AIAA Scitech 2021 Forum, Virtual Event. 11–15 and 19–21 January 2021; p. 1452. [Google Scholar]
  12. Rigas, G.; Sipp, D.; Colonius, T. Nonlinear input/output analysis: Application to boundary layer transition. J. Fluid Mech. 2021, 911, A15. [Google Scholar] [CrossRef]
  13. Haley, C.; Zhong, X. Supersonic mode in a low-enthalpy hypersonic flow over a cone and wave packet interference. Phys. Fluids 2021, 33, 054104. [Google Scholar] [CrossRef]
  14. Malik, M.R. Numerical methods for hypersonic boundary layer stability. J. Comput. Phys. 1990, 86, 376–413. [Google Scholar] [CrossRef]
  15. Fedorov, A. Transition and stability of high-speed boundary layers. Annu. Rev. Fluid Mech. 2011, 43, 79–95. [Google Scholar] [CrossRef]
  16. Long, T.; Dong, Y.; Zhao, R.; Wen, C. Mechanism of stabilization of porous coatings on unstable supersonic mode in hypersonic boundary layers. Phys. Fluids 2021, 33, 054105. [Google Scholar] [CrossRef]
  17. Fong, K.D.; Wang, X.; Zhong, X. Numerical simulation of roughness effect on the stability of a hypersonic boundary layer. Comput. Fluids 2014, 96, 350–367. [Google Scholar] [CrossRef]
  18. Kara, K.; Balakumar, P.; Kandil, O. Receptivity of hypersonic boundary layers due to acoustic disturbances over blunt cone. In Proceedings of the 45th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV, USA, 8–11 January 2007; p. 945. [Google Scholar]
  19. Kara, K.; Balakumar, P.; Kandil, O. Effects of wall cooling on hypersonic boundary layer receptivity over a cone. In Proceedings of the 38th Fluid Dynamics Conference and Exhibit, Seattle, WA, USA, 23–26 June 2008; p. 3734. [Google Scholar]
  20. Kara, K.; Balakumar, P.; Kandil, O.A. Effects of nose bluntness on hypersonic boundary-layer receptivity and stability over cones. AIAA J. 2011, 49, 2593–2606. [Google Scholar] [CrossRef] [Green Version]
  21. Oz, F.; Kara, K. Effects of Local Cooling on Hypersonic Boundary-Layer Stability. In Proceedings of the AIAA Scitech 2021 Forum, Virtual Event. 11–15 and 19–21 January 2021; p. 0940. [Google Scholar]
  22. Drozdz, A.; Niegodajew, P.; Romanczyk, M.; Sokolenko, V.; Elsner, W. Effective use of the streamwise waviness in the control of turbulent separation. Exp. Therm. Fluid Sci. 2021, 121, 110291. [Google Scholar] [CrossRef]
  23. Iyer, P.S.; Malik, M.R. Wall-modeled LES of flow over a Gaussian bump. In Proceedings of the AIAA Scitech 2021 Forum, Virtual Event. 11–15 and 19–21 January 2021; p. 1438. [Google Scholar]
  24. Mohammed-Taifour, A.; Weiss, J. Periodic forcing of a large turbulent separation bubble. J. Fluid Mech. 2021, 915, A24. [Google Scholar] [CrossRef]
  25. Hady, F.; Ibrahim, F.; Abdel-Gaied, S.; Eid, M. Effect of heat generation/absorption on natural convective boundary-layer flow from a vertical cone embedded in a porous medium filled with a non-Newtonian nanofluid. Int. Commun. Heat Mass Transf. 2011, 38, 1414–1420. [Google Scholar] [CrossRef]
  26. Hady, F.M.; Ibrahim, F.S.; Abdel-Gaied, S.M.; Eid, M.R. Radiation effect on viscous flow of a nanofluid and heat transfer over a nonlinearly stretching sheet. Nanoscale Res. Lett. 2012, 7, 1–13. [Google Scholar] [CrossRef] [Green Version]
  27. Hady, F.; Ibrahim, F.; Abdel-Gaied, S.; Eid, M.R. Boundary-layer non-Newtonian flow over vertical plate in porous medium saturated with nanofluid. Appl. Math. Mech. 2011, 32, 1577–1586. [Google Scholar] [CrossRef]
  28. Hady, F.; Ibrahim, F.; Abdel-Gaied, S.; Eid, M. Boundary-layer flow in a porous medium of a nanofluid past a vertical cone. In An Overview of Heat Transfer Phenomena; Kazi, S.N., Ed.; IntechOpen: London, UK, 2012; pp. 91–104. [Google Scholar]
  29. Sohail, M.; Naz, R.; Abdelsalam, S.I. Application of non-Fourier double diffusions theories to the boundary-layer flow of a yield stress exhibiting fluid model. Phys. A Stat. Mech. Appl. 2020, 537, 122753. [Google Scholar] [CrossRef]
  30. Bhatti, M.; Alamri, S.Z.; Ellahi, R.; Abdelsalam, S.I. Intra-uterine particle–fluid motion through a compliant asymmetric tapered channel with heat transfer. J. Therm. Anal. Calorim. 2020, 144, 2259–2267. [Google Scholar] [CrossRef]
  31. Barba, L.; Forsyth, G. CFD Python: The 12 steps to Navier-Stokes equations. J. Open Source Educ. 2018, 2, 21. [Google Scholar] [CrossRef]
  32. Oliphant, T.E. A Guide to NumPy; Trelgol Publishing: Austin, TX, USA, 2006; Volume 1. [Google Scholar]
  33. Ketcheson, D.I. Teaching numerical methods with IPython notebooks and inquiry-based learning. In Proceedings of the 13th Python in Science Conference, Austin, TX, USA, 6–12 July 2014; pp. 19–24. [Google Scholar]
  34. Ketcheson, D.I.; Mandli, K.; Ahmadia, A.J.; Alghamdi, A.; de Luna, M.Q.; Parsani, M.; Knepley, M.G.; Emmett, M. PyClaw: Accessible, extensible, scalable tools for wave propagation problems. SIAM J. Sci. Comput. 2012, 34, 210–231. [Google Scholar] [CrossRef] [Green Version]
  35. Pawar, S.; San, O. CFD Julia: A learning module structuring an introductory course on computational fluid dynamics. Fluids 2019, 4, 159. [Google Scholar] [CrossRef] [Green Version]
  36. Bezanson, J.; Edelman, A.; Karpinski, S.; Shah, V.B. Julia: A fresh approach to numerical computing. SIAM Rev. 2017, 59, 65–98. [Google Scholar] [CrossRef] [Green Version]
  37. Hosseini, M.; Vinuesa, R.; Hanifi, A.; Henningson, D.; Schlatter, P. Turbulent flow around a wing profile, a direct numerical simulation. In Proceedings of the 68th Annual Meeting of the APS Division of Fluid Dynamics, Boston, MA, USA, 22–24 November 2015. [Google Scholar]
  38. Tannehill, J.C.; Pletcher, R.H.; Anderson, D.A. Computational Fluid Mechanics and Heat Transfer; Taylor & Francis: Bristol, PA, USA, 1997. [Google Scholar]
  39. Press, W.H.; Teukolsky, S.A.; Vetterling, W.T.; Flannery, B.P. Numerical Recipes in Fortran 90; Cambridge University Press: New York, NY, USA, 1996. [Google Scholar]
  40. Moin, P. Fundamentals of Engineering Numerical Analysis; Cambridge University Press: New York, NY, USA, 2010. [Google Scholar]
  41. Atkinson, K.E. An Introduction to Numerical Analysis; John Wiley & Sons: New York, NY, USA, 1989. [Google Scholar]
  42. Munson, B.R.; Young, D.F.; Okiishi, T.H. Fundamentals of fluid mechanics. Oceanogr. Lit. Rev. 1995, 10, 831. [Google Scholar]
  43. Rogers, D.F.; Adams, J.A. Mathematical Elements for Computer Graphics; McGraw-Hill: New York, NY, USA, 1989. [Google Scholar]
  44. White, F.M.; Corfield, I. Viscous Fluid Flow; McGraw-Hill: New York, NY, USA, 2006; Volume 3. [Google Scholar]
Figure 1. Schematic description of the flow over a flat plate.
Figure 1. Schematic description of the flow over a flat plate.
Fluids 06 00207 g001
Figure 2. Schematic description of the change in the velocity profile from initial guess to final solution.
Figure 2. Schematic description of the change in the velocity profile from initial guess to final solution.
Fluids 06 00207 g002
Figure 3. The velocity distribution of the Blasius similarity solution obtained by given Julia code and data digitized from Schlichting [6].
Figure 3. The velocity distribution of the Blasius similarity solution obtained by given Julia code and data digitized from Schlichting [6].
Fluids 06 00207 g003
Figure 4. The representation of flow types that can be calculated with the Falkner–Skan equation. (a) Blasius flow ( m = 0 ), (b) wedge flow ( 0 < m < 1 ), (c) Hiemenz flow ( m = 1 ), and (d) corner flow ( 1 < m < 2 ).
Figure 4. The representation of flow types that can be calculated with the Falkner–Skan equation. (a) Blasius flow ( m = 0 ), (b) wedge flow ( 0 < m < 1 ), (c) Hiemenz flow ( m = 1 ), and (d) corner flow ( 1 < m < 2 ).
Fluids 06 00207 g004
Figure 5. The velocity distribution of the Falkner–Skan similarity solution obtained by Julia code and data digitized from Schlichting [6] for varying m values.
Figure 5. The velocity distribution of the Falkner–Skan similarity solution obtained by Julia code and data digitized from Schlichting [6] for varying m values.
Fluids 06 00207 g005
Figure 6. Schematic description of the Hiemenz and Homann flow. Left side corresponds to general flow and the Right side is the extended vision of the dashed rectangle. The flow represents Hiemenz flow if the circle is the projection of a cylinder and Homann flow if the circle is the projection of a sphere.
Figure 6. Schematic description of the Hiemenz and Homann flow. Left side corresponds to general flow and the Right side is the extended vision of the dashed rectangle. The flow represents Hiemenz flow if the circle is the projection of a cylinder and Homann flow if the circle is the projection of a sphere.
Fluids 06 00207 g006
Figure 7. The velocity distribution of Hiemenz similarity solution obtained by Julia code and data digitized from White [44].
Figure 7. The velocity distribution of Hiemenz similarity solution obtained by Julia code and data digitized from White [44].
Fluids 06 00207 g007
Figure 8. The velocity distribution of Homann similarity solution obtained by Julia code and digitized from White [44].
Figure 8. The velocity distribution of Homann similarity solution obtained by Julia code and digitized from White [44].
Fluids 06 00207 g008
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Oz, F.; Kara, K. A CFD Tutorial in Julia: Introduction to Laminar Boundary-Layer Theory. Fluids 2021, 6, 207. https://doi.org/10.3390/fluids6060207

AMA Style

Oz F, Kara K. A CFD Tutorial in Julia: Introduction to Laminar Boundary-Layer Theory. Fluids. 2021; 6(6):207. https://doi.org/10.3390/fluids6060207

Chicago/Turabian Style

Oz, Furkan, and Kursat Kara. 2021. "A CFD Tutorial in Julia: Introduction to Laminar Boundary-Layer Theory" Fluids 6, no. 6: 207. https://doi.org/10.3390/fluids6060207

Article Metrics

Back to TopTop