Skip to main content

Solve the Fokker-Planck equation in N dimensions

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fplanck-0.2.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

fplanck-0.2.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file fplanck-0.2.1.tar.gz.

File metadata

  • Download URL: fplanck-0.2.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.8.2

File hashes

Hashes for fplanck-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d07e5d417dcfa0a05028aa99a82a4aa8f078ad6fbb5d2117c7e14b777f1a04b1
MD5 2f505e13b9f8de8464a9b14c344000bb
BLAKE2b-256 002c817b241e698a75e38c205d2c3f2371a4b8ededb1b315d7850cd0446b965f

See more details on using hashes here.

File details

Details for the file fplanck-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fplanck-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.8.2

File hashes

Hashes for fplanck-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b74c9da8a27e892eb697e211cf61386040f777bb0ef81b0f0444e893c615e49
MD5 115ba508e73bf55036e7265624723e2e
BLAKE2b-256 6b151732ec579d411d8a849f02d444af0a7b4814abf49a00491cb627fa2613f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page