# Diffusion

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Diffusion
> Markdown URL: https://mediated.wiki/source/Diffusion.md
> Source: https://en.wikipedia.org/wiki/Diffusion
> Source revision: 1356281000
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Transport of dissolved species from the highest to the lowest concentration region}}
{{about|the generic concept of the time-dependent process}}
[[File:Diffusion.svg|thumb|right| Some particles are [dissolved](/source/Dissolution_(chemistry)) in a glass of water. At first, the particles are all near one top corner of the glass. If the particles randomly move around ("diffuse") in the water, they eventually become distributed randomly and uniformly from an area of high concentration to an area of low, and organized (diffusion continues, but with no net [flux](/source/flux)).]]
thumb|Time lapse video of diffusion a dye dissolved in water into a gel.

[[File:DiffusionMicroMacro.gif|thumb|250px|Diffusion from a microscopic and  b macroscopic point of view. Initially, there are [solute](/source/solute) molecules on the left side of a barrier (purple line) and none on the right. The barrier is removed, and the solute diffuses to fill the whole container. <u>Top:</u> A single molecule moves around randomly. <u>Middle:</u> With more molecules, there is a statistical trend that the solute fills the container more and more uniformly. <u>Bottom:</u> With an enormous number of solute molecules, all randomness is gone: The solute appears to move smoothly and deterministically from high-concentration areas to low-concentration areas. There is no microscopic [force](/source/force) pushing molecules rightward, but there ''appears'' to be one in the bottom panel. This apparent force is called an ''[entropic force](/source/entropic_force)''.]]

thumb|Three-dimensional rendering of diffusion of purple dye in water.

'''Diffusion''' is the net movement of anything (for example, atoms, ions, molecules, energy) generally from a region of higher [concentration](/source/concentration) to a region of lower concentration. Diffusion is driven by a gradient in [Gibbs free energy](/source/Gibbs_free_energy) or [chemical potential](/source/chemical_potential). It is possible to diffuse "uphill" from a region of lower concentration to a region of higher concentration, as in [spinodal decomposition](/source/spinodal_decomposition). Diffusion is a [stochastic process](/source/stochastic_process) due to the inherent randomness of the diffusing entity and can be used to model many real-life stochastic scenarios. Therefore, diffusion and the corresponding mathematical models are used in several fields beyond physics, such as [statistics](/source/statistics), [probability theory](/source/probability_theory), [information theory](/source/information_theory), [neural networks](/source/neural_networks), [finance](/source/finance), and [marketing](/source/marketing).

The concept of diffusion is widely used in many fields, including [physics](/source/physics) ([particle diffusion](/source/Molecular_diffusion)), [chemistry](/source/chemistry), [biology](/source/biology), [sociology](/source/sociology), [economics](/source/economics), [statistics](/source/statistics), [data science](/source/data_science), and [finance](/source/finance) (diffusion of people, ideas, data and price values). The central idea of diffusion, however, is common to all of these: a substance or collection undergoing diffusion spreads out from a point or location at which there is a higher concentration of that substance or collection.

A [gradient](/source/gradient) is the change in the value of a quantity; for example, concentration, [pressure](/source/pressure), or [temperature](/source/temperature) with the change in another variable, usually [distance](/source/distance). A change in concentration over a distance is called a [concentration gradient](/source/Molecular_diffusion), a change in pressure over a distance is called a [pressure gradient](/source/pressure_gradient), and a change in temperature over a distance is called a [temperature gradient](/source/temperature_gradient).

The word ''diffusion'' derives from the [Latin](/source/Latin) word, ''diffundere'', which means "to spread out".

A distinguishing feature of diffusion is that it depends on particle [random walk](/source/random_walk), and results in mixing or mass transport without requiring directed bulk motion. Bulk motion, or bulk flow, is the characteristic of [advection](/source/advection).<ref>[J.G. Kirkwood](/source/John_Gamble_Kirkwood), R.L. Baldwin, P.J. Dunlop, L.J. Gosting, G. Kegeles (1960)[http://aip.scitation.org/doi/abs/10.1063/1.1731433 Flow equations and frames of reference for isothermal diffusion in liquids]. The Journal of Chemical Physics 33(5):1505–13.</ref> The term [convection](/source/convection) is used to describe the combination of both [transport phenomena](/source/transport_phenomena).

If a diffusion process can be described by [Fick's laws](/source/Fick's_laws_of_diffusion), it is called a normal diffusion (or Fickian diffusion); Otherwise, it is called an [anomalous diffusion](/source/anomalous_diffusion) (or non-Fickian diffusion).

When talking about the extent of diffusion, two length scales are used in two different scenarios (<math>D</math> is the [diffusion coefficient](/source/diffusion_coefficient), having dimensions ''area / time''):

# [Brownian motion](/source/Brownian_motion) of an [impulsive](/source/Impulse_response) point source (for example, one single spray of perfume)—the square root of the [mean squared displacement](/source/mean_squared_displacement) from this point. In Fickian diffusion, this is <math>\sqrt{2nDt}</math>, where <math>n</math> is the [dimension](/source/dimension) of this Brownian motion;
# [Constant concentration source](/source/Fick's_laws_of_diffusion) in one dimension—the diffusion length. In Fickian diffusion, this is <math>2\sqrt{Dt}</math>.

==Diffusion vs. bulk flow==
"Bulk flow" is the movement/flow of an entire body due to a pressure gradient (for example, water coming out of a tap). "Diffusion" is the gradual movement/dispersion of concentration within a body with no net movement of matter. An example of a process where both [bulk motion](/source/Mass_flow_(life_sciences)) and diffusion occur is human breathing.<ref>{{Cite journal|last=Muir|first=D. C. F.|date=1966-10-01|title=Bulk flow and diffusion in the airways of the lung|url=http://www.sciencedirect.com/science/article/pii/S000709716680044X|journal=British Journal of Diseases of the Chest|language=en|volume=60|issue=4|pages=169–176|doi=10.1016/S0007-0971(66)80044-X|pmid=5969933|issn=0007-0971|url-access=subscription}}</ref>

First, there is a "bulk flow" process. The [lungs](/source/lungs) are located in the [thoracic cavity](/source/thoracic_cavity), which expands as the first step in external respiration. This expansion leads to an increase in volume of the [alveoli](/source/Pulmonary_alveolus) in the lungs, which causes a decrease in pressure in the alveoli. This creates a pressure gradient between the [air](/source/air) outside the body at relatively high pressure and the alveoli at relatively low pressure. The air moves down the pressure gradient through the airways of the lungs and into the alveoli until the pressure of the air and that in the alveoli are equal, that is, the movement of air by bulk flow stops once there is no longer a pressure gradient.

Second, there is a "diffusion" process. The air arriving in the alveoli has a higher concentration of oxygen than the "stale" air in the alveoli. The increase in oxygen concentration creates a concentration gradient for oxygen between the air in the alveoli and the blood in the [capillaries](/source/capillaries) that surround the alveoli. Oxygen then moves by diffusion, down the concentration gradient, into the blood. The other consequence of the air arriving in alveoli is that the concentration of [carbon dioxide](/source/carbon_dioxide) in the alveoli decreases. This creates a concentration gradient for carbon dioxide to diffuse from the blood into the alveoli, as fresh air has a very low concentration of carbon dioxide compared to the [blood](/source/blood) in the body.

Third, there is another "bulk flow" process. The pumping action of the [heart](/source/heart) then transports the blood around the body. As the left ventricle of the heart contracts, the volume decreases, which increases the pressure in the ventricle. This creates a pressure gradient between the heart and the capillaries, and blood moves through [blood vessel](/source/blood_vessel)s by bulk flow down the pressure gradient.

==Diffusion in the context of different disciplines==
[[File:Centrotherm diffusion furnaces at LAAS 0481.jpg|thumb|right|200px|Diffusion furnaces used for [thermal oxidation](/source/thermal_oxidation)]]
There are two ways to introduce the notion of ''diffusion'': either a phenomenological approach starting with [Fick's laws of diffusion](/source/Fick's_laws_of_diffusion) and their mathematical consequences, or a physical and atomistic one, by considering the ''[random walk](/source/random_walk) of the diffusing particles''.<ref>J. Philibert (2005). [http://ul.qucosa.de/fileadmin/data/qucosa/documents/19504/diff_fund_2%282005%291.pdf One and a half century of diffusion: Fick, Einstein, before and beyond.] {{webarchive|url=https://web.archive.org/web/20131213113203/http://www.rz.uni-leipzig.de/diffusion/pdf/volume2/diff_fund_2(2005)1.pdf |date=2013-12-13 }} Diffusion Fundamentals, 2, 1.1–1.10.</ref>

In the phenomenological approach, ''diffusion is the movement of a substance from a region of high concentration to a region of low concentration without bulk motion''. According to Fick's laws, the diffusion [flux](/source/Flux) is proportional to the negative [gradient](/source/gradient) of concentrations. It goes from regions of higher concentration to regions of lower concentration. Sometime later, various generalizations of Fick's laws were developed in the frame of [thermodynamics](/source/thermodynamics) and [non-equilibrium thermodynamics](/source/non-equilibrium_thermodynamics).<ref>S.R. De Groot, P. Mazur (1962). ''Non-equilibrium Thermodynamics''. North-Holland, Amsterdam.</ref>

From the ''atomistic point of view'', diffusion is considered as a result of the random walk of the diffusing particles. In [molecular diffusion](/source/molecular_diffusion), the moving molecules in a gas, liquid, or solid are self-propelled by kinetic energy. Random walk of small particles in suspension in a fluid was discovered in 1827 by [Robert Brown](/source/Robert_Brown_(botanist%2C_born_1773)), who found that minute particle suspended in a liquid medium and just large enough to be visible under an optical microscope exhibit a rapid and continually irregular motion of particles known as Brownian movement. The theory of the [Brownian motion](/source/Brownian_motion) and the atomistic backgrounds of diffusion were developed by [Albert Einstein](/source/Albert_Einstein).<ref>{{cite journal|author=A. Einstein|year=1905|title=Über die von der molekularkinetischen Theorie der Wärme geforderte Bewegung von in ruhenden Flüssigkeiten suspendierten Teilchen|journal=Annalen der Physik|volume=17|pages=549–60|doi=10.1002/andp.19053220806|issue=8|bibcode=1905AnP...322..549E|doi-access=free}}</ref>
The concept of diffusion is typically applied to any subject matter involving random walks in [ensembles](/source/Statistical_ensemble_(mathematical_physics)) of individuals.

In [chemistry](/source/chemistry) and [materials science](/source/materials_science), diffusion also refers to the movement of fluid molecules in porous solids.<ref>{{Cite book|last=Pescarmona|first=P.P.|url=https://www.worldscientific.com/worldscibooks/10.1142/11909|title=Handbook of Porous Materials|publisher=WORLD SCIENTIFIC|year=2020|volume=4|isbn=978-981-12-2328-0|editor-last=Gitis|editor-first=V.|location=Singapore|pages=150–151|language=en|doi=10.1142/11909|editor-last2=Rothenberg|editor-first2=G.}}</ref> Different types of diffusion are distinguished in porous solids. [Molecular diffusion](/source/Molecular_diffusion) occurs when the collision with another molecule is more likely than the collision with the pore walls. Under such conditions, the diffusivity is similar to that in a non-confined space and is proportional to the mean free path. [Knudsen diffusion](/source/Knudsen_diffusion) occurs when the pore diameter is comparable to or smaller than the mean free path of the molecule diffusing through the pore. Under this condition, the collision with the pore walls becomes gradually more likely and the diffusivity is lower. Finally there is configurational diffusion, which happens if the molecules have comparable size to that of the pore. Under this condition, the diffusivity is much lower compared to molecular diffusion and small differences in the kinetic diameter of the molecule cause large differences in [diffusivity](/source/Mass_diffusivity).

[Biologist](/source/Biologist)s often use the terms "net movement"  or "net diffusion" to describe the movement of ions or molecules by diffusion. For example, oxygen can diffuse through cell membranes so long as there is a higher concentration of oxygen outside the cell. However, because the movement of molecules is random, occasionally oxygen molecules move out of the cell (against the concentration gradient). Because there are more oxygen molecules outside the cell, the [probability](/source/probability) that oxygen molecules will enter the cell is higher than the probability that oxygen molecules will leave the cell. Therefore, the "net" movement of oxygen molecules (the difference between the number of molecules either entering or leaving the cell) is into the cell. In other words, there is a ''net movement'' of oxygen molecules down the concentration gradient.

In [astronomy](/source/astronomy), atomic diffusion is used to model the [stellar atmosphere](/source/stellar_atmosphere)s of [chemically peculiar star](/source/chemically_peculiar_star)s.<ref>{{cite journal
 | title=Modelling ApBp star atmospheres with stratified abundances consistent with atomic diffusion
 | last1=Stift | first1=M. J. | last2=Alecian | first2=G.
 | journal=Monthly Notices of the Royal Astronomical Society
 | volume=425 | issue=4 | pages=2715–2721 | date=October 2012
 | doi=10.1111/j.1365-2966.2012.21681.x | doi-access=free | bibcode=2012MNRAS.425.2715S
}}</ref><ref>{{cite journal
 | title=Time-dependent atomic diffusion in the atmospheres of CP stars. A big step forward: introducing numerical models including a stellar mass-loss
 | last1=Alecian | first1=G. | last2=Stift | first2=M. J.
 | journal=Monthly Notices of the Royal Astronomical Society
 | volume=482 | issue=4 | pages=4519–4527 | date=February 2019
 | doi=10.1093/mnras/sty3003 | doi-access=free | arxiv=1811.02267
 | bibcode=2019MNRAS.482.4519A
}}</ref> Diffusion of the elements is critical in understanding the surface composition of degenerate [white dwarf](/source/white_dwarf) stars and their evolution over time.<ref>{{cite journal
 | title=Diffusion Coefficients in the Envelopes of White Dwarfs
 | last1=Heinonen | first1=R. A. | last2=Saumon | first2=D.
 | last3=Daligault | first3=J. | last4=Starrett | first4=C. E.
 | last5=Baalrud | first5=S. D. | last6=Fontaine | first6=G.
 | display-authors=1 | journal=The Astrophysical Journal
 | volume=896 | issue=1 | at=id. 2 | date=June 2020
 | doi=10.3847/1538-4357/ab91ad | doi-access=free | arxiv=2005.05891
 | bibcode=2020ApJ...896....2H
}}</ref>

In [machine learning](/source/machine_learning) and [artificial intelligence](/source/artificial_intelligence), [diffusion model](/source/diffusion_model)s, also known as diffusion-based generative models or score-based generative models, are a class of [latent variable](/source/latent_variable_model) [generative](/source/generative_model) models. The goal of diffusion models is to learn a [diffusion process](/source/diffusion_process) for a given dataset, such that the process can generate new elements that are distributed similarly as the original dataset. Diffusion models were introduced in 2015 as a method to train a model that can sample from a highly complex probability distribution. They used techniques from [non-equilibrium thermodynamics](/source/non-equilibrium_thermodynamics), especially diffusion.<ref>{{Cite journal |last1=Sohl-Dickstein |first1=Jascha |last2=Weiss |first2=Eric |last3=Maheswaranathan |first3=Niru |last4=Ganguli |first4=Surya |date=2015-06-01 |title=Deep Unsupervised Learning using Nonequilibrium Thermodynamics |url=http://proceedings.mlr.press/v37/sohl-dickstein15.pdf |journal=Proceedings of the 32nd International Conference on Machine Learning |language=en |publisher=PMLR |volume=37 |pages=2256–2265|arxiv=1503.03585 }}</ref>

==History of diffusion in physics==
In the scope of time, diffusion in solids was used long before the theory of diffusion was created. For example, [Pliny the Elder](/source/Pliny_the_Elder) had previously described the [cementation process](/source/cementation_process), which produces steel from the element [iron](/source/iron) (Fe) through carbon diffusion. Another example is well known for many centuries, the diffusion of colors of [stained glass](/source/stained_glass) or [earthenware](/source/earthenware) and [Chinese ceramics](/source/Chinese_ceramics).

In modern science, the first systematic experimental study of diffusion was performed by [Thomas Graham](/source/Thomas_Graham_(chemist)). He studied diffusion in gases, and the main phenomenon was described by him in 1831–1833:<ref>''Diffusion Processes'', Thomas Graham Symposium, ed. J.N. Sherwood, A.V. Chadwick, W.M.Muir, F.L. Swinton, Gordon and Breach, London, 1971.</ref>

<blockquote>"...gases of different nature, when brought into contact, do not arrange themselves according to their density, the heaviest undermost, and the lighter uppermost, but they spontaneously diffuse, mutually and equally, through each other, and so remain in the intimate state of mixture for any length of time." </blockquote>

The measurements of Graham contributed to [James Clerk Maxwell](/source/James_Clerk_Maxwell) deriving, in 1867, the coefficient of diffusion for CO<sub>2</sub> in the air. The error rate is less than 5%.

In 1855, [Adolf Fick](/source/Adolf_Fick), the 26-year-old anatomy demonstrator from Zürich, proposed [his law of diffusion](/source/Fick's_laws_of_diffusion). He used Graham's research, stating his goal as "the development of a fundamental law, for the operation of diffusion in a single element of space". He asserted a deep analogy between diffusion and conduction of heat or electricity, creating a formalism similar to [Fourier's law for heat conduction](/source/Thermal_conduction) (1822) and [Ohm's law](/source/Ohm's_law) for electric current (1827).

[Robert Boyle](/source/Robert_Boyle) demonstrated diffusion in solids in the 17th century<ref>L.W. Barr (1997), In: ''Diffusion in Materials, DIMAT 96'', ed. H.Mehrer, Chr. Herzig, N.A. Stolwijk, H. Bracht, Scitec Publications, Vol.1, pp. 1–9.</ref> by penetration of zinc into a copper coin. Nevertheless, diffusion in solids was not systematically studied until the second part of the 19th century. [William Chandler Roberts-Austen](/source/William_Chandler_Roberts-Austen), the well-known British metallurgist and former assistant of Thomas Graham studied systematically solid state diffusion on the example of gold in lead in 1896. :<ref name="Mehrer2009">{{cite journal|author1=H. Mehrer |author2=N.A. Stolwijk |year=2009|url=http://www.uni-leipzig.de/diffusion/pdf/volume11/diff_fund_11(2009)1.pdf |title=Heroes and Highlights in the History of Diffusion|journal= Diffusion Fundamentals|volume= 11|issue= 1|pages= 1–32|doi=10.62721/diffusion-fundamentals.11.453 }}</ref>
<blockquote>
"... My long connection with Graham's researches made it almost a duty to attempt to extend his work on liquid diffusion to metals."
</blockquote>

In 1858, [Rudolf Clausius](/source/Rudolf_Clausius) introduced the concept of the [mean free path](/source/mean_free_path). In the same year, [James Clerk Maxwell](/source/James_Clerk_Maxwell) developed the first atomistic theory of transport processes in gases. The modern atomistic theory of diffusion and [Brownian motion](/source/Brownian_motion) was developed by [Albert Einstein](/source/Albert_Einstein), [Marian Smoluchowski](/source/Marian_Smoluchowski) and [Jean-Baptiste Perrin](/source/Jean-Baptiste_Perrin). [Ludwig Boltzmann](/source/Ludwig_Boltzmann), in the development of the atomistic backgrounds of the macroscopic [transport processes](/source/transport_phenomena), introduced the [Boltzmann equation](/source/Boltzmann_equation), which has served mathematics and physics with a source of transport process ideas and concerns for more than 140 years.<ref name="ChapmanCowling">S. Chapman, T. G. Cowling (1970) ''The Mathematical Theory of Non-uniform Gases: An Account of the Kinetic Theory of Viscosity, Thermal Conduction and Diffusion in Gases'', Cambridge University Press (3rd edition), {{ISBN|052140844X}}.</ref>

In 1920–1921, [George de Hevesy](/source/George_de_Hevesy) measured [self-diffusion](/source/self-diffusion) using [radioisotope](/source/radioisotope)s. He studied self-diffusion of radioactive [isotopes of lead](/source/isotopes_of_lead) in the liquid and solid lead.

[Yakov Frenkel](/source/Yakov_Frenkel) (sometimes, Jakov/Jacob Frenkel) proposed, and elaborated in 1926, the idea of diffusion in crystals through local defects (vacancies and [interstitial](/source/interstitial_defect) atoms). He concluded, the diffusion process in condensed matter is an ensemble of elementary jumps and quasichemical interactions of particles and defects. He introduced several mechanisms of diffusion and found rate constants from experimental data.

Sometime later, [Carl Wagner](/source/Carl_Wagner) and [Walter H. Schottky](/source/Walter_H._Schottky) developed Frenkel's ideas about mechanisms of diffusion further. Presently, it is universally recognized that atomic defects are necessary to mediate diffusion in crystals.<ref name="Mehrer2009"/>

[Henry Eyring](/source/Henry_Eyring_(chemist)), with co-authors, applied his theory of [absolute reaction rates](/source/Transition_state_theory) to Frenkel's quasichemical model of diffusion.<ref>{{cite journal|author1=J.F. Kincaid |author2=H. Eyring |author3=A.E. Stearn |year=1941|title= The theory of absolute reaction rates and its application to viscosity and diffusion in the liquid State|journal= Chem. Rev.|volume= 28|pages= 301–65|doi=10.1021/cr60090a005|issue=2}}</ref> The analogy between [reaction kinetics](/source/Chemical_kinetics) and diffusion leads to various nonlinear versions of Fick's law.<ref name=GorbanMMNP2011>{{cite journal|author=[A.N. Gorban](/source/Alexander_Nikolaevich_Gorban), H.P. Sargsyan and H.A. Wahab |year=2011|arxiv=1012.2908 |doi= 10.1051/mmnp/20116509 | doi-access= free|title=Quasichemical Models of Multicomponent Nonlinear Diffusion|journal=Mathematical Modelling of Natural Phenomena|volume=6|issue=5|pages=184–262|s2cid=18961678}}</ref>
<!--==Qualitative description==
{{under construction}}
Diffusion is the consequence of the random movement of particles. A [molecule](/source/molecule) or [ion](/source/ion) with [kinetic energy](/source/kinetic_energy) (explain) collides with other molecules and ions, and each collision alters the kinetic energy and [momentum](/source/momentum) of both particles. Unless the particles are bound in position in a solid, they are free to move away from each other until the next collision. Therefore, in a fluid all the particles move from collision to collision, changing direction with each collision. The path of any given particle is random, so the probability of it returning to a previous position is lower than of going somewhere else since there are so many more other places to go. If the fluid is in a container, any collision with the solid container sends it back into the volume of the fluid. The rate at which a given particle moves away from its original position depends on how fast it moves on average, which depends on the temperature, and how often it collides with other particles, which in turn depends on how far apart they are on average. The particles of a gas are much further apart than the particles of a liquid, so a gas molecule or ion generally goes further before colliding and changing direction each time, so it moves away from any given point more quickly, assuming equal velocities.

When all particles start out evenly mixed, there is no noticeable difference over time, and they stay evenly mixed. However, if there is a region where most of the particles are of one type at a given time, they tend to disperse until evenly distributed.
-->

==  Models ==

=== Definition of diffusion flux ===
Each model of diffusion expresses the '''diffusion flux''' with the use of concentrations, densities and their derivatives. Flux is a vector <math>\mathbf{J}</math> representing the quantity and direction of transfer. Given a small [area](/source/area) <math>\Delta S</math> with normal <math>\boldsymbol{\nu}</math>, the transfer of a [physical quantity](/source/physical_quantity) <math>N</math> through the area <math>\Delta S</math> per time <math>\Delta t</math> is
:<math>\Delta N = (\mathbf{J},\boldsymbol{\nu}) \,\Delta S \,\Delta t +o(\Delta S \,\Delta t)\, ,</math>
where <math>(\mathbf{J},\boldsymbol{\nu})</math> is the [inner product](/source/inner_product) and <math>o(\cdots)</math> is the [little-o notation](/source/little-o_notation). If we use the notation of [vector area](/source/vector_area) <math>\Delta \mathbf{S}=\boldsymbol{\nu} \, \Delta S</math> then
:<math>\Delta N = (\mathbf{J}, \Delta \mathbf{S}) \, \Delta t +o(\Delta \mathbf{S} \,\Delta t)\, . </math>
The [dimension](/source/Dimensional_analysis) of the diffusion flux is [flux]&nbsp;=&nbsp;[quantity]/([time]·[area]). The diffusing physical quantity <math>N</math> may be the number of particles, mass, energy, electric charge, or any other scalar [extensive quantity](/source/extensive_quantity). For its density, <math>n</math>, the diffusion equation has the form
:<math>\frac{\partial n}{\partial t}= - \nabla \cdot \mathbf{J} +W \, ,</math>
where <math>W</math> is intensity of any local source of this quantity (for example, the rate of a chemical reaction).
For the diffusion equation, the '''no-flux boundary conditions''' can be formulated as <math>(\mathbf{J}(x),\boldsymbol{\nu}(x))=0</math> on the boundary, where <math>\boldsymbol{\nu}</math> is the normal to the boundary at point <math>x</math>.

=== Normal single component concentration gradient ===
{{Main|Fick's laws of diffusion}}

Fick's first law: The diffusion flux, <math>\mathbf{J}</math>, is proportional to the negative gradient of spatial concentration, <math>n(x,t)</math>:
:<math>\mathbf{J}=-D(x) \,\nabla n(x,t),</math>
where ''D'' is the [diffusion coefficient](/source/Mass_diffusivity), which can be estimated for a given mixture using, for example, the empirical Vignes correlation model<ref>{{Cite journal |last=Vignes |first=Alain |date=May 1966 |title=Diffusion in Binary Solutions. Variation of Diffusion Coefficient with Composition |url=https://doi.org/10.1021/i160018a007 |journal=Industrial & Engineering Chemistry Fundamentals |volume=5 |issue=2 |pages=189–199 |doi=10.1021/i160018a007 |issn=0196-4313|url-access=subscription }}</ref> or the physically motivated entropy scaling.<ref>{{Cite journal |last1=Schmitt |first1=Sebastian |last2=Hasse |first2=Hans |last3=Stephan |first3=Simon |date=2025-03-17 |title=Entropy scaling for diffusion coefficients in fluid mixtures |journal=Nature Communications |language=en |volume=16 |issue=1 |page=2611 |doi=10.1038/s41467-025-57780-z |issn=2041-1723 |pmc=11914492 |pmid=40097384|arxiv=2409.17615 |bibcode=2025NatCo..16.2611S }}</ref> The corresponding [diffusion equation](/source/diffusion_equation) (Fick's second law) is
:<math>\frac{\partial n(x,t)}{\partial t}=\nabla\cdot( D(x) \,\nabla n(x,t))\, . </math>
In case the diffusion coefficient is independent of <math>x</math>, Fick's second law can be simplified to
:<math>\frac{\partial n(x,t)}{\partial t}=D \, \Delta n(x,t)\ , </math>
where <math>\Delta</math> is the [Laplace operator](/source/Laplace_operator),
:<math>\Delta n(x,t) = \sum_i \frac{\partial^2 n(x,t)}{\partial x_i^2} \ .</math>

=== Multicomponent diffusion and thermodiffusion ===
{{main | Onsager reciprocal relations}}
Fick's law describes diffusion of an admixture in a medium. The concentration of this admixture should be small and the gradient of this concentration should be also small. The driving force of diffusion in Fick's law is the antigradient of concentration, <math>-\nabla n</math>.

In 1931, [Lars Onsager](/source/Lars_Onsager)<ref name = "Onsager1931">{{cite journal |author=Onsager, L. |year=1931 |doi=10.1103/PhysRev.37.405 |title=Reciprocal Relations in Irreversible Processes. I|journal=Physical Review |volume=37|issue=4|pages=405–26|bibcode = 1931PhRv...37..405O |doi-access=free}}</ref> included the multicomponent transport processes in the general context of linear non-equilibrium thermodynamics. For
multi-component transport,
:<math>\mathbf{J}_i=\sum_j L_{ij} X_j \, ,</math>
where <math>\mathbf{J}_i</math> is the flux of the <math>i</math>th physical quantity (component), <math>X_j</math> is the <math>j</math>th [thermodynamic force](/source/Conjugate_variables_(thermodynamics)) and <math>L_{ij}</math> is Onsager's matrix of ''kinetic [transport coefficient](/source/transport_coefficient)s''.

The thermodynamic forces for the transport processes were introduced by Onsager as the space gradients of the derivatives of the [entropy](/source/entropy) density <math>s</math> (he used the term "force" in quotation marks or "driving force"):
:<math>X_i= \nabla \frac {\partial s(n)}{\partial n_i}\, ,</math>
where <math>n_i</math> are the "thermodynamic coordinates".
For the heat and mass transfer one can take <math>n_0=u</math> (the density of [internal energy](/source/internal_energy)) and <math>n_i</math> is the concentration of the <math>i</math>th component. The corresponding driving forces are the space vectors
: <math>X_0= \nabla \frac{1}{T}\ , \;\;\; X_i= - \nabla \frac{\mu_i}{T} \; (i >0) ,</math> because <math>\mathrm{d}s = \frac{1}{T} \,\mathrm{d}u-\sum_{i \geq 1} \frac{\mu_i}{T} \, {\rm d} n_i</math>
where ''T'' is the absolute temperature and <math>\mu_i</math> is the chemical potential of the <math>i</math>th component. It should be stressed that the separate diffusion equations describe the mixing or mass transport without bulk motion. Therefore, the terms with variation of the total pressure are neglected. It is possible for diffusion of small admixtures and for small gradients.

For the linear Onsager equations, we must take the thermodynamic forces in the [linear approximation](/source/linear_approximation) near equilibrium:
:<math>X_i= \sum_{k \geq 0} \left.\frac{\partial^2 s(n)}{\partial n_i \, \partial n_k}\right|_{n=n^*} \nabla n_k \ ,</math>
where the derivatives of <math>s</math> are calculated at equilibrium <math>n^*</math>.
The matrix of the ''kinetic coefficients'' <math>L_{ij}</math> should be symmetric ([Onsager reciprocal relations](/source/Onsager_reciprocal_relations)) and [positive definite](/source/Positive-definite_matrix) ([for the entropy growth](/source/Second_law_of_thermodynamics)).

The transport equations are
:<math>\frac{\partial n_i}{\partial t}= - \operatorname{div} \mathbf{J}_i =- \sum_{j\geq 0} L_{ij}\operatorname{div} X_j = \sum_{k\geq 0} \left[-\sum_{j\geq 0} L_{ij} \left.\frac{\partial^2 s(n)}{\partial n_j \, \partial n_k}\right|_{n=n^*}\right] \, \Delta n_k\ .</math>
Here, all the indexes {{nowrap|1=''i'', ''j'', ''k'' = 0, 1, 2, ...}} are related to the internal energy (0) and various components. The expression in the square brackets is the matrix <math>D_{ik}</math> of the diffusion (''i'',''k''&nbsp;>&nbsp;0), thermodiffusion (''i''&nbsp;>&nbsp;0, ''k''&nbsp;=&nbsp;0 or ''k''&nbsp;>&nbsp;0, ''i''&nbsp;=&nbsp;0) and [thermal conductivity](/source/thermal_conductivity) ({{nowrap|1=''i'' = ''k'' = 0}}) coefficients.

Under [isothermal conditions](/source/Isothermal_process) ''T''&nbsp;=&nbsp;constant. The relevant [thermodynamic potential](/source/thermodynamic_potential) is the free energy (or the [free entropy](/source/free_entropy)). The thermodynamic driving forces for the isothermal diffusion are antigradients of chemical potentials, <math>-(1/T)\,\nabla\mu_j</math>, and the matrix of diffusion coefficients is
:<math>D_{ik}=\frac{1}{T}\sum_{j\geq 1} L_{ij} \left.\frac{\partial \mu_j(n,T)} { \partial n_k}\right|_{n=n^*}</math>
(''i,k''&nbsp;>&nbsp;0).

There is intrinsic arbitrariness in the definition of the thermodynamic forces and kinetic coefficients because they are not measurable separately and only their combinations <math display="inline">\sum_j L_{ij}X_j</math> can be measured. For example, in the original work of Onsager<ref name = "Onsager1931"/> the thermodynamic forces include additional multiplier ''T'', whereas in the [Course of Theoretical Physics](/source/Course_of_Theoretical_Physics)<ref>
{{cite book
 |author=[L.D. Landau](/source/Lev_Landau), [E.M. Lifshitz](/source/Evgeny_Lifshitz)
 |year=1980
 |title=Statistical Physics
 |edition=3rd |volume=5
 |publisher=[Butterworth-Heinemann](/source/Butterworth-Heinemann)
 |isbn=978-0-7506-3372-7
}}</ref> this multiplier is omitted but the sign of the thermodynamic forces is opposite. All these changes are supplemented by the corresponding changes in the coefficients and do not affect the measurable quantities.

==== Nondiagonal diffusion must be nonlinear ====
The formalism of linear irreversible thermodynamics (Onsager) generates the systems of linear diffusion equations in the form
:<math>\frac{\partial c_i}{\partial t} = \sum_j D_{ij} \, \Delta c_j.</math>
If the matrix of diffusion coefficients is diagonal, then this system of equations is just a collection of decoupled Fick's equations for various components. Assume that diffusion is non-diagonal, for example, <math>D_{12} \neq 0</math>, and consider the state with <math>c_2 = \cdots = c_n = 0</math>. At this state, <math>\partial c_2 / \partial t = D_{12} \, \Delta c_1</math>. If <math>D_{12} \, \Delta c_1(x) < 0</math> at some points, then <math>c_2(x)</math> becomes negative at these points in a short time. Therefore, linear non-diagonal diffusion does not preserve positivity of concentrations. Non-diagonal equations of multicomponent diffusion must be non-linear.<ref name=GorbanMMNP2011/>

=== Applied forces ===
The [Einstein relation (kinetic theory)](/source/Einstein_relation_(kinetic_theory)) connects the diffusion coefficient and the mobility (the ratio of the particle's terminal [drift velocity](/source/drift_velocity) to an applied [force](/source/force)).<ref>S. Bromberg, K.A. Dill (2002), [https://books.google.com/books?id=hdeODhjp1bUC&pg=PA327 Molecular Driving Forces: Statistical Thermodynamics in Chemistry and Biology], Garland Science, {{ISBN|0815320515}}.</ref> For charged particles:
:<math> D = \frac{\mu \, k_\text{B} T}{q}, </math>
where ''D'' is the [diffusion constant](/source/Fick's_law_of_diffusion), ''μ'' is the "mobility", ''k''<sub>B</sub> is the [Boltzmann constant](/source/Boltzmann_constant), ''T'' is the [absolute temperature](/source/absolute_temperature), and ''q'' is the [elementary charge](/source/elementary_charge), that is, the charge of one electron.

Below, to combine in the same formula the chemical potential ''μ'' and the mobility, we use for mobility the notation <math>\mathfrak{m}</math>.

===Diffusion across a membrane===
The mobility-based approach was further applied by T. Teorell.<ref>{{cite journal|author=T. Teorell|pmc=1076553|pmid=16587950|year=1935|title=Studies on the "Diffusion Effect" upon Ionic Distribution. Some Theoretical Considerations|volume=21|issue=3|pages=152–61|journal=Proceedings of the National Academy of Sciences of the United States of America|bibcode = 1935PNAS...21..152T |doi = 10.1073/pnas.21.3.152 |doi-access=free}}</ref> In 1935, he studied the diffusion of ions through a membrane. He formulated the essence of his approach in the formula:
:'''the flux is equal to mobility × concentration × force per gram-ion'''.
This is the so-called ''Teorell formula''.{{citation needed|date=December 2023}} The term "gram-ion" ("gram-particle")  is used for a quantity of a substance that contains the [Avogadro number](/source/Avogadro_constant) of ions (particles). The common modern term is [mole](/source/Mole_(unit)).

The force under isothermal conditions consists of two parts:
# Diffusion force caused by concentration gradient: <math>-RT \frac{1}{n} \, \nabla n = -RT \, \nabla (\ln(n/n^\text{eq}))</math>.
# Electrostatic force caused by electric potential gradient: <math>q \, \nabla \varphi</math>.
Here ''R'' is the [gas constant](/source/gas_constant), ''T'' is the absolute temperature, ''n'' is the concentration, the equilibrium concentration is marked by a superscript "eq", ''q'' is the charge and ''φ'' is the electric potential.

The simple but crucial difference between the Teorell formula and the Onsager laws is the concentration factor in the Teorell expression for the flux. In the Einstein–Teorell approach, if for the finite force the concentration tends to zero then the flux also tends to zero, whereas the Onsager equations violate this simple and physically obvious rule.

The general formulation of the Teorell formula for non-perfect systems under isothermal conditions is<ref name=GorbanMMNP2011/>
:<math>\mathbf{J} = \mathfrak{m} \exp\left(\frac{\mu - \mu_0}{RT}\right)(-\nabla \mu + (\text{external force per mole})),</math>
where ''μ'' is the [chemical potential](/source/chemical_potential), ''μ''<sub>0</sub> is the standard value of the chemical potential.
The expression <math>a = \exp\left(\frac{\mu - \mu_0}{RT}\right)</math> is the so-called [activity](/source/Activity_(chemistry)). It measures the "effective concentration" of a species in a non-ideal mixture. In this notation, the Teorell formula for the flux has a very simple form<ref name=GorbanMMNP2011/>
:<math>\mathbf{J} = \mathfrak{m} a (-\nabla \mu + (\text{external force per mole})).</math>
The standard derivation of the activity includes a normalization factor and for small concentrations <math>a = n/n^\ominus + o(n/n^\ominus)</math>, where <math>n^\ominus</math> is the standard concentration. Therefore, this formula for the flux describes the flux of the normalized [dimensionless quantity](/source/dimensionless_quantity) <math>n/n^\ominus</math>:
:<math>\frac{\partial (n/n^\ominus)}{\partial t} = \nabla \cdot [\mathfrak{m} a (\nabla \mu - (\text{external force per mole}))].</math>

=== Ballistic time scale ===
The Einstein model neglects the inertia of the diffusing partial. The alternative
[Langevin equation](/source/Langevin_equation) starts with Newton's second law of motion:<ref name = "Bian_SoftMatt">{{Cite journal| author1 = Bian, Xin | author2 = Kim, Changho| author3 = Karniadakis, George Em|date=2016-08-14| title = 111 years of Brownian motion| journal = Soft Matter | volume = 12 | issue = 30 | pages = 6331–6346 | doi = 10.1039/c6sm01153e | pmc = 5476231| pmid = 27396746| bibcode = 2016SMat...12.6331B}}</ref>

:<math>m \frac{d^2x}{dt^2} = -\frac{1}{\mu}\frac{dx}{dt} + F(t) </math>

where
* ''x'' is the position.
* ''μ'' is the mobility of the particle in the fluid or gas, which can be calculated using the [Einstein relation (kinetic theory)](/source/Einstein_relation_(kinetic_theory)).
* ''m'' is the mass of the particle.
* ''F'' is the random force applied to the particle.
* ''t'' is time.

Solving this equation, one obtained the time-dependent diffusion constant in the long-time limit and when the particle is significantly denser than the surrounding fluid,<ref name="Bian_SoftMatt"/>

:<math> D(t) = \mu \, k_{\rm B} T(1-e^{-t/(m\mu)}) </math>

where
* ''k''<sub>B</sub> is the [Boltzmann constant](/source/Boltzmann_constant);
* ''T'' is the [absolute temperature](/source/absolute_temperature).
* ''μ'' is the mobility of the particle in the fluid or gas, which can be calculated using the [Einstein relation (kinetic theory)](/source/Einstein_relation_(kinetic_theory)).
* ''m'' is the mass of the particle.
* ''t'' is time.

At long time scales, Einstein's result is recovered, but short time scales, the ''ballistic regime'' are also explained. Moreover, unlike the Einstein approach, a velocity can be defined, leading to the [Fluctuation-dissipation theorem](/source/Fluctuation-dissipation_theorem), connecting the competition between friction and random forces in defining the temperature.<ref name="Bian_SoftMatt"/>{{rp|3.2}}

=== Jumps on the surface and in solids ===
thumb|300px|Diffusion in the monolayer: oscillations near temporary equilibrium positions and jumps to the nearest free places.

[Diffusion of reagents on the surface](/source/Surface_diffusion) of a [catalyst](/source/catalyst) may play an important role in heterogeneous catalysis. The model of diffusion in the ideal [monolayer](/source/monolayer) is based on the jumps of the reagents on the nearest free places. This model was used for CO on Pt oxidation under low gas pressure.

The system includes several reagents <math>A_1,A_2,\ldots, A_m</math> on the surface. Their surface concentrations are <math>c_1,c_2,\ldots, c_m.</math> The surface is a lattice of the adsorption places. Each
reagent molecule fills a place on the surface. Some of the places are free. The concentration of the free places is <math>z=c_0</math>. The sum of all <math>c_i</math> (including free places) is constant, the density of adsorption places ''b''.

The jump model gives for the diffusion flux of <math>A_i</math> (''i''&nbsp;=&nbsp;1,&nbsp;...,&nbsp;''n''):
:<math>\mathbf{J}_i=-D_i[z \, \nabla c_i - c_i \nabla z]\, . </math>
The corresponding diffusion equation is:<ref name=GorbanMMNP2011/>
:<math>\frac{\partial c_i}{\partial t}=- \operatorname{div}\mathbf{J}_i=D_i[z \, \Delta c_i - c_i \, \Delta z] \, .</math>
Due to the conservation law, <math>z=b-\sum_{i=1}^n c_i \, ,</math> and we
have the system of ''m'' diffusion equations. For one component we get Fick's law and linear equations because <math>(b-c) \,\nabla c- c\,\nabla(b-c) = b\,\nabla c</math>. For two and more components the equations are nonlinear.

If all particles can exchange their positions with their closest neighbours then a simple generalization gives
:<math>\mathbf{J}_i=-\sum_j D_{ij}[c_j \,\nabla c_i - c_i \,\nabla c_j]</math>
:<math>\frac{\partial c_i}{\partial t}=\sum_j D_{ij}[c_j \, \Delta c_i - c_i \,\Delta c_j]</math>
where <math>D_{ij} = D_{ji} \geq 0</math> is a symmetric matrix of coefficients that characterize the intensities of jumps. The free places (vacancies) should be considered as special "particles" with concentration <math>c_0</math>.

Various versions of these jump models are also suitable for simple diffusion mechanisms in solids.

=== Porous media ===
For diffusion in porous media the basic equations are (if Φ is constant):<ref>J. L. Vázquez (2006), The Porous Medium Equation. Mathematical Theory, Oxford Univ. Press, {{ISBN|0198569033}}.</ref>
:<math>\mathbf{J}=- \phi D \,\nabla n^m</math>
:<math>\frac{\partial n}{\partial t} = D \, \Delta n^m \, ,</math>

where ''D'' is the diffusion coefficient, Φ is porosity, ''n'' is the concentration, ''m''&nbsp;>&nbsp;0 (usually ''m''&nbsp;>&nbsp;1, the case ''m''&nbsp;=&nbsp;1 corresponds to Fick's law).

Care must be taken to properly account for the porosity (Φ) of the porous medium in both the flux terms and the accumulation terms.<ref>{{Cite journal|last1=Stauffer|first1=Philip H.|last2=Vrugt|first2=Jasper A.|last3=Turin|first3=H. Jake|last4=Gable|first4=Carl W.|last5=Soll|first5=Wendy E.|date=2009|title=Untangling Diffusion from Advection in Unsaturated Porous Media: Experimental Data, Modeling, and Parameter Uncertainty|journal=Vadose Zone Journal|language=en|volume=8|issue=2|pages=510|doi=10.2136/vzj2008.0055|bibcode=2009VZJ.....8..510S |s2cid=46200956 |issn=1539-1663}}</ref> For example, as the porosity goes to zero, the molar flux in the porous medium goes to zero for a given concentration gradient. Upon applying the divergence of the flux, the porosity terms cancel out and the second equation above is formed.

For diffusion of gases in porous media this equation is the formalization of [Darcy's law](/source/Darcy's_law): the [volumetric flux](/source/volumetric_flux) of a gas in the porous media is

:<math>q=-\frac{k}{\mu}\,\nabla p</math>

where ''k'' is the [permeability](/source/Permeation) of the medium, ''μ'' is the [viscosity](/source/viscosity) and ''p'' is the pressure.

The advective molar flux is given as

''J''&nbsp;=&nbsp;''nq''

and for <math>p \sim n^\gamma</math> Darcy's law gives the equation of diffusion in porous media with ''m''&nbsp;=&nbsp;''γ''&nbsp;+&nbsp;1.

In porous media, the average linear velocity (ν), is related to the volumetric flux as:

<math>\upsilon= q/\phi</math>

Combining the advective molar flux with the diffusive flux gives the advection dispersion equation

<math>\frac{\partial n}{\partial t} = D \, \Delta n^m \ - \nu\cdot \nabla n^m,</math>

For underground water infiltration, the [Boussinesq approximation](/source/Boussinesq_approximation_(buoyancy)) gives the same equation with&nbsp;''m''&nbsp;=&nbsp;2.

For plasma with the high level of radiation, the [Zeldovich](/source/Yakov_Borisovich_Zel'dovich)–Raizer equation gives ''m''&nbsp;>&nbsp;4 for the heat transfer.
<!--
As we know that in porous media there are pores as well as solid material existing to gather all the way along the spacial dimensions of the porous media. So, there exist a combination of diffusion mechanisms in porous media. To understand this, lets consider the example of ceramic membranes. when a gas enters into a ceramic membrane it undergoes the molecular diffusion when moving through the material of the porous media and knudsen diffusion (if the diameter of pore is less than the length of the pore) and molecular difussion (can be self diffusion or mutual diffusion depending on the number of species being diffused) in series when moving in the pores. while moving in the pore the poiseuille diffusion also happens in parrllel with knudsen and molecular diffusion. Depending on the nature of material and operating conditions one or more types of diffusion may not be applicable be small and can be neglected but basic phenomenon is the same. for more information see <M. Coroneo, G.Montante, M.GiacintiBaschetti, A.Paglianti, CFD modelling of inorganic membrane modules for gas mixture separation, Chemical EngineeringScience64(2009)1085–94-->

==Diffusion in physics==

=== Diffusion coefficient in kinetic theory of gases ===
{{See also|Kinetic theory of gases#Diffusion coefficient and diffusion flux}}
thumb|300px|Random collisions of particles in a gas.

The diffusion coefficient <math>D</math> is the coefficient in the [Fick's first law](/source/Fick's_laws_of_diffusion) <math>J=- D \, \partial n/\partial x </math>, where ''J'' is the diffusion flux ([amount of substance](/source/amount_of_substance)) per unit area per unit time, ''n'' (for ideal mixtures) is the concentration, ''x'' is the position [length].

Consider two gases with molecules of the same diameter ''d'' and mass ''m'' ([self-diffusion](/source/self-diffusion)). In this case, the elementary mean free path theory of diffusion gives for the diffusion coefficient

:<math>D=\frac{1}{3} \ell v_T = \frac{2}{3}\sqrt{\frac{k_{\rm B}^3}{\pi^3 m}} \frac{T^{3/2}}{Pd^2}\, ,</math>
where ''k''<sub>B</sub> is the [Boltzmann constant](/source/Boltzmann_constant), ''T'' is the [temperature](/source/temperature), ''P'' is the [pressure](/source/pressure), <math>\ell</math> is the [mean free path](/source/mean_free_path), and ''v<sub>T</sub>'' is the mean thermal speed:
:<math>\ell = \frac{k_{\rm B}T}{\sqrt 2 \pi d^2 P}\, , \;\;\; v_T=\sqrt{\frac{8k_{\rm B}T}{\pi m}}\, .</math>
We can see that the diffusion coefficient in the mean free path approximation grows with ''T'' as ''T''<sup>3/2</sup> and decreases with ''P'' as 1/''P''. If we use for ''P'' the [ideal gas law](/source/ideal_gas_law) ''P''&nbsp;=&nbsp;''RnT'' with the total concentration ''n'', then we can see that for given concentration ''n'' the diffusion coefficient grows with ''T'' as ''T''<sup>1/2</sup> and for given temperature it decreases with the total concentration as&nbsp;1/''n''.

For two different gases, A and B, with molecular masses ''m''<sub>A</sub>, ''m''<sub>B</sub> and molecular diameters ''d''<sub>A</sub>, ''d''<sub>B</sub>, the mean free path estimate of the diffusion coefficient of A in B and B in A is:
: <math>D_{\rm AB}=\frac{2}{3}\sqrt{\frac{k_{\rm B}^3}{\pi^3}}\sqrt{\frac{1}{2m_{\rm A}}+\frac{1}{2m_{\rm B}}}\frac{4T^{3/2}}{P(d_{\rm A}+d_{\rm B})^2}\, ,</math>

=== The theory of diffusion in gases based on Boltzmann's equation ===
In Boltzmann's kinetics of the mixture of gases, each gas has its own distribution function, <math>f_i(x,c,t)</math>, where ''t'' is the time moment, ''x'' is position and ''c'' is velocity of molecule of the ''i''th component of the mixture. Each component has its mean velocity <math display="inline">C_i(x,t) = \frac{1}{n_i} \int_c c f(x,c,t) \, dc</math>. If the velocities <math>C_i(x,t)</math> do not coincide then there exists ''diffusion''.

In the [Chapman–Enskog](/source/Chapman%E2%80%93Enskog_theory) approximation, all the distribution functions are expressed through the densities of the conserved quantities:<ref name="ChapmanCowling"/>
* individual concentrations of particles, <math display="inline">n_i(x,t)=\int_c f_i(x,c,t)\, dc</math> (particles per volume),
* density of momentum <math display="inline">\sum_i m_i n_i C_i(x,t)</math> (''m<sub>i</sub>'' is the ''i''th particle mass),
* density of kinetic energy <math display="block">\sum_i \left( n_i\frac{m_i C^2_i(x,t)}{2} + \int_c \frac{m_i (c_i-C_i(x,t))^2}{2} f_i(x,c,t)\, dc \right).</math>
The kinetic temperature ''T'' and pressure ''P'' are defined in 3D space as
:<math>\frac{3}{2}k_{\rm B} T=\frac{1}{n} \int_c \frac{m_i (c_i-C_i(x,t))^2}{2} f_i(x,c,t)\, dc; \quad P=k_{\rm B}nT,</math>
where <math display="inline">n=\sum_i n_i</math> is the total density.

For two gases, the difference between velocities, <math>C_1-C_2</math> is given by the expression:<ref name="ChapmanCowling"/>
: <math>C_1-C_2=-\frac{n^2}{n_1n_2}D_{12}\left\{ \nabla \left(\frac{n_1}{n} \right)+ \frac{n_1n_2 (m_2-m_1)}{P n (m_1n_1+ m_2n_2)} \nabla P- \frac{m_1 n_1 m_2 n_2}{P(m_1n_1+ m_2n_2)}(F_1-F_2)+k_T \frac{1}{T}\nabla T\right\},</math>
where <math>F_i</math> is the force applied to the molecules of the ''i''th component and <math>k_T</math> is the thermodiffusion ratio.

The coefficient ''D''<sub>12</sub> is positive. This is the diffusion coefficient. Four terms in the formula for ''C''<sub>1</sub>−''C''<sub>2</sub> describe four main effects in the diffusion of gases:
# <math>\nabla \,\left(\frac{n_1}{n}\right)</math> describes the flux of the first component from the areas with the high ratio ''n''<sub>1</sub>/''n'' to the areas with lower values of this ratio (and, analogously the flux of the second component from high ''n''<sub>2</sub>/''n'' to low ''n''<sub>2</sub>/''n'' because ''n''<sub>2</sub>/''n''&nbsp;=&nbsp;1&nbsp;–&nbsp;''n''<sub>1</sub>/''n'');
# <math>\frac{n_1n_2 (m_2-m_1)}{n (m_1n_1+m_2n_2)}\nabla P</math> describes the flux of the heavier molecules to the areas with higher pressure and the lighter molecules to the areas with lower pressure, this is [barodiffusion](/source/barodiffusion);
# <math>\frac{m_1 n_1 m_2 n_2}{P(m_1 n_1+ m_2 n_2)}(F_1-F_2)</math> describes diffusion caused by the difference of the forces applied to molecules of different types. For example, in the Earth's gravitational field, the heavier molecules should go down, or in electric field the charged molecules should move, until this effect is not equilibrated by the sum of other terms. This effect should not be confused with barodiffusion caused by the pressure gradient.
# <math>k_T \frac{1}{T}\nabla T</math> describes [thermodiffusion](/source/thermodiffusion), the diffusion flux caused by the temperature gradient.

All these effects are called ''diffusion'' because they describe the differences between velocities of different components in the mixture. Therefore, these effects cannot be described as a ''bulk'' transport and differ from advection or convection.

In the first approximation,<ref name="ChapmanCowling"/>
* <math display="block">D_{12}=\frac{3}{2n(d_1+d_2)^2}\left[\frac{kT(m_1+m_2)}{2\pi m_1m_2} \right]^{1/2}</math> for rigid spheres;
* <math display="block">D_{12}=\frac{3}{8nA_1({\nu})\Gamma(3-\frac{2}{\nu-1})} \left[\frac{kT(m_1+m_2)}{2\pi m_1m_2}\right]^{1/2} \left(\frac{2kT}{\kappa_{12}} \right)^{\frac{2}{\nu-1}}</math> for repulsing force <math>\kappa_{12}r^{-\nu}.</math>
The number <math>A_1({\nu})</math> is defined by quadratures (formulas (3.7), (3.9), Ch. 10 of the classical Chapman and Cowling book<ref name="ChapmanCowling"/>)

We can see that the dependence on ''T'' for the rigid spheres is the same as for the simple mean free path theory but for the power repulsion laws the exponent is different. Dependence on a total concentration ''n'' for a given temperature has always the same character, 1/''n''.

In applications to gas dynamics, the diffusion flux and the bulk flow should be joined in one system of transport equations. The bulk flow describes the mass transfer. Its velocity ''V'' is the mass average velocity. It is defined through the momentum density and the mass concentrations:
:<math>V=\frac{\sum_i \rho_i C_i} \rho \, .</math>
where <math>\rho_i =m_i n_i</math> is the mass concentration of the ''i''th species, <math display="inline">\rho=\sum_i \rho_i</math> is the mass density.

By definition, the diffusion velocity of the ''i''th component is <math>v_i=C_i-V</math>, <math display="inline">\sum_i \rho_i v_i=0</math>.
The mass transfer of the ''i''th component is described by the [continuity equation](/source/continuity_equation)
:<math>\frac{\partial \rho_i}{\partial t}+\nabla(\rho_i V) + \nabla (\rho_i v_i) = W_i \, ,</math>
where <math>W_i</math> is the net mass production rate in chemical reactions, <math display="inline">\sum_i W_i= 0</math>.

In these equations, the term <math>\nabla(\rho_i V)</math> describes advection of the ''i''th component and the term <math>\nabla (\rho_i v_i)</math> represents diffusion of this component.

In 1948, [Wendell H. Furry](/source/Wendell_H._Furry) proposed to use the ''form'' of the diffusion rates found in kinetic theory as a framework for the new phenomenological approach to diffusion in gases. This approach was developed further by F.A. Williams and S.H. Lam.<ref>{{cite journal|author=S. H. Lam |url=http://www.princeton.edu/~lam/MultiComp.pdf|title=Multicomponent diffusion revisited| doi=10.1063/1.2221312| year=2006|journal=Physics of Fluids| volume=18| issue=7|pages=073101–073101–8 |article-number=073101 |bibcode = 2006PhFl...18g3101L }}</ref> For the diffusion velocities in multicomponent gases (''N'' components) they used
:<math>v_i=-\left(\sum_{j=1}^N D_{ij} \mathbf{d}_j + D_i^{(T)} \, \nabla (\ln T) \right)\, ;</math>
:<math>\mathbf{d}_j=\nabla X_j + (X_j-Y_j)\,\nabla (\ln P) + \mathbf{g}_j\, ;</math>
:<math>\mathbf{g}_j=\frac{\rho}{P} \left( Y_j \sum_{k=1}^N Y_k (f_k-f_j) \right)\, .</math>
Here, <math>D_{ij}</math> is the diffusion coefficient matrix, <math>D_i^{(T)}</math> is the thermal diffusion coefficient, <math>f_i</math> is the body force per unit mass acting on the ''i''th species, <math>X_i=P_i/P</math> is the partial pressure fraction of the ''i''th species (and <math>P_i</math> is the partial pressure), <math>Y_i=\rho_i/\rho</math> is the mass fraction of the ''i''th species, and <math display="inline">\sum_i X_i=\sum_i Y_i=1.</math>

thumb|350px|right|As carriers are generated (green:electrons and purple:holes) due to light shining at the center of an intrinsic semiconductor, they diffuse towards two ends. Electrons have higher diffusion constant than holes leading to fewer excess electrons at the center as compared to holes.

=== Diffusion of electrons in solids ===

{{main|Diffusion current}}
When the density of electrons in solids is not in equilibrium, diffusion of electrons occurs. For example, when a bias is applied to two ends of a chunk of semiconductor, or a light shines on one end (see right figure), electrons diffuse from high density regions (center) to low density regions (two ends), forming a gradient of electron density. This process generates current, referred to as [diffusion current](/source/diffusion_current).

Diffusion current can also be described by [Fick's first law](/source/Fick's_laws_of_diffusion)
:<math>J=- D \, \partial n/\partial x\, ,</math>
where ''J'' is the diffusion current density ([amount of substance](/source/amount_of_substance)) per unit area per unit time, ''n'' (for ideal mixtures) is the electron density, ''x'' is the position [length].

=== Diffusion in geophysics ===
Analytical and numerical models that solve the diffusion equation for different initial and boundary conditions have been popular for studying a wide variety of changes to the Earth's surface. Diffusion has been used extensively in erosion studies of hillslope retreat, bluff erosion, fault scarp degradation, wave-cut terrace/shoreline retreat, alluvial channel incision, coastal shelf retreat, and delta progradation.<ref>{{Cite journal|last1=Pasternack|first1=Gregory B.|last2=Brush|first2=Grace S.|last3=Hilgartner|first3=William B.|date=2001-04-01|title=Impact of historic land-use change on sediment delivery to a Chesapeake Bay subestuarine delta|journal=[Earth Surface Processes and Landforms](/source/Earth_Surface_Processes_and_Landforms)|language=en|volume=26|issue=4|pages=409–27|doi=10.1002/esp.189|issn=1096-9837|bibcode=2001ESPL...26..409P|s2cid=129080402 }}</ref> Although the Earth's surface is not literally diffusing in many of these cases, the process of diffusion effectively mimics the holistic changes that occur over decades to millennia. Diffusion models may also be used to solve inverse boundary value problems in which some information about the depositional environment is known from paleoenvironmental reconstruction and the diffusion equation is used to figure out the sediment influx and time series of landform changes.<ref>{{Cite web|url=http://pasternack.ucdavis.edu/research/projects/tidal-freshwater-deltas/tfd-modeling/|author= Gregory B. Pasternack |title= Watershed Hydrology, Geomorphology, and Ecohydraulics :: TFD Modeling|website=pasternack.ucdavis.edu|language=en|access-date=2017-06-12}}</ref>

=== Dialysis ===
[[Image:Semipermeable membrane (svg).svg|thumb|upright=1.25|Schematic of semipermeable membrane during [hemodialysis](/source/hemodialysis), where blood is red, dialysing fluid is blue, and the membrane is yellow.]]
Dialysis works on the principles of the diffusion of solutes and [ultrafiltration](/source/ultrafiltration) of fluid across a [semi-permeable membrane](/source/semi-permeable_membrane). Diffusion is a property of substances in water; substances in water tend to move from an area of high concentration to an area of low concentration.<ref name=Mosby>'' Mosby's Dictionary of Medicine, Nursing, & Health Professions''. 7th ed. St. Louis, MO; Mosby: 2006</ref> Blood flows by one side of a semi-permeable membrane, and a dialysate, or special dialysis fluid, flows by the opposite side. A semipermeable membrane is a thin layer of material that contains holes of various sizes, or pores. Smaller solutes and fluid pass through the membrane, but the membrane blocks the passage of larger substances (for example, red blood cells and large proteins). This replicates the filtering process that takes place in the kidneys when the blood enters the kidneys and the larger substances are separated from the smaller ones in the [glomerulus](/source/Glomerulus_(kidney)).<ref name=Mosby/>

==Random walk (random motion)==
thumb|The apparent random motion of atoms, ions or molecules explained. Substances appear to move randomly due to collisions with other substances. From the iBook ''Cell Membrane Transport'', free license granted by IS3D, LLC, 2014. One common misconception is that individual atoms, ions or molecules move randomly, which they do not. In the animation on the right, the ion in the left panel appears to have "random" motion in the absence of other ions. As the right panel shows, however, this motion is not random but is the result of "collisions" with other ions. As such, the movement of a single atom, ion, or molecule within a mixture just appears random when viewed in isolation. The movement of a substance within a mixture by "random walk" is governed by the kinetic energy within the system that can be affected by changes in concentration, pressure or temperature. (This is a classical description. At smaller scales, quantum effects will be non-negligible, in general. Thus, the study of the movement of a single atom becomes more subtle since particles at such small scales are described by probability amplitudes rather than deterministic measures of position and velocity.)

=== Separation of diffusion from convection in gases ===
While Brownian motion of multi-molecular mesoscopic particles (like pollen grains studied by Brown) is observable under an optical microscope, molecular diffusion can only be probed in carefully controlled experimental conditions. Since Graham experiments, it is well known that avoiding of convection is necessary and this may be a non-trivial task.

Under normal conditions, molecular diffusion dominates only at lengths in the nanometre-to-millimetre range. On larger length scales, transport in liquids and gases is normally due to another [transport phenomenon](/source/transport_phenomena), [convection](/source/convection). To separate diffusion in these cases, special efforts are needed.

In contrast, [heat conduction](/source/heat_conduction) through solid media is an everyday occurrence (for example, a metal spoon partly immersed in a hot liquid). This explains why the diffusion of heat was explained mathematically before the diffusion of mass.

===Other types of diffusion===
* [Anisotropic diffusion](/source/Anisotropic_diffusion), also known as the Perona–Malik equation, enhances high gradients
* [Atomic diffusion](/source/Atomic_diffusion), in solids
* [Bohm diffusion](/source/Bohm_diffusion), spread of plasma across magnetic fields
* [Eddy diffusion](/source/Eddy_diffusion), in coarse-grained description of turbulent flow
* [Effusion](/source/Effusion) of a gas through small holes
* [Electronic](/source/Electronics) diffusion, resulting in an [electric current](/source/current_(electricity)) called the [diffusion current](/source/diffusion_current)
* [Facilitated diffusion](/source/Facilitated_diffusion), present in some organisms
* [Gaseous diffusion](/source/Gaseous_diffusion), used for [isotope separation](/source/isotope_separation)
* [Heat equation](/source/Heat_equation), diffusion of thermal energy
* [Itō diffusion](/source/It%C5%8D_diffusion), mathematisation of Brownian motion, continuous stochastic process.
* [Knudsen diffusion](/source/Knudsen_diffusion) of gas in long pores with frequent wall collisions
* [Lévy flight](/source/L%C3%A9vy_flight)
* [Molecular diffusion](/source/Molecular_diffusion), diffusion of molecules from more dense to less dense areas
* [Momentum diffusion](/source/Momentum_diffusion) ex. the diffusion of the [hydrodynamic](/source/hydrodynamic) velocity field
* [Photon diffusion](/source/Photon_diffusion)
* [Plasma diffusion](/source/Plasma_diffusion)
* [Random walk](/source/Random_walk),<ref>{{cite book |title= Aspects and Applications of the Random Walk |isbn=978-0444816061|last= Weiss |first= G. |year= 1994 |publisher= North-Holland}}</ref> model for diffusion
* [Reverse diffusion](/source/Reverse_diffusion), against the concentration gradient, in phase separation
* [Rotational diffusion](/source/Rotational_diffusion), random reorientation of molecules
* [Spin diffusion](/source/Spin_diffusion), diffusion of [spin magnetic moment](/source/spin_magnetic_moment)s in solids
* [Surface diffusion](/source/Surface_diffusion), diffusion of adparticles on a surface
* [Taxis](/source/Taxis) is an animal's directional movement activity in response to a stimulus
** [Kinesis](/source/Kinesis_(biology)) is an animal's non-directional movement activity in response to a stimulus
* [Trans-cultural diffusion](/source/Trans-cultural_diffusion), diffusion of cultural traits across geographical area
* [Turbulent diffusion](/source/Turbulent_diffusion), transport of mass, heat, or momentum within a turbulent fluid

==See also==
{{col div}}
* {{annotated link|Anomalous diffusion}}
* {{annotated link|Convection–diffusion equation}}
* {{annotated link|Diffusion-limited aggregation}}
* {{annotated link|Darken's equations}}
* {{annotated link|Isobaric counterdiffusion}}
* {{annotated link|Sorption}}
* {{annotated link|Osmosis}}
* {{annotated link|Percolation theory}}
* {{annotated link|Social Networks}}
{{colend}}

==References==
{{reflist|35em}}

{{Authority control}}

Category:Diffusion
Category:Articles containing video clips
Category:Broad-concept articles

---
Adapted from the Wikipedia article [Diffusion](https://en.wikipedia.org/wiki/Diffusion) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Diffusion?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
