Metadata-Version: 2.4
Name: dtocean-hydrodynamics
Version: 4.0.1
Summary: Hydrodynamics module for the DTOcean tools
License: GPL-3.0-or-later
License-File: LICENSE.txt
Author: The DTOcean Developers
Maintainer: Mathew Topper
Maintainer-email: damm_horse@yahoo.co.uk
Requires-Python: >=3.12,<3.15
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: cma (>=4.4.1,<5.0.0)
Requires-Dist: contourpy (>=1.3.1,<2.0.0)
Requires-Dist: h5py (>=3.12.1,<4.0.0)
Requires-Dist: matplotlib (>=3.10.8,<4.0.0)
Requires-Dist: natsort (>=8.4.0,<9.0.0)
Requires-Dist: numpy (>=2.3.5,<3.0.0)
Requires-Dist: pandas (>=3.0.1,<4.0.0)
Requires-Dist: pillow (>=12.1.1,<13.0.0)
Requires-Dist: polite-config (>=3.0.0,<4.0.0)
Requires-Dist: pyopengl (>=3.1.7,<4.0.0)
Requires-Dist: pyside6 (>=6.9.0,<7.0.0)
Requires-Dist: scikit-learn (>=1.6.0,<2.0.0)
Requires-Dist: scipy (>=1.14.1,<2.0.0)
Requires-Dist: shapely (>=2.0.6,<3.0.0)
Requires-Dist: shiboken6 (>=6.9.0,<7.0.0)
Project-URL: Bug Tracker, https://github.com/DTOcean/dtocean/issues
Project-URL: Homepage, https://dtocean.github.io/dtocean
Project-URL: Repository, https://github.com/DTOcean/dtocean
Description-Content-Type: text/markdown

[![dtocean-hydrodynamics actions](https://github.com/DTOcean/dtocean/actions/workflows/test-dtocean-hydrodynamics.yml/badge.svg?branch=main)](https://github.com/DTOcean/dtocean/actions/workflows/test-dtocean-hydrodynamics.yml)
[![codecov](https://img.shields.io/codecov/c/gh/DTOcean/dtocean?token=Y3GR22fUJ8&flag=dtocean-hydrodynamics)](https://app.codecov.io/gh/DTOcean/dtocean?flags%5B0%5D=dtocean-hydrodynamics)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dtocean-hydrodynamics)

# dtocean-hydrodynamics

This package provides the Hydrodynamics design module for the DTOcean tools.
It can calculate the energy output of arrays of fixed or floating wave or tidal
ocean energy converters, including the effect of interactions. It can optimise
the position of the devices for maximum energy yield, constrained by the given
environment.

Part of the [DTOcean](https://github.com/DTOcean/dtocean) suite of tools.

## Installation

```sh
pip install dtocean-hydrodynamics
```

After installation, ensure that all the necessary data files are downloaded
using the following command:

```sh
dtocean-hydro init
```

Alternatively, if [dtocean-core] is installed, use:

```sh
dtocean init
```

## Usage

### Examples

Example scripts are available in the `examples` folder of the source code.

For tidal energy converters:

```sh
cd examples
python tidal_fixed_layout.py
```

For wave energy converters:

```sh
cd examples
python wave_fixed_layout.py
```

### Command Line Tools

A graphical user interface to the WEC analysis tool is provided. This tool is a
required pre-processing step for analysing the interactions of wave energy
converters. To get help:

```sh
dtocean-wec -h
```

Alternatively, if [dtocean-core] is installed, the GUI can be accessed using:

```sh
dtocean hydrodynamics wec
```

## Documentation

Video tutorials describing how to use the WEC simulator tool can be found on
the Data Only Greater [YouTube
Channel](https://www.youtube.com/@dataonlygreater).

## Development

Development of dtocean-hydrodynamics uses the
[Poetry](https://python-poetry.org/) dependency manager. Poetry must be
installed and available on the command line.

To install:

```sh
poetry install
```

After installation, ensure that all the necessary data files are downloaded
using the following command:

```sh
dtocean-hydro init
```

Alternatively, if [dtocean-core] is installed, use:

```sh
dtocean init
```

## Tests

A test suite is provided with the source code that uses [pytest](https://docs.pytest.org).

Install the testing dependencies:

```sh
poetry install --with test
```

Additional tests are available for the plugins to [dtocean-core] and
[dtocean-app]. Enable these tests by installing the `test-extras` group:

```sh
poetry install --with test --with test-extras
```

Run the tests:

```sh
poetry run pytest
```

Code quality can also be audited using the [ruff](https://docs.astral.sh/ruff/)
and [pyright](https://github.com/microsoft/pyright) tools. Install the
dependencies:

```sh
poetry install --with audit
```

Run the audit:

```sh
poetry run ruff
poetry run pyright src
```

## Contributing

Please see the [dtocean](https://github.com/DTOcean/dtocean) GitHub repository
for contributing guidelines.

## Credits

This package was initially created as part of the [EU DTOcean project](
https://www.dtoceanplus.eu/About-DTOceanPlus/History) by:

* Francesco Ferri at [Aalborg University](https://www.en.aau.dk/)
* Pau Mercade Ruiz at [Aalborg University](https://www.en.aau.dk/)
* Thomas Roc at IT Power (now [ITPEnergised](http://www.itpenergised.com/))
* Chris Chartrand at [Sandia National Labs](https://www.sandia.gov/)
* Jean-Francois Filipot at [France Energies Marines](https://www.france-energies-marines.org/)
* Rui Duarte at [France Energies Marines](https://www.france-energies-marines.org/)
* Mathew Topper at [TECNALIA](https://www.tecnalia.com)

It is now maintained by Mathew Topper at [Data Only Greater](
https://www.dataonlygreater.com/).

## License

[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)

[dtocean-app]: https://pypi.org/project/dtocean-app/
[dtocean-core]: https://pypi.org/project/dtocean-core/

