Flows and fields

A gas at one pressure has two velocities and one divergence

Put hydrogen beside nitrogen at the same pressure and temperature and let them mix. Count molecules, and nothing is flowing: as many go one way as the other, and the molar velocity is exactly zero everywhere. Weigh them, and the mixture has a velocity of six millimetres a second a second after they meet, which is what the continuity equation means by velocity. That velocity has a non-zero divergence in a gas with no compression in it at all. Neither answer is wrong, and a good deal of confusion comes from assuming that a mixture has only one.

Worth reading first: What a flow is · Mass has nowhere to go.

What a flow is built up the velocity field by averaging over enough molecules, in a small volume, so that fluctuations die away and a smooth number remains. It left out a question because the air was treated as one substance. When molecules differ, an average has to be taken with some weighting, and there’s more than one reasonable choice. Weight by mass and the result’s the mass-average velocity. Weight by number and it’s the molar average. Weight by the volume each kind of molecule occupies and there’s a third.

For a single gas these are all the same. In a mixture they aren’t, and the difference isn’t small or academic. This essay computes one clean case, two gases mixing at uniform pressure and temperature, in which one of those velocities is exactly zero and another is the speed of a brisk millimetre per second. What follows isn’t a paradox, but it is a reminder that a “velocity field” was a defined quantity all along, chosen because the equations for it come out in a particular form.

The molecules change places at a constant pressure and the density varies across the mixing zoneHydrogen's mole fraction, and the density over nitrogen's, against position, 1 s after hydrogen and nitrogen are brought together at one pressure. The zone's scale is 2√(Dt) = 1.8 cm. The mole fraction is a plain error function. The density is that same curve scaled and shifted, and it is 0.145 of nitrogen's one scale into the hydrogen side and 0.927 one scale into the nitrogen side.-6-4-2024600.20.40.60.81position, centimetresfraction, and density over nitrogen'shydrogen mole fractiondensitytwo ideal gases at uniform pressure and temperature, Fick's law with one constant diffusivityisobaric binary diffusion, Ma → 0, Pe irrelevant, a one-dimensional tube
Fig. 1 Hydrogen’s mole fraction, and the density over nitrogen’s, against position, one second after the gases meet at one pressure. The zone’s scale, 2Dt2\sqrt{Dt}, is 1.8 cm. The density is 0.145 of nitrogen’s one scale into the hydrogen side and 0.927 one scale into the nitrogen side. Dialled through a quarter, one and four seconds, the profile spreads as t\sqrt t.

What the molecules are doing

Take a long tube with hydrogen at one end and nitrogen at the other, at uniform pressure and temperature. Remove the partition at t=0t=0. Each species diffuses into the other. An ideal gas has a molar density c=p/RTc=p/RT that depends only on pressure and temperature, so cc is uniform and fixed as the gases mix. If xx is hydrogen’s mole fraction, Fick’s law gives its molar flux as

JA=−cD∂x∂z,J_A=-cD\frac{\partial x}{\partial z},

and for nitrogen, 1−x1-x being its mole fraction, the flux is exactly the negative of that. So in a given time as many nitrogen molecules cross any plane in one direction as hydrogen molecules in the other. Hydrogen goes one way and nitrogen the other, and they pass in equal numbers. The mole fraction satisfies the diffusion equation with a fixed coefficient:

x(z,t)=12 erfc ⁣(z2Dt).x(z,t)=\tfrac12\,{\rm erfc}\!\left(\frac{z}{2\sqrt{Dt}}\right).

So what’s the mixture’s velocity? Counting molecules, it’s plainly zero: the molar-average velocity v∗=∑xiviv^*=\sum x_iv_i has JA+JB=0J_A+J_B=0, so cv∗=0cv^*=0 everywhere. For ideal gases the partial molar volumes are equal, so the volume average is also zero, as a dye could confirm. No net number of molecules moves through any fixed plane.

A nitrogen molecule weighs fourteen times what a hydrogen molecule does, though. An equal number of molecules crossing in each direction carries a good deal more mass in the direction nitrogen’s moving. Mass is moving from right to left. That is what a mass-average velocity, v=∑ρivi/ρv=\sum\rho_iv_i/\rho, measures:

ρv=(MA−MB)JA,v=D (MB−MA) ∂x/∂zxMA+(1−x)MB.\rho v=(M_A-M_B)J_A,\qquad v=D\,\frac{(M_B-M_A)\,\partial x/\partial z}{xM_A+(1-x)M_B}.

That’s a real flux, not an artefact. The centre of mass of the tube’s contents really does move, and a balance holding it would see a sideways shift. And the equation of continuity, in the form everybody writes it, ∂ρ/∂t+∇⋅(ρv)=0\partial\rho/\partial t+\nabla\cdot(\rho\mathbf v)=0, is satisfied by this velocity and by no other.

Count the molecules and nothing moves; weigh them and the mixture has a velocity of millimetres a second. The mass-average and molar-average velocities in the hydrogen–nitrogen tube at one second, against position. The molar average is exactly zero. The mass average peaks at 6.39 mm/s towards the hydrogen, on the hydrogen-rich side of the join, at a similarity coordinate of -0.72. Both are right, and they answer different questions.
Fig. 2 The mass-average and molar-average velocities in the hydrogen–nitrogen tube at one second, against position. The molar average is exactly zero. The mass average peaks at 6.4 mm/s towards the hydrogen, at a similarity coordinate of −0.72-0.72.

The result comes in a similarity form, v=D/t f(η)v=\sqrt{D/t}\,f(\eta), with η=z/2Dt\eta=z/2\sqrt{Dt}. With D=0.78D=0.78 cm²/s, D/t\sqrt{D/t} is 8.8 mm/s at a second. The peak’s f=0.72f=0.72, so a mass velocity of 6.4 mm/s after one second, in a gas that nobody’s pushing and in which the pressure is uniform to a very good approximation. After a hundred seconds it has fallen to 0.64 mm/s.

Continuity’s velocity has a divergence

Here’s where the question gets more pointed. Consider the two equations a fluid-mechanics student knows: for a fluid of constant density, ∇⋅v=0\nabla\cdot\mathbf v=0. And for any low-Mach-number flow, density’s change is small because pressure changes are small and so one can take ∇⋅v=0\nabla\cdot\mathbf v=0. Both statements are usually taken as near-universal at low speed. Here’s a gas at Mach zero, at one pressure, one temperature.

A gas at one pressure and one temperature has a mass velocity with a divergence, while its volume velocity has none. The divergence of the mass-average velocity in units of 1/t against the similarity coordinate, for hydrogen and nitrogen. It reaches 0.239 on one side of the join and -0.395 on the other, in a flow that has no compression in it anywhere. The molar average's divergence is zero throughout.
Fig. 3 The divergence of the mass-average velocity in units of 1/t1/t against the similarity coordinate, for hydrogen and nitrogen. It reaches +0.24+0.24 on one side of the join and −0.40-0.40 on the other, in a flow with no compression anywhere. The molar average’s divergence is zero throughout.

There’s nothing wrong with the mathematics. Density at a fixed point really is changing, from MAM_A to MBM_B or the reverse, so ∇⋅v=−Dln⁡ρ/Dt\nabla\cdot\mathbf v=-D\ln\rho/Dt isn’t zero. There’s simply no compression, since no fluid element is at a higher pressure than it was. A velocity field can have a divergence with nothing being compressed, when its density’s changing for another reason. It’s the same statement that heat release makes in a flame, except that the density change there comes from temperature and here it comes from composition. That earlier essay’s framing, that low-speed doesn’t imply divergence-free, holds in a more surprising form when it isn’t even a question of heating.

So the claim “the flow is incompressible” needs a definition of velocity before it’s a claim at all. In this tube the molar velocity is divergence-free and the mass velocity isn’t. Many combustion codes, and low-Mach solvers generally, have to work with this distinction, and there’s an instructive way to put it. A low-Mach solver’s pressure can’t enforce ∇⋅v=0\nabla\cdot\mathbf v=0 for the mass velocity. It has to enforce a known non-zero divergence computed from what the species are doing. To forget this produces no warning, only a spurious pressure field and a conservation error.

The other side of this, in a clean form: the molar velocity isn’t conserved by the Navier–Stokes momentum equation, since it isn’t what carries momentum. Momentum is mass times velocity, and it’s the mass average that goes into ρv\rho\mathbf v. So nobody gets to choose. Continuity needs the mass velocity, as does momentum, while the kinematic statement ∇⋅v=0\nabla\cdot\mathbf v=0 belongs to the molar one. The mean is not the flow made a related point about turbulent averages, and two averages of one flow showed in compressible turbulence that a density-weighted average has the cleaner equations and a less intuitive meaning. It’s the same issue, in a laminar setting, with composition playing the part of a density fluctuation.

A marker sits at the peak

That leaves a question that can be tested, which is what a small floating marker does.

A marker carried by the mass velocity drifts as the square root of time, and it is a real displacement. The position of a parcel starting at the join, carried by the mass-average velocity, against time. It reaches -10.7 cm at 71 s. It settles on a line of constant composition, at the very point where the velocity is greatest, 85 per cent hydrogen by moles. This is the same drift a marker shows in a solid metal's Kirkendall effect, with atoms in place of molecules.
Fig. 4 The position of a parcel starting at the join, carried by the mass-average velocity, against time. It reaches −10.7-10.7 cm at 71 s, settling on a line of constant composition at the very point where the velocity is greatest, 85 per cent hydrogen by moles.

The marker’s trajectory has a tidy structure. In the similarity form, a marker on a line of constant η\eta moves at dz/dt=ηD/tdz/dt=\eta\sqrt{D/t}. So it’ll settle where f(η)=ηf(\eta)=\eta. Continuity at that point reads ρ′(f−η)+ρf′=0\rho'(f-\eta)+\rho f'=0, which has f′=0f'=0 at any such root. So a marker carried by the mass-average velocity comes to rest, on the similarity axis, exactly at the peak of ff. It’s a one-line result with no parameter in it, and it holds for any pair of gases. For hydrogen and nitrogen the peak is at a mole fraction of 0.85.

Here’s a much older parallel that’s probably the best way to understand all this. In 1947, Smigelskas and Kirkendall put inert molybdenum wires between a block of brass and a block of copper and heated the pair. Zinc diffuses out of brass faster than copper diffuses in. The wires moved. There’s more volume arriving on one side, and the lattice itself shifted to accommodate it, although no fluid flowed. That’s a Kirkendall effect, and it’s nowadays taken as one of the classic demonstrations that atoms diffuse by exchanging with vacancies. In a gas, it’s the same idea with molecules for atoms and the mass-average marker for the wire.

There’s a catch, which makes this more than a bookkeeping exercise. A real marker, such as a smoke particle, isn’t a mass-average tracer. It’s a physical particle being struck by molecules from both sides. Light hydrogen moving one way strikes it far less hard than heavy nitrogen moving the other, and it drifts in a way that depends on its size relative to the mean free path. Waldmann’s diffusiophoresis of the 1950s is the name for that drift, and it doesn’t go at the mass-average velocity. A particle much smaller than the mean free path moves with something close to a molecule-weighted velocity that differs from both of those averages. This has a practical side too, in that aerosol deposition near evaporating and condensing surfaces follows the third velocity. A tracer doesn’t reveal the velocity, in the sense of which velocity is meant, and this is the same concern as what a tracer is.

When the difference is large

The mass velocity is entirely a matter of the two molecules being unequal. The peak mass-average velocity in units of √(D/t) against the two gases' mass ratio. It is exactly zero for equal masses, 0.195 at a ratio of 2, 0.727 at 14 and 1.05 at 50. Nitrogen and oxygen, the air itself, have a ratio of 1.14 and almost none.
Fig. 5 The peak mass-average velocity in units of D/t\sqrt{D/t} against the two gases’ mass ratio. It’s zero for equal masses, 0.195 at a ratio of 2, 0.73 at 14 and 1.05 at 50.

It’s all down to mass ratio. Two gases of the same molecular mass, such as nitrogen and carbon monoxide, have no mass velocity, and the distinction disappears. Nitrogen and oxygen have a mass ratio of 1.14, for which the peak is about 0.04 of D/t\sqrt{D/t}, so air can be treated as one gas without any sense of guilt. That’s probably why the distinction seems unimportant in most of aerodynamics, because the fluid’s air, and its species are nearly the same weight.

The case for which it matters is hydrogen with anything, and helium with anything, and the heavy vapours of a combustion or chemical process. A hydrogen flame has species with mass ratios of more than ten. A plasma etching chamber with helium dilution has more. In each of these fields there’s a good reason to know which velocity is being written down.

Which equation wants which velocity

The clean way to keep all this straight is to ask of each conservation law what it needs. Take a mixture with species fluxes ni=ρivi\mathbf n_i=\rho_i\mathbf v_i. Add them, and mass conservation comes out as ∂ρ/∂t+∇⋅(∑ni)=0\partial\rho/\partial t+\nabla\cdot(\sum\mathbf n_i)=0. Writing ∑ni=ρv\sum\mathbf n_i=\rho\mathbf v defines the mass velocity, and it’s what makes the equation look as it does for a single fluid. So the mass velocity isn’t a matter of taste. It’s the velocity for which continuity retains its usual form, and no other choice does that. The momentum equation also needs it, since ρv\rho\mathbf v is literally the momentum per unit volume.

Number conservation, in a mixture of ideal gases at uniform pressure and temperature, is different. Add the species’ molar balances, and ∂c/∂t+∇⋅(cv∗)=0\partial c/\partial t+\nabla\cdot(c\mathbf v^*)=0, with the molar velocity v∗\mathbf v^*. With uniform cc, this has ∇⋅v∗=0\nabla\cdot\mathbf v^*=0. So the molar velocity is what obeys the familiar incompressibility condition. It’s also the frame in which Fick’s law is simplest, since with v∗\mathbf v^* the diffusion flux of one species is exactly minus the other.

So nature has two clean statements for a binary mixture, each with its own velocity. Continuity has its familiar form in one frame. Incompressibility and simple diffusion have theirs in another. They’re incompatible, and nobody can have both in one frame unless the molecular weights happen to be equal. A textbook that writes incompressible Navier–Stokes with a scalar transported by Fick’s law is, at this level, quietly mixing the two. For dilute mixtures, as dye in water is, the difference is of the order of the mass fraction times the density difference, and nothing’s lost. It’s in hydrogen mixtures, in combustion and in mixtures with large density contrast that the mistake is measurable. A well-known example is a low-Mach combustion solver that doesn’t conserve mass unless a “correction velocity” is added to each species’ Fick flux, to make the mass fluxes add up to zero. That’s a piece of numerical bookkeeping often regarded as a nuisance, and it’s exactly the difference between these frames.

The question of which is the “real” velocity has a tempting answer and it’s wrong. It might seem natural to ask which is what a parcel of the gas does, but a parcel is itself a defined thing. A material parcel defined by mass moves with the mass velocity. A parcel defined by number of molecules moves with the molar velocity. Each is coherent and neither has any special status other than the conservation law it serves. The same goes for a velocity defined by a dye, or a smoke particle, or a laser-Doppler seed. Each measures its own velocity, and they differ as soon as the species differ enough.

Stefan’s tube: one gas goes, and the other stays

All of the above has zero molar velocity, because the two species had equal and opposite fluxes. That isn’t always so. Take a cylinder of water with air above it, the top open to dry air. Water vapour diffuses up, and at steady state air’s stationary, since the liquid absorbs almost none of it. This is Stefan’s 1871 tube, and it’s a good contrast, because now the molar velocity isn’t zero.

Air’s stationary, but it has a concentration gradient, higher at the top where the vapour’s lower. Then Fick’s law says air should be diffusing downward. To remain stationary, it has to be carried upward by a mean flow at exactly the rate it’s diffusing down. So there’s a flow, which is a mean upward motion of the whole mixture called Stefan flow, and it adds to the vapour’s transport. Solving that gives the vapour’s molar flux as

N=cDLln⁡1−xL1−x0,N=\frac{cD}{L}\ln\frac{1-x_L}{1-x_0},

against a plain Fick estimate cD(x0−xL)/LcD(x_0-x_L)/L. For vapour at a low concentration they’re the same. Near the boiling point they’re not.

Over an evaporating surface a third velocity appears, because only one of the gases has anywhere to go. Stefan's tube: the evaporation rate over what Fick's law alone would give, against the vapour's mole fraction at the liquid, with none at the top: ln(1/(1 − x))/x. It is 1.05 at a tenth, 1.39 at a half and 2.56 at 0.9. The difference is a real flow out of the tube, the Stefan flow, and there the molar average is no longer zero.
Fig. 6 The evaporation rate over Fick’s estimate, against the vapour’s mole fraction at the liquid, with none at the top, ln⁡(1/(1−x))/x\ln(1/(1-x))/x: 1.05 at a tenth, 1.39 at a half and 2.56 at 0.9.

So that’s a third velocity. It’s a real molar flow, and its size depends on the fraction of vapour. It’s why a drop near its boiling point evaporates faster than simple diffusion suggests. And it’s why a condensing film’s calculation is a different problem if air’s present: a small mole fraction of a non-condensable gas gets carried to the cold wall by Stefan flow, and it accumulates there as a blanket through which vapour must diffuse. The consequence is a large fall in the condensation rate, which steam engineers know all too well. No condensing plant works without a vent to remove that air.

Which makes a useful contrast with the Stokes drift, the mean velocity with no mean flow. Here’s a mean flow with, in one sense, no mean velocity. Both show that a parcel-following view and a fixed-point view can differ when a mean is taken with a weighting that varies. Those are, at bottom, the same question: which average is meant?

What the tube doesn’t contain

Variable diffusivity and non-ideal gases. DD has been taken as constant across the composition, and that’s a very good approximation for ideal gases at one pressure, as the Maxwell–Stefan binary diffusivity is nearly independent of composition. It isn’t so for liquids. In a liquid mixture, volumes aren’t additive, and the volume-average velocity isn’t divergence-free either, while diffusivity may vary by large factors across the composition.

The pressure. Uniform pressure is assumed, and a tiny pressure gradient must exist to accelerate that small mass velocity. It’s negligible here, at about ρv2\rho v^2, or a few millipascals, but the assumption isn’t a law. In a narrow capillary, where the mean free path matters, this gives Graham’s and Knudsen’s phenomena, in which the pressure difference can be large.

Temperature and thermal diffusion. The temperature’s taken as uniform. Mixing hydrogen and nitrogen at constant pressure has very little heat of mixing, though there’s a measurable thermal effect in the Dufour effect, and a large temperature gradient would also produce a mass flux of its own, Soret diffusion.

Three species. With three or more, the Maxwell–Stefan equations are coupled. There are cases where one species diffuses up its own gradient because it’s dragged along by another, Duncan and Toor’s celebrated experiment of 1962. The molar velocity may stop being zero in the case of unequal diffusivities. None of that shows up with two species.

Turbulence. A real mixing process at any scale above a few centimetres is turbulent, and molecular diffusion happens at small scales. There the difference between averages is still there at the molecular scale and it can show up as a differential diffusion effect.

The convention

zz runs with hydrogen on the negative side and nitrogen on the positive. xx is hydrogen’s mole fraction. MA=2.016M_A=2.016 and MB=28.01M_B=28.01 g/mol, D=0.78D=0.78 cm²/s at 1 atm and 298 K. Mass-average velocity is the barycentric velocity used in Navier–Stokes. Molar-average velocity is the one that Fick’s law is usually written against. The two are related by v−v∗=∑(yi−xi)viv-v^*=\sum(y_i-x_i)v_i. Density here is a ratio to nitrogen’s, and “Fick’s estimate” means the diffusion term with the mean flow left out.

Checks

The mixture's numbers, and the checks on them. Mass conservation at three stations in the interdiffusing tube; two equal gases have no mass velocity; Stefan's tube with no vapour reduces to Fick; its gain at a half.
Fig. 7 Mass conservation in the interdiffusing tube, residual at three stations, close to zero; two equal gases, peak velocity zero; Stefan’s gain at x=0.5x=0.5, 1.39, which is 2ln⁡22\ln2; and the peak velocity over D/t\sqrt{D/t} for hydrogen and nitrogen, 0.72.

Continuity is the test that could have disagreed, because the formula was derived from a flux, and then checked against a separately differentiated density. An exact-equal-mass case must give a zero. The model refuses a time of zero, at which the velocity would diverge, a negative molecular mass, and a vapour fraction above one.

Stefan, Graham and Kirkendall

Graham’s measurements of gas diffusion date from 1829 to 1833, and Stefan’s tube from 1871. Maxwell’s and Stefan’s multicomponent equations are from the 1860s and 1870s. Smigelskas and Kirkendall’s experiment with marker wires appeared in 1947, with Darken’s analysis the following year. Waldmann’s work on diffusiophoresis was done in the 1950s. Duncan and Toor’s three-gas experiment dates from 1962, and Brenner’s proposal that a fluid can have two velocities even when it’s a single component, a contested idea, from 2005.

Still open: what a real aerosol follows

The essay’s marker is carried exactly by the mass-average velocity, and a real particle isn’t. A next calculation would solve the Boltzmann or BGK equation for a small sphere in a binary gas gradient across a range of Knudsen numbers, and find its drift velocity relative to the mass-average one, for hydrogen–nitrogen and for an air-water vapour system near a wet surface. It would ask at what size a tracer crosses over between following a number-weighted and a mass-weighted velocity, and whether that crossover lies inside the range of particles that a real flow-visualisation experiment uses.

Shares its objects with

Essays naming at least two of the same things, that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

ContinuumDiffusionDilatationFrame of referenceIncompressibilityMass conservationModel limitVelocity field