Skip to main content

Hamiltonian Lorenz Models

This package implements Hamiltonian Lorenz-like models, a class of low-order dynamical systems that extend the classical Lorenz-96 and Lorenz-2005 frameworks by incorporating a Hamiltonian structure. These models are designed to preserve certain physical invariants—such as energy and Casimirs—making them particularly well-suited for studying conservative dynamical systems, geophysical flows, and chaotic transport.

PyPI License

PyPI - Downloads SWH

Installation

Installation within a Python virtual environment:

python3 -m pip install hamlorenz

For more information on creating a Python virtual environment, click here. For a summary with the main steps, click here.

Features

  • Hamiltonian structure: The time evolution of the system is derived from a Hamiltonian, preserving energy exactly as in the continuous-time limit.
  • Casimir invariants: Multiple conserved quantities beyond energy, ensuring the system evolves on a constrained manifold.
  • Symplectic integrators: Optional numerical solvers designed for long-time energy and Casimir invariant preservation.
  • Lyapunov spectrum computation: Quantifies the level of chaos in the system via Lyapunov exponents.
  • Fourier-based desymmetrization: Enables translational symmetry reduction to study physical variables in a more interpretable form.
  • PDF and time series visualization: Built-in tools to analyze and visualize system statistics and dynamics.

Applications

  • Modeling barotropic dynamics or simplified atmospheric flows.
  • Testing chaos detection and prediction techniques.
  • Benchmarking conservative integration schemes.

Reference

For a full mathematical formulation and analysis of these models, see:

Fedele, Chandre, Horvat, and Žagar Hamiltonian Lorenz-like models, Physica D, Vol. 472, 134494 (2025). https://doi.org/10.1016/j.physd.2024.134494

@article{HamLorenz,
  title = {Hamiltonian Lorenz-like models},
  author = {Francesco Fedele and Cristel Chandre and Martin Horvat and Nedjeljka Žagar},
  journal = {Physica D: Nonlinear Phenomena},
  volume = {472},
  pages = {134494},
  year = {2025},
  doi = {https://doi.org/10.1016/j.physd.2024.134494},
}

Documentation & Examples

Examples can be found at Examples

The full documentation, including detailed function explanations, is available on the Wiki Page.

Metadata

Release files for HamLorenz 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HamLorenz 0.1.13
File Size Uploaded
hamlorenz-0.1.13.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HamLorenz 0.1.13
File Interpreter ABI Platform
hamlorenz-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / hamlorenz-0.1.13.tar.gz

Download URL hamlorenz-0.1.13.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b528ba14caf74a4c4847f6937ab1299653ce90c2a4a597a7c239c85fb1d6c6fa
BLAKE2b-256 checksum
How to use checksums
e5f2653e616b7887d9e9ea63d83d337a342d94834b268a4885f5217fe7d057e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / hamlorenz-0.1.13-py3-none-any.whl

Download URL hamlorenz-0.1.13-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43b159e66cf2feeeca21ab0874b6dc8758038569dc3f1c55ae1f764c116b6747
BLAKE2b-256 checksum
How to use checksums
dbcb14dd8fcecda81042294063facef75ccb9d9a41d7d1a9227e0a2fc7fe9ba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page