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.15

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.15
File Size Uploaded Provenance Actions
hamlorenz-0.1.15.tar.gz 11.4 kB Without provenance Details for hamlorenz-0.1.15.tar.gz

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / hamlorenz-0.1.15.tar.gz

Download URL hamlorenz-0.1.15.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f09efa2e87647652e131f2d3f871d322fff7f59aeb3c2e51bc29483a50ca0d2c
BLAKE2b-256 checksum
How to use checksums
29c6f9d5bffdfeccd1b9f312d9195ce480beb7d92ec01ce5560ebb735bb1283d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

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

Download URL hamlorenz-0.1.15-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1812b93ca1f9c3f79a4b48eb052c60a59478115444a3085636ec4d7d89fbece1
BLAKE2b-256 checksum
How to use checksums
0f363a167e9e02102c7149b6f15551d76ab89700c8b8e7d089ec38e8a7e5e28c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Security for HamLorenz 0.1.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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