Skip to content

Python module for the evaluation of probability densities and exit rates in a tubular ensemble

License

Notifications You must be signed in to change notification settings

juliankappler/PyTubular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTubular: Python module for the evaluation of probability densities and exit rates in the tubular ensemble

About

This module contains both sympy-based symbolic and numpy-based numerical tools for one-dimensional Fokker-Planck dynamics in a small time-dependent domain, as derived in Ref. [1].

More specifically, for a given drift $a(x,t)$ and diffusivity $D(x,t)$ we consider the Fokker-Planck equation

$$\partial_t P = - \partial_x \left( a P\right) + \partial_x^2 \left(D P\right),$$

on a time-dependent domain $x \in [\varphi(t)-R(t), \varphi(t) + R(t)]$, where $\varphi(t)$ is the instantaneous domain center and $2R(t)$ the instantaneous domain diameter. We refer to the domain center also as reference path, and the time-dependent domain as tube.

We consider absorbing boundary conditions

$$P(\varphi(t)-R(t),t) = P(\varphi(t)+R(t),t) = 0$$

for the density $P(x,t)$. Due to the absorbing boundary conditions, the total density within the domain, given by $$P(t) = \int_{\varphi(t)-R(t)}^{\varphi(t)+R(t)}P(x,t)dx,$$ is a monotonously decaying function of time.

The python module PyTubular implements perturbative analytical results for both the decay rate of the density, $$\alpha := - \frac{\partial_t P(t)}{P(t)},$$ as well as the normalized density within the domain, $$P^N(x,t) := \frac{ P(x,t)}{P(t)}.$$

To indicate that $P$, $\alpha$, and $P^N$ depend on $\varphi$, $R$, we also write $\alpha \equiv \alpha_R^{\varphi}$, $P \equiv P_R^{\varphi}$, $P^N \equiv P_R^{\varphi,N}$.

Note that if the diffusivity is independent of position and time, then the theory implemented here reduces to the results of Ref. [2].

Examples

PyTubular comes with several illustrative example notebooks, which are located in the subfolder examples/. In particular, the examples are

Installation

PyTubular requires sympy and numpy, the most probable tube example furthermore uses the cma package for minimizing multidimensional functions. To install these requirements as well as PyTubular, you can run the following commands.

>> git clone https://github.com/juliankappler/PyTubular.git
>> cd PyTubular
>> pip install -r requirements.txt
>> pip install .

References

[1] Sojourn probabilities in tubes and pathwise irreversibility for Itô processes. J. Kappler, M. E. Cates, R. Adhikari. arXiv: 2009.04250.

[2] Stochastic action for tubes: Connecting path probabilities to measurement. J. Kappler and R. Adhikari. Physical Review Research vol. 2, p. 023407, 2020. DOI: 10.1103/PhysRevResearch.2.023407.

About

Python module for the evaluation of probability densities and exit rates in a tubular ensemble

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages