Repository navigation
Description
Finite difference methods work really well for a lot of problems, but there are some problems that they are not well suited for. Finite element and spectral element schemes have the advantage of considerable geometric flexibility, which makes them highly suitable for simulating toroidal confinement devices with round-ish/triangular-ish cross sections or otherwise non-trivial geometry. It would be great if we had finite element plasma simulation capabilities in addition to finite difference capabilities. I am sure we will need multiple methods since different methods will be most suitable for different problems (e.g., finite elements are not the greatest at capturing shocks).
It would be advantageous if we could build upon an existing package. Possibilities include (but are not limited to):
- FEnicS: "FEniCS is a popular open-source (LGPLv3) computing platform for solving partial differential equations (PDEs). FEniCS enables users to quickly translate scientific models into efficient finite element code."
- MFEM: "a free, lightweight, scalable C++ library for finite element methods" with python bindings though PyMFEM. This was suggested in Discretization/Solver Libraries #66.
The package(s) that we use should have the following qualities:
- Easy to use
- Open source under a permissive license
- Really well integrated into Python
- Can be installed easily using tools like conda (which was easy to do for FEnicS, at least)
- Allows users to produce highly readable/maintainable code
- High performance on devices ranging from laptops (or cell phones?) to gigantic megacomputers from science fiction that for some reason still use punchcards
- Flexible, so that it is easy to change the system of equations
- Stable API
- Well suited to handling stiff systems of equations
- As an example, semi-implicit schemes can use an implicit time advance to cover the shortest timescale behavior, with an explicit time advance for longer timescale behavior
- Has an active user/developer community
- Easy to use (repeating here, but I'd say this is even more important than performance)
We can also learn from existing really powerful plasma simulation codes that are written in Fortran, including:
Some of these codes can be used in Python via OMFIT, though I believe most or all of these codes and OMFIT require signing a user agreement form before getting access.
This is a very long term project, so this might be best saved until v0.2 or later.
Activity
tulasinandan commentedon Aug 22, 2017
I'm working on a spectral Hall-MHD code.
StanczakDominik commentedon Oct 31, 2017
There's a MOOC on edX on FEniCS I'm looking to participate in. I'll see how hard it would be to get something working with that.
Cadair commentedon Oct 31, 2017
fwiw, I met a FEniCS person recently, it looks very cool and is also a NumFOCUS project.
github-actions commentedon Dec 16, 2023
This issue will be closed in 90 days due to five years of inactivity unless the stale label or comment is removed.