4 ms·
This seems to be all about ODEs. Has anyone got any recommendation for a good PDE solver? One that might run a problem having more than three spatial dimensions
by alimw 9y ago
This seems to be all about ODEs. Has anyone got any recommendation for a good PDE solver? One that might run a problem having more than three spatial dimensions? (and ideally callable from Python)
- ChrisRackauckas 9y agoTalking about PDEs is way more complex and I didn't get into it. What do you mean by a good PDE solver? Generally a PDE solver is built by doing some spatial discretization and then either solving that with some numerical linear solver directly (if it's a time-independent problem, or if it's a fully-implicit discretization), or using an ODE solver. There are many different spatial discretization techniques, including finite element, finite difference, finite volume, and spectral methods. There are libraries for helping one discretize space using each of these methods. But then there are "full-stop PDE solvers" which choose a specific PDE and solve that. For example, MATLAB and Mathematica can numerically solve diffusion-advection systems directly. And there are many user packages for different PDEs. So to cover this fully, I would need to go through the available tools for numerical linear algebra and spatial discretization, but on the other hand cover some full-stop PDE solvers as well. This will be a different blog post. Without knowing your background or what you want to do, FEniCS is a good Python finite element toolbox that can then be used to build the linear equation or system of ODEs, from which you use other tools like those mentioned here to complete the solving. As for full-stop PDE solvers in Python, I am not sure and need to look into it myself...
- alimw 9y agoThanks! My problem is based on a straightforward constant-coefficient diffusion-advection equation, but there are complicated boundaries and I'd like it to work in six or seven dimensions (given time and a big computer!). I have read a little about FEniCS but I think it will struggle just to generate the mesh. I'm looking at Mathematica now. It seems like it will treat an evolution equation specifically (method of lines)---perhaps that's what you mean by a "full-stop solver"?
- ChrisRackauckas 9y agoYup, that's exactly what I mean. People have pre-written solvers for specific equations. Sounds like you found one for you, so that's great! When you ask about PDE tools though, people start talking about tools for building PDE solvers like FEniCS becuase it's so rare to find something exactly for your PDE, but there's no reason to use these tools unless you have to.
- ysakamoto 9y agoThere is no good general-purpose PDE solver, as there are all these considerations such as elliptic/parabolic/hyperbolic PDEs, accuracy/stability, FEM/FVM/FDM, linear/nonlinear, numerical oscillation, steady state/unsteady etc... But I do recommend FeniCS PDE solver [1]. It is fairly easy to use if you understand the finite element method and type of PDE you are solving for. [1] https://fenicsproject.org/ https://fenicsproject.org/
- ViralBShah 9y agoThere was a GSOC project on Julia wrappers for FeniCS. https://julialang.org/blog/2017/09/gsoc-fenics https://julialang.org/blog/2017/09/gsoc-fenics
- thisrod 9y agoPDEs are hard to solve numerically, because you usually need to evaluate the derivatives. The errors are not smooth functions of the coordinates, so their derivatives tend to swamp the derivative of the solution. By contrast, ODE solving is about integrals, which add up the nearly equal quantities that derivatives subtract. In this area of numerical computing, the important part is still the user, and the program they use is mostly a matter of what's convenient.
- dagw 9y agoFEniCS (https://fenicsproject.org/ https://fenicsproject.org/) is probably the best open source solution currently available and it works great from python. They even have a pretty good free book to getting started: https://fenicsproject.org/pub/tutorial/pdf/fenics-tutorial-vol1.pdf https://fenicsproject.org/pub/tutorial/pdf/fenics-tutorial-v...