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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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