Giter Site home page Giter Site logo

symplectic-guiding-center's Introduction

Symplectic Guiding Center

Integrator written in c++ for numerical simulations of physical systems, focused on the variational symplectic integration of the guiding center.

Other interators/system are implemented/possible.

warning

This code is not optimized and very, very, very slow. Don't try or think to use it in a production environment.

Documentation

For a theoretical background and an explanation of the different integrators, please read the thesis (doc/thesis.pdf) or the comments inside each class.

Prerequisites

  • Boost and Boost.log
  • gsl
  • eigen3

Compile and run

Make sure you have a valid configuration (config.h) file (see the following section)

  make
  ./bin/symplectic

if you don't have make, just use:

  g++ -DBOOST_LOG_DYN_LINK -Wall -o bin/symplectic symplectic.cpp -lgsl -lgslcblas -lboost_log -lboost_log_setup -lpthread -lboost_thread

Configuration

See utils/configInterface.h for the structure of a valid configuration.

A valid config class must be put in ./config.h. To start, just copy an example configuration in examples/ to ./config.h.

The main configurable entities are Integrator (config variables "integrator", "auxiliary_integrator", "first_guess_integrator"), System (config variable "system") and EMField (config variable "emField").

Valid integrators:

  • RK4 (explicit)
  • VariationalMidpoint (implicit)
  • SymplecticExplicit1 (explicit, system must be "GuidingCenter", DIM must be 8)
  • SymplecticExplicit2 (explicit, system must be "GuidingCenter", DIM must be 8)
  • SymplecticExplicit3 (explicit, system must be "GuidingCenter", DIM must be 8)
  • SymplecticExplicit4 (explicit, system must be "GuidingCenter", DIM must be 8)
  • SymplecticImplicit1 (implicit, system must be "GuidingCenter", DIM must be 8)
  • symplecticSemiexplicitQin (implicit, system must be "GuidingCenter", DIM must be 8)
  • SymplecticImplicit3D (implicit, system must be "GuidingCenter", DIM must be 6)

Valid systems

  • GuidingCenter

Valid EM fields

  • Tokamak
  • ForceFree
  • TwoDimField

symplectic-guiding-center's People

Contributors

zontafil avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

lstagner

symplectic-guiding-center's Issues

bug magnetic field expression tokamak case

Thank you very much for making the code available.

It seems that the expression for the y component of the magnetic field for the tokamak case is not consistent with the vector potential and the pdf documentation.

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.