A CFD Tutorial in Julia: Introduction to Compressible Laminar Boundary-Layer Flows
Abstract
:1. Introduction
2. Compressible Laminar Boundary-Layer
2.1. Compressible Blasius Equations
2.2. Numerical Procedure
3. Comparison of Julia and MATLAB
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A
- https://docs.julialang.org/en/v1/ (accessed on 4 November 2021)
- https://www.coursera.org/learn/julia-programming (accessed on 4 November 2021)
- https://www.youtube.com/user/JuliaLanguage/featured (accessed on 4 November 2021)
- https://www.youtube.com/user/Parallel Computing and Scientific Machine Learning (accessed on 4 November 2021)
- https://discourse.julialang.org/ (accessed on 4 November 2021)
- https://github.com/frkanz/A-CFD-Tutorial-in-Julia-Compressible-Blasius/tree/main (accessed on 4 November 2021)
References
- Anderson, J.D. Fundamentals of Aerodynamics; McGraw-Hill Education: New York, NY, USA, 2010. [Google Scholar]
- Schlichting, H.; Gersten, K. Boundary-Layer Theory; Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
- Anderson, J.D. Ludwig Prandtl’s Boundary Layer. Phys. Today 2005, 58, 42–48. [Google Scholar] [CrossRef]
- Prandtl, L. Über Flüssigkeitsbewegung bei sehr kleiner Reibung, Verh 3 int. Math-Kongr, Heidelberg, English Translation. 1904. Available online: http://homepage.ntu.edu.tw/~wttsai/Adv_Fluid/NACA_TM-452.pdf (accessed on 4 November 2021).
- Blasius, H. Grenzschichten in Flüssigkeiten mit Kleiner Reibung. Z. Math. Phys. 1908, 60, 397–398. [Google Scholar]
- Hager, W.H. Blasius: A life in research and education. Exp. Fluids 2003, 34, 566–571. [Google Scholar] [CrossRef] [Green Version]
- Cousteix, T.; Cebeci, J. Modeling and Computation of Boundary-Layer Flows; Springer: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
- White, F.M.; Corfield, I. Viscous Fluid Flow; McGraw-Hill: New York, NY, USA, 2006; Volume 3. [Google Scholar]
- Metcalf, M.; Reid, J.K. Fortran 90/95 Explained; Oxford University Press, Inc.: Oxford, UK, 1999. [Google Scholar]
- Sanner, M.F. Python: A programming language for software integration and development. J. Mol. Graph. Model. 1999, 17, 57–61. [Google Scholar] [PubMed]
- Stroustrup, B. The C++ Programming Language; Pearson Education: London, UK, 2000. [Google Scholar]
- MATLAB. Version 7.10. 0 (R2010a); The MathWorks Inc.: Natick, MA, USA, 2010. [Google Scholar]
- 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]
- Barba, L.; Forsyth, G. CFD Python: The 12 steps to Navier-Stokes equations. J. Open Source Educ. 2018, 2, 21. [Google Scholar] [CrossRef]
- Oliphant, T.E. A Guide to NumPy; Trelgol Publishing USA: Natick, MA, USA, 2006; Volume 1. [Google Scholar]
- 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]
- 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]
- 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]
- Oz, F.; Kara, K. A CFD Tutorial in Julia: Introduction to Laminar Boundary-Layer Theory. Fluids 2021, 6, 207. [Google Scholar] [CrossRef]
- Iyer, V. Computer Program BL2D for Solving Two-Dimensional and Axisymmetric Boundary Layers; NASA NASA-CR-4668; NASA: Washington, DC, USA, 1995.
- Chang, C.L. Langley Stability and Transition Analysis Code (LASTRAC) Version 1.2 User Manual; NASA TM-2004-213233; NASA: Washington, DC, USA, June 2004.
- Brennan, G.; Gajjar, J.; Hewitt, R. Tollmien–Schlichting wave cancellation via localised heating elements in boundary layers. J. Fluid Mech. 2021, 909. [Google Scholar] [CrossRef]
- 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]
- 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]
- Rigas, G.; Sipp, D.; Colonius, T. Nonlinear input/output analysis: Application to boundary layer transition. J. Fluid Mech. 2021, 911. [Google Scholar] [CrossRef]
- 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]
- Malik, M.R. Numerical methods for hypersonic boundary layer stability. J. Comput. Phys. 1990, 86, 376–413. [Google Scholar] [CrossRef]
- Fedorov, A. Transition and stability of high-speed boundary layers. Annu. Rev. Fluid Mech. 2011, 43, 79–95. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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, Nevada, 8–11 January 2007; p. 945. [Google Scholar]
- 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]
- 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]
- Oz, F.; Kara, K. Effects of Local Cooling on Hypersonic Boundary-Layer Stability. In AIAA Scitech 2021 Forum; AIAA: Reston, VA, USA, 2021; p. 0940. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- Iyer, P.S.; Malik, M.R. Wall-modeled LES of flow over a Gaussian bump. In AIAA Scitech 2021 Forum; AIAA: Reston, VA, USA, 2021; p. 1438. [Google Scholar]
- Mohammed-Taifour, A.; Weiss, J. Periodic forcing of a large turbulent separation bubble. J. Fluid Mech. 2021, 915. [Google Scholar] [CrossRef]
- 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]
- 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]
- 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]
- 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]
- 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. Stat. Mech. Appl. 2020, 537, 122753. [Google Scholar] [CrossRef]
- 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]
- Tannehill, J.C.; Pletcher, R.H.; Anderson, D.A. Computational Fluid Mechanics and Heat Transfer; Taylor & Francis: Bristol, PA, USA, 1997. [Google Scholar]
- National Center for Biotechnology Information. PubChem Periodic Table of Elements. 2021. Available online: https://pubchem.ncbi.nlm.nih.gov/element/Titanium (accessed on 12 October 2021).
- Howarth, L. Concerning the effect of compressibility on lam inar boundary layers and their separation. Proc. R. Soc. London. Ser. Math. Phys. Sci. 1948, 194, 16–42. [Google Scholar]
- LII, W.S. The viscosity of gases and molecular force. Lond. Edinb. Dublin Philos. Mag. J. Sci. 1893, 36, 507–531. [Google Scholar]
- Moin, P. Fundamentals of Engineering Numerical Analysis; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Anderson, J.D.; Degrez, G.; Dick, E.; Grundmann, R. Computational Fluid Dynamics: An Introduction; Springer Science & Business Media: Berlin, Germany, 2013. [Google Scholar]
- Lubin, M.; Dunning, I. Computing in operations research using Julia. INFORMS J. Comput. 2015, 27, 238–248. [Google Scholar] [CrossRef] [Green Version]
File Op. | 10,000 | ||||||
---|---|---|---|---|---|---|---|
Included | Julia | MATLAB | Julia | MATLAB | Julia | MATLAB | |
Loop | Mean | 0.0360 | 0.5214 | 0.1394 | 1.9817 | 0.5592 | 7.8060 |
STD | 0.0010 | 0.0137 | 0.0017 | 0.0210 | 0.0062 | 0.0522 | |
Vectorized | Mean | 0.0643 | 0.5145 | 0.2678 | 1.9471 | 1.0042 | 7.7527 |
STD | 0.0139 | 0.0137 | 0.0287 | 0.0107 | 0.0348 | 0.0402 |
File Op. | 10,000 | ||||||
---|---|---|---|---|---|---|---|
Excluded | Julia | MATLAB | Julia | MATLAB | Julia | MATLAB | |
Loop | Mean | 0.0059 | 0.0177 | 0.0233 | 0.0651 | 0.0930 | 0.2562 |
STD | 0.0001 | 0.0031 | 0.0011 | 0.0024 | 0.0005 | 0.0138 | |
Vectorized | Mean | 0.0437 | 0.0166 | 0.0866 | 0.0564 | 0.4542 | 0.3091 |
STD | 0.0117 | 0.0021 | 0.0215 | 0.0040 | 0.0584 | 0.0138 |
File Op. | |||||||
---|---|---|---|---|---|---|---|
Included | Julia | MATLAB | Julia | MATLAB | Julia | MATLAB | |
Loop | Mean | 0.4604 | 3.1921 | 3.3852 | 22.8472 | 25.1985 | 151.5271 |
STD | 0.0160 | 0.4149 | 0.0132 | 0.4356 | 0.0470 | 0.5615 | |
Vectorized | Mean | 1.4524 | 3.2964 | 10.0283 | 28.4063 | 81.2305 | 188.5569 |
STD | 0.1622 | 0.1531 | 0.4356 | 1.0269 | 0.4925 | 0.9425 |
File Op. | |||||||
---|---|---|---|---|---|---|---|
Excluded | Julia | MATLAB | Julia | MATLAB | Julia | MATLAB | |
Loop | Mean | 0.1538 | 0.3268 | 1.1964 | 3.7574 | 10.5993 | 28.5775 |
STD | 0.0038 | 0.0187 | 0.0077 | 0.3274 | 0.1667 | 0.1065 | |
Vectorized | Mean | 0.8056 | 0.5087 | 8.5873 | 9.3634 | 71.9560 | 67.5810 |
STD | 0.0706 | 0.0257 | 0.0687 | 0.9880 | 0.4309 | 0.8318 |
File Op. | 50,000 | 100,000 | 200,000 | ||||
---|---|---|---|---|---|---|---|
Excluded | Julia | MATLAB | Julia | MATLAB | Julia | MATLAB | |
Loop | Mean | 0.0831 | 1.2468 | 0.1631 | 5.1070 | 0.3298 | 39.4378 |
STD | 0.0054 | 0.0310 | 0.0057 | 0.3006 | 0.0098 | 0.8308 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Oz, F.; Kara, K. A CFD Tutorial in Julia: Introduction to Compressible Laminar Boundary-Layer Flows. Fluids 2021, 6, 400. https://doi.org/10.3390/fluids6110400
Oz F, Kara K. A CFD Tutorial in Julia: Introduction to Compressible Laminar Boundary-Layer Flows. Fluids. 2021; 6(11):400. https://doi.org/10.3390/fluids6110400
Chicago/Turabian StyleOz, Furkan, and Kursat Kara. 2021. "A CFD Tutorial in Julia: Introduction to Compressible Laminar Boundary-Layer Flows" Fluids 6, no. 11: 400. https://doi.org/10.3390/fluids6110400
APA StyleOz, F., & Kara, K. (2021). A CFD Tutorial in Julia: Introduction to Compressible Laminar Boundary-Layer Flows. Fluids, 6(11), 400. https://doi.org/10.3390/fluids6110400