Vol. 7 No. 3 (2024)
Open Access
Peer Reviewed

COMPARING SCIENTIFIC COMPUTING ENVIRONMENTS FOR SIMULATING 2D NON-BUOYANT FLUID PARCEL TRAJECTORY UNDER INERTIAL OSCILLATION: A PRELIMINARY EDUCATIONAL STUDY

Authors

Sandy Herho , Iwan Anwar , Katarina Herho , Candrasa Dharma , Dasapta Irawan

DOI:

10.29303/ipr.v7i3.335

Downloads

Received: Apr 30, 2024
Accepted: Aug 13, 2024
Published: Aug 19, 2024

Abstract

This study presents a preliminary numerical investigation of the two-dimensional trajectory of a non-buoyant fluid parcel subjected to inertial oscillations and abrupt external forcing events. The simulations were implemented using Python, GNU Octave, R, Julia, and Fortran open-source scientific computing environments. By running 1,000 iterations in each environment, we evaluated the computational performance of these languages in tackling this idealized problem. The results, visualized through static plots and animation, validate the numerical model's ability to represent the fundamental physics governing fluid motion. Statistical analysis using the Kruskal-Wallis test and Dunn's post-hoc test with Bonferroni correction revealed that Fortran exhibits significantly faster execution times than other environments. However, the choice of programming language should also consider factors such as coding expertise, library availability, and scalability requirements. This study focuses on the performance of scientific computing environments within each language rather than the languages themselves. The observed execution times should be interpreted in the context of the specific environments used, as they often leverage optimized libraries written in lower-level languages. Despite the limitations of this work, such as the simplified 2D model and the use of a single hardware configuration, this study provides valuable insights into selecting appropriate computational tools. It contributes to educational resources for teaching idealized fluid dynamics models. Future studies could explore more complex scenarios, a more comprehensive range of programming environments, and the impact of different numerical schemes and physical parameterizations.

Keywords:

Fluid parcel trajectories, Geophysical fluid dynamics, Inertial oscillations, Idealized models, Open-source programming languages

References

K. Hasselmann, “Wave-driven inertial oscillations,†Geophys. Astrophys. Fluid Dyn., vol. 1, no. 3–4, pp. 463–502, 1970, doi: 10.1080/03091927009365783.

B. Voisin, “Buoyancy oscillations,†J. Fluid Mech., vol. 984, p. A29, 2024, doi: 10.1017/jfm.2024.179.

B. Cushman-Roisin and J.-M. Beckers, Introduction to geophysical fluid dynamics: physical and numerical aspects. Oxford: Academic Press, 2011.

J. Pedlosky, Geophysical Fluid Dynamics. Berlin: Springer Science & Business Media, 2013.

G. K. Vallis, “Geophysical fluid dynamics: whence, whither and why?,†Proc. Math. Phys. Eng. Sci., vol. 472, no. 2192, p. 20160140, 2016, doi: 10.1098/rspa.2016.0140.K.

J. D. Denton and W. N. Dawes, “Computational fluid dynamics for turbomachinery design,†Proc. Inst. Mech. Eng., Part C, vol. 213, no. 2, pp. 107–124, 1998, doi: 10.1243/0954406991522211.

R. Malki, A. J. Williams, T. N. Croft, M. Togneri, and I. Masters, “A coupled blade element momentum–Computational fluid dynamics model for evaluating tidal stream turbine performance,†Appl. Math. Model., vol. 37, no. 5, pp. 3006–3020, 2013, doi: 10.1016/j.apm.2012.07.025.

C. Windt, J. Davidson, and J. v Ringwood, “High-fidelity numerical modeling of ocean wave energy systems: A review of computational fluid dynamics-based numerical wave tanks,†Renewable and Sustainable Energy Reviews, vol. 93, pp. 610–630, 2018, doi: 10.1016/j.rser.2018.05.020.

A. Bhatt, T. Valentic, A. Reimer, L. Lamarche, P. Reyes, and R. Cosgrove, “Reproducible Software Environment: a tool enabling computational reproducibility in geospace sciences and facilitating collaboration,†J. Space Weather Space Clim., vol. 10, p. 12, 2020, doi: 10.1051/swsc/2020011.

L. Talirz et al., “Materials Cloud, a platform for open computational science,†Sci. Data, vol. 7, no. 1, p. 299, 2020, doi: 10.1038/s41597-020-00637-5.

M. Beg et al., “Using Jupyter for reproducible scientific workflows,†Comput. Sci. Eng., vol. 23, no. 2, pp. 36–46, 2021, doi: 10.1109/MCSE.2021.3052101.

N. Lazar, “Ockham’s Razor,†Wiley Interdiscip. Rev. Comput. Stat., vol. 2, no. 2, pp. 243–246, 2010, doi: 10.1002/wics.75.

N. Jeevanjee, P. Hassanzadeh, S. Hill, and A. Sheshadri, “A perspective on climate model hierarchies,†J. Adv. Model. Earth Syst., vol. 9, no. 4, pp. 1760–1771, 2017, doi: 10.1002/2017MS001038.

D. Song et al., “Near-inertial oscillations in seasonal highly stratified shallow water,†Estuar. Coast. Shelf Sci., vol. 258, p. 107445, 2021, doi: 10.1016/j.ecss.2021.107445.

A. K. Mirza, H. F. Dacre, and C. H. B. Lo, “A case study analysis of the impact of a new free tropospheric turbulence scheme on the dispersion of an atmospheric tracer,†Q. J. R. Meteorol. Soc., 2024, doi: 10.1002/qj.4681.

F. J. Beron-Vera, “Nonlinear dynamics of inertial particles in the ocean: From drifters and floats to marine debris and Sargassum,†Nonlinear Dynamics, vol. 103, no. 1, pp. 1–26, 2021, doi: 10.1007/s11071-020-06053-z.

S. v Ershkov, E. Y. Prosviryakov, N. v Burmasheva, and V. Christianto, “Towards understanding the algorithms for solving the Navier–Stokes equations,†Fluid Dyn. Res., vol. 53, no. 4, p. 44501, 2021, doi: 10.1088/1873-7005/ac10f0.

J. W. Garvin, A student’s guide to the Navier-Stokes equations. Cambridge: Cambridge University Press, 2023.

Li, R., Chen, C., Dong, W., Beardsley, R.C., Wu, Z., Gong, W., Liu, Y., Liu, T., Xu, D.: Slope-intensified storm-induced near-inertial oscillations in the South China sea. J. Geophys. Res. Oceans p. 126, vol.3, 2020–016713, 2021, doi: 10.1029/2020JC016713.

T. Hibiya, “A new parameterization of turbulent mixing enhanced over rough seafloor topography,†Geophys. Res. Lett., vol. 49, no. 2, p. e2021GL096067, 2022, doi: 10.1029/2021GL096067.

X. Luo, X. Huang, J. Fei, J. Wang, C. Li, and X. Cheng, “Role of Topography in Triggering Elevated Thunderstorms Associated With Winter Cold Fronts Over the Eastern Yunnan-Guizhou Plateau,†J. Geophys. Res. Atmos., vol. 128, no. 8, p. e2023JD038640, 2023, doi: 10.1029/2023JD038640.

Y. Zhu and X. Liang, “Near-inertial oscillations in the deep Gulf of Mexico,†Deep-Sea Res. II: Top. Stud. Oceanogr., vol. 210, p. 105310, 2023, doi: 10.1016/j.dsr2.2023.105310.

E. Price, J. Mielikainen, M. Huang, B. Huang, H.-L. A. Huang, and T. Lee, “GPU-accelerated longwave radiation scheme of the rapid radiative transfer model for general circulation models (RRTMG),†IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens., vol. 7, no. 8, pp. 3660–3667, doi: 10.1109/JSTARS.2014.2315771.

M. Norman, J. Larkin, A. Vose, and K. Evans, “A case study of CUDA FORTRAN and OpenACC for an atmospheric climate kernel,†J. Comput. Sci., vol. 9, pp. 1–6, 2015, doi: 10.1016/j.jocs.2015.04.022.

J. Ott, M. Pritchard, N. Best, E. Linstead, M. Curcic, and P. Baldi, “A Fortran-Keras deep learning bridge for scientific computing,†Sci. Program., vol. 2020, pp. 1–13, 2020, doi: 10.1155/2020/8888811.

W. A. Perkins, N. D. Brenowitz, C. S. Bretherton, and J. M. Nugent, “Emulation of cloud microphysics in a climate model,†J. Adv. Model. Earth Syst., vol. 16, no. 4, p. e2023MS003851, 2024, doi: 10.1029/2023MS003851.

I. M. Held and M. J. Suarez, “A Proposal for the Intercomparison of the Dynamical Cores of Atmospheric General Circulation Models,†Bull. Am. Meteorol. Soc., vol. 75, no. 10, pp. 1825–1830, 1994, doi: 10.1175/1520-0477(1994)075%3C1825:APFTIO%3E2.0.CO;2.

J. Kämpf, Ocean Modelling for Beginners: Using Open-Source Software. Berlin: Springer Science & Business Media, 2009.

J. Kämpf, Advanced Ocean Modelling: Using Open-Source Software. Berlin: Springer Science & Business Media, 2010.

S. van der Walt, S. C. Colbert, and G. Varoquaux, “The NumPy array: a structure for efficient numerical computation,†Comput. Sci. Eng., vol. 13, no. 2, pp. 22–30, 2011, doi: 10.1109/MCSE.2011.37.

S. H. S. Herho and D. E. Irawan, “PY-METEO-NUM: Dockerized Python Notebook Environment for Portable Data Analysis Workflows in Indonesian Atmospheric Science Communities,†Int. J. Data Sci., vol. 2, no. 1, pp. 38–46, 2021, doi: 10.18517/ijods.2.1.38-46.2021. S. H. S. Herho, “A Univariate Extreme Value Analysis and Change Point Detection of Monthly Discharge in Kali Kupang, Central Java, Indonesia,†JOIV : Int. J. Inform. Visualization, vol. 6, no. 4, pp. 862–868, 2022, doi: 10.30630/joiv.6.4.953.

S. H. S. Herho, “A Univariate Extreme Value Analysis and Change Point Detection of Monthly Discharge in Kali Kupang, Central Java, Indonesia,†JOIV : Int. J. Inform. Visualization, vol. 6, no. 4, pp. 862–868, 2022, doi: 10.30630/joiv.6.4.953.

Y.-K. Qian, “xinvert: A Python package for inversion problems in geophysical fluid dynamics,†J. Open Source Softw., vol. 8, no. 89, p. 5510, 2023, doi: 10.21105/joss.05510.

J. Yu, T. Mukerji, and P. Avseth, “rockphypy: An extensive Python library for rock physics modeling,†SoftwareX, vol. 24, p. 101567, 2023, doi: 10.1016/j.softx.2023.101567.

R. Suwarman et al., “imc-precip-iso: open monthly stable isotope data of precipitation over the Indonesian Maritime Continent,†J. of Data, Inf. and Manag., pp. 1–12, 2024, doi: 10.1007/s42488-024-00116-1.

J. B. D. Jaffrés, “GHCN-Daily: a treasure trove of climate data awaiting discovery,†Comput. Geosci., vol. 122, pp. 35–44, 2019, doi: 10.1016/j.cageo.2018.07.003. O.

Sulpis et al., “RADIv1: a non-steady-state early diagenetic model for ocean sediments in Julia and MATLAB/GNU Octave,†Geosci. Model Dev., vol. 15, no. 5, pp. 2105–2131, 2022, doi: 10.5194/gmd-15-2105-2022.

J. B. D. Jaffrés and J. L. Gray, “Chasing rainfall: estimating event precipitation along tracks of tropical cyclones via reanalysis data and in-situ gauges,†Environ. Model. Softw., vol. 167, p. 105773, 2023, doi: 10.1016/j.envsoft.2023.105773.

J. M. Perkel, “Julia: come for the syntax, stay for the speed,†Nature, vol. 572, no. 7767, pp. 141–142, 2019, doi: 10.1038/d41586-019-02310-3.

A. Ramadhan et al., “Oceananigans. jl: Fast and friendly geophysical fluid dynamics on GPUs,†J. Open Source Softw., vol. 5, no. 53, 2020, doi: 10.21105/joss.02018.

N. Constantinou, G. Wagner, L. Siegelman, B. Pearson, and A. Palóczy, “GeophysicalFlows. jl: Solvers for geophysical fluid dynamics problems in periodic domains on CPUs GPUs,†J. Open Source Softw., vol. 6, no. 60, 2021, doi: 10.21105/joss.03053.

S. Partee et al., “Using machine learning at scale in numerical simulations with SmartSim: An application to ocean climate modeling,†J. Comput. Sci., vol. 62, p. 101707, 2022, doi: 10.1016/j.jocs.2022.101707.

S. Bishnu, R. R. Strauss, and M. R. Petersen, “Comparing the Performance of Julia on CPUs versus GPUs and Julia-MPI versus Fortran-MPI: a case study with MPAS-Ocean (Version 7.1),†Geosci. Model Dev., vol. 16, no. 19, pp. 5539–5559, 2023, doi: 10.5194/gmd-16-5539-2023.

B. Czernecki, A. Głogowski, and J. Nowosad, “Climate: An R package to access free in-situ meteorological and hydrological datasets for environmental assessment,†Sustainability, vol. 12, no. 1, p. 394, 2020, doi: 10.3390/su12010394.

S. H. S. Herho, F. Brahmana, K. E. P. Herho, and D. E. Irawan, “Does ENSO significantly affect rice production in Indonesia? A preliminary study using computational time-series approach,†Int. J. Data Sci., vol. 2, no. 2, pp. 69–76, 2021, doi: 10.18517/ijods.2.2.69-76.2021.

N. P. McKay, J. Emile-Geay, and D. Khider, “GeoChronR–an R package to model, analyze and visualize age-uncertain paleoscientific data,†Geochronology, vol. 2020, pp. 1–33, 2020, doi: 10.5194/gchron-3-149-2021.

M. D. Ashkezari et al., “Simons collaborative marine atlas project (Simons CMAP): an open-source portal to share, visualize, and analyze ocean data,†Limnol. Oceanogr. Methods, vol. 19, no. 7, pp. 488–496, 2021, doi: 10.1002/lom3.10439.

J. D. Hunter, “Matplotlib: A 2D graphics environment,†Comput. Sci. Eng., vol. 9, no. 03, pp. 90–95, 2007, doi: 10.1109/MCSE.2007.55.

W. McKinney, “pandas: a foundational Python library for data analysis and statistics,†Python for High Performance and Scientific Computing, vol. 14, no. 9, pp. 1–9, 2011.

W. H. Kruskal and W. A. Wallis, “Use of Ranks in One-Criterion Variance Analysis,†J. Am. Stat. Assoc., vol. 47, no. 260, pp. 583–621, 1952, doi: 10.1080/01621459.1952.10483441.

E. Ostertagova, O. Ostertag, and J. KováÄ, “Methodology and application of the Kruskal-Wallis test,†Appl. Mech., vol. 611, pp. 115–120, 2014, doi: 10.4028/www.scientific.net/AMM.611.115.

O. J. Dunn, “Multiple comparisons using rank sums,†Technometrics, vol. 6, no. 3, pp. 241–252, 1964, doi: 10.1080/00401706.1964.10490181.

G. D. Ruxton and G. Beauchamp, “Time for some a priori thinking about post hoc testing,†Behav. Ecol., vol. 19, no. 3, pp. 690–693, 2008, doi: 10.1093/beheco/arn020.

P. Virtanen et al., “SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python,†Nat. Methods, vol. 17, pp. 261–272, 2020, doi: 10.1038/s41592-019-0686-2.

M. A. Terpilowski, “scikit-posthocs: Pairwise multiple comparison tests in Python,†J. Open Source Softw., vol. 4, no. 36, p. 1169, 2019, doi: 10.21105/joss.01169.

K. J. Millman and M. Aivazis, "Python for Scientists and Engineers," Computing in Science Engineering, vol. 13, no. 2, pp. 9–12, Mar. 2011, doi: 10.1109/MCSE.2011.36.

T. Kluyver et al., "Jupyter Notebooks – a publishing format for reproducible computational workflows," in Positioning and Power in Academic Publishing: Players, Agents and Agendas, 2016, pp. 87–90.

R. Hallberg, "Using a resolution function to regulate parameterizations of oceanic mesoscale eddy effects," Ocean Model., vol. 72, pp. 92–103, 2013, doi: 10.1016/j.ocemod.2013.08.007.

P. Bougeault and P. Lacarrere, "Parameterization of Orography-Induced Turbulence in a Mesobeta--Scale Model," Mon. Weather Rev., vol. 117, no. 8, pp. 1872–1890, 1989, doi: 10.1175/1520-0493(1989)117<1872:POOITI>2.0.CO;2.

G. Danabasoglu, S. C. Bates, B. P. Briegleb, S. R. Jayne, M. Jochum, W. G. Large, S. Peacock, and S. G. Yeager, "The CCSM4 Ocean Component," J. Clim., vol. 25, no. 5, pp. 1361–1389, 2012, doi: 10.1175/JCLI-D-11-00091.1.

G. Madec, "NEMO ocean engine," Institut Pierre-Simon Laplace (IPSL), France, No. 27, ISSN No 1288-1619, 2008, doi: 10.5281/zenodo.3248739.

Author Biographies

Sandy Herho, University of California, Riverside

Department of Earth and Planetary Sciences

Iwan Anwar, Bandung Institute of Technology

Oceanography Research Group

Katarina Herho, Trisakti University

Department of Geological Engineering

Candrasa Dharma, Indonesian Navy

Naval Hidrographic and Oceanographic Center

Dasapta Irawan, Bandung Institute of Technology

Applied Geology Research Group

Downloads

Download data is not yet available.

Metrics

Metrics Loading ...

How to Cite

Herho, S., Anwar, I., Herho, K., Dharma, C., & Irawan, D. (2024). COMPARING SCIENTIFIC COMPUTING ENVIRONMENTS FOR SIMULATING 2D NON-BUOYANT FLUID PARCEL TRAJECTORY UNDER INERTIAL OSCILLATION: A PRELIMINARY EDUCATIONAL STUDY. Indonesian Physical Review, 7(3), 451–468. https://doi.org/10.29303/ipr.v7i3.335

Similar Articles

1 2 3 4 5 > >> 

You may also start an advanced similarity search for this article.