Skip to content

This repository contains the code for the paper "Kinon, P. L., Morandin, R. & Schulze, P. (2025): Discrete gradient methods for port-Hamiltonian differential-algebraic equations."

License

Notifications You must be signed in to change notification settings

plkinon/phdae_discrete_gradients

Repository files navigation

arXiv DOI License: MIT PyPI version Black

PHDAEDiscreteGradients

This repository contains the source code, which contains selected contributions of the paper Kinon, P. L., Morandin, R. & Schulze, P. (2025): Discrete gradient methods for port-Hamiltonian differential-algebraic equations.

Table of Contents

  1. Citation
  2. Installation
  3. Usage

Citation

If you found our project helpful or you have used it in your academic work, please consider citing it:

@misc{kinon_morandin_schulze_2025,
  title={Discrete gradient methods for port-Hamiltonian differential-algebraic equations}, 
  author={Philipp L. Kinon and Riccardo Morandin and Philipp Schulze},
  year={2025},
  eprint={2505.18810},
  archivePrefix={arXiv},
  primaryClass={math.NA},
  url={https://arxiv.org/abs/2505.18810}, 
}

and the latest Zenodo-DOI. Please see license.

Installation

The implementation of time integrators and example systems has been done in the package pydykit, which is used here.

  1. Clone this repository to your machine.

  2. Open a terminal and navigate to your local clone.

  3. Create a new virtual environment and activate it. We recommend using venv:

    python3.12 -m venv .venv
    source .venv/bin/activate
  4. Install pydykit from PyPI

pip install pydykit==0.0.6

Usage

This repo can be used in two ways:

  1. For validation:

    Extract your desired result data as .csv-file data from the results folder.

  2. For verification:

    In the terminal, with the activated environment, run your desired script:

    python scripts/*.py

    This will overwrite the correspoding results file in the results folder. For the error analysis choose the desired integration scheme in the respective script.

About

This repository contains the code for the paper "Kinon, P. L., Morandin, R. & Schulze, P. (2025): Discrete gradient methods for port-Hamiltonian differential-algebraic equations."

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages