Skip to main content

Solve the Fokker-Planck equation in N dimensions

Project description

PyPi Version Conda Version tests

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-1.0.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fplanck-1.0.2-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fplanck-1.0.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fplanck-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f889965f89e9a309d775e1f184707e72245405b7a2d6bb95cdf3d9ed5b85c175
MD5 b29e0f464b8f71f4a807d8ea577beb49
BLAKE2b-256 a0beb98f7eae055af6f2139373d8e6f4401aef27c0d6e63b4821fe493052e6b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fplanck-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for fplanck-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a628473b4513722a3e82b34f06322da4e406fa50be42fb64fb0299b0720b2d8
MD5 ff7aeff545fa90bbc7d5e26bbecbee48
BLAKE2b-256 7ab98e2f76ef72d861eb9db43317e510af181d4faca70a6863e5a15f5c3a30e6

See more details on using hashes here.

Supported by

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