I am not a frequent flier, but I have spent enough time flying at altitude to start thinking about the difference in pressure between the air outside the window and the air inside the cabin. Except I haven’t, until now. I like looking at the screen tracking the progress of the flight and showing the altitude, temperature, groundspeed etc so I know how cold it gets at 37,000 feet. But it doesn’t show the pressure, and for whatever reason I suddenly became interested in finding out.
An internet search for ‘pressure at altitude’ yielded this formula:

P = pressure at altitude h [any unit so long as same as Pb]
Pb = pressure at sea level [any unit so long as same as P]
h = height above sea level [m]
hb = height at ground level [m]
Tb = temperature at sea level [K]
Lb = temperature lapse rate = -0.0065 Km-1
R = universal gas constant = 8.31432 kg.m2s-2K-1mol-1
g0 = gravitational acceleration constant = 9.80665 ms-2
M = molar mass of atmosphere = 0.0289644 kg.mol-1

Plugging in Pb = 1 atm, Tb = 293K, h = 11,277 m (37,000 ft) and taking hb as sea level gave me an answer I honestly didn’t expect. The outside pressure at 37,000 feet is only 0.22 atm – barely a fifth of its value at sea level!

That got me thinking about the structural stresses at altitude if the cabin is maintained at ground-level pressure, and I soon discovered that aeronautical engineers had been there long before me. In order to reduce these stresses, the cabin pressure is programed to reduce gradually during ascent from the airport of origin to a regulatory cabin altitude of 8,000 ft (2,438 m) and then increase gradually during descent until the cabin pressure matches the air pressure at the destination. So what is the pressure at 8,000 ft? I plugged h = 2,438 m into the equation and discovered that the cabin pressure at cruising altitude is 25% less than at sea level. A significant difference.

This in turn got me thinking about the reduction in oxygen availability, given that passengers do not appear to be distressed by it. Applying the ideal gas equation brought me to the conclusion that the reduction must be in proportion to the pressure difference, other things like cabin temperature and breathing rate and tidal volume being equal, since under these circumstances:
n1 = oxygen availability at ground level, n2 = oxygen availability at cruising altitude
P1 = cabin pressure at ground level, P2 = cabin pressure at cruising altitude
n1RT/P1V = n2RT/P2V
n2/n1 = P2/P1

In other words, the cabin air I am breathing at altitude contains 25% less oxygen per unit volume than it did at takeoff. I suspect the reason we don’t notice the change is that we are doing nothing more physically demanding than sitting in our seats. If we were all riding exercise bicycles we would probably notice soon enough.

– – – –

Breathing in, breathing out

The type of airplane I usually fly in has around 270 passengers and crew. Each of us inhales an average 7½ liters of air per minute of which 20% is oxygen, so we inhale around 400 liters of oxygen per minute of which we utilize something like 5%. That corresponds to consuming 1.2 cubic meters of oxygen per hour.

We use this oxygen to sustain vital cellular processes, and biochemistry tells us that the oxygen we consume is replaced with equal amounts of exhaled carbon dioxide and water vapor. These gases cannot be allowed to build up in the cabin airspace since increased levels of carbon dioxide can have adverse physiological effects while water vapor carries a risk to the aircraft of condensation and corrosion. Again, aeronautical engineers have long known this and have solved both this and the oxygen depletion problem by continuously replacing the cabin air with air from outside which fortunately has the same nitrogen-oxygen composition as air at sea level. This air is compressed to the required cabin altitude using either bleed air from the jet engine compressor or purpose-built electrical compressor systems.

Water vapor is a different matter. At cruising altitude the outside temperature is -76°F (-60°C) or thereabouts. The vapor pressure of water at this temperature is extremely low so there can be only tiny quantities of water vapor in the air outside – this reference proves the point with a graph showing how the Mixing Ratio decreases exponentially with altitude.

Given this fact, it is a bit of a mystery to me where any replacement water vapor comes from if not from the breath of passengers and crew. In any event, cabin air has a reputation for dryness with relative humidity often as low as 20%. This explains why bottles of water are supplied as a courtesy service on longer-haul flights.

– – – –

“If the cabin air system should fail …”

When the safety video plays and it gets to the oxygen mask part, I often wonder if I will be able to breathe normally as the voice asks me to do once I have put the mask on as quickly as I can and tightened the elastic bands before helping others. I am not the excitable type but I think normal breathing is a tall order in this situation, especially since I know that the flow of oxygen is coming from a chemical generator usually designed to last not much more than 15 minutes. Enough time for the airplane to descend to a safe height I have read. However I have also read that the cockpit crew have the use of compressed oxygen cylinders which last somewhat longer, which makes me wonder what I would do in the meantime if they needed that extra capacity.

– – – –

When flying is a pain in the ear

I thought I would add a few words on this topic as I have experienced problems with this myself. If you have read this far, you will know that cabin air undergoes decompression on the way up to cruising altitude and compression on the way down. This can cause some passengers to experience ear pain – I have noticed that children seem more vulnerable to this than adults, especially during descent.

The problem centers on the middle ear cavity, which has the eardrum and ear canal on one side and a tube connected to the nasal canal on the other called the Eustachian tube. Its purpose is to ensure equal pressure on either side of the eardrum. Trouble is that the Eustachian tube is not always up to the job and when it doesn’t function properly, pain from pressure imbalance on the eardrum can result. This can be relieved by yawning or swallowing but if these techniques don’t work there are a number of proprietary products that might be worth trying, including pressure-controlling ear plugs and nasal balloons.

Nasal balloons encourage a closed Eustachian tube to open and allow pressure on both sides of the eardrum to equalize.

– – – –

P Mander December 2022

Advertisement

One of the many statements of the Second Law of Thermodynamics is the following:

Spontaneous changes are those which, if carried out under the proper conditions,
can be made to do work
.

The problem with this statement is that there are examples of spontaneous change where it is not immediately obvious what the ‘proper conditions’ might be. The mixing of two perfect gases is a case in point. As the header diagram shows, two gases initially compartmentalized in a container will each expand to fill the space available to them when the partition is removed. The process is spontaneous but no work is done.

There is however another means of achieving the same mixing result if the partition is replaced with a piston equipped with a membrane permeable to gas A but not to gas B. This can be achieved in practice for example with palladium, which is easily permeable to hydrogen but not to other gases.

During this process the piston does PV work of 1 unit, displacing the original volume of the left compartment V = 1 at pressure P = 1. If the piston were connected to an external arrangement for extending a spring or raising a weight, the spontaneous mixing of gases could be made to do mechanical work.

Reversing the above process by doing mechanical work on the system would afford a method of separating the mixed gases. In either case, maximal efficiency would be achieved (see reference below).

– – – –

Postscript

The remarkable diffusion properties of hydrogen

In Munich in 1883, Max Planck conducted an experiment in which a platinum tube originally containing hydrogen at atmospheric pressure was heated until the platinum became permeable to hydrogen, upon which it was found that almost the whole contents diffused out leaving a high vacuum (see reference below)!

Reference: G.H. Bryan, Thermodynamics, published by BG Teubner, Leipzig 1907, page 126

– – – –

Perovskite Solar Cells (PSCs) are a fast-advancing solar technology with a promising combination of high efficiency and low production costs. The big challenge for PSCs is long-term stability and the prevention of degradation by moisture. CarnotCycle is pleased to note that the absolute humidity computation formula published by this blog is proving useful in quantifying the uptake of water by perovskite films and thereby enhancing understanding of moisture-associated degradation processes.

Link: Detection and Estimation of Moisture in Hybrid Perovskite Photovoltaic Films

– – – –

The recent incidents of severe flooding in the United States and Pakistan are traumatizing and ruinous to the many people affected and a shock to weather forecasters and local authorities. A wake-up call has been served and much meteorological research and analysis has been set in motion.

But we all know that making deductions about the influence of climate change is fraught with difficulty. We accept that no one can claim 100% certainty, and this gives space for sceptics to challenge assertions made, and to put forward alternative explanations.

This is the nature of debates with many voices, many strongly held beliefs and many interests to serve. No doubt it will continue this way. But at the same time it is useful to remind ourselves that atmospheric thermodynamics can furnish us with facts upon which we can all agree.

– – – –

Temperature and vapor pressure

It is a fundamental fact of nature that chemical substances in the solid and liquid states exert a vapor pressure, which means that some of the molecules escape into the vapor phase. And physical chemistry teaches us that vapor pressure varies solely with temperature.

Water exerts a vapor pressure, commonly seen in the phenomenon of evaporation. Molecules of water escape from the liquid surface to become molecules of water vapor in the air. Note that water vapor is not wet – it is a gas just like nitrogen, oxygen or carbon dioxide. What makes it different to other atmospheric gases is that it can change back from the gas phase to the liquid or solid phase as water or ice depending on how the thermodynamic conditions change.

The relationship between water vapor pressure and temperature deserves close attention. There are two distinct effects of temperature: one is that water vapor pressure increases linearly with temperature if the vapor density is constant. The other is that the saturation vapor pressure – the maximum pressure for a given temperature – increases logarithmically with temperature in accordance with the thermodynamically exact Clapeyron equation.

This dual effect is expressed in the following formula (see Appendix for derivation)

Since temperature is expressed in Kelvin, the T2/T1 term tends to be small – a 10 degree increase from 298K (25C) to 308K (35C) has a value of only 1.03. But the corresponding change in saturation vapor pressure is much larger – from 31.67 hPa at 25C to 56.31 hPa at 35C. The net effect of a modest temperature rise at constant vapor density is a significant (42%) drop in relative humidity and a substantial increase in water vapor capacity. A volume of 1 cubic meter can contain

The atmosphere is an open thermodynamic system which means that a unit volume of air can contain variable amounts of water vapor. It is instructive to examine the effect of a modest rise in temperature on water vapor density (absolute humidity AH) if the relative humidity is unchanged. The formula below expresses this relation

This is simply an inversion of the linear-logarithmic relation given above. The net effect of a modest temperature rise is a significant increase in absolute humidity which mirrors the increase in saturation vapor pressure.

– – – –

Wildfires and atmospheric water vapor capacity

Think about the atmospheric consequences of wildfires. For the already heated atmosphere lying above such fires, the combustion of biomass not only produces intense additional heat but also substantial quantities of water vapor from combustion, which can be represented as

Wildfires therefore have a double effect on atmospheric water vapor, increasing the unit volume capacity as well as pushing water vapor into that volume, which serves to offset the reduction in relative humidity. The effect of maintained relative humidity on the water vapor capacity of increasingly warm air is shown in the graphic below

The foregoing, while not attempting to establish a predictive link between heatwaves and flooding events, does demonstrate the fact that increases in air temperature that are seen to occur in heatwaves are associated with significant increases in atmospheric water vapor capacity, and that wildfires undoubtedly produce substantial amounts of water vapor. Taking into account the ancient wisdom that what goes up must come down, it does not take too much imagination to see the potential for heavy rainfall and associated flooding that heatwaves and wildfires represent.

– – – –

Appendix

Relative humidity (RH) is defined by the relation
RH(T) = pvap(T)/psat(T)
where pvap is the actual vapor pressure and psat is the saturation vapor pressure at temperature T. The behavior of water vapor in the atmosphere approximates that of an ideal gas due to its very low partial pressure. By the ideal gas law pV = nRT at constant vapor density (n/V = constant)
pvap(T2)/T2 = pvap(T1)/T1
At temperature T2
RH(T2) = pvap(T2)/psat(T2)
Substituting for pvap(T2)
RH(T2) = T2/T1 x pvap(T1)/psat(T2)
At temperature T1
RH(T1) = pvap(T1)/psat(T1)
Substituting for pvap(T1)
RH(T2)/RH(T1) = T2/T1 x psat(T1)/psat(T2) [constant vapor density]

– – – –

ESP32BT app

This post gives coding for temperature and dewpoint displays in both Fahrenheit and Celsius.

If you enjoy programming microcontrollers in Arduino IDE and building prototypes, this is a cool project to consider. It uses a battery powered ESP32-WROOM module with Bluetooth capability and a DHT11 or DHT22 temperature humidity sensor to transmit a set of four parameters that measure the comfort of your environment to an app on your Android smartphone. The prototype is portable (in principle wearable) and because it communicates via Bluetooth it doesn’t interrupt your phone’s internet connectivity.

Prototype construction

I used a 30-pin ESP32-WROOM microcontroller equipped with a DHT22 sensor on a standard 400 tie-point breadboard with power supplied from a 4 x AA Battery Case designed to deliver 5V via a USB jack. The sensor, mounted on a breakout board with a built-in pull-up resistor, is powered from the ESP32 (3V3, GND) with the signal routed to GPIO4. The Bluetooth app installed on my Android phone in the header picture is Serial Bluetooth Terminal by Kai Morich.

Comfort indicators

We human beings are equipped with sensory nerves that enable us to feel the Temperature of our surroundings, but it is the relation between temperature and humidity which really determines how comfortable our environment feels. Relative humidity is the percentage uptake of air’s water vapor carrying capacity,  but because this capacity rises and falls as air warms and cools it is not always the best guide to comfort. Absolute humidity measures the actual amount of water vapor in the air. In more temperate climates this is useful especially for indoor environments: 5 g/m3 or below feels dry, 8 – 11 g/m3 is comfortable, above 13 g/m3 starts getting clammy. For both indoor and outdoor environments, the Dewpoint temperature is a good measure for assessing comfort particularly during summer: a dewpoint of 13C/55F is comfortable, a dewpoint of 15C/60F is beginning to get clammy, while a dewpoint of 18C/65F is oppressive.

Coding and Uploading

The coding below was compiled in the Arduino IDE programming environment.
NOTE 1: When ESP32 boards are installed, the BluetoothSerial.h library comes with it so you don’t need to install it separately.
NOTE 2: The declarations for ah, td and tdf must be on one line.
NOTE 3: The display is set to refresh every 30 seconds = 30000 milliseconds; this can be configured in the millisecond delay(30000) at the end of the code.
BEFORE UPLOAD: With the board connected to the USB, check under Tools menu that the correct board is chosen and that the relevant COM port is selected. Click Upload then press and hold down the BOOT/RESET button on the ESP32 and release it when the status message at the bottom of the IDE window shows “Connecting …….” When the sketch has loaded, open the Arduino IDE Serial Monitor, set the baud rate to 115200 and press the enable EN button on the ESP32 to start the device for Bluetooth pairing and check processing of data from the sensor.
Now you’re good to go with your smartphone Bluetooth app.

– – – – – – – – – – – – – – –
Display in degrees Celsius
– – – – – – – – – – – – – – –

/*
Bluetooth Temperature Humidity Gauge for Android Smartphones using an ESP32-WROOM
microprocessor equipped with a DHT22 or DHT11 RH&T sensor to pair with a Smartphone app
such as Serial Bluetooth Terminal. Variables displayed are relative humidity in %, absolute humidity in g/m3, temperature and dewpoint temperature in degrees Celsius. Program by Peter Mander, published August 2022 by CarnotCycle blog.
*/

#include “BluetoothSerial.h”
#include <DHT.h>
#include <DHT_U.h>
#include <math.h>

BluetoothSerial SerialBT;

#define DHTPIN 4
//#define DHTTYPE DHT22 //uncomment as necessary
//#define DHTTYPE DHT11 //uncomment as necessary
DHT dht(DHTPIN, DHTTYPE);
float rh, t, tp, ah, td;

void setup() {
Serial.begin(115200);
dht.begin();
SerialBT.begin(“ESP32”); // Bluetooth device name
Serial.println(“ESP32 ready to pair with Bluetooth”);
}

void loop() {
rh = dht.readHumidity(); //relative humidity in %
t = dht.readTemperature(); //temperature in Celsius
tp = 1-(373.15/(273.15+t));
ah = (1013.25*pow(2.71828,((13.3185*tp)-(1.9760*pow(tp,2))-(0.6445*pow(tp,3))-(0.1299*pow(tp,4))))*rh*2.1667)/(273.15+t); // absolute humidity = water vapor density in g/m^3, formula by P.Mander 2020
td = 243.5*(log(rh/100)+((17.67*t)/(243.5+t)))/(17.67-log(rh/100)-((17.67*t)/(243.5+t))); // dew point temperature in Celsius, formula by P.Mander 2017
Serial.print(“Rel Humidity “); Serial.print(rh); Serial.println(” %”);
Serial.print(“Abs Humidity “); Serial.print(ah); Serial.println(” g/m3″);
Serial.print(“Temperature “); Serial.print(t); Serial.println(” deg C”);
Serial.print(“Dewpoint “); Serial.print(td); Serial.println(” deg C”);
Serial.println(” “);
SerialBT.print(“Rel Humidity “); SerialBT.print(rh); SerialBT.println(” %”);
SerialBT.print(“Abs Humidity “); SerialBT.print(ah); SerialBT.println(” g/m3″);
SerialBT.print(“Temperature “); SerialBT.print(t); SerialBT.println(” deg C”);
SerialBT.print(“Dewpoint “); SerialBT.print(td); SerialBT.println(” deg C”);
SerialBT.println(” “);
delay(30000);
}

– – – – – – – – – – – – – – – – –
Display in degrees Fahrenheit
– – – – – – – – – – – – – – – – –

/*
Bluetooth Temperature Humidity Gauge for Android Smartphones using an ESP32-WROOM
microprocessor equipped with a DHT22 or DHT11 RH&T sensor to pair with a Smartphone app
such as Serial Bluetooth Terminal. Variables displayed are relative humidity in %, absolute humidity in g/m3, temperature and dewpoint temperature in degrees Fahrenheit. Program by Peter Mander, published August 2022 by CarnotCycle blog.
*/

#include “BluetoothSerial.h”
#include <DHT.h>
#include <DHT_U.h>
#include <math.h>

BluetoothSerial SerialBT;

#define DHTPIN 4
//#define DHTTYPE DHT22 //uncomment as necessary
//#define DHTTYPE DHT11 //uncomment as necessary
DHT dht(DHTPIN, DHTTYPE);
float rh, t, tf, tp, ah, tdf;

void setup() {
Serial.begin(115200);
dht.begin();
SerialBT.begin(“ESP32”); // Bluetooth device name
Serial.println(“ESP32 ready to pair with Bluetooth”);
}

void loop() {
rh = dht.readHumidity(); //relative humidity in %
t = dht.readTemperature(); //temperature in Celsius
tf = t*9.0/5.0+32.0; //temperature in Fahrenheit
tp = 1-(373.15/(273.15+t));
ah = (1013.25*pow(2.71828,((13.3185*tp)-(1.9760*pow(tp,2))-(0.6445*pow(tp,3))-(0.1299*pow(tp,4))))*rh*2.1667)/(273.15+t); // absolute humidity = water vapor density in g/m^3, formula by P.Mander 2020
tdf = 243.5*(log(rh/100)+((17.67*t)/(243.5+t)))/(17.67-log(rh/100)-((17.67*t)/(243.5+t)))*9.0/5.0+32.0; // dew point temperature in Fahrenheit, formula by P.Mander 2017
Serial.print(“Rel Humidity “); Serial.print(rh); Serial.println(” %”);
Serial.print(“Abs Humidity “); Serial.print(ah); Serial.println(” g/m3″);
Serial.print(“Temperature “); Serial.print(tf); Serial.println(” deg F”);
Serial.print(“Dewpoint “); Serial.print(tdf); Serial.println(” deg F”);
Serial.println(” “);
SerialBT.print(“Rel Humidity “); SerialBT.print(rh); SerialBT.println(” %”);
SerialBT.print(“Abs Humidity “); SerialBT.print(ah); SerialBT.println(” g/m3″);
SerialBT.print(“Temperature “); SerialBT.print(tf); SerialBT.println(” deg F”);
SerialBT.print(“Dewpoint “); SerialBT.print(tdf); SerialBT.println(” deg F”);
SerialBT.println(” “);
delay(30000);
}

– – – –

P. Mander August 2022