8

I would like some super simple computational code for solving magnetohydrodynamics problems. High accuracy nor performance is not my concern. I wan't it just to visually explore qualitative behavior of plasma. Important for me is:

  • Generality - it should not be specialised on any particular subproblem of MHD
  • Easy to get it work - does not require any libraries difficult to instal. Input is strightforward and well documented by some examples
  • Easy to read and modify - you can read the code and learn about MHD solution from it. You can use this code as starting point for your own MHD code development

Something as simple as this Navier stokes solver would be best

best would be something in python-numpy or java, but C++ or Fortran is not a big problem for me.

Up to now I found:

some libraries ( MHD-Hermes and python-mhd ) which are in python, but doesn't seem to have any documantation or examples how to use it.

and this A Free, Fast, Simple and Efficient TVD MHD Code which is in frotran but has just 400 lines

I was thinking about writing something by myself but I want to be sure there is nothing similar already avaible. I think it could be quite easy, just take the Navier-Stokes solver from the link above and introduce electric and magnetic potential by FFT poisson solver ( or Particle Mesh Ewald ).

Prokop Hapala
  • 927
  • 10
  • 17

2 Answers2

3

Have a look on these three:

  • Piernik MHD it is a code which evolved from the Pen & Trac MHD you mentioned in your question. Now its quite mature and the development is still active. Written in modern Fortran 95/2003.

  • Godunov MHD an MHD code designed especially for simulating the reconnection events, but can be easily modified and applied to other problems. It can be parallelized from single multicore machine (OpenMP) up to clusters with many nodes (MPI). Written in Fortran 90/95.

  • python-mhd a small and simple MHD code, easy to play with it. Written in Python and C.

corion
  • 166
  • 2
  • thanks, I sould look on that in more detail. About python-mhd: This would be ideal because it is pytho. I mentioned it also in original question. However, I have problem running the example (I write an issue https://code.google.com/p/python-mhd/issues/detail?id=1). I didn't found any other documentation or example than that on frontpage. – Prokop Hapala Jul 08 '13 at 11:16
1

Give a try to PLUTO

http://plutocode.ph.unito.it/

I hope this helps ! Cheers, Tom

Tom
  • 465
  • 4
  • 14