Consider the two-bulb diffusion experiment where bulb A contains a 50-50 molar-% and mixture, and bulb B contains a 50-50 molar-% and mixture. The bulbs are connected by a capillary with length . We will consider the diffusion of the three gases.

Two-Bulb Diffusion Experiment
Let’s label the three components as 1: , 2: , and 3: . The binary Maxwell-Stefan diffusivities are:
,
,
.
The pressure and temperature are and , respectively.
The Maxwell-Stefan equations for the first two components can be written as:
Using the constraint and the bootstrap , the mole fraction and molar flux of the third component can be eliminated from the set of equations.
Questions:
Implement and numerically solve the ODEs for components 1 and 2 using the boundary conditions at : and . Use a shooting method to compute and from the boundary conditions at : and .
Note that in Python you can use SciPy’s
solve_ivpto solve the ODEs and SciPy’sroot(ornewtonfrompymrm) to obtain and such that the boundary conditions at are obeyed.Linearize the Maxwell-Stefan equations and compute the fluxes by solving the set of two linear equations.
Use the method of Toor, Steward, and Prober to solve the ternary Maxwell-Stefan diffusion problem.
Numerically solve the problem as a boundary value problem to compute the fluxes and compositions in the capillary (e.g., using the
pymrmbuilding blocks).Consider a time-dependent problem where the concentrations in the bulbs evolve. The bulb volumes are:
,
.The capillary has a diameter of , so a cross-sectional area , and length (the apparatus of Duncan and Toor, 1962). Assume constant pressure is maintained in the bulbs and the ideal gas law, such that is equal and constant in time throughout the system and . Assume pseudo-steady state in the capillary and use a linearization to compute the flux as a function of composition in the bulbs.