# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Calculate a person's maximum rate of exhalation

Contributed by:
Claudio Lobo Chaib Filho

ResourceFunction["PeakExpiratoryFlow"][ gives the peak rate of exhalation for a person of a particular | |

ResourceFunction["PeakExpiratoryFlow"][ gives the property |

Peak expiratory flow is a person's maximum speed of expiration (breathing out air). It measures the airflow through the bronchi and thus the degree of obstruction in the airways.

The *age* can be given as a Quantity in any unit of time. When a unit is not specified, the interpretation is in years.

The age can be any value between 1 month and 120 years.

The *height* can be given as a Quantity in any unit of length. When a unit is not specified, the interpretation is in centimeters.

There is no specific range for height. In some cases, where the age and height set are not satisfactory for the function, the "LungCapacity" *prop* will indicate Missing["NotAvailable"].

The following properties are supported for *prop*:

"PEF" | (default) peak expiratory flow value |

"LungCapacity" | estimated lung capacity (volume of the lungs) |

"Plot" | age versus PEF plot |

"PropertyAssociation" | Association containing all properties |

"Plot" gives an age (*x*-axis) versus PEF (*y*-axis) plot, where the normal region (green) is shown along with the typical curve (black dashed). The warning region is displayed in yellow and the medical emergency region is displayed in red.

The "TimeUnit" option can take any unit of time. By default, the time is given in minutes.

The "VolumeUnit" option can take any unit of volume. By default, the volume is given in liters.

Calculate the PEF (peak expiratory flow) of a person:

In[1]:= |

Out[1]= |

When the function is used with three arguments, the property given is "PEF":

In[2]:= |

Out[2]= |

In[3]:= |

Out[3]= |

If age and height units are not specified, they are interpreted as years and centimeters:

In[4]:= |

Out[4]= |

Other units of measurement are accepted in the function input, for example, months and feet:

In[5]:= |

Out[5]= |

Obtain approximate lung capacity with the fourth argument "LungCapacity":

In[6]:= |

Out[6]= |

Get a plot with the fourth argument "Plot":

In[7]:= |

Out[7]= |

Get all forms of output simultaneously as an Association using "PropertyAssociation":

In[8]:= |

Out[8]= |

Get a unit of time other than minutes with the option "TimeUnit":

In[9]:= |

Out[9]= |

Get a unit of volume other than liters with the option "VolumeUnit":

In[10]:= |

Out[10]= |

All forms of output inherit the specific units chosen by the options, including the plot:

In[11]:= |

Out[11]= |

Even if age is given in a time unit other than years, the *x*-axis of the plot will be in years:

In[12]:= |

Out[12]= |

There is no specific range for height. In some cases, where the age and height set is not satisfactory for the function, the specific output "LungCapacity" will indicate it is missing:

In[13]:= |

Out[13]= |

- 1.0.0 – 11 November 2020

This work is licensed under a Creative Commons Attribution 4.0 International License