Giter Site home page Giter Site logo

lmixing's Introduction

Lmixing

A Python module to calculate the rate coefficient for angular momentum mixing of Rydberg atoms in collisions with protons in astrophysical plasmas

Distant collisions of protons change the angular momentum of highly excited hydrogenic Rydberg atoms with no energy transfer in a reaction: p+ + H(n, ℓ) → p+ + H(n,ℓ'). This process is very efficient and it is responsible for creating the statistical equilibrium distribution of angular momentum states within the hydrogenic energy shell.

This module calculates the rate coefficients by using exact quantum mechanical results for low and moderate principal quantum numbers n, and by using a semiclassical approximation when the direct calculation is not practical.

In order to avoid truncation error and loss of precision due to subtraction of near-equal terms, the code exploits the unlimited size integer Python type to calculate the Wigner's 6-j symbols, and the mpmath package to extend the floating point precision in calculating high order polynomials.

Installation

This module requires Pyhton 3.x and depends on scipy for dealing with physical constants and unit conversion, and on mpmath for extending the precision of floating point numbers beyond hardware capabilities.

You can download, clone and install the source from GitHub

$ git clone https://github.com/vrinceanu/Lmixing.git
$ cd Lmixing
$ python setup.py install --user

If you wish to know more in detail what git is and what you can do with it, the github help page has all the references needed.

Usage

As a quick example, we calculate the rate coefficient for a specific case and compare two approximations:

>>> from Lmixing.rates import rate
>>> n = 10; L = 1; T = 10; ne= 100
>>> (rate(n,L,T,ne,method='semiclassical'), rate(n,L,T,ne,method='quantum'))

Or run some tests:

python3 examples/tests.py

Documentation

Citing Lmixing: DOI

lmixing's People

Contributors

vrinceanu avatar

Watchers

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