Skip to content

Commit

Permalink
updated pmv_ppd example
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoTartarini committed Apr 12, 2020
1 parent 0ca52b5 commit ee993db
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

import os

# import sys
# sys.path.insert(0, os.path.abspath('../src/temperature_converter'))

Expand Down Expand Up @@ -40,7 +41,7 @@
html_last_updated_fmt = '%b %d, %Y'
html_split_index = False
html_sidebars = {
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)

Expand Down
14 changes: 10 additions & 4 deletions docs/usage.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
=====
Usage
=====
======================
Examples and Tutorials
======================

`Examples`_ files on how to use some of the functions

.. _Examples: https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort/tree/master/examples

YouTube `tutorials`_ playlist

.. _tutorials: https://www.youtube.com/watch?v=MLQecKYQFvg&list=PL9DCOjERDBeGGVBBlaEWMMDoS_06MZcto
.. _tutorials: https://www.youtube.com/playlist?list=PLY91jl6VVD7zMaJjRVrVkaBtI56U7ztQC

.. raw:: html

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
<iframe width="420" height="315" src="https://www.youtube.com/watch?v=Se52OVj4xg0&list=PLY91jl6VVD7zMaJjRVrVkaBtI56U7ztQC"> </iframe>
</div>
21 changes: 21 additions & 0 deletions examples/calc_adaptive_EN.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from pprint import pprint
from pythermalcomfort.models import adaptive_en
from pythermalcomfort.psychrometrics import running_mean_outdoor_temperature

result = adaptive_en(tdb=25, tr=25, t_running_mean=24, v=0.1)

pprint(result)

result = adaptive_en(tdb=22.5, tr=22.5, t_running_mean=24, v=0.1)

pprint(result)

comf_tmp = result['tmp_cmf']

result = adaptive_en(tdb=72.5, tr=72.5, t_running_mean=75, v=0.1, units='IP')
pprint(result)

rmt_value = running_mean_outdoor_temperature([29, 28, 30, 29, 28, 30, 27], alpha=0.9)

result = adaptive_en(tdb=25, tr=25, t_running_mean=rmt_value, v=0.3)
pprint(result)
1 change: 0 additions & 1 deletion examples/calc_pmv_ppd.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# for users who wants to use the IP system
results_ip = pmv_ppd(tdb=77, tr=77, vr=0.4, rh=50, met=1.2, clo=0.5, units="IP")
print(results_ip)
# {"pmv": 0.01, "ppd": 5.0}

import pandas as pd
import os
Expand Down

0 comments on commit ee993db

Please sign in to comment.