← Articles
natural ventilation stack effect wind pressure MacroFlo airflow simulation

How MacroFlo calculates natural ventilation

A step-by-step walk through the wind, buoyancy, flow and mass-balance methodology behind natural ventilation simulation, with interactive models.


As mechanical engineers we design spaces that breathe naturally through wind and temperature differences. MacroFlo is a simulation program that helps with the design and appraisal of naturally ventilated and mixed-mode buildings. It works by modelling the flow of air through openings in the building envelope. Two main physical forces drive this flow: wind pressure and buoyancy, which we also call the stack effect.

The whole calculation rests on a simple “stirred tank” assumption. We treat the air density as uniform throughout any single room. This makes the mathematics manageable while still giving accurate results for most practical cases.

Wind pressure mechanics

Wind pressure on external openings is calculated at every simulation time step using data from the weather file.

We calculate wind pressure with this equation:

pw=Cp12ρv2p_w = C_p \, \tfrac{1}{2} \rho v^2

Here is what each symbol means:

  • pwp_w is the wind pressure in pascals (Pa)
  • CpC_p is the wind pressure coefficient (it changes with building shape and wind direction)
  • ρ\rho is air density in kilograms per cubic metre (kg/m³)
  • vv is the reference wind speed in metres per second (m/s)

Pressure rises with the square of wind speed. A small increase in speed therefore makes a big difference to the driving force.

1Interactive model

Wind pressure and the square law

Adjust the wind speed and the pressure coefficient, and watch the pressure on the face respond. Because speed enters the equation squared, the curve steepens quickly.

Air density1.20 kg/m³
Wind pressure pw15.1 Pa
Positive pressure, pushing inward

Reference wind speed

The raw meteorological wind speed uu from the weather file must be adjusted for terrain and height. We use a power-law velocity profile:

v=uKhav = u \, K \, h^a

Default assumptions are standardised: a measurement height of 10 m, open country terrain, and a boundary layer thickness of 270 m. The constants KK and aa change according to the actual site terrain (country, suburbs or city). This adjustment ensures the wind speed we use is realistic for the building location.

2Interactive model

How terrain and height shape the wind profile

The same weather-file wind is slowed near the ground by rougher surroundings and strengthens with height. Choose a terrain, set the reference speed, and slide the sampling height.

Site terrain
TerrainOpen country
Wind speed at height5.8 m/s

Low-rise versus high-rise classification

We classify buildings so that the correct wind speed and pressure coefficients are applied.

Low-rise buildings are up to 3 storeys, or roughly 12.5 m tall. For these the reference wind speed is evaluated at the overall building height and applied uniformly. Pressure coefficients are taken from the overall building shape, such as long wall or short wall.

High-rise buildings are taller than 3 storeys or 12.5 m. Here the pressure coefficients vary with height. They are assigned according to the opening’s elevation ratio h/Hh/H.

Buoyancy (stack) pressure

Buoyancy calculations show how air pressure changes with elevation because of the gravitational weight of the air column.

Internal pressure at height hh follows:

pn(h)=pn(0)hρngp_n(h) = p_n(0) - h \rho_n g

External pressure on a façade at height hh is:

p0,i(h)=pw,ihρ0gp_{0,i}(h) = p_{w,i} - h \rho_0 g

The symbols are:

  • hh is the absolute height above ground level (m)
  • pn(0)p_n(0) is the extrapolated reference pressure at ground level (Pa)
  • ρn\rho_n and ρ0\rho_0 are the internal and external air densities
  • gg is gravity, 9.81 m/s²

Because internal and external temperatures differ, the densities differ. Consequently the pressure difference across the building envelope changes linearly with height.

3Interactive model

The stack effect and the neutral pressure plane

Warm inside and cold outside set up two pressure profiles that fall at different rates. Where they cross is the neutral plane. Change the outside temperature and watch it move, then reverse.

Inside temperature20 °C
Neutral plane height4.8 m
In at the base, out at the top

Airflow characteristics and integration

Airflow through an opening depends on the pressure difference across it.

For large openings such as windows and doors the volume flow rate is:

q=0.62Aop(2ρ)0.5(Δp)0.5q = 0.62 \, A_{op} \left( \frac{2}{\rho} \right)^{0.5} (\Delta p)^{0.5}

For cracks we use:

q=CL(ρrefρ)0.5(Δp)0.6q = C \, L \left( \frac{\rho_{ref}}{\rho} \right)^{0.5} (\Delta p)^{0.6}

Because the pressure difference is not constant across the height of a large opening, we integrate the flow equation over the full height. We divide the opening into many thin horizontal slices, calculate the flow through each slice, and add the results together. The differential flow for a thin slice is:

dq=0.62(2ρ)0.5(Δp(h))0.5dAopdq = 0.62 \left( \frac{2}{\rho} \right)^{0.5} (\Delta p(h))^{0.5} \, dA_{op}

If the pressure difference crosses zero somewhere inside the opening, that location is the neutral pressure plane. Air flows inward on one side of the plane and outward on the other. We split the integration exactly at this height so that inward and outward volume flows are calculated separately and correctly.

4Interactive model

Integrating flow over the height of one opening

A single tall opening spans the neutral plane: the pressure difference points one way below it and the other way above. Slice the opening and watch the stepped sum approach the smooth profile.

Inward flow0.68 m³/s
Outward flow0.70 m³/s
Split at the neutral plane

Applied examples of mass balance

The ground-level reference pressure pn(0)p_n(0) is found by enforcing conservation of mass. The total mass of air entering the room must equal the total mass leaving it.

Example 1: a 10 m high atrium in winter

Imagine a 10 m high atrium on a winter day. Outside temperature is 0 °C (density ρ0\rho_0) and inside temperature is 20 °C (density ρn\rho_n). Wind speed is zero. Two equal openings exist: one at 0 m and one at 10 m.

The external cold-air pressure drops rapidly with height while the internal warm-air pressure drops slowly. To keep mass balance, the system creates a neutral pressure plane near the middle of the atrium height. The bottom opening lies entirely below this plane, so cold air flows inward. The top opening lies entirely above it, so warm air flows outward.

Example 2: a first-floor room with two openings

Consider a room on the first floor that extends from 4 m to 8 m in height. It has two identical 1 m × 1 m openings: the lower one between 5 m and 6 m, the upper one between 7 m and 8 m.

Even though the room sits above ground level, we mathematically extend its internal pressure profile down to h=0h = 0 to establish the universal baseline reference pressure pn(0)p_n(0).

A single neutral pressure plane now exists for the whole room relative to the outside. For identical openings the neutral plane settles between them, roughly at 6.5 m. The lower opening (5 to 6 m) lies completely below the plane and experiences only inward flow. The upper opening (7 to 8 m) lies completely above the plane and experiences only outward flow. Neither opening contains the neutral plane inside its own physical height.

5Interactive model

Mass balance in the first-floor room

A room sitting above ground with two openings. The internal pressure profile is extended down to the ground to set the baseline, and the mass coming in the lower opening equals the mass leaving the upper.

Inside temperature20 °C
Neutral plane height6.5 m
Mass in0.91 kg/s
Mass out0.91 kg/s
Mass balanced

These examples show how the same mass-balance principle works whether the space is at ground level or elevated. By following the steps we have covered, you can see exactly how MacroFlo predicts natural airflow and helps us design comfortable, energy-efficient buildings.