From 31cbcc2fb11421a564c4d79f16064720c15b9f83 Mon Sep 17 00:00:00 2001 From: Humberto Date: Fri, 27 Sep 2024 01:37:36 +0100 Subject: [PATCH] paper updated to include references and some restructuring (following internal reviews) --- joss-paper/paper.bib | 230 ++++++++++++++++++++++++++++++++----------- joss-paper/paper.md | 26 ++--- 2 files changed, 187 insertions(+), 69 deletions(-) diff --git a/joss-paper/paper.bib b/joss-paper/paper.bib index 72e39779..48fe37c0 100644 --- a/joss-paper/paper.bib +++ b/joss-paper/paper.bib @@ -1,59 +1,175 @@ -@article{Pearson:2017, - url = {http://adsabs.harvard.edu/abs/2017arXiv170304627P}, - Archiveprefix = {arXiv}, - Author = {{Pearson}, S. and {Price-Whelan}, A.~M. and {Johnston}, K.~V.}, - Eprint = {1703.04627}, - Journal = {ArXiv e-prints}, - Keywords = {Astrophysics - Astrophysics of Galaxies}, - Month = mar, - Title = {{Gaps in Globular Cluster Streams: Pal 5 and the Galactic Bar}}, - Year = 2017 -} - -@book{Binney:2008, - url = {http://adsabs.harvard.edu/abs/2008gady.book.....B}, - Author = {{Binney}, J. and {Tremaine}, S.}, - Booktitle = {Galactic Dynamics: Second Edition, by James Binney and Scott Tremaine.~ISBN 978-0-691-13026-2 (HB).~Published by Princeton University Press, Princeton, NJ USA, 2008.}, - Publisher = {Princeton University Press}, - Title = {{Galactic Dynamics: Second Edition}}, - Year = 2008 -} - -@article{gaia, - author = {{Gaia Collaboration}}, - title = "{The Gaia mission}", - journal = {Astronomy and Astrophysics}, - archivePrefix = "arXiv", - eprint = {1609.04153}, - primaryClass = "astro-ph.IM", - keywords = {space vehicles: instruments, Galaxy: structure, astrometry, parallaxes, proper motions, telescopes}, - year = 2016, - month = nov, - volume = 595, - doi = {10.1051/0004-6361/201629272}, - url = {http://adsabs.harvard.edu/abs/2016A%26A...595A...1G}, -} - -@article{astropy, - author = {{Astropy Collaboration}}, - title = "{Astropy: A community Python package for astronomy}", - journal = {Astronomy and Astrophysics}, - archivePrefix = "arXiv", - eprint = {1307.6212}, - primaryClass = "astro-ph.IM", - keywords = {methods: data analysis, methods: miscellaneous, virtual observatory tools}, - year = 2013, - month = oct, - volume = 558, - doi = {10.1051/0004-6361/201322068}, - url = {http://adsabs.harvard.edu/abs/2013A%26A...558A..33A} -} - -@misc{fidgit, - author = {A. M. Smith and K. Thaney and M. Hahnel}, - title = {Fidgit: An ungodly union of GitHub and Figshare}, +@article{OpenFOAM, + author = {OpenFOAM Foundation}, + title = {Open Field Operation and Manipulation}, + year = {2024}, + publisher = {Github}, + journal = {GitHub repository}, + url = {https://github.com/OpenFOAM} +} + +@article{SU2, + author = {Standford University}, + title = {SU2}, + year = {2024}, + publisher = {GitHub}, + journal = {GitHub repository}, + url = {https://github.com/su2code/SU2} +} + +@article{CODE_SATURN, + author = {EDF}, + title = {CODE_SATURN}, + year = {2024}, + publisher = {GitHub}, + journal = {GitHub repository}, + url = {https://github.com/code-saturne/code_saturne} +} + +@article{Gerris, + author = {Stephane Popinet}, + title = {Gerris}, + year = {2018}, + publisher = {Institut Jean le Rond d'Alembert}, + journal = {sourceforge repository}, + url = {http://gerris.dalembert.upmc.fr/} +} + +@article{rackauckas2017differentialequations, + title={Differentialequations.jl--a performant and feature-rich ecosystem for solving differential equations in julia}, + author={Rackauckas, Christopher and Nie, Qing}, + journal={Journal of Open Research Software}, + volume={5}, + number={1}, + pages={15}, + year={2017}, + publisher={Ubiquity Press} +} + +@article{innes:2018, + author = {Mike Innes}, + title = {Flux: Elegant Machine Learning with Julia}, + journal = {Journal of Open Source Software}, + year = {2018}, + doi = {10.21105/joss.00602}, +} + +@article{KNET, + author = {Deniz Yuret and collaborators}, + title = {Knet}, + year = {2024}, + publisher = {Giuthub}, + journal = {Giuthub repository}, + url = {hhttps://github.com/denizyuret/Knet.jl} +} + +@software{pal2023lux, + author = {Pal, Avik}, + title = {Lux: Explicit Parameterization of Deep Neural Networks in Julia}, + month = apr, + year = 2023, + note = {If you use this software, please cite it as below.}, + publisher = {Zenodo}, + version = {v0.5.0}, + doi = {10.5281/zenodo.7808904}, + url = {https://doi.org/10.5281/zenodo.7808904} +} + +@article{Lubin2023, + author = {Miles Lubin and Oscar Dowson and Joaquim {Dias Garcia} and Joey Huchette and Beno{\^i}t Legat and Juan Pablo Vielma}, + title = {{JuMP} 1.0: {R}ecent improvements to a modeling language for mathematical optimization}, + journal = {Mathematical Programming Computation}, + volume = {15}, + pages = {581–589}, + year = {2023}, + doi = {10.1007/s12532-023-00239-3} +} + +@inproceedings{NEURIPS2020_9332c513, + author = {Moses, William and Churavy, Valentin}, + booktitle = {Advances in Neural Information Processing Systems}, + editor = {H. Larochelle and M. Ranzato and R. Hadsell and M. F. Balcan and H. Lin}, + pages = {12472--12485}, + publisher = {Curran Associates, Inc.}, + title = {Instead of Rewriting Foreign Code for Machine Learning, Automatically Synthesize Fast Gradients}, + url = {https://proceedings.neurips.cc/paper/2020/file/9332c513ef44b682e9347822c2e457ac-Paper.pdf}, + volume = {33}, + year = {2020} +} + +@article{OceananigansJOSS, + doi = {10.21105/joss.02018}, + url = {https://doi.org/10.21105/joss.02018}, year = {2020}, - publisher = {GitHub}, - journal = {GitHub repository}, - url = {https://github.com/arfon/fidgit} + publisher = {The Journal of Open Source Software}, + volume = {5}, + number = {53}, + pages = {2018}, + author = {Ali Ramadhan and Gregory LeClaire Wagner and Chris Hill and Jean-Michel Campin and Valentin Churavy and Tim Besard and Andre Souza and Alan Edelman and Raffaele Ferrari and John Marshall}, + title = {{Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs}}, + journal = {Journal of Open Source Software} +} + +@article{schlottkelakemper2021purely, + title={A purely hyperbolic discontinuous {G}alerkin approach for + self-gravitating gas dynamics}, + author={Schlottke-Lakemper, Michael and Winters, Andrew R and + Ranocha, Hendrik and Gassner, Gregor J}, + journal={Journal of Computational Physics}, + pages={110467}, + year={2021}, + month={06}, + volume={442}, + publisher={Elsevier}, + doi={10.1016/j.jcp.2021.110467}, + eprint={2008.10593}, + eprinttype={arXiv}, + eprintclass={math.NA} +} + +@misc{WeymouthFont2024, + title = {WaterLily.jl: A differentiable and backend-agnostic Julia solver to simulate incompressible viscous flow and dynamic bodies}, + author = {Gabriel D. Weymouth and Bernat Font}, + url = {https://arxiv.org/abs/2407.16032}, + eprint = {2407.16032}, + archivePrefix = {arXiv}, + year = {2024}, + primaryClass = {physics.flu-dyn} +} + + +@article{HMedina, + title = {A novel laminar kinetic energy model for the prediction of pretransitional velocity fluctuations and boundary layer transition}, + journal = {International Journal of Heat and Fluid Flow}, + volume = {69}, + pages = {150-163}, + year = {2018}, + issn = {0142-727X}, + doi = {https://doi.org/10.1016/j.ijheatfluidflow.2017.12.008}, + url = {https://www.sciencedirect.com/science/article/pii/S0142727X17306343}, + author = {H. Medina and A. Beechook and H. Fadhila and S. Aleksandrova and S. Benjamin}, + keywords = {Laminar kinetic energy, Boundary layer, Transition, OpenFOAM, Plate, Separation, Bubble} +} + +@article{Wilcox, + author = {Wilcox, David C.}, + title = {Reassessment of the scale-determining equation for advanced turbulence models}, + journal = {AIAA Journal}, + volume = {26}, + number = {11}, + pages = {1299-1310}, + year = {1988}, + doi = {10.2514/3.10041}, + URL = {https://doi.org/10.2514/3.10041}, + eprint = {https://doi.org/10.2514/3.10041} +} + +@article{montoison-orban-2023, + author = {Montoison, Alexis and Orban, Dominique}, + title = {{Krylov.jl: A Julia basket of hand-picked Krylov methods}}, + journal = {Journal of Open Source Software}, + volume = {8}, + number = {89}, + pages = {5187}, + year = {2023}, + doi = {10.21105/joss.05187} } \ No newline at end of file diff --git a/joss-paper/paper.md b/joss-paper/paper.md index 51878b74..7ac8a72f 100644 --- a/joss-paper/paper.md +++ b/joss-paper/paper.md @@ -49,14 +49,14 @@ bibliography: paper.bib # Summary -Understanding the behaviour of fluid flow, such as air over a wing, water in a pipeline, or fuel in an engine is crucial in many engineering applications, from designing aircraft and automotive components to optimising energy systems, etc. Computational Fluid Dynamics (CFD) enables engineers to model real-world conditions, optimise designs, and predict performance under a wide range of scenarios, and it has become a vital part of the modern engineering design process for creating efficient, safe, and sustainable designs. As engineers seek to develop and optimise new designs, particularly in fields where there is a drive to push the current state-of-the-art or physical limits of existing design solutions, often, new CFD methodologies or physical models are required. Therefore, extendable and flexible CFD frameworks are needed, for example, to allow seamless integration with machine learning models. In this paper, the features of the first release of the Julia package XCALibre.jl are presented. Designed with extensibility in mind, XCALibre.jl is aiming to facilitate the rapid prototyping of new fluid models and to easily integrate with Julia's powerful ecosystem, enabling access to optimisation libraries and machine learning frameworks to enhance its functionality and expand its application potential, whilst offering multi-threaded performance CPUs and GPU acceleration. +Understanding the behaviour of fluid flow, such as air over a wing, oil lubrication in gas turbines, or cooling air flow in a combustor or turbine is crucial in many engineering applications, from designing aircraft and automotive components to optimising energy systems, etc. Computational Fluid Dynamics (CFD) enables engineers to model real-world conditions, optimise designs, and predict performance under a wide range of scenarios, and it has become a vital part of the modern engineering design process for creating efficient, safe, and sustainable designs. As engineers seek to develop and optimise new designs, particularly in fields where there is a drive to push the current state-of-the-art or physical limits of existing design solutions, often, new CFD methodologies or physical models are required. Therefore, extendable and flexible CFD frameworks are needed, for example, to allow seamless integration with machine learning models. In this paper, the features of the first release of the Julia package XCALibre.jl are presented. Designed with extensibility in mind, XCALibre.jl is aiming to facilitate the rapid prototyping of new fluid models and to easily integrate with Julia's powerful ecosystem, enabling access to optimisation libraries and machine learning frameworks to enhance its functionality and expand its application potential, whilst offering multi-threaded performance CPUs and GPU acceleration. # Statement of need -Given the importance of fluid flow simulation in engineering applications, it is not surprising that there is a wealth of CFD solvers available, both open-source and commercially available. Well established open-source codes include: OpenFOAM, SU2, CODE_SATURN, Gerris, etc. It is a testament to the open-source philosophy, and their developers, that some of these codes offer almost feature parity with commercial codes. However, the more feature-rich open-source codes have large codebases and, for performance reasons, have been implemented in statically compiled languages which makes it difficult to adapt and incorporate recent trends in scientific computing, for example, GPU computing and interfacing with machine learning frameworks, which is also the case for commercial codes (to a larger extent due to their closed source nature where interfaces to code internals can be quite rigid – although thanks to access to more resources commercial codes have been steadily ported to work on GPUs). As a result, the research community has been actively developing new CFD codes, which is evident within the Julia ecosystem. +Given the importance of fluid flow simulation in engineering applications, it is not surprising that there is a wealth of CFD solvers available, both open-source and commercially available. Well established open-source codes include: OpenFOAM [@OpenFOAM], SU2 [@SU2], CODE_SATURN [@CODE_SATURN], Gerris [@Gerris], etc. It is a testament to the open-source philosophy, and their developers, that some of these codes offer almost feature parity with commercial codes. However, the more feature-rich open-source codes have large codebases and, for performance reasons, have been implemented in statically compiled languages which makes it difficult to adapt and incorporate recent trends in scientific computing, for example, GPU computing and interfacing with machine learning frameworks, which is also the case for commercial codes (to a larger extent due to their closed source nature where interfaces to code internals can be quite rigid – although thanks to access to more resources commercial codes have been steadily ported to work on GPUs). As a result, the research community has been actively developing new CFD codes, which is evident within the Julia ecosystem. -The Julia programming language offers a fresh approach to scientific computing, with the benefits of dynamism whilst retaining the performance of statically typed languages thanks to its just-in-time compilation approach (using LLVM compiler technology). Thus, Julia makes it easy to prototype and test new ideas whilst producing machine code that is performant. This simplicity-performance dualism has resulted in a remarkable growth in its ecosystem offering for scientific computing, which includes state-of-the-art packages for solving differential equations (`DifferentialEquations.jl`), building machine learning models (`Flux.jl`, `Knet.jl` and `Lux.jl`), optimisation frameworks (`JUMP.jl`, XXX and XXX, and more), automatic differentiation (), etc. Likewise, excellent CFD packages have also been developed, most notoriously: `Oceananigans.jl`, which provides tools for ocean modelling, `Trixi.jl` which provides high-order for solvers using the Discontinuous Garlekin method, and `Waterlilly.jl` which implements the immerse boundary method on structured grids using a staggered finite volume method. In this context, `XCALibre.jl` aims to complement and extend the Julia ecosystem by providing a cell-centred and unstructured finite volume general-purpose CFD framework for the simulation of both incompressible and weakly compressible flows. The package is intended primarily for researchers and students, as well as engineers, who are interested in CFD applications using the built-in solvers or those who seek a user-friendly framework for developing new CFD solvers or methodologies. +The Julia programming language offers a fresh approach to scientific computing, with the benefits of dynamism whilst retaining the performance of statically typed languages thanks to its just-in-time compilation approach (using LLVM compiler technology). Thus, Julia makes it easy to prototype and test new ideas whilst producing machine code that is performant. This simplicity-performance dualism has resulted in a remarkable growth in its ecosystem offering for scientific computing, which includes state-of-the-art packages for solving differential equations e.g. `DifferentialEquations.jl` [@rackauckas2017differentialequations] , building machine learning models such as `Flux.jl` [@innes:2018], `Knet.jl` [@KNET] and `Lux.jl` [@pal2023lux], optimisation frameworks e.g. `JUMP.jl` [@Lubin2023] , automatic differentiation, such as `Enzyme.jl` [@NEURIPS2020_9332c513] , etc. Likewise, excellent CFD packages have also been developed, most notoriously: `Oceananigans.jl` [@OceananigansJOSS], which provides tools for ocean modelling, `Trixi.jl` [@schlottkelakemper2021purely] which provides high-order for solvers using the Discontinuous Garlekin method, and `Waterlilly.jl` [@WeymouthFont2024] which implements the immerse boundary method on structured grids using a staggered finite volume method. In this context, `XCALibre.jl` aims to complement and extend the Julia ecosystem by providing a cell-centred and unstructured finite volume general-purpose CFD framework for the simulation of both incompressible and weakly compressible flows. The package is intended primarily for researchers and students, as well as engineers, who are interested in CFD applications using the built-in solvers or those who seek a user-friendly framework for developing new CFD solvers or methodologies. # Key features @@ -65,15 +65,19 @@ A brief summary of the main features available in the first public release (vers * **XPU computation** `XCALibre.jl` is implemented using `KernelAbstractions.jl` which allows it to support both multi-threaded CPU and GPU calculations. * **Unstructured grids and formats** `XCALIbre.jl` is implemented to support unstructured meshes using the Finite Volume method for equation discretisation. Thus, arbitrary polyhedral cells are supported, enabling the representation and simulation of complex geometries. `XCALibre.jl` provides mesh conversion functions to load externally generated grid. Currently, the Ideas (`unv `) and `OpenFOAM` mesh formats can be used. The `.unv` mesh format supports both 2D and 3D grids (note that the `.unv` format only supports prisms, tetrahedral, and hexahedral cells). The `OpenOAM` mesh format can be used for 3D simulations (the mesh `OpenFOAM` mesh format has no cell restrictions and support arbitrary polyhedral cells). * **Flow solvers** Steady and transient solvers are available, which use the SIMPLE and PISO algorithms for steady and transient simulations, respectively. These solvers support simulation of both Incompressible and weakly compressible fluids (using a sensible energy model). -* **Turbulence models** RANS and LES turbulence models are supported. RANS models available in the current release include: the standard Wilcox $k-\omega$ model (add ref) and the transitional $k-\omega LKE$ model (add ref). For LES simulations the classic `Smagorinsky` model is available. +* **Turbulence models** RANS and LES turbulence models are supported. RANS models available in the current release include: the standard Wilcox $k-\omega$ model [@Wilcox] and the transitional $k-\omega$ LKE model [@HMedina]. For LES simulations the classic `Smagorinsky` model is available. * **VTK simulation output** simulation results are written to `vtk` files for 2D cases and `vtu` for 3D simulations. This allows to perform simulation post-processing in `ParaView`, which is the leading open-source project for scientific visualisation. -* **Linear solvers and discretisation schemes** in `XCALibre.jl` users are able to select from a growing range of pre-defined discretisation schemes, e.g. `Upwind`, `Linear` and `LUST` for discretising divergence terms. By design, the choice of discretisation strategy is made on a term-by-term basis offering great flexibility. Users must also select and configure the linear solvers used to solve the discretised equations. Linear solvers are provided by `Krylov.jl` (REF) and reexported in `XCALibre.jl` for convenience (please refer to the user guide for details on exported solvers). +* **Linear solvers and discretisation schemes** in `XCALibre.jl` users are able to select from a growing range of pre-defined discretisation schemes, e.g. `Upwind`, `Linear` and `LUST` for discretising divergence terms. By design, the choice of discretisation strategy is made on a term-by-term basis offering great flexibility. Users must also select and configure the linear solvers used to solve the discretised equations. Linear solvers are provided by `Krylov.jl` [@montoison-orban-2023] and reexported in `XCALibre.jl` for convenience (please refer to the user guide for details on exported solvers). -# Example: laminar flow over a backward facing step +# Examples -The use of `XCALibre.jl` is now illustrated using simple backward-facing step configuration with 4 boundaries as depicted in figure \ref{fig:domain}. The flow will be considered as incompressible and laminar the `:wall` and `:top` boundaries will be considered as solid wall boundaries. The inflow velocity is 1.5 $m/s$ and the outlet boundary is set up as a pressure outlet (i.e. a `Dirichlet` condition with a reference value of 0 $Pa$). Notice that this case uses a structured grid for simplicity, however, in `XCALibre.jl` the grid connectivity information is unstructured and complex geometries can be used. Here the simulation is setup to run on the CPU, the steps needed to run on GPUs can be found in the documentation (REF). +Users are referred to the documentation where examples for using `XCALibre.jl` are provided, including advanced examples showing how it is possible to integrate the Julia ecosystem to extend the functionality in XCALibre.jl, with examples that include flow optimisation, and integration with the `Flux.jl` machine learning framework. -![My figure](domain_mesh.png\label{fig:domain}){ width=80% } +## Verification: laminar flow over a backward facing step + +The use of `XCALibre.jl` is now illustrated using simple backward-facing step configuration with 4 boundaries as depicted in figure \ref{fig:domain}. The flow will be considered as incompressible and laminar the `:wall` and `:top` boundaries will be considered as solid wall boundaries. The inflow velocity is 1.5 $m/s$ and the outlet boundary is set up as a pressure outlet (i.e. a `Dirichlet` condition with a reference value of 0 $Pa$). Notice that this case uses a structured grid for simplicity, however, in `XCALibre.jl` the grid connectivity information is unstructured and complex geometries can be used. Here the simulation is setup to run on the CPU, the steps needed to run on GPUs can be found in the [documentation](https://mberto79.github.io/XCALibre.jl/stable/). + +![Computational domain\label{fig:domain}](domain_mesh.png){ width=80% } The corresponding simulation setup is shown below: @@ -160,12 +164,10 @@ initialise!(model.momentum.p, 0.0) residuals = run!(model, config); ``` -Quick narrative of results +The velocity and pressure results are verified with those obtained using OpenFOAM [@OpenFOAM] and shown in figure \ref{fig:comparison}, showing that they are in excellent agreement. -![My figure](BFS_verification.svg){ width=80% } +![Comparision with OpenFOAM \label{fig:comparison}](BFS_verification.svg){ width=80% } -# Advanced examples -Users are referred to the documentation where more advanced examples for using `XCALibre.jl` are provided, including flow optimisation, and integration with the `Flux.jl` machine learning framework. # References