Loading the performance map¶
Performance map objects (Permaps) in Costa are represented as an extension of the
pandas DataFrame structure. They can therefore benefit from
a wide variety of methods to process and arrange the data.
For the fill method to work properly,
the DataFrame representing the performance table must have a specific format.
There are two ways to obtain an adequate DataFrame.
One way is to format it yourself through Python scripting using pandas methods.
The other way is to format the performance file so that it can be correctly
interpreted by the build_heating_permap and
build_cooling_permap methods.
These methods will in turn translate the file into an adequate DataFrame.
Format the DataFrame¶
The performance map DataFrame structure must obey the two following rules:
- Table inputs constitute the DataFrame index.
If there are multiple quantities involved (as it is usually the case), a
MultiIndexmust be used. (See indexing with a MultiIndex for more info.) Each level in the index must be named after the corresponding quantity, following the index names convention.- Table outputs constitute the DataFrame columns.
Each column correspond to a specific quantity, like the index levels. The columns values represent the performance (the output) values, and each column name represent the name of the associated output quantity (see column names convention).
Consider for example a performance map with two input quantities: the room air temperature \(T_{dbr}\) and the outdoor air temperature \(T_{dbo}\). Let’s say that there are three entries for \(T_{dbr}\) and four entries for \(T_{dbo}\):
\(T_{dbr}\) entries: 18.3 °C, 21.1 °C and 23.9 °C
\(T_{dbo}\) entries: –20.6 °C, –10 °C, 0 °C and 15 °C
The performance map DataFrame would thus have \(3 \times 4 = 12\) rows and look like this:
heating capacity power
Tdbr Tdbo
18.3 -20.6 4.52 2.20
-10.0 5.23 2.18
0.0 5.88 2.11
15.0 7.60 1.68
21.1 -20.6 4.41 2.24
-10.0 5.10 2.22
0.0 5.74 2.15
15.0 7.42 1.71
23.9 -20.6 4.19 2.32
-10.0 4.85 2.30
0.0 5.45 2.23
15.0 7.05 1.78
Note
The order of the index levels and the columns doesn’t matter, as long as their names follow the naming conventions.
Name |
Quantity |
|---|---|
|
Room air dry-bulb temperature |
|
Outdoor air dry-bulb temperature |
|
Room air wet-bulb temperature 1 |
|
Indoor unit air flow rate |
|
Compressor frequency |
Name |
Quantity |
|---|---|
|
Heat pump total power input |
|
Heat pump capacity |
|
Heat pump coefficient of performance |
Format the input file¶
If you’d rather not use pandas to get an adequate DataFrame, there is a plan B:
you can use a tool of your choice to create a performance map file that can be
interpreted by the methods build_<mode>_permap
(see quick tutorial).
However, as of now the diversity of acceptable file formats is pretty limited,
so this method offers less flexibility.
The required file formats for each operating mode
are described in the following sections.
Heating input file¶
In heating mode, only files with indoor and outdoor dry-bulb temperatures
inputs are accepted—this is the most common format in manufacturer datasheets.
To work with the method build_heating_permap,
the performance table from the example above has to be formatted this way:
Tdbr 18.3 21.1 23.9
Tdbo TC IP TC IP TC IP
-20.6 4.52 2.20 4.41 2.24 4.19 2.32
-10.0 5.23 2.18 5.10 2.22 4.85 2.30
0.0 5.88 2.11 5.74 2.15 5.45 2.23
15.0 7.60 1.68 7.42 1.71 7.05 1.78
Note
Only the numerical data (in red) actually matters, the labels are not interpreted. Thus if you format this way:
Tdbo -20.6 -10.0 0.0 15.0
Tdbr TC IP TC IP TC IP TC IP
18.3 4.52 2.20 5.23 2.18 5.88 2.11 7.60 1.68
21.1 4.41 2.24 5.10 2.22 5.74 2.15 7.42 1.71
23.9 4.19 2.32 4.85 2.30 5.45 2.23 7.05 1.78
the (room) temperatures 18.3 °C, 21.1 °C and 23.9 °C will be interpreted as outdoor temperatures values. This also means that you can replace the cells in black with anything you want, since they are discarded.
Cooling input file¶
The cooling mode file format is very similar to the one in heating mode,
with two notable exceptions: room air wet-bulb temperatures (\(T_{wbr}\))
are also provided, and there is an additional “sensible heat capacity” (SHC)
column. To work with the method build_cooling_permap,
the cooling performance table must be formatted in this way:
Tdbr 21.1 26.7 32.2
Twbr 15.6 19.4 22.8
Tdbo TC SHC IP TC SHC IP TC SHC IP
15.0 3.25 2.71 0.41 3.70 3.18 0.42 4.14 3.37 0.44
25.0 3.49 2.89 0.63 3.97 3.41 0.64 4.44 3.61 0.65
30.6 3.30 2.73 0.70 3.75 3.22 0.71 4.20 3.42 0.73
40.0 2.62 2.29 0.72 2.97 2.70 0.74 3.33 2.87 0.75
Note that this format omit some dry-bulb / wet-bulb combinations
(e.g. there is no data for
\(T_{dbr} =\) 21.1 °C and \(T_{wbr} =\) 19.4 °C),
but this is how manufacturers usually provide cooling performance data. Since
Costa provides a way to determine the sensible heat ratio based on the
conditions (see using default corrections),
the SHC column is dropped by the method
build_cooling_permap.
Footnotes
- 1
The room air wet-bulb temperature should only be included in cooling performance maps, as it does not have any impact on performance in heating.