Before you turn this problem in, make sure everything runs as expected. First, restart the kernel (in the menubar, select Kernel\(\rightarrow\)Restart) and then run all cells (in the menubar, select Cell\(\rightarrow\)Run All).

Make sure you fill in any place that says YOUR CODE HERE or “YOUR ANSWER HERE”, as well as your name and collaborators below:

NAME = ""
COLLABORATORS = ""

Gas absorption in a liquid film can be enhanced by chemical reactions. In this example, the gas A dissolves at the surface of the liquid film and diffuses into the film. A reaction also occurs that consumes the dissolved A: \(A + B \rightarrow C\). B is not volatile though, and it does not leave the film. Within the film defined by the length scale \(L\) diffusion is the only transport mechanism of A and B.

The concentrations of \(A\) and \(B\) in the region between x=0 and x=L are governed by these differential equations:

\(\frac{d^2C_A}{dx^2} = \frac{k}{D_{AD}} C_A C_B\)

\(\frac{d^2C_B}{dx^2} = \frac{k}{D_{BD}} C_A C_B\)

with boundary conditions of \(C_A(x=0) = C_{As}\), \(dC_B/dx (x=0) = 0\), \(C_A(x=L) = 0\) and \(C_B(x=L) = C_{B0}\). The values of the constants in this problem are given as:

L = 2e-4     # m
Dad = 2e-10  # m^s/s
Dbd = 4e-10  # m^2/s
Cb0 = 10     # kg-mol/m^3
Cas = 10     # kg-mol/m^3
k = 1.6e-3   # m^3/(kg mol s)

Use this information to compute and plot the concentration profiles of A and B from x=0 to x=L. Show evidence that the boundary conditions are satisfied, and compute the derivative of A ( 𝑑𝐶𝐴/𝑑𝑥 ) at x=0.

When you are done, download a PDF and turn it in on Canvas. Make sure to save your notebook, then run this cell and click on the download link.

%run ~/f23-06623/f23.py
%pdf