Straightforward numerical integration of ODE systems from SymPy.
Project description
pyodesys
========
.. image:: http://hera.physchem.kth.se:9090/api/badges/bjodah/pyodesys/status.svg
:target: http://hera.physchem.kth.se:9090/bjodah/pyodesys
:alt: Build status
.. image:: https://img.shields.io/pypi/v/pyodesys.svg
:target: https://pypi.python.org/pypi/pyodesys
:alt: PyPI version
.. image:: https://img.shields.io/badge/python-2.7,3.4,3.5-blue.svg
:target: https://www.python.org/
:alt: Python version
.. image:: https://img.shields.io/pypi/l/pyodesys.svg
:target: https://github.com/bjodah/pyodesys/blob/master/LICENSE
:alt: License
.. image:: http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat
:target: http://hera.physchem.kth.se/~pyodesys/benchmarks
:alt: airspeedvelocity
.. image:: http://hera.physchem.kth.se/~pyodesys/branches/master/htmlcov/coverage.svg
:target: http://hera.physchem.kth.se/~pyodesys/branches/master/htmlcov
:alt: coverage
`pyodesys <https://github.com/bjodah/pyodesys>`_ provides a straightforward way
of numerically integrating systems of ordinary differential equations. It unifies
the interface of several libraries. It also provides a convenience class for
representing and integrating ODE systems defined by `SymPy <http://www.sympy.org>`_
expressions.
The numerical integration is perfomed using eiher:
- `scipy.integrate.ode <http://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html>`_
- `pygslodeiv2 <https://github.com/bjodah/pygslodeiv2>`_
- `pyodeint <https://github.com/bjodah/pyodeint>`_
- `pycvodes <https://github.com/bjodah/pycvodes>`_
Note that implicit steppers which require a user supplied
callback for calculating the jacobian is provided automatically by pyodesys.
Documentation
-------------
Autogenerated API documentation for latest stable release is found here:
`<https://pythonhosted.org/pyodesys>`_
(and development docs for the current master branch are found here:
`<http://hera.physchem.kth.se/~pyodesys/branches/master/html>`_).
Installation
------------
Simplest way to install pyodesys and its (optional) dependencies is to use the `conda package manager <http://conda.pydata.org/docs/>`_:
::
$ conda install -c bjodah pyodesys pytest
$ python -m pytest --pyargs pyodesys
alternatively you may also use `pip`:
::
$ python -m pip install --user pyodesys[all]
see `setup.py`_ for optional requirements.
Source distribution is available here:
`<https://pypi.python.org/pypi/pyodesys>`_
Example
-------
The classic van der Pol oscillator (see `examples/van_der_pol.py <examples/van_der_pol.py>`_)
.. code:: python
>>> from pyodesys.symbolic import SymbolicSys
>>> def f(t, y, p):
... return [y[1], -y[0] + p[0]*y[1]*(1 - y[0]**2)]
...
>>> odesys = SymbolicSys.from_callback(f, 2, 1)
>>> xout, yout, info = odesys.integrate(10, [1, 0], [1], integrator='odeint')
>>> _ = odesys.plot_result()
>>> import matplotlib.pyplot as plt; plt.show() # doctest: +SKIP
.. image:: https://raw.githubusercontent.com/bjodah/pyodesys/master/examples/van_der_pol.png
for more examples, see `examples/ <https://github.com/bjodah/pyodesys/tree/master/examples>`_, and rendered jupyter notebooks here:
`<http://hera.physchem.kth.se/~pyodesys/branches/master/examples>`_
License
-------
The source code is Open Source and is released under the simplified 2-clause BSD license. See `LICENSE <LICENSE>`_ for further details.
Contributors are welcome to suggest improvements at https://github.com/bjodah/pyodesys
Author
------
Björn I. Dahlgren, contact:
- gmail address: bjodah
- kth.se address: bda
========
.. image:: http://hera.physchem.kth.se:9090/api/badges/bjodah/pyodesys/status.svg
:target: http://hera.physchem.kth.se:9090/bjodah/pyodesys
:alt: Build status
.. image:: https://img.shields.io/pypi/v/pyodesys.svg
:target: https://pypi.python.org/pypi/pyodesys
:alt: PyPI version
.. image:: https://img.shields.io/badge/python-2.7,3.4,3.5-blue.svg
:target: https://www.python.org/
:alt: Python version
.. image:: https://img.shields.io/pypi/l/pyodesys.svg
:target: https://github.com/bjodah/pyodesys/blob/master/LICENSE
:alt: License
.. image:: http://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat
:target: http://hera.physchem.kth.se/~pyodesys/benchmarks
:alt: airspeedvelocity
.. image:: http://hera.physchem.kth.se/~pyodesys/branches/master/htmlcov/coverage.svg
:target: http://hera.physchem.kth.se/~pyodesys/branches/master/htmlcov
:alt: coverage
`pyodesys <https://github.com/bjodah/pyodesys>`_ provides a straightforward way
of numerically integrating systems of ordinary differential equations. It unifies
the interface of several libraries. It also provides a convenience class for
representing and integrating ODE systems defined by `SymPy <http://www.sympy.org>`_
expressions.
The numerical integration is perfomed using eiher:
- `scipy.integrate.ode <http://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html>`_
- `pygslodeiv2 <https://github.com/bjodah/pygslodeiv2>`_
- `pyodeint <https://github.com/bjodah/pyodeint>`_
- `pycvodes <https://github.com/bjodah/pycvodes>`_
Note that implicit steppers which require a user supplied
callback for calculating the jacobian is provided automatically by pyodesys.
Documentation
-------------
Autogenerated API documentation for latest stable release is found here:
`<https://pythonhosted.org/pyodesys>`_
(and development docs for the current master branch are found here:
`<http://hera.physchem.kth.se/~pyodesys/branches/master/html>`_).
Installation
------------
Simplest way to install pyodesys and its (optional) dependencies is to use the `conda package manager <http://conda.pydata.org/docs/>`_:
::
$ conda install -c bjodah pyodesys pytest
$ python -m pytest --pyargs pyodesys
alternatively you may also use `pip`:
::
$ python -m pip install --user pyodesys[all]
see `setup.py`_ for optional requirements.
Source distribution is available here:
`<https://pypi.python.org/pypi/pyodesys>`_
Example
-------
The classic van der Pol oscillator (see `examples/van_der_pol.py <examples/van_der_pol.py>`_)
.. code:: python
>>> from pyodesys.symbolic import SymbolicSys
>>> def f(t, y, p):
... return [y[1], -y[0] + p[0]*y[1]*(1 - y[0]**2)]
...
>>> odesys = SymbolicSys.from_callback(f, 2, 1)
>>> xout, yout, info = odesys.integrate(10, [1, 0], [1], integrator='odeint')
>>> _ = odesys.plot_result()
>>> import matplotlib.pyplot as plt; plt.show() # doctest: +SKIP
.. image:: https://raw.githubusercontent.com/bjodah/pyodesys/master/examples/van_der_pol.png
for more examples, see `examples/ <https://github.com/bjodah/pyodesys/tree/master/examples>`_, and rendered jupyter notebooks here:
`<http://hera.physchem.kth.se/~pyodesys/branches/master/examples>`_
License
-------
The source code is Open Source and is released under the simplified 2-clause BSD license. See `LICENSE <LICENSE>`_ for further details.
Contributors are welcome to suggest improvements at https://github.com/bjodah/pyodesys
Author
------
Björn I. Dahlgren, contact:
- gmail address: bjodah
- kth.se address: bda
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyodesys-0.5.3.tar.gz
(27.0 kB
view details)
File details
Details for the file pyodesys-0.5.3.tar.gz
.
File metadata
- Download URL: pyodesys-0.5.3.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c8e3a85eed0dd191fd5b1fb514175f12387ea9f81a4c5b5d0642b01cd700d1 |
|
MD5 | 6d6218f918558bd31e272a10964042a9 |
|
BLAKE2b-256 | 3643c0217177b9600acfe7746266cac9768c7f5598440b9dac8ffb23376c6196 |