Comparison of Explicit Method of Solution for CFD Euler Problems using MATLAB® and FORTRAN 77

Authors

  • A Nordli
  • H Khawaja

DOI:

https://doi.org/10.21152/1750-9548.13.2.203

Abstract

This work presents a comparison of an explicit method of solution for an inviscid compressible fluid mechanics problem using Euler equations for two-dimensional internal flows. The same algorithm was implemented in both FORTRAN 77 and MATLAB®. The algorithm includes Runge‒Kutta time marching scheme with smoothing. Both solvers were initialized in the same manner. In addition, it was ensured that both solvers have the exact same values for time step, convergence criteria, boundary conditions, and the grid. The only difference between the two solvers was the precision of variables.

The problem solved was a two-dimensional dual bump with an accelerating flow through a duct. The same algorithm solving the Euler equations of fluid flow is implemented in both FORTRAN 77 and MATLAB®, and applied to identical input. While the solutions look qualitativly the same, a 20% difference in the stationary solution is observed. No claim is made of the relevance of the computations to actual fluid flow, rather the key takeaway being that two finite and deterministic computations of the same algorithm on the same input in FORTRAN 77 and MATLAB® produce different output.

References

Press, W.H. and W.T. Vetterling, Numerical Recipes in FORTRAN: The Art of Scientific Computing. 1992: Cambridge University Press.

MATLAB®. 2015, The MathWorks Inc.: Natick, Massachusetts.

Rose, L.D. and D. Padua, Techniques for the translation of MATLAB programs into Fortran 90. ACM Trans. Program. Lang. Syst., 1999. 21(2): p. 286-323. https://doi.org/10.1145/316686.316693

Khawaja, H. and S. Scott, CFD-DEM Simulation of Propagation of Sound Waves in Fluid Particles Fluidised Medium. The International Journal of Multiphysics, 2011. 5(1): p. 47-60. https://doi.org/10.1260/1750-9548.5.1.47

Khawaja, H.A., CFD-DEM and Experimental Study of Bubbling in a Fluidized Bed. The Journal of Computational Multiphase Flows, 2015. 7(4): p. 227-240. https://doi.org/10.1260/1757-482x.7.4.227

Khawaja, H.A., Sound waves in fluidized bed using CFD–DEM simulations. Particuology, 2018. 38: p. 126-133. https://doi.org/10.1016/j.partic.2017.07.002

Khawaja, H. and M. Moatamedi, Semi-Implicit Method for Pressure-Linked Equations (SIMPLE) – solution in MATLAB®. The International Journal of Multiphysics, 2018. 12(4): p. 313-326. https://doi.org/10.21152/1750-9548.12.4.313

Eidesen, H., H. Khawaja, and S. Jackson, Simulation of the HDPE Pyrolysis Process. The International Journal of Multiphysics, 2018. 12(1): p. 79 - 88.

Brunner, D., H. Khawaja, M. Moatamedi, and G. Boiger, CFD modelling of pressure and shear rate in torsionally vibrating structures using ANSYS CFX and COMSOL Multiphysics. The International Journal of Multiphysics, 2018. 12(4): p. 349 - 358. https://doi.org/10.21152/1750-9548.12.4.349

Myrvang, T, and H. Khawaja. Validation of air ventilation in tunnels, using experiments and computational fluid dynamics. The International Journal of Multiphysics, 2018. 12(3): p. 295 - 311. https://doi.org/10.21152/1750-9548.12.3.295

Batchelor, G.K., An Introduction to Fluid Dynamics. Cambridge Mathematical Library. 2000, Cambridge: Cambridge University Press.

Warburton, R., Object-oriented Vs. Functional Programming: Bridging the Divide Between Opposing Paradigms. 2015: O'Reilly Media.

Runge, C., Ueber die numerische Auflösung von Differentialgleichungen. Mathematische Annalen, 1895. 46(2): p. 167-178. https://doi.org/10.1007/bf01446807

Butcher, J.C., A stability property of implicit Runge-Kutta methods. BIT Numerical Mathematics, 1975. 15(4): p. 358-361. https://doi.org/10.1007/bf01931672

Courant, R., K. Friedrichs, and H. Lewy, Über die partiellen Differenzengleichungen der mathematischen Physik. Mathematische Annalen, 1928. 100(1): p. 32-74. https://doi.org/10.1007/bf01448839

Page, C.G., The Professional Programmers Guide to Fortran 77. 1988: Pitman.

The MathWorks, Inc. [cited 2019; Available from: https://se.mathworks.com/help/symbolic/digits.html.

Published

2019-06-30

How to Cite

Nordli, A. and Khawaja, H. (2019) “Comparison of Explicit Method of Solution for CFD Euler Problems using MATLAB® and FORTRAN 77”, The International Journal of Multiphysics, 13(2), pp. 203-214. doi: 10.21152/1750-9548.13.2.203.

Issue

Section

Articles

Most read articles by the same author(s)

1 2 3 4 > >>