Skip to main content

Toolkit for energy engineering

Project description

antupy

antupy (from the mapuzugun word "antü" (sun)[^1]) is an open-source python library to support the development of (solar thermal) energy research projects. It is a toolkit of classes and methods to help simulate energy conversion and energy storage systems, under uncertain timeseries constraints (weather, market, human behaviour, etc.).

An object-oriented software, it is structured in three main interdependent modules:

  • A unit manager to store and represent physical quantities. It offers three classes to represent data structures. Var, for scalar or 0D data; Array, for 1D-vectors (or timeseries), and Frame for 2D-dataframe-style data.
  • To help simulate real world systems, it provides classes to represent Models and Plants, that can be used with different analysers, such as, the Parametric class. To help these simulations, a couple of Timeseries Generators (TSGs) are presented, such as Weather and Market data generators.
  • A set of utility modules based on the unit manager system. props: a thermophysical properties library; htc: a heat transfer coefficient library; solar: a module with solar-related functions; loc: a location manager.

Due to the wide range of possibilities and variety of these systems, the development has been focused on the developers' research. Therefore, at the moment, the only simulations implemented so far are domestic water heating (dwh), and concentrated solar thermal (cst) systems.

Documentation

Check the documentation, cloning the repository and run 'docs/make.bat html' in your python environment. The docs has not yet been published.

The antupy variable system

antupy works in its core with a unit management module units, which include the class Unit to represent units that are compatible with the SI unit system. From this, three type of variables are introduced.

  1. The Var class to manage single variables, with the structure (value:float, unit:str).
  2. The Array class for 1D data structures in the form of (array:np.ndarray, unit:str).
  3. The Frame class for 2D data structures in the form of (frame:pd.DataFrame|pl.DataFrame, unit:list[str]).

Methodology

antupy methodology divides the analysis in three sections: problem definition (pre-processing), simulations, and the analysis itself (post-processing).

the problem definition

has two main outputs: simulation settings and timeseries generation. The first one deals with things that don't change during the simulations, it is the numerical models and fixed parameters; while the timeseries generation includes the things that change during the simulation (weather, market data, etc.) including the possible uncertainties.

simulations

key concepts: - thermal simulation. - energy system simulations. - MC simulations. - forecasts.

analysis

The analysis is performed once the simulation is over.

main classes

All these are Protocols.

Analysers

They are the most fundamental objects. They define the type of analysis to be performed, and by consequence, the required models (and the interconnection between models), TSGs and Solvers to perform such analysis.

Timeseries Generators (TSGs)

These are objects that generate the timeseries for the simulations. Each one has a set of attributes and methods that fully define the timeseries generation algorithm. The most common ones are: Weather, Market, HWD, and ControlledLoad.

Models

represents real-world object that converts energy and/or mass flows following certain physical principle. Its functionality is defined by a protocol that includes: input/output flows, a numerical model (equations?) describing the input-to-output process, and a solver caller to simulate said model under certain inputs. A Model can contain other interconnected model.

Solvers

Here is where the simulations are executed. Solvers can be own-made modules or wrappers of other (ideally open source) library/software. For example, for PV systems, we use pvlib, while for CSP both own methods or solarshift/SAM software are available.

Examples

See the examples folder.

Data

[^1]: mapuzugun is the language of the Mapuche people, the main indigineous group in Chile. antu (antv) means sun, but it also represents one of the main pijan (spirits) in the Mapuche mythology. Here the word is used in its first literal meaning. The name was chosen because the first version of this software was written in Temuco, a Chilean city located at the historic Mapuche heartland.

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

antupy-0.5.0.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

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

antupy-0.5.0-py3-none-any.whl (57.1 kB view details)

Uploaded Python 3

File details

Details for the file antupy-0.5.0.tar.gz.

File metadata

  • Download URL: antupy-0.5.0.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.10 Windows/11

File hashes

Hashes for antupy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 678430bddea5180534c7c82434b22f2c54402006ab17b614daec98247b5af097
MD5 70ae76aa39ce333c78876eaa47a5248d
BLAKE2b-256 0d78fe7d3fb95242826106f1924ad3d60bdbbd46b8f15309688695d40df8aac3

See more details on using hashes here.

File details

Details for the file antupy-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: antupy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 57.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.10 Windows/11

File hashes

Hashes for antupy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fbec3c5f08f576aaf6ecaf67dad8c9bdb9098530a887803ac00056c84d0e6cc
MD5 ab11059ebc53b4b9df6799ca407159ae
BLAKE2b-256 567dc962a37d4cbfc2e6f382f60aad33bdc82a734751628222f11ac253fdc4bb

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