This is not so much a full tutorial as a trail of the results (only) of a custom Wolfram Mathematica library in combination with CoolProp and the Webel `Psy`

package and `MPsy`

class for psychrometrics (which uses the user-contributed MTools package for Mathematica) applied to selected example problems from the following **3rd-party** online training course:

It is assumed here that CED Engineering retains copyright in the related **Air Conditioning Psychrometrics PDF**, so content from that PDF is not reproduced here, just results, except for the example problem statement quotes encapsulated as linked Webel "Snippet" pages, and their provided answers for comparison with CoolProp and Webel's `Psy/MPsy`

in some tables.

Also, since the Mathematica code for leverage of the CoolProp wrappers and the MTools-based Webel `MPsy`

class for psychrometrics depend on proprietary code for a client, neither the **underlying** Mathematica code nor the notebooks are made available here (the provision of which could also undermine the challenge for CED Engineering course participants).

The CED Engineering course PDF has good explanations of the use of psychrometric charts and typical industry *use cases*, but it has some type-settings errors in the worked examples and some psychrometric property value errors, which are indicated here and may be of re-assuring use to course participants attempting the problems themselves (and might even help CED Engineering improve a future edition of the course).

**only**as a reference for the numerical values in SI and IP Units!

This slide trail is primarily a demonstration of applications of Mathematica to psychrometrics (humid air physics), it is NOT a full tutorial trail on psychrometrics (although you can learn a lot from it).

This trail is also NOT a Mathematica tutorial. If you are not already familiar with Mathematica and the Wolfram Language, you may find the Mathematica function calling code that appears in this trail a little confusing, but at least you can enjoy seeing just how powerful Mathematica is for tasks such as psychrometrics calculations, and for generating rich tables and plots.

After showing how Mathematica was used to calculate the solutions, some additional slides also show how SysML Parametric Diagrams and SysML Activity Diagrams can be used to represent the Mathematica code using the Webel SysML4Mathematica modelling recipe:

If you are not fluent in Systems Modeling Language v1 (SysML^{®}), or you are just interested in the Mathematica aspect, you may wish to stop there.

The original CED Engineering course PDF document examined uses Imperial Units (IP), with some unstated variant of British Thermal Units (BTUs). The Webel `MPsy`

class and functions of the Webel `Psy`

package can perform conversion from SI to IP units, and assume International British Thermal Units and Pounds (lb).

There will of course be small differences in thermodynamic and psychrometric properties between the CoolProp library values and those given in the course answers, and these are indicated in results tables here as percentages and "deltas".

Please note:

Results here are presented in both SI and IP units (leveraging the wonderful units-aware Quantity algebra system of Mathematica).

The Webel `Psy`

package can generate basic Psychrometrics Charts (in either SI and IP units) sufficient for indicating a psychrometric state and associated data, as well as tracking 2-state and 3-state changes, examples of which are included here. The `Psy`

charts in Mathematica are interactive: for example, if you hold your mouse over a state point indicator dot in the chart, it displays a tooltip popup with a useful table of data. There are also GUIs for driving the charts (much like most interactive online psychrometrics charts), but most slides here just show the generated charts.

The thermodynamic and psychrometric property names and field names used in the Webel `Psy`

package and `MPsy`

class are mostly aligned with the CoolProp Humid Air API query keys.

## Concerning thermodynamic conventions used here

The pressure used in the CED Engineering course examples is not always stated, in this Webel tutorial trail a sea-level atmosphere pressure of 101325 Pa is assumed.

The term *enthalpy* (H) refers here strictly to TOTAL enthalpy (an energy measure), not *mass-specific enthalpy* (h), even if the term *enthalpy* is used (somewhat sloppily) throughout much of the HVAC&R industry to indicate what is actually *mass-specific enthalpy* (a measure of energy per mass).

The term *heat* always refers here to energy transferred as heat energy flow (denoted Q). In strict physics, thermodynamic systems **DO NOT "contain heat"**, and that colloquial HVAC&R industry usage is avoided here. Systems here only contain internal energy (denoted U).

For Q (heat flow) and W (used here for work, not to be confused with 'W' or 'w' used for humidity ratio), the Wikipedia Thermodynamics convention is used, so if the internal energy is denoted `U`

, the change in internal energy when there is no mass transfer (closed system) is given as `dU = Q - W`

, so:

`Q`

indicates the energy GAINED BY the system as heat energy transfer.`W`

indicates the work DONE BY the system on its external surroundings.

The Q flow sign convention adopted on Wikipedia is used:

Therefore, when humid-air is the system (or sub-system) of interest:

- For sensible heating of humid-air Q is
**+ve**. - For sensible cooling of humid-air Q is
**-ve**.

Therefore, when humid-air is the system (or sub-system) of interest and there is mass exchange of water (so the humidity ratio 'w' changes):

- For water gain (such as during humidification),
`w2 - w1`

and "mDotWater" (the mass flow rate of water) are**+ve**; - For water loss (such as during dehumidification or condensation),
`w2 - w1`

and "mDotWater" (the mass flow rate of water) are**-ve**.

`Psy`

library results with the CED course answers!A capital 'Q' is not in fact used in the `Psy`

library for heat energy:

For examples exploring humidification and/or water condensation, where there is mass transfer from humid-air to or from the external environment, the Webel Psy library uses an MPsy object (representing a humid-air **subsystem**) in combination with an MExt object (a water-containing external of finite volume and mass) or an MSink or MSource object (infinite reservoirs), and has novel ways of visually representing the mass and energy balances using Mathematica.

## Some of the slide images are large and dense

In this trail each single slide image typically contains: a custom table showing values related to a course Question and, where available, comparing values computed with CoolProp with the values in Imperial Units (IP) from the course Answers; creation of one or more`MPsy`

objects representing humid air states; a table comparing those states; an `Psy`

package function for computing the answer from the MPsy objects; psychrometric charts for the `MPsy`

states.
## Many of the first few examples are very similar

If you are already familiar with reading psychrometric charts, and once you've got the gist of obtaining psychrometric data from a combination of the dry bulb temperature 'tdb' and one of the relative humidity 'r', the absolute humidity 'w', or the wet bulb temperature 'twb' (the first few slides), you might like to skip to the more interesting examples exploring state changes under different common scenarios, including analysis of energy balance and (where relevant) water mass balance, such as:

**Webel SysML4Mathematica (v1)**interesting: You also may find the following separate slide trails interesting: