SearcharxivSearch

arXiv · 1807.01769

FluidSim: modular, object-oriented Python package for high-performance CFD simulations

Abstract

The Python package fluidsim is introduced in this article as an extensible framework for Computational Fluid Mechanics (CFD) solvers. It is developed as a part of FluidDyn project (Augier et al., 2018), an effort to promote open-source and open-science collaboration within fluid mechanics community and intended for both educational as well as research purposes. Solvers in fluidsim are scalable, High-Performance Computing (HPC) codes which are powered under the hood by the rich, scientific Python ecosystem and the Application Programming Interfaces (API) provided by fluiddyn and fluidfft packages (Mohanan et al., 2018). The present article describes the design aspects of fluidsim, viz. use of Python as the main language; focus on the ease of use, reuse and maintenance of the code without compromising performance. The implementation details including optimization methods, modular organization of features and object-oriented approach of using classes to implement solvers are also briefly explained. Currently, fluidsim includes solvers for a variety of physical problems using different numerical methods (including finite-difference methods). However, this metapaper shall dwell only on the implementation and performance of its pseudo-spectral solvers, in particular the two- and three-dimensional Navier-Stokes solvers. We investigate the performance and scalability of fluidsim in a state of the art HPC cluster. Three similar pseudo-spectral CFD codes based on Python (Dedalus, SpectralDNS) and Fortran (NS3D) are presented and qualitatively and quantitatively compared to fluidsim. The source code is hosted at Bitbucket as a Mercurial repository bitbucket.org/fluiddyn/fluidsim and the documentation generated using Sphinx can be read online at fluidsim.readthedocs.io.

Explore related subjects

Keep this discovery

BibTeXRIS

Ashwin Vishnu Mohanan, Cyrille Bonamy, Miguel Calpe Linares, Pierre Augier. 2018-07-03. FluidSim: modular, object-oriented Python package for high-performance CFD simulations. https://doi.org/10.5334/jors.239

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

A Framework for Discharge Time Prediction of Energy Storage Units Based on Coupled Dynamics and Multi-Factor Aging Models

This paper presents a physically interpretable framework for predicting time to empty (TTE) in portable embedded systems. The framework couples usage-driven load-power decomposition, electrical power-voltage-current closure, a semi-empirical aging model, and SOC-temperature dynamics. Smartphone telemetry is mapped to battery current through an interpretable load model and conversion-efficiency correction. Battery capacity loss is modeled by combining Arrhenius temperature dependence, SEI diffusion behavior, and cycle-related power-law degradation. The coupled dynamic model then predicts TTE under different initial SOC values, ambient temperatures, and usage profiles. Chronological hold-out evaluation on a 6.9-h smartphone discharge session yielded a current RMSE of 0.0095 $\pm$ 0.0006 A, a temperature RMSE of 2.93 $\pm$ 0.24$^\circ$C, and a TTE MAPE of 4.81 $\pm$ 0.61%. Evaluation on NASA cell B0005 produced a capacity-loss RMSE of 0.031 Ah. Baseline, ablation, and counterfactual analyses further illustrate the contributions of thermal and aging corrections and the relative influence of load features. The results demonstrate the feasibility and interpretability of the proposed framework, while broader validation across devices and batteries remains necessary.

cs.CE

Node-Shift-Encoding Genetic Algorithm with fuzzy-enhanced reference tour to solve the bi-objective service-oriented TSP

The Travelling Salesman Problem (TSP) remains a key area of research in combinatorial optimization, with applications in logistics, manufacturing, and service delivery. This paper addresses a bi-objective service-oriented TSP in which the clients' ranks in the delivery path matter. Unlike conventional depot-based TSP formulations, the considered problem does not assume a distinguished depot or a fixed tour origin. To address this setting, we adapt the Miller--Tucker--Zemlin (MTZ)-based formulation and derive an original linearization of the resulting model, enabling its solution with off-the-shelf integer linear programming solvers. This adaptation avoids the rigid tour origin imposed by the conventional MTZ formulation, for which fixing the starting node does not affect the tour cost but can affect the objective in a customer-rank-sensitive TSP. To solve this problem, we present a Node-Shift-Encoding (NSE)-based Genetic Algorithm augmented with fuzzy reasoning to update the reference tour throughout the evolutionary process. Experimental evaluation on TSPLIB benchmarks demonstrates that the proposed method achieves improved performance compared with the classical NSE approach.

cs.CE

Geometric organization of olfactory descriptor data in the Poincar\'e disk

Odor quality is commonly represented using high dimensional descriptor profiles, yet their low dimensional organization remains unclear. We investigated whether a two-dimensional hyperbolic embedding can provide an interpretable representation of this structure. We applied hyperbolic metric multidimensional scaling to two complementary datasets: 480 Sagar rating profiles from three participants rating 160 odorants on 15 continuous descriptors, and 4983 GoodScents--Leffingwell molecules annotated with 138 binary descriptors. The embeddings substantially preserved pairwise descriptor distances, supporting subsequent analyses of radial and angular organization. In Sagar, rating profile entropy was strongly and negatively associated with hyperbolic radius, with diffuse profiles closer to the center and concentrated profiles closer to the boundary. This radial organization emerged primarily at the level of the full descriptor profile, rather than any individual descriptor, and remained robust across alternative descriptor representations, participant specific analyses, and averaged ratings. Sweet, musky, fruity, pleasantness showed the strongest directional trends. In GoodScents--Leffingwell, active label entropy, reflecting descriptor multiplicity, increased with radius, whereas orthogonalized descriptor entropy, reflecting spread across orthogonal modes, decreased with radius. Related binary descriptors occupied coherent localized high-density regions. These findings reveal complementary radial and angular organization in the hyperbolic representation of olfactory descriptor data. They support hyperbolic mapping as an interpretable descriptive framework in which radius summarizes global profile properties, while the angular component captures continuous descriptor gradients and categorical organization.

cs.CE