Demonstrates the use Antoine's equation and Raoult's law to compute flammability limits for methanol.

We'd like to estimate range of temperatures over which this methanol fueled fire starter will successfully operate.

In [1]:

```
from IPython.display import YouTubeVideo
YouTubeVideo("8gFqzbnUO-Y")
```

Out[1]:

The flammability limits of methanol in air at 1 atmosphere pressure correspond to vapor phase mole fractions in the range

$$ 6.7 \mbox{ mol%} \leq y_{MeOH} \leq 36 \mbox{ mol%} $$Assuming the pure methanol located in the wick of this fire starter reaches a vapor-liquid with air in the device, find the lower and upper operating temperatures for this device.

The first thing we'll do is define a simple python function to calculate the saturation pressure of methanol at a given temperature using Antoine's equation

$$\log_{10} P^{sat} = A - \frac{B}{T + C}$$Constants for methanol can be found in the back of the course textbook for the case where pressure is given in units of mmHg and temperature in degrees centigrade.

In [ ]:

```
# Antoine equation for methanol. Pressure in mmHg, temperature in degrees C
A = 7.89750
B = 1474.08
C = 229.13
def Psat(T):
return 10**(A - B/(T+C))
```

To test the function, compute the saturation pressure of methanol for several temperatures and print the results.

In [3]:

```
T = [0, 5, 10, 15, 20, 25]
for t in T:
print('Saturation pressure of methanol at', t, 'deg C =', Psat(t), 'mmHg')
```

By Raoult's law, the partial pressure of pure methanol is equal to the saturation pressure,

\begin{equation} p_{MeOH} = P^{sat}_{MeOH}(T) \end{equation}For an ideal gas, the partial pressure is given by Dalton's law

\begin{equation} p_{MeOH} = y_{MeOH} P \end{equation}Putting these together and solving for the mole fraction of methanol in the vapor phase

\begin{equation} y_{MeOH} = \frac{P^{sat}_{MeOH}(T)}{P} \end{equation}For example, at an atmospheric pressure of 760 mmHg, the mole fraction of methanol is given by

In [4]:

```
P = 760.0 # mmHg
y = Psat(25)/P # mole fraction
print("mole fraction of methanol at 25 deg C and 1 atmosphere =", y)
```

Since this is within the flammability limits of methanol, the fire starter should work at room temperatures.

The partial pressure of methanol at the lower flammability limit

\begin{equation} p_{MeOH} = y_{MeOH}P \end{equation}In [5]:

```
P = 760.0 # pressure mmHg
y = 0.067 # mole fractio at the lower flammability limit
p_MeOH = 0.067*760
print('model fraction at the LFL =', p_MeOH, "mm Hg")
```

Next we need to solve for the temperature at which the partial pressure of methanol is at the lower flammability limit.

\begin{equation} P^{sat}_{MeOH}(T) = p_{MeOH} \end{equation}Let's start with a guesses at 0 and 20 deg C.

In [6]:

```
print(Psat(0), "mmHg")
print(Psat(20), "mmHg")
```

This may be close enough to use an equation solver to finish the job. Here we'll use `brentq`

which is one of the root-finding funtions from the `scipy.optimize`

library.

A python `lambda`

function is a convenient means of recasting the equation

as

\begin{equation} P^{sat}_{MeOH} - y_{MeOH}P = 0 \end{equation}which is the form need for using a root-finding algorithm.

In [7]:

```
# problem data
P = 760.0 # pressure mmHg
y = 0.067 # mole fractio at the lower flammability limit
# partial pressure of methanol at the lower flamability limit
p_MeOH = 0.067*760
# Antoine equation for methanol. Pressure in mmHg, temperature in degrees C
def Psat(T):
return 10**(7.89750 - 1474.08/(T + 229.13))
from scipy.optimize import brentq
Tlow = brentq(lambda T: Psat(T) - p_MeOH, 0, 20)
print("Lower Flammability Temperature = ", Tlow, "deg C")
print("Upper Flammability Temperature = ", 32.0 + 9.0*Tlow/5.0, "deg F")
```

Calculate the upper limit on temperature at which this lighter can operate.