Coder Social home page Coder Social logo

crewsdw / vlasov1d2v Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 118 KB

Python scripts to solve the Vlasov-Poisson system with external magnetic field in a three-dimensional phase space using discontinuous Galerkin methods

License: MIT License

Python 100.00%
vlasov-solver

vlasov1d2v's Introduction

This collection of Python codes solves the Vlasov-Poisson system in 1D+2V using the Runge-Kutta Discontinuous Galerkin finite element method using CUDA-accelerated libraries, namely CuPy. The solver is capable of up to 9th order spatial and 3rd order temporal accuracy.

Some example solutions are found here

Abstract:

The discontinuous Galerkin (DG) operators in the Lobatto basis are constructed to arbitrary order for tensor-product n-cube elements, for which only the one-dimensional gradient operators are needed. This is done by characterizing interpolating polynomials on Lobatto quadrature points as a Fourier-Legendre approximation to the quadrature-weighted identity of that point. The DG gradient operators are then shown to be approximations to the derivative of the identity. Interpreting the nodal basis in this way leads to useful and interpretable operations such as integration with the exponential kernel for Fourier analysis, leading to a high-order discrete Fourier transform. In this work the high-order transform is shown to solve the Poisson equation with O((โˆ†x)^n+1/2)-accuracy. Efficient calculation of high-dimensional flows is illustrated by solving the Vlasov-Poisson system in 1D+2V phase space to simulate the instability of a loss-cone distribution to perpendicular-propagating cyclotron harmonic waves.

Use

You'll need a CUDA-compatible GPU and an install of the CuPy library.

To use the scipts: download the files, make a data folder, and adjust the run parameters (resolutions, domain length, etc.) at the beginning of the "main.py" file. To play around with different initial conditions, adjust the eigenvalue parameter "om" (for frequency, omega) during initialization of the distribution function.

vlasov1d2v's People

Stargazers

 avatar  avatar  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.