Git Product home page Git Product logo

ef_python's Introduction

Ef is a software for simulation of charged particles dynamics. It's primary areas of application are accelerator science and plasma physics.

About ef

Examples


Single particle in uniform magnetic field;       Widening of a ribbon beam during the propagation



Ribbon beam in uniform magnetic field



Potential of electron beam inside conducting tube;       Volt-Ampere characteristic of a planar diode

Physics

Motivation

Ef focuses on non-relativistic energies. Particular emphasis is placed on low-energy beams, such that can be found in ion sources and electron guns. A motivation behind the program, the scope and the general goals are discussed here.

Particle-in-cell

Particles dynamics is traced under action of external electromagnetic fields. Particle self-interaction is taken into account with particle-in-cell method. Detailed description of the mathematical model can be found here.

CAD plans

Attention is given to integration with CAD software to allow for simulation of complex real-life experimental setups. An experimental plugin for FreeCAD exists.

Versions

Ef is a free software -- it's source code is open and avaible for modification and redistribution. Python (this one) and C++ versions are available. Python version is easy to install and experiment with. It's speed should be sufficient to perform example computations and small-scale simulations but for large-scale simulations C++ version is the choice.

Status

Current features are described in detail in appropriate wiki sections, as well as installation procedure. Some usage examples are also given.

For users

Install

It's advisable to use a virtual python environment:

virtualenv --python=python3 ef_venv
. ef_venv/bin/activate

EF is not available in pypi yet, install from github:

pip install 'git+https://github.com/epicf/ef_python.git'

Run

Start simulation defined by my_config.conf:

ef my_config.conf

Continue simulation from hdf5 file my_0005.h5:

ef my_0005.h5

For developers

Install for development

git clone https://github.com/epicf/ef_python.git
cd ef_python
virtualenv --python=python3 venv
. venv/bin/activate
pip install -r requirements.txt
pip install -e .

Test

Install pytest:

pip install pytest pytest-mock

Run fast unittests:

pytest

Run more tests (including slower examples)

pytest -m 'not (slow)'

Run every test (including slow simulation examples)

pytest -m ''

Run tests with tox

More python versions and test types.

  • Install tox: pip install tox
  • Run tox

Can also run in parallel with detox.

Run

Start simulation defined by my_config.conf:

ef my_config.conf

Continue simulation from hdf5 file my_0005.h5:

ef my_0005.h5

ef_python's People

Contributors

fizmat avatar dumbman avatar noooway 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.