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 428b7ad commit 0ca52b5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions examples/calc_pmv_ppd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
from pythermalcomfort.psychrometrics import v_relative
from pythermalcomfort.utilities import met_typical_tasks
from pythermalcomfort.utilities import clo_individual_garments
import pandas as pd
import os

# input variables
tdb = 27 # dry-bulb air temperature, [$^{\circ}$C]
Expand All @@ -20,23 +18,22 @@
vr = v_relative(v=v, met=met)

# calculate PMV in accordance with the ASHRAE 55 2017
results = pmv_ppd(tdb=tdb, tr=tr, vr=vr, rh=rh, met=met,
clo=icl, standard="ASHRAE")
results = pmv_ppd(tdb=tdb, tr=tr, vr=vr, rh=rh, met=met, clo=icl, standard="ASHRAE")

# print the results
print(results)
# {"pmv": -0.11, "ppd": 5.2}

# print PMV value
print(results["pmv"])
# -0.11
print(f"pmv={results['pmv']}, ppd={results['ppd']}%")

# 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")
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

df = pd.read_csv(os.getcwd() + "/examples/template-SI.csv")

df['PMV'] = None
Expand Down

0 comments on commit 0ca52b5

Please sign in to comment.