Skip to main content

Performance pOlar Exchange forMat

Project description

POEM

Performance pOlar Exchange forMat

PyPI - Status PyPI - License

C++ PyPI - Python Version PyPI version

C++ library and Python bindings defining an exchange format for performance polar in marine engineering, wind assisted vessels performance prediction, weather routing optimisation, embedded control systems, training simulators.

Links

Introduction

  • what is a VPP
  • what is a digital twin
  • what is a performance polar
  • the different type of polars
  • how a polar is used

POEM in a nuttshel

  • why poem
  • what is poem
  • is poem for me

Python interface

The pypoem package that wraps poem is pypoem. It does not currently give acces to the whole C++ API but feature are progressively ported to Python.

Requirements

pypoem is tested with Python version >= 3.9.

Install from Pypi

pypoem is available on Pypi, so it can be installed as:

$ pip install pypoem

Install from sources

pypoem relies on scikit-build-core for the packaging. Source installation is realised by running the following command int the repository root directory:

$ pip install .

Basic usage

Here is a simple example of the creation of a MPPP Polar with one PolarTable and its writing to a netCDF file compliant with POEM file format thanks the of POEM library.

from pypoem import pypoem
import numpy as np

# Declaring three dimensions
STW = pypoem.make_dimension("STW", "kt", "Speed Through Water")
TWS = pypoem.make_dimension("TWS", "kt", "True Wind Speed")
TWA = pypoem.make_dimension("TWA", "deg", "True Wind Angle")

# Creating a DimensionSet
dimension_set = pypoem.make_dimension_set((STW, TWS, TWA))

# Creating a DImensionGrid and filling the dimensions with values
dimension_grid = pypoem.make_dimension_grid(dimension_set)
dimension_grid.set_values("STW", np.linspace(8, 20, 13))
dimension_grid.set_values("TWS", np.linspace(0, 40, 9))
dimension_grid.set_values("TWA", np.linspace(0, 180, 13))

# Creating a Polar of type MPPP (Motor only Power Prediction)
polar_MPPP = pypoem.make_polar("MPPP", pypoem.MPPP, dimension_grid)

# Creating a PolarTable from the MPPP Polar
BrakePower = polar_MPPP.create_polar_table_double("BrakePower", "kW", "Brake Power", 
                                                  pypoem.POEM_DOUBLE)

# Generating a dummy NDArray with ones and the same shape as the DimensionGrid
# Note that NDArrays must be arranged in a row major order with respect the DimensionSet
# of the DimensionGrid. If you think in terms of nested for loop with Dimensions, 
# the last Dimension (here TWA) is moving fastest (most inner loop).
brake_power_data = np.ones(dimension_grid.shape())

# Setting the BrakePower PolarTable with the array
BrakePower.set_values(brake_power_data)
assert(np.all(brake_power_data == BrakePower.array()))

# Writing to netCDF
pypoem.to_netcdf(polar_MPPP, "polar_basic.nc")
  • Reading a POEM file
  • More complex example

Work In Progress

Integrating the C++ library

Work In Progress

Requirements

Work In Progress

CMake

Work In Progress

Basic usage

Work In Progress

Current limitations

POEM has been primarily developed under Linux OS. Port to other platforms is expected to come in the future but is not a current top priority. Contributors for a Windows port are welcome :)

Latest standard is available at: https://dice-poem.readthedocs.io/en/latest/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pypoem-1.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pypoem-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pypoem-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pypoem-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pypoem-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file pypoem-1.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b69d3da2a44352065f9135b45fca0a4738797c9dc607827cb01fba17d8848ae
MD5 712ee4dfe2430d0c1eb3c8f473d269dc
BLAKE2b-256 5266c5ba4442e47cd7d6cda256aee93be941f0260bb2415861eff590f7ade8b3

See more details on using hashes here.

File details

Details for the file pypoem-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e973242653d4b4de806bad615e884e04c47596fe5fe1213e409fca47058fd269
MD5 aec99b96139ad5349576804fc8f40610
BLAKE2b-256 e539ff15380a5bf4d1a78af6570b7a46eedb67a0e738502759bc4cc36b7ab5a4

See more details on using hashes here.

File details

Details for the file pypoem-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4c42a9a1e36e3bee46a9fc6b6b74401fcee39977b40b1cb8acba57ae25219b8
MD5 82ece50643444889f8a79541c08e2882
BLAKE2b-256 50aa728457d2e15fe0028780b48433db18ed38da7a116d3dd1fc9bdac57404d2

See more details on using hashes here.

File details

Details for the file pypoem-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d80863ae27e674099a858f4786d3dc891a00641d91c6c7bbc3687d3702bd4b4
MD5 930fdd24873d89c845e12567e6905d8d
BLAKE2b-256 201ff0018c2558f8f1b92dff8595602cba47c621b171fa5ed4568ec7c563848a

See more details on using hashes here.

File details

Details for the file pypoem-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d071fbddd4b079418c13ed6cde2a6913b764533423e6d26a6938f13d91108dab
MD5 e0aaecac9634f7e40849fb9299cdc077
BLAKE2b-256 2067fff449d213bbf6bab78dd8adc347b1da95f188b73c0d5fe2ebd242ee0d9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page