ladybug_comfort.pmv module

Utility functions for calculating Predicted MEan Vote (PMV).

PMV is a thermal comfort model for use on the interior of buildings where a heating or cooling system is operational. For naturally ventilated buildings, the Adaptive thermal comfort model is recommended and, for outdoor conditions, models such as Universal Thermal Climate Index (UTCI) or Physiological Equivalent Temperature (PET) are recommended.

ladybug_comfort.pmv.calc_missing_pmv_input(target_pmv, pmv_inputs, low_bound=0.0, up_bound=100.0, tolerance=0.001, still_air_threshold=0.1)[source]

Return the value of a missing_pmv_input given a target_pmv and the 6 other inputs.

This is particularly useful when trying to draw comfort polygons on charts using the PMV model.

Parameters:
  • target_pmv – The target PMV that you are trying to produce from the inputs to the PMV model.

  • pmv_inputs

    A dictionary of 7 pmv inputs with the following keys: ‘ta’, ‘tr’, ‘vel’, ‘rh’, ‘met’, ‘clo’, ‘wme’. Each key should correspond to a value that represents that pmv input but one of these inputs should have a value of None. The input corresponding to None will be solved for by this function. One can also input None for both ‘ta’ and ‘tr’ to solve for the operative temperature that meets the target_pmv. In this case, both ‘ta’ and ‘tr’ in the output dictionary will be the same. Example (solving for relative humidity):

    {
    'ta': 20,
    'tr': 20,
    'vel': 0.05,
    'rh': None,
    'met': 1.2,
    'clo': 0.75,
    'wme': 0
    }
    

  • low_bound – The lowest possible value of the missing input you are tying to find. Putting in a good value here will help the model converge to a solution faster.

  • up_bound – The highest possible value of the missing input you are tying to find. Putting in a good value here will help the model converge to a solution faster.

  • tolerance – The acceptable error in the target_pmv. The default is set to 0.001

  • still_air_threshold – The air velocity in m/s at which the Pierce Standard Effective Temperature (SET) model will be used to correct values in the original Fanger PMV model. Default is 0.1 m/s per the 2015 release of ASHRAE Standard-55.

Returns:

complete_pmv_inputs – A copy of the pmv_inputs dictionary but with values for all inputs. The missing input to the PMV model will be filled by the value that returns the target_pmv.

ladybug_comfort.pmv.fanger_pmv(ta, tr, vel, rh, met, clo, wme=0)[source]

Calculate PMV using only Fanger’s original equation.

Note that Fanger’s original experiments were conducted at low air speeds (<0.1 m/s) and the 2015 ASHRAE-55 thermal comfort standard states that one should use standard effective temperature (SET) to correct for the cooling effect of air speed in cases where such speeds exceed 0.1 m/s. The pmv() function in this module will apply this SET correction in cases where it is appropriate.

Note

[1] Fanger, P.O. (1970). Thermal Comfort: Analysis and applications in environmental engineering. Copenhagen: Danish Technical Press.

Parameters:
  • ta – Air temperature [C]

  • tr – Mean radiant temperature [C]

  • vel – Relative air velocity [m/s]

  • rh – Relative humidity [%]

  • met – Metabolic rate [met]

  • clo – Clothing [clo]

  • wme – External work [met], normally around 0 when seated

Returns:

A tuple with three elements

  • pmv: Predicted mean vote (PMV)

  • ppd: Percentage of people dissatisfied (PPD) [%]

  • heat_loss: A dictionary with the 6 heat loss terms of the PMV model. The dictionary items are as follows:

    • ’cond’: heat loss by conduction [W]

    • ’sweat’: heat loss by sweating [W]

    • ’res_l’: heat loss by latent respiration [W]

    • ’res_s’ heat loss by dry respiration [W]

    • ’rad’: heat loss by radiation [W]

    • ’conv’ heat loss by convection [W]

ladybug_comfort.pmv.pierce_set(ta, tr, vel, rh, met, clo, wme=0.0)[source]

Calculate Standard Effective Temperature (SET).

This function uses the J.B. Pierce two-node model of human thermoregulation.

Note

[1] Nishi, Y; Gagge, A.P. (1977). “Effective temperature scale useful for hypo-and hyperbaric environments”. Aviation, Space, and Environmental Medicine. 48 (2): 97–107.

Parameters:
  • ta – Air temperature [C]

  • tr – Mean radiant temperature [C]

  • vel – Relative air velocity [m/s]

  • rh – Relative humidity [%]

  • met – Metabolic rate [met]

  • clo – Clothing [clo]

  • wme – External work [met], normally around 0 when seated

Returns:

se_temp – Standard effective temperature [C]

ladybug_comfort.pmv.pmv_from_ppd(ppd, pmv_up_bound=3, ppd_tolerance=0.001)[source]

Calculate the two possible Predicted Mean Vote (PMV) values for a PPD value.

Parameters:
  • ppd – The percentage of people dissatisfied (PPD) for which you want to know the possible PMV.

  • pmv_up_bound – The upper limit of PMV expected for the input PPD. Putting in a good estimate here will help the model converge on a solution faster. Defaut = 3

  • ppd_tolerance – The acceptable error in meeting the target PPD. Default = 0.001.

Returns:

A tuple with two elements

  • pmv_lower: The lower (cold) PMV value that will produce the input ppd.

  • pmv_upper: The upper (hot) PMV value that will produce the input ppd.

ladybug_comfort.pmv.ppd_from_pmv(pmv)[source]

Calculate the Percentage of People Dissatisfied (PPD) from PMV.

Parameters:

pmv – The predicted mean vote (PMV) for which you want to know the PPD.

Returns:

ppd – The percentage of people dissatisfied (PPD) for the input PMV.

ladybug_comfort.pmv.ppd_threshold_from_comfort_class(comf_class)[source]

Get acceptable PPD comfort threshold given the EN-15251 comfort class.

Parameters:

comf_class – An integer representing the EN-15251 comfort class. Choose from: 1, 2, 3 (the higher the class, the greater the PPD threshold)

Returns:

ppd_thresh – Acceptable PPD threshold.

ladybug_comfort.pmv.predicted_mean_vote(ta, tr, vel, rh, met, clo, wme=0, still_air_threshold=0.1)[source]

Calculate PMV using Fanger’s original model and Pierce SET.

This method uses the officially correct way to calculate PMV comfort according to the 2017 ASHRAE-55 Thermal Comfort Standard. This function will return valid values even if the air speed is above the sill air threshold of Fanger’s original model (> 0.1 m/s).

However, because this function always returns the Standard Effective Temperature (SET), it will run much more slowly for cases that are below the still air threshold (roughly 10 times as long). For cases where a SET output is not required, it is recommended that the predicted_mean_vote_no_set method be used.

Note

[1] ASHRAE Standard 55 (2017). “Thermal Environmental Conditions for Human Occupancy”. Atlanta Georgia: American Society of Heating, Refrigerating and Air Conditioning Engineers.

[2] Hoyt Tyler, Schiavon Stefano, Piccioli Alberto, Cheung Toby, Moon Dustin, and Steinfeld Kyle, 2017, CBE Thermal Comfort Tool. Center for the Built Environment, University of California Berkeley, http://comfort.cbe.berkeley.edu/

[3] Doherty, T.J., and E.A. Arens. (1988). Evaluation of the physiological bases of thermal comfort models. ASHRAE Transactions, Vol. 94, Part 1, 15 pp. https://escholarship.org/uc/item/6pq3r5pr

Parameters:
  • ta – Air temperature [C]

  • tr – Mean radiant temperature [C]

  • vel – Relative air velocity [m/s]

  • rh – Relative humidity [%]

  • met – Metabolic rate [met]

  • clo – Clothing [clo]

  • wme – External work [met], normally around 0 when seated

  • still_air_threshold – The air velocity in m/s at which the Pierce Standard Effective Temperature (SET) model will be used to correct values in the original Fanger PMV model. Default is 0.1 m/s per the 2015 release of ASHRAE Standard-55.

Returns:

A dictionary containing results of the PMV model with the following keys

  • pmv – Predicted mean vote (PMV)

  • ppd – Percent predicted dissatisfied (PPD) [%]

  • set – Standard effective temperature (SET) [C]

  • ta_adj – Air temperature adjusted for air speed [C]

  • ce – Cooling effect. The difference between the air temperature and the adjusted air temperature [C]

  • heat_loss – A dictionary with the 6 heat loss terms of the PMV model. The dictionary keys are as follows:

    • cond – heat loss by conduction [W]

    • sweat – heat loss by sweating [W]

    • res_l – heat loss by latent respiration [W]

    • res_s – heat loss by dry respiration [W]

    • rad – heat loss by radiation [W]

    • conv – heat loss by convection [W]

ladybug_comfort.pmv.predicted_mean_vote_no_set(ta, tr, vel, rh, met, clo, wme=0, still_air_threshold=0.1)[source]

Calculate PMV using Fanger’s model and Pierce SET model ONLY WHEN NECESSARY.

This method uses the officially correct way to calculate PMV comfort according to the 2015 ASHRAE-55 Thermal Comfort Standard. This function will return correct values even if the air speed is above the sill air threshold of Fanger’s original equation (> 0.1 m/s).

However, because this function does not return the Standard Effective Temperature (SET), it will run much faster for cases that are below the still air threshold (roughly 1/10th the time).

Parameters:
  • ta – Air temperature [C]

  • tr – Mean radiant temperature [C]

  • vel – Relative air velocity [m/s]

  • rh – Relative humidity [%]

  • met – Metabolic rate [met]

  • clo – Clothing [clo]

  • wme – External work [met], normally around 0 when seated.

  • still_air_threshold – The air velocity in m/s at which the Pierce Standard Effective Temperature (SET) model will be used to correct values in the original Fanger PMV model. Default is 0.1 m/s per the 2015 release of ASHRAE Standard-55.

Returns:

A dictionary containing results of the PMV model with the following keys

  • pmv – Predicted mean vote (PMV)

  • ppd – Percent predicted dissatisfied (PPD) [%]

  • ta_adj – Air temperature adjusted for air speed [C]

  • ce – Cooling effect. The difference between the air temperature and the adjusted air temperature [C]

  • heat_loss – A dictionary with the 6 heat loss terms of the PMV model. The dictionary keys are as follows:

    • cond – heat loss by conduction [W]

    • sweat – heat loss by sweating [W]

    • res_l – heat loss by latent respiration [W]

    • res_s – heat loss by dry respiration [W]

    • rad – heat loss by radiation [W]

    • conv – heat loss by convection [W]

ladybug_comfort.pmv.saturated_vapor_pressure_torr(db_temp)[source]

Calculate saturated vapor pressure (Torr) at temperature (C)

This is used to synchronize the results of the Standard Effective temperature (SET) model with the results of the original Fanger model.