Skip to main content

Collection of TESPy heat pump models and additional Streamlit dashboard.

Project description

Streamlit App

heatpumps

Steady-state simulation of design and partload operation of a wide collection of heat pump topologies.

Key Features

  • Steady-state simulation of design and partload operation based on TESPy
  • Parametrization and result visualisation through a Streamlit dashboard
  • Industry standard, as well as topologies still in research and developement, supported
  • Sub- and transcritical processes
  • Wide variety of refrigerants due to the integration of CoolProp

Installation

Installation of heatpumps is very easy using pip. If you are using Miniforge, you can create and activate a clean environment like this:

conda create -n my_new_env python=3.11
conda activate my_new_env

Then simply install heatpumps with the following command:

python -m pip install heatpumps

If you want to use an editable version of the package, e.g. if you want to contribute to the project and test your own changes, skip the command above, clone the repository from GitHub and use this one:

python -m pip install -e .[dev]

The addition of the "-e" flag allows for changes to directly have an effect and adding "[dev]" to the installation path tells pip to also install the optional dependencies for developers.

Run the dashboard

The heatpumps package comes with a command to run the dashboard directly from your terminal. Running the dashboard is as easy as typing the following command:

heatpumps-dashboard

Using the heat pump model classes

To use the heat pump model classes in your own scripts, you can import them as follows:

from heatpumps.models import HeatPumpSimple, HeatPumpEconIHX
from heatpumps.parameters import get_params

# Simple cycle model
params = get_params('HeatPumpSimple')

params['setup']['refrig'] = 'R1234yf'
params['fluids']['wf'] = 'R1234yf'

params['C3']['T'] = 85  # feed flow temperature of heat sink
params['C1']['T'] = 50  # return flow temperature of heat sink

hp = HeatPumpSimple(params=params)

hp.run_model()
hp.generate_state_diagram(diagram_type='logph', savefig=True, open_file=True)

# Serial compression with closed economizer and internal heat exchanger
econ_type = 'closed'
params = get_params('HeatPumpEconIHX', econ_type=econ_type)

params['ihx']['dT_sh'] = 7.5  # superheating by internal heat exchanger

hp = HeatPumpEconIHX(params=params, econ_type=econ_type)

hp.run_model()
hp.perform_exergy_analysis(print_results=True)

License

Copyright (c) 2023-2026 Jonas Freißmann and Malte Fritz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

heatpumps-1.4.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

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

heatpumps-1.4.1-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file heatpumps-1.4.1.tar.gz.

File metadata

  • Download URL: heatpumps-1.4.1.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for heatpumps-1.4.1.tar.gz
Algorithm Hash digest
SHA256 26481a4078ecec33dcf8953cb94fb0f27db749bd8a7063e9d54a9447e11970cb
MD5 3bf8d164e9d94c772df52546561fbbb5
BLAKE2b-256 6c7f6451e6aafaba72d88ec94989b41e8e0f5e9784c90ca17d47fe37b3d40a8d

See more details on using hashes here.

File details

Details for the file heatpumps-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: heatpumps-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for heatpumps-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5be49809997441138817b4e4e92fb6cc7d48646ef4d93b8bef32c27ebd1d412
MD5 75a13ab888f9ac01a20fbfbb02135d2c
BLAKE2b-256 2e8233a4903778ce5e6e77a2f06fadb7e7346bc9123b4ea18216e57ec14115c0

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