Skip to content

plkinon/phdae_discrete_gradients

Repository files navigation

DOI License: MIT PyPI version Black

PHDAEDiscreteGradients

This repository contains the source code for the open-access journal article 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:

@article{kinon_morandin_schulze_2026,
  title   = {Discrete gradient methods for port-Hamiltonian differential-algebraic equations}, 
  author  = {Philipp L. Kinon and Riccardo Morandin and Philipp Schulze},
  journal = {Applied Numerical Mathematics},
  year    = {2026},
  volume  = {223},
  pages   = {45-75},
  issn    = {0168-9274},
  doi     = {https://doi.org/10.1016/j.apnum.2025.12.006},
}

and the latest Zenodo-DOI. Please see the 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

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

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages