Abstract
Scikit-FDiff is a new tool for Partial Differential Equation (PDE) solving, written in purePython, that focuses on reducing the time between the development of the mathematicalmodel and the numerical solving. It allows easy and automated finite difference discretization, thanks to symbolic processing(using the SymPy library (Meurer et al., 2017)) which can deal with systems of multi-dimensional partial differential equations and complex boundary conditions. Using finite differences, and the method of lines, Scikit-FDiff allows for the transforma-tion of the original PDE into an Ordinary Differential Equation (ODE), providing fastcomputation of the temporal evolution vector and the Jacobian matrix. The latter ispre-computed in a symbolic way and is sparse by nature. An efficient vectorization al-lows one to formulate the numerical system in such a way as to facilitate the numericalsolver work, even for complex multi-dimensional coupled cases. Systems can be evaluatedwith as few computational resources as possible, enabling the use of implicit and explicitsolvers at a reasonable cost. Scikit-FDiff stands out in comparison to other competitors, such as the FEniCS Project,Clawpack, or the Dedalus Project, in terms of its simplicity. Despite the fact that Scikit-FDiff uses a relatively simple method (finite-differences), which allows one to code in away which is close to the mathematical model, it is able to solve real-world problems. Itis however less suited than other packages for building specialized solvers. Scikit-FDiff also contains several classic ODE solver implementations (some of which havebeen made available from dedicated python libraries), including the backward and forwardEuler scheme, Crank-Nicolson, and explicit Runge-Kutta. More complex approaches, likethe improved Rosenbrock-Wanner schemes (Rang, 2015) up to the 6th order, are alsoavailable in Scikit-FDiff. The time-step is managed by a built-in error computation,which ensures the accuracy of the solution. The main goal of this software is to minimize the time spent writing numerical solversallowing one to focus on model development and data analysis. Therefore, Scikit-Fdiffhas been formulated such that it can solve both simple examples and complex models inonly a few line of code. In addition, extra tools are provided, such as data saving duringthe simulation, real-time plotting, and post-processing. Scikit-FDiff can be used for a wide range of applications including thermal diffusion,heterogeneous chemical reactor modelling, wave propagation, and a large number of non-linear phenomena modelled as systems of PDEs. To date the authors have used it forsolving heated falling-films (Cellier, 2018), dropplet spread on windshield and simplemoisture flow in a porous medium. Furthermore, Scikit-Fdiff has been validated forsolving the shallow-water equation on dam-breaks (LeVeque, 2002) (and the steady-lakecase).
Highlights
Using finite differences, and the method of lines, Scikit-FDiff allows for the transformation of the original Partial Differential Equation (PDE) into an Ordinary Differential Equation (ODE), providing fast computation of the temporal evolution vector and the Jacobian matrix
It allows easy and automated finite difference discretization, thanks to symbolic processing (using the SymPy library (Meurer et al, 2017)) which can deal with systems of multidimensional partial differential equations and complex boundary conditions
The method of lines, Scikit-FDiff allows for the transformation of the original PDE into an Ordinary Differential Equation (ODE), providing fast computation of the temporal evolution vector and the Jacobian matrix
Summary
It allows easy and automated finite difference discretization, thanks to symbolic processing (using the SymPy library (Meurer et al, 2017)) which can deal with systems of multidimensional partial differential equations and complex boundary conditions. The method of lines, Scikit-FDiff allows for the transformation of the original PDE into an Ordinary Differential Equation (ODE), providing fast computation of the temporal evolution vector and the Jacobian matrix. The latter is pre-computed in a symbolic way and is sparse by nature.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.