/buildingphysics

Code repository of the book "Building Physics - Applications in python"

Primary LanguageJupyter Notebook

(Work in progress ! The book has not been released yet :)

Building Physics - Applications in Python

This repository provides Python implementations of the models presented in the book Building Physics - Applications in Python. There are two ways of using this repository :

1/ No install: Colab Notebooks

Colab notebooks allow you to run code examples in an interactive way. Everything is ready to go and there is no need to install anything! This approach is well suited for people interested in testing the examples without having to modify the code or setup a Python environment. To run a notebook, click on one of the links below, then on the button! GoogleColab

Chapter 1 : basics

Chapter 2 : PCM, HVAC

Chapter 3 : coupled problems and minimization

  • Work in progress

2/ Python scripts

The python scripts provide some material to tinker with. It is a good starter for the reader interested in implementing the exercises listed along the book.

Environment setup

You may want to set up an appropriate environment in order to create your own notebooks/ The Python environment of this repository can be set up via Pipenv. To install Pipenv on your machine, we refer you to the Pipenv documentation.

pipenv install
pipenv shell

The first command installs the project dependencies. The second command starts a pipenv shell with the virtual env activated.

If the dependencies locking takes a long time, use :

PIPENV_SKIP_LOCK=true pipenv install 

Starting a notebook locally

The Notebooks can be run on your local machine using a Jupyter instance. To start a notebook server :

pipenv shell
jupyter notebook --ip=0.0.0.0

A browser should start with a Jupyter server showing the root folder of the repository.