Metadata-Version: 2.4
Name: pyrc
Version: 0.1.0
Summary: Framework to create partially automated networks made up of resistors and capacitors.
Author-email: "Joel Kimmich, Tim Jourdan" <pyrc@igte.uni-stuttgart.de>
License: GPL-3.0-or-later
Project-URL: Homepage, https://pyrc.de
Project-URL: Documentation, https://pyrc.de
Project-URL: Repository, https://codeberg.org/IGTE/pyrc
Project-URL: Issues, https://codeberg.org/IGTE/pyrc/issues
Project-URL: Changelog, https://pyrc.de/changelog.html
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: matplotlib>=3.10.0
Requires-Dist: meshio>=5.3.5
Requires-Dist: numpy>=2.2.2
Requires-Dist: pandas>=2.2.3
Requires-Dist: psutil>=7.0.0
Requires-Dist: pvlib>=0.12.0
Requires-Dist: scipy>=1.15.1
Requires-Dist: sympy>=1.13.3
Requires-Dist: vpython>=7.6.5
Requires-Dist: rtree>=1.4.1
Requires-Dist: networkx>=3.6.0
Provides-Extra: docs
Requires-Dist: Sphinx~=8.2.3; extra == "docs"
Requires-Dist: sphinx_design~=0.6.1; extra == "docs"
Requires-Dist: roman-numerals-py; extra == "docs"
Requires-Dist: sphinx-gallery; extra == "docs"
Requires-Dist: pydata_sphinx_theme>=0.16.1; extra == "docs"
Provides-Extra: dev
Requires-Dist: ruff>=0.15.8; extra == "dev"
Requires-Dist: build>=1.4.2; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

<h1 align="center">
<img src="https://codeberg.org/IGTE/pyrc/raw/commit/b356e77f85cf33decd9ebfa2fef8a93f49db6aad/docs/source/_static/logo_dark.svg" alt="PyRC Logo" height="65">
</h1><br>

[![PyPI - Version](https://img.shields.io/pypi/v/pyrc)](https://pypi.org/project/pyrc/)
[![PyPI - License](https://img.shields.io/pypi/l/pyrc)](https://pypi.org/project/pyrc/)
[![DOI](https://img.shields.io/badge/DOI-10.18419%2Fdarus--5765-blue)](https://dx.doi.org/10.18419/darus-5765)
[![Typing](https://img.shields.io/pypi/types/pyrc)](https://pypi.org/project/pyrc/)

PyRC is a package for modeling and solving dynamic thermal RC-network problems. It brings the simplicity of
Python to physics-based dynamic models that can be represented as ODEs and solved efficiently by numerical algorithms.
The automation of geometric thermal problems in PyRC makes it easy to combine existing Python scripts with accurate,
physics-based dynamic models.

PyRC started as research software, built from scientists for scientists, and later for everyone. It was initiated at
the [Institute for Building Energetics, Thermotechnology and Energy Storage (IGTE)](https://www.igte.uni-stuttgart.de)
at the University of Stuttgart by Joel Kimmich and Tim Jourdan.

## When to use PyRC

- Multidimensional dynamic thermal problems
- Systems where time scales span nanoseconds to decades
- Avoiding the complexity of CFD mesh generation
- Thermal networks with unstructured topology
- Extending or customizing solvers directly in Python
- Parameterizing large-scale RC-networks with up to thousands of elements
- Parameterizing small-scale RC-networks with only a few elements
- Time-dependent system matrices or boundary conditions
- Solving partial differential equations via lumped-parameter models
- Creating geometric networks with visual aid of VPython
- Obtaining the state-space representation of complex systems with hundreds or thousands of capacities and
  resistors — even without solving the ODE

## Installation

```bash
pip install pyrc
```

## Performance

- Network with weather data as boundary conditions and 280 radiation source terms; simulating one year with a
  maximum time step of 0.4 s on a single core at 3.2 GHz:
  - 3'302 capacities, 10'717 resistances
  - Pre-simulation to initialize: 2.5 hours (~7 simulated days)
  - Total simulation time: ~6.5 days
- Smaller systems (~400 nodes) run 1'000 times faster than simulated time.
- Largest simulated system: over 6'000 capacitors and 30'000 resistors.

## Fun Facts

- In principle, PyRC works not only for thermal problems but also for electrical ones. However, this has not yet been
  tested, and an `Induction` class modeling the behaviour of an electrical coil is still missing. Contributions
  are welcome!
- Even without solving the ODE, PyRC can be used to obtain the state-space representation of complex systems with
  hundreds or thousands of capacities and resistors.

## Publications

First publication:
> Kimmich, J. & Jourdan, T.: "Python Package for Generating Dynamic Systems and Simulating Resistance-Capacitance
> Networks (PyRC)", DaRUS, 2026. <https://dx.doi.org/10.18419/darus-5765>

Poster presented at the 1st Stuttgart Research Software Day, 2026:
> Kimmich, J. & Jourdan, T.: "PyRC", Zenodo, 2026. <https://doi.org/10.5281/zenodo.18832971>

Further publications are in progress.

## Notes

- PyRC was first applied to simulate a dynamic thermal system with constant mass flow under boundary conditions
  from weather data (solar radiation and ambient temperature) over a full year, including parameter studies.
- More extensive testing beyond the cases covered so far is necessary. Contributions in this regard are
  particularly welcome.

## Contributing

See [CONTRIBUTING.rst](https://codeberg.org/IGTE/pyrc/src/branch/main/CONTRIBUTING.rst) for how to contribute to PyRC.

## License

See [LICENSE.txt](https://codeberg.org/IGTE/pyrc/src/branch/main/LICENSE.txt) for the license.

## Funding

Funded by the Federal Ministry for Economic Affairs and Energy (Bundesministerium für Wirtschaft und Energie), Germany.
