HVAC Matlab GUI Package

vibrationdata_hvac is a stand-alone Matlab GUI for everyday HVAC calculations. It brings twelve calculations together in one window: airflow and duct velocity, air density at altitude, psychrometrics, sensible and latent loads, the cooling coil process, air mixing, heat exchangers, wall U-values, duct friction loss, fan power and the fan laws, capacity and efficiency, and a unit converter. It follows the same layout as the vibrationdata_fluids app.

The twelve tabs follow a typical one-page HVAC formula sheet, but each one also gives the exact result next to the sheet’s shortcut. The constants 1.08, 4840 and 6356 assume standard air (or water at about 70 F), and a volume-weighted mix temperature is only approximate, so the app shows how far the shortcut is from the exact value. At 5280 ft, for example, the sensible heat factor is 0.89, not 1.08.

Download:
vibrationdata_hvac_11_28_26.zip: Matlab source (about 1.4 MB). Unzip into one folder and run vibrationdata_hvac in Matlab R2026b or later.
vibrationdata_hvac_sa_11_28_26.zip: Stand-alone Windows executable (about 2.1 MB). This version does not need Matlab, but it needs the free MATLAB Runtime R2026b.

Worked examples: vibrationdata_hvac_worked_examples_revA.pptx (PowerPoint, 46 slides). Twelve examples, one for every tab, run through the GUI and checked against independent hand calculations: the velocity and velocity pressure in a 24 x 12 in duct, the air density in Denver, a psychrometric state at 25 °C and 50 % RH, the loads for 1000 cfm of supply air, a cooling coil with its apparatus dew point and bypass factor, mixing return and outdoor air, a 1-2 shell and tube heat exchanger, the U-value of an insulated wall, the friction loss in a round duct, fan power and a fan speed change, the COP and EER of a 3-ton unit, and a flow conversion. Every result agrees with the hand calculation to the digits shown.

Ver 1.0 was developed and tested in Matlab R2026b. Its files are saved in R2026b and do not open in older releases. It uses base Matlab only, with no toolboxes. The source zip contains the app, the equation images and the equations PDF. The app is also in the vibrationdata_App launcher, under Waves, Fluids, Flutter & Blast.

TWELVE CALCULATIONS

A Select Function list on the left side of the window opens the tab for each calculation:

  • Airflow & Duct Velocity: the velocity for an airflow, the airflow for a velocity, or the duct size for a target velocity, in a rectangular or round duct, with the hydraulic diameter, the equal-friction round diameter and the velocity pressure.
  • Air Density & Altitude: the standard-atmosphere pressure at an altitude (or a measured barometric pressure), the dry and moist air density, and the load factors that replace 1.08 and 4840 at that density.
  • Psychrometrics: the full moist-air state from the dry bulb and one of relative humidity, wet bulb, dew point or humidity ratio: humidity ratio, wet bulb, dew point, vapor pressure, enthalpy, specific volume, density and degree of saturation, at any altitude, with a psychrometric chart.
  • Sensible, Latent & Total Load: the sensible, latent and total loads and the sensible heat ratio for an airflow, or the airflow for a sensible load, with factors from the air density or the sheet’s 1.08 and 4840.
  • Coil Process: the total, sensible and latent capacity of a cooling coil from its entering and leaving states, the condensate, and the apparatus dew point and bypass factor, plotted on the psychrometric chart.
  • Air Mixing: the mixed-air state of two streams by the exact mass balance, compared with the volume-weighted rule, with the mixing line on the chart.
  • Heat Exchanger (LMTD): the log mean temperature difference and heat duty for counterflow, parallel flow and a 1-2 shell and tube exchanger (with the F correction factor), with the effectiveness and NTU.
  • Wall U-Value & Heat Transfer: the U-value of a layered wall with inside and outside films, the heat loss, the temperature at each layer (plotted through the wall), and the radiation from a surface.
  • Duct Friction Loss: the Colebrook friction factor, friction rate and pressure loss of a rectangular or round duct, the loss of the fittings from their loss coefficients, and the round duct size for a target friction rate.
  • Fan Power & Fan Laws: the air, shaft and motor input power of a fan, compared with the sheet’s BHP formula, and the flow, pressure and power at a new speed, wheel size or air density, with the system curve.
  • Capacity & Efficiency: cooling capacity in BTU/hr, kW and tons, with the COP, EER and kW per ton.
  • Unit Converter: airflow, velocity, pressure, power, enthalpy and temperature units.
HOW THE APP WORKS
  • Every tab has its own English or metric unit selection and an equation strip that shows the formulas used. Changing the units converts the values already entered.
  • The psychrometric properties are exact (the Hyland-Wexler saturation pressure and ideal-gas moist air), in both unit systems and at any altitude, rather than read from a chart.
  • View Equations opens a PDF with the 27 equations, notes on the sheet’s shortcuts, and references for all twelve tabs.
  • Save Model and Load Model store and restore the inputs of every tab in one file.
  • Export to Excel writes the inputs and results of every calculated tab to one workbook.
  • Plots open in separate windows: the psychrometric chart, the wall temperature profile and the fan system curve. Closing the app closes them too.
SOURCES

The app uses standard, freely available methods:

  • Psychrometrics: the equations of PsychroLib (D. Meyer and D. Thevenard, Journal of Open Source Software, 2019), with the Hyland and Wexler (1983) saturation pressure.
  • Bergman, Lavine, Incropera and DeWitt, Fundamentals of Heat and Mass Transfer, for conduction, radiation and heat exchangers, and Bowman, Mueller and Nagle (1940) for the F correction factor.
  • Colebrook (1939) and F.M. White, Fluid Mechanics, for the friction factor, and Huebscher (1948) for the equivalent round duct.
  • NIST Special Publication 811, for unit conversions.

Full references are in the View Equations PDF. Film coefficients, conductivities, emissivities and fitting loss coefficients are inputs, and the defaults are examples only. Use the values for your own building and equipment.

The app is also part of the Vibrationdata Matlab Signal Analysis & Structural Dynamics Package. Please send me an email if you have questions or suggestions.

Tom Irvine

More stand-alone Matlab GUIs: Matlab Engineering GUI Packages Hub

Learn This in a Live Course

Fans, blowers and HVAC equipment noise and vibration are covered in the Machinery Acoustics, Vibration & Rotor Dynamics course. The February 2027 series includes live one-hour classes, IACET CEUs, recorded sessions and slides. See the schedule and fees or register here.

Leave a Comment