This work aims to break many of the barriers to entry in a Navier-Stokes solver by coupling it to a Jupyter sandbox environment. For students in computational fluid dynamics, it provides direct hands-on experience and a safe place for practising and learning, while for advanced users and code developers, it works as a rapid prototyping tool.
Beginners may face many barriers to entry in a Navier-Stokes solver, for instance:
This work aims to break these barriers by coupling a sandbox environment into the solver.
To this end, the high-order Navier-Stokes solver Xcompact3d was modified to accept the entire initial set-up from an external source, including physical and numerical parameters, initial and boundary conditions, and a solid geometry that can be inserted with Immersed Boundary Method (IBM). The initial set-up, in turn, is provided from a Jupyter Notebook, taking advantage of the built-in documentation with markdown cells (easily including figures and Latex equations), visualization and interactivity with widgets and plotting libraries, besides the versatility and readability of Python coding. Additionally, the input parameters can be checked for consistency and compatibility. Previous knowledge of NumPy and Matplotlib is enough to start with the exemplified flow configurations. However, there is no limitation to extend it to more advantaged tools like Pandas, Xarray, Dask, Numba, Holoview, Plotly and many others from the Jupyter ecosystem. In fact, the Jupyter CFD Sandbox was incorporated into the Python package Xcompact3d-toolbox.
The outcome of the presented framework benefits users from different levels:
Furthermore, it is a useful advance in terms of research reproducibility and can be ported to any other numerical solver, let we know if you do so.
Tutorials and exemplified flow configurations are available at Xcompact3d-toolbox’s Documentation.