Metadata-Version: 2.4
Name: heatpumps
Version: 1.4.0
Summary: Collection of TESPy heat pump models and additional Streamlit dashboard.
Author-email: Jonas Freißmann <jonas.freissmann@web.de>, Malte Fritz <malte.fritz@web.de>
Requires-Python: !=3.9.7, >=3.9
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
License-File: LICENSE
Requires-Dist: coolprop>=6.4.1
Requires-Dist: darkdetect>=0.8.0
Requires-Dist: fluprodia==3.3
Requires-Dist: matplotlib>=3.6.3
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=1.5.3
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: plotly>=5.20.0
Requires-Dist: scikit-learn>=1.2.1
Requires-Dist: scipy>=1.10.0
Requires-Dist: streamlit>=1.47.0,<2.0.0
Requires-Dist: tespy>=0.8.0,<0.9.0
Requires-Dist: build ; extra == "dev"
Requires-Dist: flit ; extra == "dev"
Requires-Dist: furo ; extra == "dev"
Requires-Dist: pytest ; extra == "dev"
Requires-Dist: sphinx>=7.2.2 ; extra == "dev"
Requires-Dist: sphinx-copybutton ; extra == "dev"
Requires-Dist: sphinx-design ; extra == "dev"
Requires-Dist: sphinxcontrib.bibtex ; extra == "dev"
Project-URL: Documentation, https://heatpumps.readthedocs.io/
Project-URL: Homepage, https://github.com/jfreissmann/heatpumps
Project-URL: Issues, https://github.com/jfreissmann/heatpumps/issues
Project-URL: Repository, https://github.com/jfreissmann/heatpumps
Provides-Extra: dev

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://heatpumps.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](https://github.com/oemof/tespy)
  - Parametrization and result visualisation through a [Streamlit](https://github.com/streamlit/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](https://github.com/CoolProp/CoolProp)

## Installation

Installation of *heatpumps* is very easy using pip. If you are using [Miniforge](https://github.com/conda-forge/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:

```python
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.

