Skip to main content

Impute missing values in a performance table

Project description

Costa: populate incomplete performance tables

Costa (Complete and supplement performance tables) is a Python package whose purpose is to fill incomplete performance maps using correction curves. It is meant to create variable capacity air-to-air heat pumps performance maps that can be used by the Type 3254 in TRNSYS.

With Costa, the whole process of extending and formatting performance maps becomes quite straightforward, see basic usage.

Features

  • Performance map manipulation using pandas DataFrames
  • Extend performance maps using custom correction curves
  • Automatic normalization
  • Rated values adjustments
  • Write performance maps in the format required by the Type 3254

Incoming features

  • Plot slices of the performance map
  • Use basic functionalities with a user interface

Installation

Install Costa with pip by running

$ pip install costa

Basic usage

Import the package and load the (incomplete) performance map into a DataFrame

import costa
hpm = costa.build_heating_permap("heating-performance-map.dat")

Specify the entries of the variable you want to extend, e.g. the frequency

# Add entries 0.1, 0.2, ..., 1.0
hpm.pm.entries['freq'] = np.arange(1, 1.1, 0.1)

Specify the operating mode (required to use the appropriate corrections)

hpm.pm.mode = 'heating'

Fill the missing performance values for the specified frequencies

hpm_full = hpm.pm.fill()

Note: The Type 3254 uses normalized performance maps. Normalization can be carried out with the normalize method, or directly through the fill method using the rated values of any two quantities amongst capacity, power and COP. For example, with a rated capacity of 4.69 W and a rated power of 1.01 W,

rated_values = pd.DataFrame({'capacity': [4.69], 'power': [1.01]})
hpm_full = hpm.pm.fill(norm=rated_values)

Extend the operating frequency range to [0,1]

hpm_full.pm.ranges['freq'] = [0, 1]

And finally write the full performance map

hpm_full.pm.write("permap-heating.dat")

Now the generated file permap-heating.dat should be compatible with the Type 3254.

Support

If you are having problems, please open an issue in the issue tracker and submit a minimal working example to highlight what is not working.

Project details


Download files

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

Source Distribution

costa-0.0.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

costa-0.0.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file costa-0.0.1.tar.gz.

File metadata

  • Download URL: costa-0.0.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for costa-0.0.1.tar.gz
Algorithm Hash digest
SHA256 97e7d6db544b8d0cf5b47170bd387d082e23066c391173b0d7d66b908d221bb3
MD5 8daba176b251a344255163bce35aa131
BLAKE2b-256 27a301aed0e4d299b4116b9eb24e2ec9acb2bea65aad3bb572046de6aedb2033

See more details on using hashes here.

File details

Details for the file costa-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: costa-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.1

File hashes

Hashes for costa-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8119250a6eb1f1b7a1a591e21a1b63a1562b24c16a455b6550a6959a916c10be
MD5 811d9863ddfa65380a8edb2170f83b01
BLAKE2b-256 8e8bde0f6df535be4adfb2b3b5540006adec0231c306cbf5e924322663152520

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