GithubHelp home page GithubHelp logo

knut0815 / runko Goto Github PK

View Code? Open in Web Editor NEW

This project forked from natj/runko

0.0 1.0 0.0 2.26 MB

Modern C++14/python3 toolbox for plasma simulations

Home Page: https://runko.readthedocs.io

License: MIT License

CMake 0.47% Python 52.32% C++ 43.23% Mathematica 2.79% Shell 0.49% Makefile 0.23% Julia 0.27% C 0.08% Perl 0.10%

runko's Introduction

Modern C++14/Python3 toolbox for plasma simulations

Build Status Documentation Status MIT

Runko is a collection of simulation codes written in modern C++14/Python3 to model astrophysical plasmas. The framework consists of various physical modules that can be run independently or combined to create multi-physics simulations. Low-level "kernels" are mainly implemented in modern C++ that allows to write modular and high performance code. By binding these fast low-level classes to Python objects it is also easy to use and extend them. This ensures efficient code, rapid prototyping, and ease of use.

Under the hood, the framework uses the massively parallel grid infrastructure library corgi that relies on decomposing the grid to smaller subregions, called tiles, that can be operated on and updated independently of each other. Corgi also automatically parallelizes the simulations and provides dynamic load-balancing capability. Therefore, small simulation setups can be tested locally on laptops and then extended for massively parallel supercomputer platforms (currently tested up to ~10k cores).

Documentation is available from runko.readthedocs.io.

Design and usage of the code is described in detail in the accompanying paper.

Available modules

Current main physics simulation modules include:

  • FDTD electromagnetic field module based on staggered Yee lattices (fields/)
  • 2D3V Particle-In-Cell module (pic/)
  • 1D3V Relativistic Vlasov module (vlasov/)

Additionally, modules under construction include:

  • Force-free MHD module (ffe/)
  • Non-linear Monte Carlo radiation module (radiation/)
  • Full 3D3V Vlasov module

Quick getting started guide

  1. Follow the installation instructions to get Runko running on your laptop.
  2. Add your own project repository under projects/ directory.
    • This can be based on, for example, Python drivers in projects/tests/
  3. Test & prototype your new simulation setups on your laptop/desktop.
  4. Simulate on supercomputers!

Showcase

Relativistic kinetic turbulence

PIC module has been used to simulate formation of turbulence in collisionless magnetically-dominated pair plasma.

We start by perturbing the initial magnetic field in an otherwise uniform box of plasma. Magnetic eddies are quickly seen to develop. When the eddies collide, thin current sheets are formed. These thin sheets are unstable for magnetic reconnection that starts to tear the sheets and produce plasmoid.




Collisionless shocks

PIC module has also an initial work-in-progress collisionless shock setup. This is based on the common piston setup where plasma is reflected from the left simulation wall and made to collide with it self. A collisionless shock is quickly formed stopping the plasma.

Plasma instabilities

Vlasov module has been used to simulate the development of beam instability in a stratified medium.

In this 1D1V simulation we track the development of stratified beam instability starting from a relative density of ~10^-5 as the incoming beam enters the box. At higher densities of ~1 the beam excites Langmuir wave turbulence and heats the background plasma. This is a density contrast of over 100000!

How to cite?

You can use the following BibTeX template to cite Runko in any scientific discourse:

@ARTICLE{runko,
       author = {{N{\"a}ttil{\"a}}, J.},
        title = "{Runko: Modern multi-physics toolbox for simulating plasma}",
      journal = {arXiv e-prints},
     keywords = {Physics - Computational Physics, Astrophysics - Instrumentation and Methods for Astrophysics, Physics - Plasma Physics},
         year = "2019",
        month = "Jun",
          eid = {arXiv:1906.06306},
        pages = {arXiv:1906.06306},
archivePrefix = {arXiv},
       eprint = {1906.06306},
 primaryClass = {physics.comp-ph},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2019arXiv190606306N},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

runko's People

Contributors

natj avatar veledina avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.