GithubHelp home page GithubHelp logo

chaddy1004 / fplanck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnaparker/fplanck

0.0 1.0 0.0 891 KB

Numerically solve the Fokker-Planck equation in N dimensions

License: MIT License

Python 98.85% TeX 1.15%

fplanck's Introduction

Build Status

FPlanck

FPlanck is a Python library for numerically solving the Fokker-Planck partial differential equation (also known as the Smoluchowski equation) in N dimensions using a matrix numerical method:

The method is based on the paper "Physically consistent numerical solver for time-dependent Fokker-Planck equations" by V. Holubec, K. Kroy, and S. Steffenoni, available on arXiv and published in APS.

Features

  • Can specify an external potential (conservative) and force field (non-conservative) in N-dimensions
  • Solve for the steady-state probability distribution and probability currents
  • Propagate any initial probability distribution to the solution at any later time
  • Periodic and reflecting boundary conditions (can be mixed along different dimensions)

Installation

FPlanck can be installed with pip

pip install fplanck

Examples

On the left: a single particle in a titled periodic potential with periodic boundary conditions. The animation shows the time evolution of the probability distribution for the particle location. The PDF is driven in the positive direction due to the tilted potential.

On the right: a single particle in a 2D harmonic potential. The particle is initially away from the center of the harmonic well, and over time is restored to the center.

Usage

See the examples folder for how to use FPlanck.

License

FPlanck is licensed under the terms of the MIT license.


References

[1] Wikipedia contributors, "Fokker–Planck equation," Wikipedia, The Free Encyclopedia, https://en.wikipedia.org/w/index.php?title=Fokker%E2%80%93Planck_equation&oldid=906834519

[2] Holubec, V., Kroy, K. and Steffenoni, S., 2019. Physically consistent numerical solver for time-dependent Fokker-Planck equations. Physical Review E, 99(3), p.032117.

fplanck's People

Contributors

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