Skip to main content

Image tests

Documentation License

About

This projects allows you to calculate how many solar energy you can collect on faces of you house and it changes heating season.

For make it you need to load mesh file (.stl or .obj) which represents form of your house and specify some parameters of the house. After that just start calculation and get plots of temperatures of elements inside house.

For calculate solar power on each face of house with different tilt and azimuth in py-solarhouse uses PVLIB This library makes it possible to take the weather into account when calculating power.

All thermal processes in the house calculated by models. These models are described here: Thermal theory

Substituting different parameters of the house, you can carry out the calculation for each configuration and choose the best combination of parameters to save energy for heating.

Version

0.0.4

Documentation

Documentation

Dependencies

numpy
scipy
trimesh
pvlib
pandas
matplotlib
mpld3
shapely
jinja2
netCDF4
siphon
tables

Installation and run

from pypi:

$ pip install solarhouse

from github:

$ git clone https://github.com/yaricp/py-solarhouse.git
$ cd py-solarhouse
$./install.sh

Usage:

After installation of package you can use it in you code.

Firstly you need to create mesh file which represent shape of house.

It can be create in Free SketchUp

Also it can be create on any 3D editors which can formed files .obj and .stl

After that put this mesh file to .files/ folder.

file main.py:

import os

import uuid

import settings
from solarhouse.building import Building
from solarhouse.calculation import Calculation
import solarhouse.export as export


def main():
    calc = Calculation(
        tz=settings.TZ,
        geo=settings.GEO,
        building=Building(
            mesh_file=settings.PATH_FILE_OBJECT,
            geo=settings.GEO,
            wall_material=settings.WALL_MATERIAL,
            wall_thickness=settings.WALL_THICKNESS,
            start_temp_in=settings.TEMPERATURE_START,
            power_heat_inside=settings.POWER_HEAT_INSIDE,
            efficiency=settings.EFF,
            heat_accumulator={
                'volume': 0.032,
                'material': 'water',
            },
            windows={
                'area': 0.3,
                'therm_r': 5.0,
            },
            floor={
                'area': 1.0,
                'material': 'adobe',
                'thickness': 0.2,
                't_out': 4.0,
            },
        ),
                    )
    data_frame = calc.compute(date=22, month=12, year=2019, with_weather=False)
    calc_id = str(uuid.uuid4())
    output_dir = os.path.join(settings.PATH_OUTPUT, calc_id)
    os.makedirs(output_dir, exist_ok=True)
    csv_file_path = export.as_file(data_frame, 'csv', output_dir)
    export.as_html(data_frame, output_dir)

if __name__ == "__main__":
    main()

file settings.py:

import os
import pathlib


_this_dir = pathlib.Path(__file__).parent.absolute()

PATH_FILE_OBJECT = os.path.join(_this_dir, 'files/cube.obj')
TIME_TICK = 1    #1 hours
WALL_THICKNESS = 0.3
TEMPERATURE_START = 20  #celcium
POWER_HEAT_INSIDE = 0   #kWtt
MASS_INSIDE = 500   #kg
PATH_FILE_TEMPERATURE_OUTSIDE_FILE = os.path.join(_this_dir, 'files/temp_table.csv')
PATH_EXPORT_THERMO_RESULT_FILE = os.path.join(_this_dir, 'files/results.csv')
SPACE_POWER_ON_METER = 1000
WALL_MATERIAL = 'adobe'
EFF = 75        #in percents
EFF_ANG = 85.0
GEO = {
    'latitude': 54.841426,
    'longitude': 83.264479,
}
TZ = 'Asia/Novosibirsk'
COUNT_FACES_FOR_PARALLEL_CALC = 1000
PATH_OUTPUT = os.path.join(_this_dir, 'output')

All parameters of a house (mesh, thickness of wall, material of walls and etc.) sets in file settings.py

After that you can start calculation:

$python3 main.py

As result you get two files in folder with output/<calc_id> : data.csv and plot.html

Author

Yaroslav Pisarev yaricp@gmail.com

Metadata

Release files for solarhouse 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solarhouse 0.0.4
File Size Uploaded Provenance Actions
solarhouse-0.0.4.tar.gz 14.9 kB Without provenance Details for solarhouse-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for solarhouse 0.0.4
File Interpreter ABI Platform Actions
solarhouse-0.0.4-py3-none-any.whl Python 3 none any Details for solarhouse-0.0.4-py3-none-any.whl

Total release size: 30.9 kB

Release files / solarhouse-0.0.4.tar.gz

Download URL solarhouse-0.0.4.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bf61b9afb4c3bae250e9466896b27ad693d0e86896ea9a856b68ca628c32f681
BLAKE2b-256 checksum
How to use checksums
dfc75b09d467f6e3019a3a131435247a5a78b479314dea104caec17b406a317d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release files / solarhouse-0.0.4-py3-none-any.whl

Download URL solarhouse-0.0.4-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5d9c5f5a5fbb8926232247039ba1c2b5d72769719d8b57555ba6a3453c18f51
BLAKE2b-256 checksum
How to use checksums
89d753a8285ed25431f424a8cc45fa2c7bd34c08686593b2702da85974c7e7ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Security for solarhouse 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page