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.6.2-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.6.2-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.6.2-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.6.2-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.6.2-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.6.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pypoem-1.6.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 373e0ea89e2d76efcd6fe14d4824ee8ec08a1b122f51aa9951cba5ac13c22ce0
MD5 1f47c443c33028fcde728c36959bc684
BLAKE2b-256 21346480801b547e0a83479c22f92dc92139ee1f191cc15de6beeaff39ee4bec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypoem-1.6.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f153b93b4352cdd3f75924c97996df30b61796491221d524a0419e1b73c85210
MD5 169246f89a1b8477a8c3167dd24c8ed8
BLAKE2b-256 a7dabd9c0650028221de47324889afd2ef2e20f6e39e50f2409472a01b89cff8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypoem-1.6.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97fef770e1380b6b426eb3297be5ffd80d54ce5af2a88f44986af6f12c3d3898
MD5 fc104d5f8d4d7e7edc7dc92e99765cd4
BLAKE2b-256 0c53040a56b10d9b480691da577fa65f9fe2ab1f744bcf18d35c87be37d95334

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypoem-1.6.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 265ede262efccc0c7abe7d7edb1105fe30185d9da1956ee5ea1d10d0bf81ae0d
MD5 e9788001bc724ad0cd2bcd9613980c16
BLAKE2b-256 4d0f1414d3f8e145a90becfa565b8a04e4b29513e4e384f4479d9765c51a41ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pypoem-1.6.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 97d45e93d177f00194009db9f4e5d300ec76e22e3bc71f56c4602247ae683265
MD5 f6ca585ca003b4b805a934391cc2a7e1
BLAKE2b-256 e0878e69ac6e429621663d249d16709d7c1da2a8233f13a16f31554c823dcd35

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