py-pde


Namepy-pde JSON
Version 0.38.0 PyPI version JSON
download
home_pageNone
SummaryPython package for solving partial differential equations
upload_time2024-04-04 06:55:50
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.9
licenseMIT
keywords pdes partial-differential-equations dynamical-systems
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-pde

<img src="docs/source/_images/logo.png" width="200em" align="right" />


[![PyPI version](https://badge.fury.io/py/py-pde.svg)](https://badge.fury.io/py/py-pde)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/py-pde.svg)](https://anaconda.org/conda-forge/py-pde)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml/badge.svg)](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml)
[![codecov](https://codecov.io/gh/zwicker-group/py-pde/branch/master/graph/badge.svg)](https://codecov.io/gh/zwicker-group/py-pde)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)
[![Documentation Status](https://readthedocs.org/projects/py-pde/badge/?version=latest)](https://py-pde.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.02158/status.svg)](https://doi.org/10.21105/joss.02158)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

`py-pde` is a Python package for solving partial differential equations (PDEs). 
The package provides classes for grids on which scalar and tensor fields can be
defined. The associated differential operators are computed using a
numba-compiled implementation of finite differences. This allows defining,
inspecting, and solving typical PDEs that appear for instance in the study of
dynamical systems in physics. The focus of the package lies on easy usage to
explore the behavior of PDEs. However, core computations can be compiled
transparently using numba for speed.

[Try it online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)


Installation
------------

`py-pde` is available on `pypi`, so you should be able to install it through `pip`:

```bash
pip install py-pde
```

In order to have all features of the package available, you might want to 
install the following optional packages:

```bash
pip install h5py pandas mpi4py numba-mpi
```

Moreover, `ffmpeg` needs to be installed for creating movies.

As an alternative, you can install `py-pde` through [conda](https://docs.conda.io/en/latest/)
using the [conda-forge](https://conda-forge.org/) channel:

```bash
conda install -c conda-forge py-pde
```

Installation with `conda` includes all dependencies of `py-pde`.

Usage
-----

A simple example showing the evolution of the diffusion equation in 2d:

```python
import pde

grid = pde.UnitGrid([64, 64])                 # generate grid
state = pde.ScalarField.random_uniform(grid)  # generate initial condition

eq = pde.DiffusionPDE(diffusivity=0.1)        # define the pde
result = eq.solve(state, t_range=10)          # solve the pde
result.plot()                                 # plot the resulting field
```

PDEs can also be specified by simply writing expressions of the evolution rate.
For instance, the
[Cahn-Hilliard equation](https://en.wikipedia.org/wiki/Cahn–Hilliard_equation)
can be implemented as
```python
eq = pde.PDE({'c': 'laplace(c**3 - c - laplace(c))'})
```
which can be used in place of the `DiffusionPDE` in the example above.


More information
----------------
* Tutorial notebooks in the [tutorials folder](https://github.com/zwicker-group/py-pde/tree/master/examples/tutorial)
* [Examples gallery](https://py-pde.readthedocs.io/en/latest/examples_gallery/)
  with an overview of the capabilities of the package
* The [Discussions on GitHub](https://github.com/zwicker-group/py-pde/discussions)
* [Full documentation on readthedocs](https://py-pde.readthedocs.io/)
  or as [a single PDF file](https://py-pde.readthedocs.io/_/downloads/en/latest/pdf/).
* The [paper published in the Journal of Open Source Software](https://doi.org/10.21105/joss.02158)
* [Practical tutorial on pattern formation in biological cells](https://github.com/zwicker-group/tutorial-pattern-formation-in-cells)

 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-pde",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "pdes, partial-differential-equations, dynamical-systems",
    "author": null,
    "author_email": "David Zwicker <david.zwicker@ds.mpg.de>",
    "download_url": "https://files.pythonhosted.org/packages/e0/87/590105199f6151a3f3527d5938fe3a81764871bfd45db82ea7b7fc8b0d09/py-pde-0.38.0.tar.gz",
    "platform": null,
    "description": "# py-pde\n\n<img src=\"docs/source/_images/logo.png\" width=\"200em\" align=\"right\" />\n\n\n[![PyPI version](https://badge.fury.io/py/py-pde.svg)](https://badge.fury.io/py/py-pde)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/py-pde.svg)](https://anaconda.org/conda-forge/py-pde)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml/badge.svg)](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml)\n[![codecov](https://codecov.io/gh/zwicker-group/py-pde/branch/master/graph/badge.svg)](https://codecov.io/gh/zwicker-group/py-pde)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)\n[![Documentation Status](https://readthedocs.org/projects/py-pde/badge/?version=latest)](https://py-pde.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02158/status.svg)](https://doi.org/10.21105/joss.02158)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n`py-pde` is a Python package for solving partial differential equations (PDEs). \nThe package provides classes for grids on which scalar and tensor fields can be\ndefined. The associated differential operators are computed using a\nnumba-compiled implementation of finite differences. This allows defining,\ninspecting, and solving typical PDEs that appear for instance in the study of\ndynamical systems in physics. The focus of the package lies on easy usage to\nexplore the behavior of PDEs. However, core computations can be compiled\ntransparently using numba for speed.\n\n[Try it online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)\n\n\nInstallation\n------------\n\n`py-pde` is available on `pypi`, so you should be able to install it through `pip`:\n\n```bash\npip install py-pde\n```\n\nIn order to have all features of the package available, you might want to \ninstall the following optional packages:\n\n```bash\npip install h5py pandas mpi4py numba-mpi\n```\n\nMoreover, `ffmpeg` needs to be installed for creating movies.\n\nAs an alternative, you can install `py-pde` through [conda](https://docs.conda.io/en/latest/)\nusing the [conda-forge](https://conda-forge.org/) channel:\n\n```bash\nconda install -c conda-forge py-pde\n```\n\nInstallation with `conda` includes all dependencies of `py-pde`.\n\nUsage\n-----\n\nA simple example showing the evolution of the diffusion equation in 2d:\n\n```python\nimport pde\n\ngrid = pde.UnitGrid([64, 64])                 # generate grid\nstate = pde.ScalarField.random_uniform(grid)  # generate initial condition\n\neq = pde.DiffusionPDE(diffusivity=0.1)        # define the pde\nresult = eq.solve(state, t_range=10)          # solve the pde\nresult.plot()                                 # plot the resulting field\n```\n\nPDEs can also be specified by simply writing expressions of the evolution rate.\nFor instance, the\n[Cahn-Hilliard equation](https://en.wikipedia.org/wiki/Cahn\u2013Hilliard_equation)\ncan be implemented as\n```python\neq = pde.PDE({'c': 'laplace(c**3 - c - laplace(c))'})\n```\nwhich can be used in place of the `DiffusionPDE` in the example above.\n\n\nMore information\n----------------\n* Tutorial notebooks in the [tutorials folder](https://github.com/zwicker-group/py-pde/tree/master/examples/tutorial)\n* [Examples gallery](https://py-pde.readthedocs.io/en/latest/examples_gallery/)\n  with an overview of the capabilities of the package\n* The [Discussions on GitHub](https://github.com/zwicker-group/py-pde/discussions)\n* [Full documentation on readthedocs](https://py-pde.readthedocs.io/)\n  or as [a single PDF file](https://py-pde.readthedocs.io/_/downloads/en/latest/pdf/).\n* The [paper published in the Journal of Open Source Software](https://doi.org/10.21105/joss.02158)\n* [Practical tutorial on pattern formation in biological cells](https://github.com/zwicker-group/tutorial-pattern-formation-in-cells)\n\n \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package for solving partial differential equations",
    "version": "0.38.0",
    "project_urls": {
        "documentation": "http://py-pde.readthedocs.io",
        "homepage": "https://github.com/zwicker-group/py-pde",
        "repository": "https://github.com/zwicker-group/py-pde"
    },
    "split_keywords": [
        "pdes",
        " partial-differential-equations",
        " dynamical-systems"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a3968f2f904ac2cd97ff449dceea498d886b569c941d2c428c428b754fcc9d1c",
                "md5": "5cd547a2464b655c7b72c5c828d5f1c3",
                "sha256": "f31a93880ca032d57bdf206be3b73e956c83191d37a9879c2c2b58f391e07e19"
            },
            "downloads": -1,
            "filename": "py_pde-0.38.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5cd547a2464b655c7b72c5c828d5f1c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 313330,
            "upload_time": "2024-04-04T06:55:47",
            "upload_time_iso_8601": "2024-04-04T06:55:47.229112Z",
            "url": "https://files.pythonhosted.org/packages/a3/96/8f2f904ac2cd97ff449dceea498d886b569c941d2c428c428b754fcc9d1c/py_pde-0.38.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e087590105199f6151a3f3527d5938fe3a81764871bfd45db82ea7b7fc8b0d09",
                "md5": "dcfe253157e995c1d5a7a6ac8f4b0b80",
                "sha256": "fd2cc441333b24860f14cacaed97bea14dfeb8cf0a5fcbe7a031d9e85145a6dd"
            },
            "downloads": -1,
            "filename": "py-pde-0.38.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dcfe253157e995c1d5a7a6ac8f4b0b80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 1625235,
            "upload_time": "2024-04-04T06:55:50",
            "upload_time_iso_8601": "2024-04-04T06:55:50.111986Z",
            "url": "https://files.pythonhosted.org/packages/e0/87/590105199f6151a3f3527d5938fe3a81764871bfd45db82ea7b7fc8b0d09/py-pde-0.38.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 06:55:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zwicker-group",
    "github_project": "py-pde",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "py-pde"
}
        
Elapsed time: 0.25116s