Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add finite element or spectral element simulation capability #82

Closed
namurphy opened this issue Aug 3, 2017 · 5 comments
Closed

Add finite element or spectral element simulation capability #82

namurphy opened this issue Aug 3, 2017 · 5 comments
Labels
effort: very high Requiring ≳2 weeks. Can this be split up into multiple smaller/focused issues? feature request Issues requesting a new feature or enhancement plasmapy.formulary Related to the plasmapy.formulary subpackage Stale Dormant issues & PRs which will be automatically closed if the label is not removed. wish list 🌠 Desired but not planned features or improvements
Milestone

Comments

@namurphy
Copy link
Member

namurphy commented Aug 3, 2017

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.

@namurphy namurphy added effort: high Requiring perhaps ∼1–2 weeks. Can this be split up into multiple smaller/focused issues? feature request Issues requesting a new feature or enhancement wish list 🌠 Desired but not planned features or improvements labels Aug 3, 2017
@namurphy namurphy added this to the v0.2 milestone Aug 3, 2017
@StanczakDominik StanczakDominik added this to To do in MHD Simulation Aug 3, 2017
@tulasinandan
Copy link

I'm working on a spectral Hall-MHD code.

@StanczakDominik StanczakDominik added the plasmapy.formulary Related to the plasmapy.formulary subpackage label Aug 24, 2017
@namurphy namurphy added effort: very high Requiring ≳2 weeks. Can this be split up into multiple smaller/focused issues? and removed effort: high Requiring perhaps ∼1–2 weeks. Can this be split up into multiple smaller/focused issues? labels Sep 19, 2017
@StanczakDominik
Copy link
Member

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
Copy link
Contributor

Cadair commented Oct 31, 2017

fwiw, I met a FEniCS person recently, it looks very cool and is also a NumFOCUS project.

@ghost
Copy link

ghost commented Feb 5, 2018

WRT to interfacing to NIMROD, when it gets to the point where initial values for problems and model parameters are defined, I would be happy to work on writing this out in NIMROD namelist and h5 format.

I've personally used firedrake which is related to FEniCS in that it is built on much of the same infrastructure. I was very impressed and it seems to be a great solution for small problems.

https://www.firedrakeproject.org/

Copy link

This issue will be closed in 90 days due to five years of inactivity unless the stale label or comment is removed.

@github-actions github-actions bot added the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label Dec 16, 2023
@namurphy namurphy closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: very high Requiring ≳2 weeks. Can this be split up into multiple smaller/focused issues? feature request Issues requesting a new feature or enhancement plasmapy.formulary Related to the plasmapy.formulary subpackage Stale Dormant issues & PRs which will be automatically closed if the label is not removed. wish list 🌠 Desired but not planned features or improvements
Projects
No open projects
MHD Simulation
  
To do
Development

No branches or pull requests

4 participants