Fundamentals / Mechanical engineering / Fluid mechanics

Fluid mechanics · Advanced study

Read the connected derivations and worked problems in sequence, or open each chapter in its home course.

  1. Energy, entropy and mechanical response

    Close a steady-flow energy balance, then determine which pressure or temperature change reveals an irreversible process. Connect a film force to a moving bearing.

  2. Solving transport while conserving mass

    Follow control-volume reasoning onto a grid. Compare diffusion, interface fluxes and advective remapping. Check how a travelling perturbation moves at different resolutions.

Energy, entropy and mechanical response

Close a steady-flow energy balance, then determine which pressure or temperature change reveals an irreversible process. Connect a film force to a moving bearing.

  1. Open systems, enthalpy and steady-flow devices
  2. Entropy, irreversibility and useful-work loss
  3. Useful work and exergy destruction
  4. Diffusion with a stationary carrier gas
  5. Hydrodynamic lubrication and sliding bearings
  6. From cut forces to local equilibrium
  7. Action density, stress waves and the boundary that reflects them
  8. From binary collisions to the Boltzmann equation

Open systems, enthalpy and steady-flow devices

Use an inlet-outlet balance to distinguish shaft work, kinetic-energy conversion and pressure reduction.

From first principles

Derive the steady-flow energy balance including flow work

Surround a turbine, nozzle or mixing chamber with a stationary control surface. In addition to transporting its internal, kinetic and gravitational energies, an entering fluid is pushed across the inlet by upstream pressure. A mass increment \(dm\) occupies volume \(v\,dm\) and requires pressure work \(pv\,dm\) to enter. The outlet carries the corresponding work away. Combining internal energy \(u\) and flow work defines enthalpy:

\[h=u+pv,\]
\[e_{\rm stream}=h+V^2/2+gz .\]

Here \(V\) denotes speed, \(v\) specific volume and \(z\) elevation. In steady operation, sum these stream contributions and include heat into and shaft work out of the control volume. For one inlet and one outlet with equal mass rate, rearrangement gives

\[\dot Q-\dot W_s=\dot m\,[h_2-h_1+(V_2^2-V_1^2)/2+g(z_2-z_1)] .\]

All terms have units of power. A nozzle can accelerate flow without shaft work by lowering static enthalpy. A throttle with no heat, no shaft work and negligible speed and elevation changes is instead approximately isenthalpic. Omitting the pressure work while also using internal energy would miss both conclusions.

Background · Specific enthalpy
\[h=u+pv\]

Specific quantities are per unit mass. Enthalpy accounts for internal energy and flow work when mass passes through a control surface.

Derivation and applications

Convert a nozzle energy balance into a mass-flow limit

A steady nozzle converts static enthalpy into bulk kinetic energy. A converging passage has a maximum possible mass flow at a specified inlet stagnation state. Derive this for a steady, one-dimensional, adiabatic ideal gas with constant \(c_p\) and \(\gamma\), reversible acceleration and negligible inlet-reservoir velocity. Write reservoir conditions as \(T_0,p_0\) and the local static conditions as \(T,p\). With no shaft work the energy balance gives

\[c_pT_0=c_pT+u^2/2,\]
\[u=\sqrt{2c_pT_0(1-T/T_0)} .\]

Isentropic acceleration links temperature and pressure. Let \(r=T/T_0\), so \(p/p_0=r^{\gamma/(\gamma-1)}\). The mass flux is \(\rho u\) and ideal-gas density is \(p/(RT)\). Substitution gives a function of just one local variable:

\[G(r)=\frac{p_0}{RT_0}\sqrt{2c_pT_0}\,r^{1/(\gamma-1)}\sqrt{1-r}.\]

To find its maximum differentiate \(\ln G=(\ln r)/(\gamma-1)+\ln(1-r)/2+\text{constant}\). Equating the two derivative terms gives the sonic temperature and pressure ratios:

\[r_*=\frac{2}{\gamma+1},\]
\[p_*/p_0=\left(\frac{2}{\gamma+1}\right)^{\gamma/(\gamma-1)},\]
\[u_*^2=\gamma R T_* .\]

The flow through a converging exit is choked when downstream pressure is low enough for this state to be reached. Further lowering downstream pressure changes the flow after the exit; the ideal mass flux at that exit remains fixed. The model omits wall friction, heat transfer and discharge-coefficient corrections.

Worked example

Size a sonic air metering aperture

For \(p_0=200\) kPa absolute, \(T_0=300\) K, \(\gamma=1.40\) and \(R=287\) J/(kg K), the critical state has \(T_*=250\) K and \(p_*=105.7\) kPa. Then \(\rho_*=1.47\) kg/m³ and \(u_*=317\) m/s, giving \(G_*\simeq467\) kg/(m² s). A \(20.0\) mm² effective aperture meters about \(9.33\) g/s if the downstream pressure allows choking.

Second application

Decide whether a higher receiver pressure matters

Raise the receiver pressure to \(160\) kPa. Its ratio to reservoir pressure is now \(0.800\), above the critical \(0.528\). An ideal converging nozzle discharges at this pressure with \(r=0.800^{(0.4/1.4)}=0.938\). The energy equation gives \(u\approx193\) m/s, static density about \(1.98\) kg/m³, and mass flux about \(382\) kg/(m² s). Through the same aperture the predicted flow falls to \(7.64\) g/s. A model assuming choked flow at both settings would miss this change.

Try it · Nozzle

Set the inputs to the values in the worked example, then vary one quantity while holding the others fixed. Compare the curve and numerical balance with the second application. The calculation uses the assumptions derived above; its readout identifies bounds such as choking, phase-region changes and inconsistent measurements.

Account for fluid entering and leaving

A closed-system piston can be followed with its gas. A continuously operating turbine has fresh fluid crossing its boundary every second. Enclose the hardware and its internal flow in a stationary control volume. Flowing mass carries internal energy \(u\), kinetic energy \(v^2/2\) and gravitational energy \(gz\) per kilogram. Upstream pressure also does work pushing fluid in, while downstream pressure opposes its exit. Per unit mass this flow work is \(p/\rho\), motivating the specific enthalpy \(h=u+p/\rho\).

Adding all incoming and outgoing energy rates gives, for one inlet, one outlet and constant stored energy,

\[\dot Q-\dot W_s=\dot m\left[h_2-h_1+(v_2^2-v_1^2)/2+g(z_2-z_1)\right].\]

Here \(\dot W_s\) is shaft power out of the control volume. Pressure work at the flowing boundaries is already contained in enthalpy; adding it once more would count it twice. One inlet and outlet have the same steady mass rate even when their volumetric flow rates differ dramatically because gas expands.

Read the dominant energy conversion

In a short, insulated nozzle there is no shaft, the elevation difference is small and falling enthalpy raises velocity. The property \(h+v^2/2\) is then constant, often called stagnation enthalpy. In an insulated turbine with small inlet and outlet speeds, the enthalpy drop instead appears mainly as positive shaft work. An insulated compressor takes work in, raising enthalpy. An insulated throttling valve has neither shaft power nor a large net change of bulk kinetic energy between distant ports, so its inlet and outlet enthalpies are approximately equal. These components can all drop pressure during expansion, yet their energy effects differ.

For ideal-gas air with nearly constant \(c_p\), an enthalpy difference may be approximated by \(c_p\Delta T\). Keeping h in kJ/kg while using \(v^2/2\) in J/kg is a common factor-of-one-thousand error. At 100 m/s the kinetic energy is 5 kJ/kg. That estimate often decides whether an inlet velocity may be omitted from a turbine work calculation.

Evaluate heat loss and exhaust speed

A turbine passes 2.0 kg/s of gas from \(h_1=820\) to \(h_2=600\) kJ/kg. Inlet speed is 40 m/s, exhaust speed 160 m/s and the casing loses 10 kW of heat. Elevations are equal. The gas loses \(2(820-600)=440\) kW of enthalpy flow. Its kinetic-energy rate grows by \(2(160^2-40^2)/2000=24.0\) kW. The unit delivers \(440-24-10=406\) kW shaft power. Counting all 440 kW as shaft output would overstate the result by both the residual exhaust energy and the heat leak.

A separate nozzle using gas at \(h_1=820\) kJ/kg and 40 m/s could reach \(h_2=800\) kJ/kg without a shaft if its speed rose to \(\sqrt{40^2+2(20\,000)}=204\) m/s. This estimate is an energy condition. The required area ratio, pressure drop and possibility of choking also depend on compressible-flow relations.

Extend the same balance to a mixer

Two insulated water lines mix at negligible speed change. One supplies 0.20 kg/s at 360 K and the other 0.30 kg/s at 300 K. A mass balance gives 0.50 kg/s at exit. With equal, constant \(c_p\) and no shaft, summing the two inlet enthalpy rates yields an outlet temperature \([0.20(360)+0.30(300)]/0.50=324\) K. The temperature lies between the inlet values, closer to the higher mass rate. The mixer conserves energy while creating entropy. The next lecture explains how both statements can hold simultaneously and why reversing the mixer without another effect is impossible.

Interpret a measured stagnation temperature

For an insulated diffuser with negligible shaft work, reducing speed from 200 to 40 m/s raises static enthalpy by \((200^2-40^2)/2=19.2\,\mathrm{kJ/kg}\). For air with \(c_p=1.005\,\mathrm{kJ/(kg\,K)}\) that corresponds to a 19.1 K static temperature rise. Stagnation enthalpy \(h+V^2/2\) stays constant even if internal friction produces entropy. A stationary temperature probe that slows the arriving air may approach a stagnation reading, so comparison with a predicted static temperature requires knowing where and how the measurement was taken.

Minimise compression work by selecting an intermediate pressure

A continuous air supply can be compressed in two stages and cooled at intermediate pressure. For a steady adiabatic compressor with negligible kinetic and potential changes, shaft work input is the stream enthalpy rise. With an ideal gas, constant \(c_p,\gamma\), and a reversible stage,

\[w=c_p T_{\rm in}[(p_{\rm out}/p_{\rm in})^a-1],\]

where \(a=(\gamma-1)/\gamma\). This follows by integrating \(ds=c_p\,dT/T-R\,dp/p=0\), then applying \(dh=c_p\,dT\). If both stages use the same isentropic efficiency, divide each ideal rise by that efficiency.

Assume complete intercooling to the original inlet temperature \(T_1\), no pressure losses and prescribed first and last pressures. Put \(r_1=p_i/p_1,\ r_2=p_3/p_i\), so \(r_1r_2=p_3/p_1=r\). Total ideal work is \(c_pT_1[r_1^a+(r/r_1)^a-2]\). Differentiate with respect to \(\ln r_1\); the derivative is \(c_pT_1a(r_1^a-r_2^a)\). The sum has a minimum at equal ratios, giving intermediate pressure \(p_i=\sqrt{p_1p_3}\). This is a geometric mean of absolute pressures. A gauge-pressure ratio would give a completely different design.

Compare two cooled stages with a single compression

Supply air at 100 kPa and 300 K and deliver it at 900 kPa absolute. For \(\gamma=1.4,\ c_p=1.005\,\mathrm{kJ/(kg\,K)}\), an ideal single stage gives \(T_3=300(9^{0.2857})=562.0\,\mathrm K\) and work about 263 kJ/kg. Two equal-ratio stages operate through 300 kPa. Each reaches \(300(3^{0.2857})=410.6\,\mathrm K\) before its outlet or intercooler, requiring \(1.005(110.6)=111.2\,\mathrm{kJ/kg}\). Total work is about 222.4 kJ/kg, roughly 15.5% lower. The intercooler must remove 111.2 kJ/kg between the stages under the ideal complete-cooling assumption.

With equal stage efficiencies of 0.80, each real enthalpy rise becomes 139.0 kJ/kg and the intermediate discharge temperature is about 438 K. Cooling back to 300 K then removes 139.0 kJ per kilogram, with a corresponding load of 27.8 kW at 0.20 kg/s. The equal-ratio choice survives because both stage work expressions acquired the same multiplier. An intercooler that can cool only to 330 K increases the weight of second-stage compression work; the new optimum shifts towards a larger first-stage pressure ratio. A design comparing only compressor shaft power would also need to account for coolant pumping, fan power and pressure losses before choosing the number of stages.

For an incomplete intercooler the optimal shift can be calculated. Take stage two inlet temperature \(T_m=330\) K independently maintained and identical efficiencies. The variable portion of total work is proportional to \(T_1r_1^a+T_m(r/r_1)^a\). Differentiating with respect to log first-stage ratio gives \(T_1r_1^a=T_mr_2^a\), or \(r_1/r_2=(330/300)^{1/a}=1.40\). At overall ratio nine,

\[r_1=\sqrt{9(1.40)}=3.54,\ r_2=2.54.\]

Compressing farther while the air is colder is energetically preferable within this simplified comparison. These ratios presume the cooler can maintain 330 K over its revised duty and that both discharge temperatures stay within their allowable ranges. A compressor map may impose further flow and speed limits beyond the thermodynamic minimum.

At fixed pressure endpoints, the measured intermediate pressure alone would thus be insufficient for diagnosing whether the cooler or a compressor caused an observed power increase.

How much static temperature does a nozzle convert to speed?

Air flows steadily through an insulated nozzle with negligible shaft work and elevation change. Take \(c_p=1005\) J/(kg K). Divide the conserved stagnation enthalpy \(c_pT+u^2/2\) by \(c_p\) to find the exit temperature.

How much static temperature does a nozzle convert to speed?. Horizontal axis: Exit speed (m/s). Vertical axis: Static temperature (K). Data follow the figure.
At 300 m/s the static temperature is about 44.8 K below stagnation temperature, regardless of pressure in this enthalpy calculation. Predicting exit pressure as well would require an entropy or loss model.
Read values from the plot
Static temperature (K) at selected values of Exit speed (m/s).
Exit speed (m/s)Stagnation temperature 350 KStagnation temperature 400 KStagnation temperature 450 K
0350400450
104344.62394.62444.62
210328.06378.06428.06
316300.32350.32400.32
420262.24312.24362.24

Download all 211 plotted samples (CSV)

Interactive calculation · change the inputs of this example

Change stagnation temperature and heat capacity independently. The speed-related temperature drop follows the energy balance.

The curves below are recalculated from this section’s equations in your browser. The fixed reference plot above remains available for comparison.

Entropy, irreversibility and useful-work loss

Check a proposed process with the second law and quantify the effect of a finite temperature difference.

From first principles

Separate entropy transfer from entropy generated inside a boundary

For a reversible differential process the thermodynamic definition of entropy is

\[dS=\delta Q_{\rm rev}/T.\]

Irreversible changes reach the same state-function difference but can generate entropy internally. For a closed system exchanging heats \(Q_j\) across boundary portions at known local temperatures \(T_j\), the second law gives an experimentally testable inequality:

\[S_2-S_1=\sum_j\int\frac{\delta Q_j}{T_j}+S_{\rm gen},\qquad S_{\rm gen}\ge0 .\]

To evaluate the left side independently of the actual path, use a reversible path between the same equilibrium states. For an ideal gas the fundamental relation \(Tds=du+p\,dv\), together with \(du=c_vdT\) and \(pv=RT\), yields

\[s_2-s_1=c_v\ln(T_2/T_1)+R\ln(v_2/v_1)\]

for constant specific heat. Inserting this property change into the balance isolates entropy generation of the actual process. A gas might cool and lose entropy while the combined gas plus surroundings generates entropy. For heat exchanged across a wall separating two reservoirs, the two reservoirs’ boundary transfer terms have opposite signs and different temperature denominators.

Background · Entropy generation
\[\dot S_{\rm gen}=\dot S_{\rm system}-\sum\dot Q_j/T_j-\dot S_{\rm mass,in}+\dot S_{\rm mass,out}\]

Use boundary temperatures at which heat actually crosses. All flows, storage and units must refer to the same control volume.

Derivation and applications

Count the entropy generated when two ideal gases mix

Two separated ideal gases can have the same temperature and pressure, yet their mixing increases entropy. Consider distinct nonreacting species in insulated rigid compartments. Remove the separator and let them equilibrate in the common volume. Initially both sides have temperature \(T\) and pressure \(p\), and no shaft work is performed. The total internal energy of ideal gases depends only on temperature, so the final equilibrium temperature stays \(T\). Denote mole numbers by \(n_i\) and total volume by \(V\).

For each species, the entropy change can be calculated along a reversible isothermal expansion into its accessible final volume, even though the actual mixing is irreversible. Integrating \(\delta Q_{\rm rev}/T=p_i\,dV/T=n_iR\,dV/V\) gives

\[\Delta S_i=n_iR\ln(V/V_i).\]

The initial volumes were proportional to mole numbers because \(p\) and \(T\) were common. Thus \(V_i/V=n_i/\sum_jn_j=y_i\), the final mole fraction. Add the species changes and use zero boundary entropy transfer:

\[\Delta S_{\rm mix}=S_{\rm gen}=-R\sum_i n_i\ln y_i .\]

For two gases with \(y\) and \(1-y\), the generation per mole of mixture is maximal when both are equally abundant. The derivative and its zero are

\[\frac{d}{dy}\frac{\Delta S_{\rm mix}}n=R\ln[(1-y)/y]=0\quad\Longrightarrow\quad y=\tfrac12.\]

The entropy change tends to zero when either fraction tends to one. If the compartments contain the same gas and the initial temperatures and pressures already agree, removing the partition does not create distinguishable species; assigning artificial labels would predict a spurious mixing term.

Worked example

Estimate the lost work of mixing two samples

Mix \(1.00\) mol of one ideal gas and \(3.00\) mol of another at \(300\) K. The mole fractions are \(0.250\) and \(0.750\). The generated entropy is

\[-8.314[\ln0.25+3\ln0.75]=18.7\,\mathrm{J/K}.\]

Relative to an environment at \(300\) K, the destroyed work potential is \(300(18.7)=5.61\) kJ. No energy has disappeared from the insulated vessel.

Second application

Compare equal and strongly unequal amounts

For a fixed total of \(4.00\) mol, an equal mixture generates \(4R\ln2=23.1\) J/K. With only \(0.0400\) mol of one species the fractions become \(0.0100\) and \(0.990\). The generation falls to

\[4R[-0.01\ln0.01-0.99\ln0.99]=1.86\,\mathrm{J/K}.\]

Each rare molecule gains access to much more volume, but there are few such molecules; both contributions must be counted before comparing samples.

Try it · Mixing

Set the inputs to the values in the worked example, then vary one quantity while holding the others fixed. Compare the curve and numerical balance with the second application. The calculation uses the assumptions derived above; its readout identifies bounds such as choking, phase-region changes and inconsistent measurements.

Energy bookkeeping is not sufficient

In an insulated two-body experiment, heat lost by one body is gained by the other. That energy balance alone would allow heat to move spontaneously from a colder body to a hotter one. Entropy supplies the missing direction constraint. It is a property of a state. For a simple equilibrium system a reversible differential heat transfer defines \(dS=\delta Q_{\rm rev}/T\). An irreversible process between the same endpoints has the same entropy difference; the actual heat transfer divided by the body temperature need not equal that difference.

For a closed system, the integrated entropy balance reads \(\Delta S=\int \delta Q/T_b+S_{\rm gen}\), where \(T_b\) is the absolute temperature at the boundary where the heat crosses. Entropy generation satisfies \(S_{\rm gen}\ge0\). A system can lose entropy by exporting it in heat or in a mass stream. A negative change in the entropy of a single hot body therefore need not violate the second law.

Background · Why does a small temperature difference produce a second-order loss at fixed conductance?

Let a link of constant conductance \(G\) join reservoirs held at \(T+\Delta T/2\) and \(T-\Delta T/2\). In steady operation the heat current is \(G\Delta T\). Subtract the entropy leaving the hot reservoir from that entering the cold reservoir.

\[\dot S_{\rm gen}=G\Delta T\left(\frac{1}{T-\Delta T/2}-\frac{1}{T+\Delta T/2}\right)=\frac{G(\Delta T)^2}{T^2-(\Delta T/2)^2}.\]

At fixed conductance, halving a small difference approximately quarters the entropy production per second, while it also halves the heat current. If a design must keep the heat rate fixed, halving the difference requires nearly twice the conductance and only halves the production. This distinction matters when comparing a bigger exchanger with the original one.

Calculate a property change with a convenient path

For a calorically perfect ideal gas, combine \(T\,ds=du+p\,dv\) with \(du=c_v\,dT\) and \(p=RT/v\). This gives

\[ds=c_v\,dT/T+R\,dv/v.\]

Replacing \(v\) using the ideal-gas law yields the alternative \(ds=c_p\,dT/T-R\,dp/p\). Integrate between the initial and final equilibrium states. These are property relationships, even when the actual path between states includes friction, throttling or free expansion.

An ideal gas passing through an insulated valve with equal inlet and outlet speeds has \(h_2=h_1\), so its temperatures are equal in the constant-\(c_p\) approximation. Dropping air from 400 to 100 kPa gives \(s_2-s_1=-0.287\ln(100/400)=0.398\) kJ/(kg K). With no heat transfer or other streams, the positive entropy change per kilogram is entirely generated. A reversible insulated expansion turbine would generally produce a lower outlet temperature and shaft work.

Trace entropy across two reservoirs

An insulated conductor transfers 600 W from a reservoir at 400 K to another at 300 K. Its stored energy and entropy are steady. The hot reservoir loses entropy at \(600/400=1.50\) W/K, while the cold one gains \(600/300=2.00\) W/K. The total generation rate is 0.50 W/K. Heat rate is the same at both ends; entropy transfer in that heat differs because the temperatures differ.

\[\dot S_{\rm gen}=\dot Q\left(\frac1{T_c}-\frac1{T_h}\right).\]

If the surroundings defining the available-work reference are at \(T_0=300\) K, the corresponding destruction of available work is \(T_0\dot S_{\rm gen}=150\) W. For these particular reservoirs a reversible engine supplied with 600 W at 400 K could have produced \(600(1-300/400)=150\) W before rejecting the remainder. The conductor instead rejects all 600 W to the cold sink. Energy did not disappear; an opportunity for work was lost.

Locate sources and choose a boundary

A heat exchanger can have little external heat leak yet generate appreciable entropy internally through finite temperature differences and pressure losses. Write \(\dot S_{\rm gen}=\sum_{\rm out}\dot m s-\sum_{\rm in}\dot m s-\sum_j\dot Q_j/T_{b,j}\) for steady operation. Both streams belong inside the same control volume when testing internal heat exchange. If the boundary encloses only one stream, heat crossing the wall carries entropy with it and must appear explicitly. The largest reduction in entropy generation per extra unit of area or pumping effort is a design question. The thermodynamic balance identifies losses without alone determining the economically preferred geometry.

Compare the conditions on a valve and a turbine

Air passes through a steady insulated throttling valve from 400 to 100 kPa with negligible changes of speed. With no shaft work the first law gives equal inlet and outlet enthalpy. For ideal air this implies equal temperature. Its entropy change follows from \(\Delta s=c_p\ln(T_2/T_1)-R\ln(p_2/p_1)=0.287\ln4=0.398\,\mathrm{kJ/(kg\,K)}\). At 0.10 kg/s the entropy generation is 0.0398 kW/K. An ideal adiabatic turbine undergoing the same pressure drop has constant entropy and delivers work as its temperature falls. Pressure ratio alone therefore cannot determine the temperature change across an unfamiliar device.

Obtain a work bound for two finite bodies

The reversible efficiency \(1-T_c/T_h\) describes operation between reservoirs held at fixed temperatures. If the two bodies are finite, each increment of transferred heat changes the temperatures and the instantaneous efficiency. Consider two incompressible blocks in a common insulated enclosure. Their heat capacities \(C_h,C_c\) are taken as constant. A reversible engine operates between them and exports mechanical work until no temperature difference remains. The working fluid returns to its starting state after each incremental cycle, so conservation of entropy for this reversible composite system determines the final temperature.

\[C_h\ln(T_f/T_h)+C_c\ln(T_f/T_c)=0,\]
\[T_f=T_h^{C_h/(C_h+C_c)}T_c^{C_c/(C_h+C_c)}.\]

Energy conservation gives maximum work \(W_{\max}=C_hT_h+C_cT_c-(C_h+C_c)T_f\) for consistent internal-energy references. The reversible final temperature is a weighted geometric mean. If the two blocks are simply put in thermal contact without work output, first-law conservation instead gives the weighted arithmetic mean. The arithmetic mean is larger for unequal initial temperatures; additional energy remains as sensible heat after irreversible contact. These different final temperatures matter when comparing two ways of using the same finite resources.

In a real engine running at finite heat-transfer rates there are temperature differences between each block and the working fluid. Total entropy then increases. For a specified common final temperature the entropy change of the blocks is fixed by state properties; measuring it indicates the departure from the ideal reversible construction without needing the working-fluid cycle.

Compare direct contact and a reversible engine quantitatively

Take a hot assembly of heat capacity 2.0 kJ/K at 450 K and a cooler assembly of 1.0 kJ/K at 300 K. Solving the log balance gives

\[T_f=(450^2\,300)^{1/3}=393.1\,\mathrm K.\]

The hot assembly releases about \(2(450-393.1)=113.8\,\mathrm{kJ}\) and the cold one receives 93.1 kJ. Their difference gives approximately 20.7 kJ of maximum work. Acting as though the initial temperatures stayed at 450 and 300 K throughout would assign an incorrectly high efficiency to later parts of the transfer.

By direct contact the common temperature would be \((2\times450+300)/3=400\,\mathrm K\). The entropy generated is

\[2\ln(400/450)+\ln(400/300)=0.0521\,\mathrm{kJ/K}.\]

If instead a device delivers a measured 12 kJ of work before the blocks reach a common temperature, energy fixes that temperature as \((1200-12)/3=396\,\mathrm K\). The measured process then generates \(2\ln(396/450)+\ln(396/300)=0.0220\,\mathrm{kJ/K}\), a positive value between the two limiting cases. Entropy generation multiplied by an environmental temperature gives destroyed exergy relative to that environment; comparing the finite-body work outputs also requires acknowledging their different final stored energies.

The geometric-mean result has an informative limiting case. If the cold assembly is so large that \(C_c/C_h\) tends to infinity, its temperature remains effectively fixed, and the engine work reduces to \(C_h[(T_h-T_c)-T_c\ln(T_h/T_c)]\). This is the integral of the reversible work recovered as the finite hot block approaches a constant sink. It is smaller than applying the initial Carnot efficiency to all of the hot block’s released heat.

Which mixture generates the most entropy?

Mix streams of the same incompressible liquid at 370 K and 290 K, at equal pressure, with constant \(c_p=4180\) J/(kg K). The energy balance fixes the outlet temperature. Evaluate the outlet entropy minus the mass-weighted inlet entropy using \(c_p\ln T\).

Which mixture generates the most entropy?. Horizontal axis: Hot-stream mass fraction. Vertical axis: Entropy produced per kg (J/kg K). Data follow the figure.
Either pure stream gives zero entropy production. An equal-mass mixture settles at 330 K and produces about 30.9 J/(kg K). The maximum is near, but not exactly at, equal fractions because temperature appears inside a logarithm.
Read values from the plot
Entropy produced per kg (J/kg K) at selected values of Hot-stream mass fraction.
Hot-stream mass fractionAdiabatic mixing of identical liquid
00
0.24824.064
0.530.935
0.75222.177
10

Download all 251 plotted samples (CSV)

Interactive calculation · change the inputs of this example

Move the two inlet temperatures toward each other and watch entropy production vanish throughout the mixture range.

The curves below are recalculated from this section’s equations in your browser. The fixed reference plot above remains available for comparison.

Useful work and exergy destruction

Evaluate the useful-work potential of a steady stream and distinguish energy conservation from the destruction of useful-work potential.

From first principles

Derive maximum useful work relative to an environment

For a closed body changing toward equilibrium with surroundings at \(T_0,p_0\), consider the reversible path that gives the largest possible useful work. Neglect bulk kinetic and gravitational energy. With heat \(Q_0\) positive into the body and total boundary plus shaft work \(W\) positive out, the first law gives

\[W=U_i-U_f+Q_0.\]

Reversible heat exchange with this environment requires

\[Q_0=T_0(S_f-S_i).\]

Part of total work simply displaces ambient pressure, so

\[W_{\rm useful,rev}=U_i-U_f+T_0(S_f-S_i)-p_0(V_f-V_i).\]

Choose the final state as the dead state, denoted by subscript zero. Grouping the available initial differences defines nonflow physical exergy:

\[B=(U-U_0)+p_0(V-V_0)-T_0(S-S_0).\]

If the process generates entropy, the same first and second law combination lowers the useful work by \(T_0S_{\rm gen}\). The expression depends on the specified surrounding state and assumes no other heat reservoirs or chemical changes. A stream crossing a control volume carries its pressure flow work as well, giving a distinct enthalpy-based expression for flow exergy.

Background · Exergy destruction
\[\dot X_{\rm dest}=T_0\dot S_{\rm gen}\]

The environmental reference temperature enters in kelvin. Irreversibility destroys useful-work potential even when the total energy balance closes.

Derivation and applications

Derive the work potential of a compressed flowing gas

A stream can deliver useful work by cooling or by expanding, even when no fuel or chemical reaction is involved. Choose a steady reference environment at \(T_0,p_0\) with the same gas composition. Consider one kilogram taken reversibly from its inlet state to the environmental state. Neglect kinetic and potential energy. Let \(q_0\) be heat supplied from the environment, positive into the device, and \(w\) shaft work delivered. The steady energy balance includes flow work in enthalpy:

\[w=h-h_0+q_0 .\]

The only external heat exchange occurs with the environment. Reversibility then gives \(s_0-s=q_0/T_0\), eliminating the unmeasured heat transfer. The maximum work is the specific physical flow exergy

\[b=(h-h_0)-T_0(s-s_0).\]

For an ideal gas with constant \(c_p\) and \(R\), insert \(dh=c_p\,dT\) and \(ds=c_p\,dT/T-R\,dp/p\). Integrate relative to \(T_0,p_0\):

\[b=c_p[(T-T_0)-T_0\ln(T/T_0)]+RT_0\ln(p/p_0).\]

The pressure term survives at ambient temperature. Near \(T=T_0\) the thermal term is quadratic in the temperature difference because energy and the ambient heat contribution cancel to first order. The formula describes work relative to a specified reference and assumes the inlet and outlet composition is the same. An actual dissipative path destroys part of the reversible work potential.

Worked example

Estimate the work available from warm compressed air

Take air at \(T=360\) K, \(p=300\) kPa entering an environment at \(T_0=300\) K and \(p_0=100\) kPa. With \(c_p=1.005\) and \(R=0.287\) kJ/(kg K), the thermal contribution is \(1.005[60-300\ln1.2]=5.33\) kJ/kg. The pressure contribution is \(0.287(300)\ln3=94.6\) kJ/kg. Total available work is approximately \(99.9\) kJ/kg, mostly associated with pressure.

Second application

Account for loss in an ambient-temperature throttle

Let \(0.100\) kg/s of ideal air throttle adiabatically from \(300\) to \(100\) kPa, both at \(300\) K. Enthalpy stays constant, no shaft work is extracted, and the exergy destruction is \(0.100(94.6)=9.46\) kW. Independent entropy accounting gives \(\dot S_{\rm gen}=\dot mR\ln3=0.0315\) kW/K. Its product with the ambient \(300\) K recovers the same \(9.46\) kW. A device balancing energy perfectly can therefore expend substantial work potential.

Try it · Flow exergy

Set the inputs to the values in the worked example, then vary one quantity while holding the others fixed. Compare the curve and numerical balance with the second application. The calculation uses the assumptions derived above; its readout identifies bounds such as choking, phase-region changes and inconsistent measurements.

How much work is lost when two finite bodies touch?

Two insulated metal blocks start at different temperatures. A small cyclic heat engine could transfer heat from one to the other and deliver shaft work until the temperatures equalise. Simply bringing the blocks into thermal contact also gives a common final temperature, but it conserves a different quantity. Calculate the two end states before estimating how much work the initial temperature difference made available.

Assume constant positive heat capacities \(C_h,C_c\), no phase change, no external heat exchange and no mechanical work by either block. In direct passive contact no outside work is produced. The total energy change is therefore zero, giving \(T_{\rm mix}=(C_hT_h+C_cT_c)/(C_h+C_c)\). If the intervening engine instead operates reversibly, each small entropy transfer leaving the hot block equals the entropy entering the cold one. At the final common temperature \(T_f\),

\[C_h\ln(T_f/T_h)+C_c\ln(T_f/T_c)=0,\]
\[T_f=\exp\left[\frac{C_h\ln T_h+C_c\ln T_c}{C_h+C_c}\right].\]

Here all temperatures are absolute. More formally the logarithms can be taken of ratios to the same reference temperature; that reference cancels. The weighted geometric mean lies below the weighted arithmetic mean. The reversible final state thus contains less internal energy than the passive final state. The difference has emerged as work,

\[W_{\max}=(C_h+C_c)(T_{\rm mix}-T_f).\]

An irreversible engine generates entropy and ends at a higher common temperature with smaller available work.

Take two blocks with capacities of 1.2 kJ/K, initially at 360 K and 280 K. Passive contact ends at 320.0 K; the reversible engine ends at \(\sqrt{360\times280}=317.49\) K and delivers 6.02 kJ. Passive contact generates 0.01890 kJ/K of entropy. To visualise the reversible path, let \(s\) be the entropy transferred from one block into the other. The instantaneous temperatures are \(T_h(s)=T_h(0)e^{-s/C_h}\) and \(T_c(s)=T_c(0)e^{s/C_c}\). The next increment of work is \((T_h-T_c)ds\), so the signed area between the two temperature curves reproduces the total work.

The block temperatures converge as entropy is transferred; alongside, the accumulated engine work flattens at the common temperature.
The slope of the work curve is the temperature gap. It vanishes at the reversible end state even though the engine delivered finite work earlier.

The scaling becomes particularly clear for equal capacities \(C\) when the starting temperatures are \(T_m+\Delta\) and \(T_m-\Delta\). The mixed temperature is \(T_m\), while the reversible final temperature is \(T_m\sqrt{1-(\Delta/T_m)^2}\). Expanding the square root for small temperature gaps gives

\[W_{\max}\simeq C\Delta^2/T_m.\]

For \(T_m=320\) K and \(\Delta=40\) K this is 6.0 kJ, close to the exact 6.02 kJ. Halving the temperature gap at the same mean temperature gives roughly a quarter of the work. The energy initially contained in the warmer block above the mean temperature scales only linearly with the gap, so that energy alone is a poor measure of usable work.

If the surroundings never exchange heat with either block, should their temperature appear in this maximum-work calculation?

Work through the solution

The reversible engine can use only the two specified bodies. Their initial states and conservation of their total entropy determine how far the work extraction goes. A different problem allows ultimate equilibration with an external reservoir at \(T_0\). In that enlarged problem the standard exergy destruction associated with the irreversible contact is \(T_0 S_{\rm gen}\). These work comparisons have different permitted end states. The notebook keeps the enclosure insulated and checks the work using the energy balance on both bodies throughout the exchange.

Interactive calculation · Finite source temperatures

Vary the notebook inputs and compare both plotted observables. The same equations generate the browser curves and the notebook reference; fixed material, geometry and model assumptions are stated in the readout.

Download the editable notebook for this example

Interactive calculation · Finite source work

Vary the notebook inputs and compare both plotted observables. The same equations generate the browser curves and the notebook reference; fixed material, geometry and model assumptions are stated in the readout.

Download the editable notebook for this example

Specify the surroundings before rating a resource

A warm stream contains energy relative to a chosen reference. The amount that could become useful work depends on the surroundings available to receive heat. If stream and environment reach mutual thermal and mechanical equilibrium, there is no further physical work potential associated with their difference. This equilibrium is the physical dead state at \(T_0,p_0\). Exclude chemical reactions here and consider a steady flow with constant composition.

Imagine a reversible device that takes a stream from its current state to the dead state while interacting thermally only with the environment. The steady first law relates delivered work to changes in stream enthalpy, kinetic and potential energy, and heat. The reversible entropy balance gives heat received from the environment \(q_0=T_0(s_0-s)\). Eliminating that heat gives the specific flow exergy

\[\psi=(h-h_0)-T_0(s-s_0)+V^2/2+g(z-z_0).\]

Use consistent units for the kinetic and potential terms. The entropy contribution reduces the fraction of enthalpy that a reversible device can turn into useful work. At the dead state, with the same velocity and elevation as the reference, that work potential vanishes.

Cool a liquid to the environment

Take a stream of liquid water at approximately ambient pressure, 360 K, with negligible motion and elevation change. It flows at 0.20 kg/s towards a large environment at 300 K. Assume \(c_p=4.18\,\mathrm{kJ/(kg\,K)}\) constant. Integration gives

\[h-h_0=c_p(T-T_0),\]
\[s-s_0=c_p\ln(T/T_0).\]

The stream’s specific physical exergy is therefore

\[4.18[60-300\ln(360/300)]=22.2\,\mathrm{kJ/kg}.\]

Its enthalpy difference is much larger, 250.8 kJ/kg.

Cooling all the way to 300 K makes at most \(0.20(22.2)=4.44\,\mathrm{kW}\) of useful work available, even though the stream releases 50.16 kW of heat. Direct heat exchange with the environment delivers no shaft work. The environment entropy gain is \(50.16/300=0.1672\,\mathrm{kW/K}\), while the stream loses \(0.20(4.18)\ln(360/300)=0.1524\,\mathrm{kW/K}\). The difference, about 0.0148 kW/K, is the entropy production rate. Multiplication by \(T_0\) gives the lost 4.44 kW of work potential.

Include heat crossing another temperature boundary

Heat \(Q\) supplied reversibly by a reservoir at a uniform boundary temperature \(T_b\) carries exergy \(Q(1-T_0/T_b)\). This follows by comparing its energy with the environmental heat required to discharge the associated entropy \(Q/T_b\). A heat input of 10 kW from a 600 K reservoir in a 300 K environment carries 5 kW of exergy. A transfer from a finite cooling stream has changing source temperature and requires integration, as in the water example. Irreversibility in the device destroys exergy at rate \(T_0\dot S_{\rm gen}\); directing heat to a useful secondary process can retain part of the exergy that direct cooling would destroy.

Include the work potential of pressure

For an ideal gas already at \(T_0\), an elevated pressure still gives physical flow exergy \(RT_0\ln(p/p_0)\). Air at 300 K and twice environmental pressure has about \(0.287(300)\ln2=59.7\,\mathrm{kJ/kg}\) of pressure-related work potential although its ideal-gas enthalpy equals that at the dead state.

Derive the least work needed to heat a finite stream

Heat pumps are commonly compared by heat delivered per unit of electrical work. A second-law comparison additionally accounts for the temperature at which heat is delivered. Consider a steady stream heated from \(T_i\) to \(T_o\) at nearly environmental pressure, with constant heat capacity rate \(C=\dot m c_p\). A reversible heat pump extracts heat from surroundings at \(T_0\) and delivers it through a temperature-matched sequence of infinitesimal condensers. For one increment \(dQ=C\,dT\) at stream temperature \(T\), the reversed Carnot relation gives

\[dW_{\min}=dQ(1-T_0/T).\]

Integrating over the stream yields

\[W_{\min}=C[(T_o-T_i)-T_0\ln(T_o/T_i)].\]

This is the increase of its physical flow exergy, and is smaller than evaluating the Carnot work factor at the final high temperature for the whole heat duty. A device that condenses at a single temperature above the warmest outlet generates entropy during delivery to the colder portions. The result assumes that the source of heat is the environment at \(T_0\); a colder source would introduce an additional resource requirement.

For steady equipment receiving only electricity and environmental heat, with negligible parasitic flows, a meaningful second-law efficiency is the stream’s exergy increase divided by actual electrical input. Electric power is entirely work potential, whereas a kilowatt of heat near room temperature carries only a small fraction of a kilowatt of exergy.

Compare a heat pump with a resistance heater

Water flows at 0.10 kg/s from 293 K to 333 K in a 293 K environment. With \(c_p=4.18\,\mathrm{kJ/(kg\,K)}\), heat duty is \(0.418(40)=16.72\,\mathrm{kW}\). The exergy increase is \(0.418[40-293\ln(333/293)]=1.05\,\mathrm{kW}\) approximately. This relatively small figure reflects the modest average temperature lift. A well-insulated heat pump drawing 4.20 kW from the electrical supply has heating COP \(16.72/4.20=3.98\) and exergy efficiency about 25%. Its surroundings provide 12.52 kW of heat under the stated energy balance.

A resistance heater supplying the identical water service draws 16.72 kW when its losses to the room are negligible. It is nearly 100% efficient on the simple electrical-energy-to-heat basis, yet its exergy efficiency is only about 6.3%. For the heat pump the implied destruction of work potential is \(4.20-1.05=3.15\,\mathrm{kW}\); for resistance heating it is about 15.67 kW. Electricity used by a circulating pump, external heat leaks or a source below environmental temperature belongs in the appropriate device boundary before drawing a practical comparison. The heat-duty equality ensures that the machines are judged against the same delivered temperature service.

For the resistance case the entropy balance can be checked without using the exergy formula. Electrical work carries no entropy across the control surface, and assume no heat leakage. The stream increases its entropy at \(0.418\ln(333/293)=0.0535\,\mathrm{kW/K}\). Multiplying by the 293 K environment gives 15.7 kW destroyed, consistent with the difference between input work and stream exergy gain. This agreement depends on keeping the heater and heated stream in the same chosen boundary.

Diffusion with a stationary carrier gas

A solvent evaporates into a gas layer. Its molecules diffuse relative to the mixture, while evaporation also induces a bulk molar flow. Work through the species balances to see why the flux ceases to scale linearly with surface concentration.

Choose the reference frame for a flux

Let A be the evaporating species and B an insoluble carrier. A planar film of thickness L lies between the evaporating surface, at mole fraction \(y_s\), and a well-mixed reservoir at \(y_\infty<y_s\). Keep total pressure, temperature, total molar concentration \(c=p/(RT)\) and binary diffusivity D uniform. In a stationary laboratory frame the total species flux equals diffusion relative to the molar-average velocity plus transport by that velocity. If positive z points towards the reservoir, write

\[N_A=-cD{dy_A\over dz}+y_A(N_A+N_B).\]

Steady conditions in one dimension make \(N_A,N_B\) independent of z. Carrier B cannot enter the liquid and has zero net flux there. This fixes \(N_B=0\) throughout the film. B still diffuses towards the interface relative to the moving mixture. Its diffusive flux balances its outward convective flux. The constraint \(N_A+N_B=0\) would instead describe equimolar counterdiffusion between two exchanging species.

Separate variables and enforce both boundary concentrations

Collect the terms in \(N_A\), divide by \(1-y_A\) and integrate from the surface to the reservoir. The remaining integral is a logarithm of the carrier mole fraction.

\[N_A(1-y_A)=-cD{dy_A\over dz},\]
\[N_A={cD\over L}\ln{1-y_\infty\over 1-y_s}.\]
\[1-y_A(z)=(1-y_s)\left({1-y_\infty\over1-y_s}\right)^{z/L}.\]

The concentration profile curves because a given net flux requires a different concentration gradient at different carrier fractions. A dilute expansion of the logarithm gives

\[N_A\simeq(cD/L)(y_s-y_\infty).\]

The exact-to-dilute flux ratio exceeds unity when the surface emits A. The discrepancy becomes measurable long before the carrier disappears. At fractions very close to unity, the assumptions of a stagnant, isothermal film also deserve new scrutiny.

Small and large amounts of vapour at the surface

At 300 K and 1 bar, \(c=40.09\) mol/m³. Take \(D=2.0\times10^{-5}\) m²/s and \(L=5\) mm. The coefficient \(cD/L=0.1604\) mol/(m² s). With a vapour-free reservoir and \(y_s=0.05\), the logarithm is 0.05129 and the predicted flux is 0.00823 mol/(m² s). A linear gradient would give 0.00802, about 2.5% lower.

For \(y_s=0.50\), the flux rises to 0.111 mol/(m² s), versus 0.0802 for the dilute estimate. At mid-depth the exact fraction is \(1-\sqrt{0.5}=0.293\), while linear interpolation gives 0.25. An experimental check can therefore use either a mass-loss measurement or a local concentration measurement. Evaporative cooling changes the saturation mole fraction at the surface, so a measured surface temperature matters even if room temperature seems stable.

Use a vapour-free reservoir and increase the surface fraction from 0.10 to 0.80. Estimate which midpoint concentration lies farther from linear interpolation. Compare the resulting flux errors and identify the physical transport term responsible.

Tutorial · recover the effective film thickness

At the same temperature and diffusivity the surface mole fraction is 0.30, the reservoir fraction is 0.05 and a balance reports \(N_A=0.050\) mol/(m² s). Estimate L. What film thickness would be inferred if the outward molar flow were ignored?

Show the two fits

Solving the exact expression gives

\[L=cD\ln(0.95/0.70)/N_A=4.90\,\mathrm{mm}.\]

The linear fit yields

\[L=cD(0.25)/N_A=4.01\,\mathrm{mm}.\]

The latter fit makes the film thinner to compensate for omitted advection. In an experiment that effective thickness would predict the wrong flux when the surface composition changes appreciably.

Further reading · Lienhard and Lienhard · A Heat Transfer Textbook, chapter 11 on mass transfer by diffusion

Hydrodynamic lubrication and sliding bearings

Derive the flow balance in a converging lubricant film and determine why the sliding surface can support a load without solid contact.

From first principles

Derive the flux through a moving lubricant film

Consider two broad bearing surfaces separated by a thin gap \(h\). Let the lower surface move at speed \(U\) and the upper one remain still. Assume incompressible Newtonian lubricant, no slip, negligible inertia and a gap changing only slowly in the streamwise direction. Pressure is nearly constant through the thickness. Locally, the streamwise momentum balance reduces to a pressure gradient balanced by viscous shear curvature.

\[\mu\frac{\partial^2u}{\partial y^2}=\frac{dp}{dx},\]
\[u(0)=U,\]
\[u(h)=0 .\]

Integrating twice gives a linear velocity contribution from sliding and a parabolic contribution from the pressure gradient. Integrating that velocity across the gap gives the discharge per unit width.

\[u(y)=U(1-y/h)-\frac{1}{2\mu}\frac{dp}{dx}y(h-y),\]
\[q=\frac{Uh}{2}-\frac{h^3}{12\mu}\frac{dp}{dx}.\]

In a steady film without leakage or normal surface motion the same \(q\) crosses every section. A varying gap changes the sliding contribution, forcing a pressure gradient to preserve that flow. The integral of gauge pressure over the bearing pad gives its normal load capacity.

Derivation and applications

Relate recess pressure to restrictor resistance in a hydrostatic pad

A hydrostatic bearing can sustain load at zero sliding speed because an external supply drives lubricant through a restriction. Consider a flat circular thrust pad with a central recess of radius \(a\) and outer land radius \(b\). Let the parallel land clearance \(h\) be uniform and much smaller than its radial extent. Use incompressible Newtonian oil of viscosity \(\mu\), steady laminar radial outflow, no squeeze motion, ambient gauge pressure at \(b\), and negligible pressure drop inside the recess. The pressure-driven flow per circumferential width follows the parallel-plate law.

\[Q=-2\pi r\frac{h^3}{12\mu}\frac{dp}{dr},\]
\[p(r)=\frac{6\mu Q}{\pi h^3}\ln\frac br .\]

At the recess edge \(p(a)=p_r\). The land therefore behaves as a flow resistance \(R_L\) proportional to the inverse cube of clearance. A linear feed restrictor \(R_f\) drops supply pressure \(p_s\) to \(p_r\). Equal flow passes through the feed and land, giving a hydraulic pressure divider.

\[R_L=\frac{6\mu}{\pi h^3}\ln(b/a),\]
\[p_r=Q R_L=p_s\frac{R_L}{R_f+R_L}.\]

Integrate pressure over the uniform recess and logarithmic land. The logarithm integral contains an inner-boundary term that cancels the associated part of the recess load, leaving a simple effective area.

\[W=\pi a^2p_r+2\pi\int_a^b r p(r)\,dr=\frac{\pi(b^2-a^2)}{2\ln(b/a)}p_r .\]

Closing the pad increases land resistance, raises recess pressure and increases force opposing closure. When the land resistance is already very large, recess pressure approaches supply pressure and the available load saturates.

Worked example

Predict load at a balanced restriction

For \(a=10.0\) mm and \(b=20.0\) mm, effective area is

\[\pi(0.0200^2-0.0100^2)/(2\ln2)=6.80\times10^{-4}\,\mathrm{m^2}.\]

If \(R_L=R_f\) at the operating clearance and \(p_s=0.800\) MPa, recess pressure is 0.400 MPa and supported load is 272 N. This load is present without any relative sliding of the two faces.

Change the inputs and inspect this calculation below

Second application

Infer a clearance change from pressure

A different bearing has \(p_r/p_s=0.600\) initially and 0.750 after a load change. Resistance ratios \(R_L/R_f=p_r/(p_s-p_r)\) therefore increase from 1.50 to 3.00. Since land resistance varies as \(h^{-3}\), the final gap is \(2^{-1/3}=0.794\) of its initial value. An initial 25.0 µm film becomes 19.8 µm, assuming unchanged oil viscosity and feed resistance.

Interactive calculation · Change the inputs of this example

Use the adjustable quantities to test the two worked calculations above. The plot recomputes this derivation’s balance or constitutive relation; its numerical readout reports the quantities needed for the forward calculation and the inverse or design question. Keep the fixed assumptions stated in the readout when comparing with the example values.

Where lubricant pressure comes from

A shaft turning inside a plain bearing drags lubricant around with its surface. A load displaces the journal from the bore centre, creating a film whose gap narrows in one direction. Wall motion carries oil into this wedge, and a pressure gradient redistributes the flow so the same fluid rate passes successive sections. Pressure integrated over the bearing can then support a load. Surface motion alone in a uniform gap between surfaces with equal end pressures cannot produce this load in the ideal steady model.

Consider a broad slider bearing rather than the full journal geometry. Let a lower wall move at speed \(U\); a fixed upper wall forms a slowly varying small gap \(h(x)\). Assume incompressible Newtonian lubricant, constant viscosity, negligible inertia and negligible leakage through the sides. Pressure is nearly uniform across the thickness. The axial momentum equation reduces to \(\mu d^2u/dy^2=dp/dx\), and no slip gives

\[u(0)=U,\ u(h)=0.\]
\[u=U(1-y/h)-\frac{1}{2\mu}\frac{dp}{dx}\,y(h-y),\]
\[q=\frac{Uh}{2}-\frac{h^3}{12\mu}\frac{dp}{dx}.\]

Mass conservation makes \(q\) per unit width constant along the bearing. Where the local dragged flow \(Uh/2\) exceeds \(q\), pressure rises downstream. Where it falls short, pressure falls and supplies a forward pressure-driven contribution. The transition locates a pressure maximum.

Solve a two-depth ideal bearing

Consider a stepped pad with two equal 10 mm long regions, gaps \(h_1=0.20\) and \(h_2=0.10\,\mathrm{mm}\) in the sliding direction. Both ends have ambient pressure, \(U=1.0\,\mathrm{m/s}\), and \(\mu=0.05\,\mathrm{Pa\,s}\). Ignore the local loss at the abrupt step and treat each region as fully developed. Integration of \(dp/dx=12\mu(Uh/2-q)/h^3\) across both regions gives zero net pressure change. With equal lengths this fixes

\[q=\frac U2\frac{h_1^{-2}+h_2^{-2}}{h_1^{-3}+h_2^{-3}}=5.56\times10^{-5}\,\mathrm{m^2/s}.\]

In the first region \(Uh_1/2=1.00\times10^{-4}\,\mathrm{m^2/s}\). The positive pressure gradient is \(3.33\times10^6\,\mathrm{Pa/m}\), giving an interface gauge pressure of 33.3 kPa. The second region has an equal opposite gradient. The resulting triangular pressure distribution integrates to a force per unit width of \(0.5(0.020)(33333)=333\,\mathrm{N/m}\). A nominal 50 mm width would thus support approximately 16.7 N under the negligible-side-leakage assumption.

Understand failure at low speed

With zero sliding speed, equal end pressures imply zero steady gauge pressure everywhere in this model, so the load capacity vanishes. Start-up and shutdown therefore differ from established hydrodynamic running. A separately pressurised hydrostatic bearing can carry load at zero shaft speed. If a solution predicts large negative absolute pressures in a diverging region, actual oil may cavitate and the full-film boundary conditions must change. Viscous heating can also lower the local viscosity. Film thickness, thermal balance and supply conditions all matter when transferring the simple slider result to a journal in service.

Predict a viscosity change

For the same slider geometry and speed with equal prescribed end pressures, the calculated flux is independent of viscosity but all gauge pressure gradients are proportional to viscosity. Halving viscosity in the ideal stepped example therefore halves its load capacity at unchanged film thickness.

Derive load carried by a closing lubricant film

Sliding motion is not the only way to develop pressure in a thin film. Two parallel circular plates moving towards each other expel viscous oil radially, producing a squeeze-film pressure. Let plate radius be \(R\), uniform gap \(h(t)\), and approach speed \(v=-dh/dt>0\). Assume incompressible Newtonian oil, no slip, negligible inertia, rigid parallel plates, negligible edge resistance and ambient pressure at the rim. The gap is much smaller than the radius. Neither plate moves radially, so depth-integrated radial flux per unit circumference is \(q_r=-h^3(dp/dr)/(12\mu)\), the stationary-wall pressure-driven slit relation.

Inside radius \(r\), incompressibility requires outward flow through its circumference to equal the volume displaced by plate motion: \(2\pi r q_r=\pi r^2v\). Thus \(q_r=rv/2\) and \(dp/dr=-6\mu rv/h^3\). Integrating inward from ambient at the edge gives

\[p(r)-p_a=\frac{3\mu v}{h^3}(R^2-r^2),\]
\[W=\int_0^R(p-p_a)2\pi r\,dr=\frac{3\pi\mu R^4v}{2h^3}.\]

The maximum pressure is at the centre, twice the area average because the pressure shape is parabolic. The load grows very steeply as the gap narrows at imposed speed. At imposed load, however, the approach slows. This distinction mirrors the need to separate displacement-controlled and force-controlled contact tests. A stationary gap with no relative normal motion produces no squeeze-generated pressure under the stated ambient boundary condition.

Estimate the time for a thrust pad to approach its stop

A circular pad of radius 25 mm settles under a constant additional normal force of 100 N on oil of dynamic viscosity \(0.15\,\mathrm{Pa\,s}\). Ignore inertia after the short initial transient. Rearranging the load law gives

\[-dh/dt=2Wh^3/(3\pi\mu R^4).\]

Between initial and final gaps, integration gives

\[t=[3\pi\mu R^4/(4W)](h_f^{-2}-h_i^{-2}).\]

For \(h_i=150\,\mathrm{\mu m}\) and \(h_f=50\,\mathrm{\mu m}\) this yields 0.491 s.

At an intermediate 100 micrometre gap the instantaneous speed is

\[2(100)(10^{-4})^3/[3\pi(0.15)(0.025)^4]=0.000362\,\mathrm{m/s}.\]

The centre gauge pressure is \(2W/(\pi R^2)=102\,\mathrm{kPa}\), independent of gap here because the load is prescribed and the approach speed adapts. Halving the gap at unchanged load reduces approach speed eightfold. The ideal solution takes infinite time to reach zero thickness, which should not be interpreted as assurance against surface contact: roughness, oil leakage paths, tilt and elasticity enter before an arbitrarily small gap is reached. On separation the sign of the calculated pressure reverses and cavitation or air ingress may prevent the predicted tensile liquid pressure from developing.

A load-cell test can independently discriminate squeeze action from simple dry sliding resistance. At fixed small gap and sufficiently slow normal motion the predicted force is proportional to approach speed, with a slope scaling as \(h^{-3}\). Closing the gap from 100 to 80 micrometres should multiply the force slope by \((100/80)^3=1.95\). The transient test must either measure instantaneous gap or be run with an imposed motion, since holding load constant causes speed and gap to evolve together. Comparing forces at the same clock time on two different tests would not isolate the gap dependence.

From cut forces to local equilibrium

A support reaction tells you the total force entering a part. To predict what an inclined internal surface carries, keep track of both the orientation of the cut and the direction of the force across it.

A force that depends on the surface you choose

Imagine a small triangular wedge cut out of a thin, slowly loaded plate. Its sloping face has unit outward normal \(\mathbf n=(n_x,n_y)\) and area \(A\). The two faces normal to the coordinate axes have areas \(A n_x\) and \(A n_y\) when both components are positive. Name the internal force per unit area on a face its traction. Opposite faces of the same cut carry equal and opposite tractions. Gravity and acceleration act on volume, which shrinks faster than area as the wedge shrinks. Dividing its force balance by \(A\) therefore gives a relation that no longer contains its size.

\[\mathbf t(\mathbf n)=n_x\mathbf t(\mathbf e_x)+n_y\mathbf t(\mathbf e_y)=\boldsymbol\sigma\mathbf n .\]

The columns of the stress matrix are the two coordinate-face tractions. Their linear combination supplies the force on any inclined face. A small square additionally needs zero net moment. To leading order, the shear forces on opposite faces form two couples of opposite sign and equal lever arm. Their balance requires \(\sigma_{xy}=\sigma_{yx}\) for an ordinary material without internal body couples.

Background · Traction
\[\mathbf t(\mathbf n)=\boldsymbol\sigma\mathbf n\]

Specify the plane normal before projecting the force per area into normal and shear parts. A stress component is not a net force until integrated over an area.

Why a gradient of stress carries a body force

Now use a tiny rectangular element of side lengths \(dx,dy\) and unit thickness. The right-face contribution to horizontal force is \(\sigma_{xx}(x+dx,y)dy\); the left face contributes its negative evaluated at \(x\). Their difference is \(\partial_x\sigma_{xx}\,dx\,dy\) to leading order. Resolve the upper and lower shear tractions in the same way. Add a prescribed horizontal force per volume \(b_x\) and divide by volume. Repeating in the vertical direction produces two independent equations.

\[\partial_x\sigma_{xx}+\partial_y\sigma_{xy}+b_x=0,\]
\[\partial_x\sigma_{xy}+\partial_y\sigma_{yy}+b_y=0 .\]

These equations say nothing yet about how much the material stretches. They can test an assumed stress field before the elastic modulus has even been measured. A candidate must also reproduce the applied boundary tractions. Satisfying the interior equations alone leaves many possible stresses.

Worked example · the grip on a diagonal bonding plane

At a measurement point let \(\sigma_{xx}=60,\sigma_{yy}=20,\sigma_{xy}=10\) MPa. The outward normal is \((0.6,0.8)\). Matrix multiplication gives \(\mathbf t=(44,22)\) MPa. Projection along the normal gives \(0.6(44)+0.8(22)=44.0\) MPa tension. Projection on the unit tangent \((-0.8,0.6)\) gives \(-22.0\) MPa. Reversing the tangent changes the sign of reported shear. Reversing the surface normal reverses the traction vector itself. For a uniform 100 mm² patch the force has components 4.40 and 2.20 kN. Using only normal stress would miss the tangential load that the adhesive must transmit.

Worked example · a specimen with a known stress gradient

Stand a bar upright, support it at its bottom and leave the top free. Use upward \(y\), length \(L\), constant density \(\rho\), and tension positive. The vertical equation reads \(d\sigma_{yy}/dy-\rho g=0\). Integrating from the free top gives

\[\sigma_{yy}=\rho g(y-L).\]

For a 3.0 m aluminium bar of density 2700 kg/m³ the base stress is −79.5 kPa. Its upward support traction is positive because the bottom face has downward outward normal. A uniform cross-sectional area of 200 mm² gives a base reaction of 15.9 N, equal to the weight. The local and global checks involve different quantities but must agree.

Find the angles where the shear traction passes through zero. Compare each with an extremum of the normal traction. Change the sign of the imposed xy shear, sketch the new angles before moving the slider, and check whether the two extreme normal stresses change.

Tutorial · test a candidate before using a material law

In a region with \(x,y\) in metres, propose \(\sigma_{xx}=ax,\ \sigma_{xy}=-ay,\ \sigma_{yy}=0\), where \(a=2.0\) MPa/m. Does the field need a body force? Find the traction at \(x=0.30,\ y=0.20\) m on a face normal to positive \(x\).

Check the balance and the boundary reading

The horizontal divergence is \(a-a=0\). The vertical divergence is zero because the shear has no \(x\) variation. No body force is needed. The face sees the first column of the matrix, \((0.60,-0.40)\) MPa. A traction-free exterior at that location would reject this field even though it satisfies both interior equations.

Further reading · A. F. Bower, Applied Mechanics of Solids, §2.3, internal forces and stress

Action density, stress waves and the boundary that reflects them

A chain of coupled masses becomes an elastic field when the wavelength is long compared with the spacing. Derive the field equation and its boundary traction from the same variation, follow energy and stress across a junction, and decide whether a measured pulse is limited by material waves or by numerical dispersion.

Pass from a discrete rod to an action density

Let equal masses of spacing \(a\) move longitudinally by \(u_j(t)\), with nearest-neighbour spring constant \(k_s\) and mass \(m_s\) per site. Their Lagrangian is \(\sum_j[m_s\dot u_j^2/2-k_s(u_{j+1}-u_j)^2/2]\). For variations smooth on the spacing, \((u_{j+1}-u_j)/a\to u_x\) and \(\sum_j a\,f_j\to\int f(x)\,dx\). Hold the line density \(\rho A=m_s/a\) and axial rigidity \(EA=k_s a\) fixed. The continuum Lagrangian density per unit reference length is

\[{\cal L}=\rho A\,u_t^2/2-EA\,u_x^2/2,\]

with \(A\) area, \(\rho\) volume density and \(E\) Young modulus. Both terms have units of joules per metre. This is a slender-rod model with small strain, primarily uniaxial stress and wavelengths long compared with the cross-sectional dimensions.

Vary the field in the action over \([0,L]\times[t_1,t_2]\). Integration of \(\rho A\,u_t\delta u_t\) by parts in time, with fixed endpoint fields, produces \(-\rho A\,u_{tt}\delta u\). Integration of \(-EAu_x\delta u_x\) by parts in space produces \(+\partial_x(EAu_x)\delta u\) and a remaining term \(-[EAu_x\delta u]_0^L\). Thus the interior equation is \(\rho A u_{tt}=\partial_x(EAu_x)\), and the end force conjugate to displacement is axial force \(N=EAu_x\). Adding external work \(F_L(t)\delta u(L)\) at the right face yields

\[N(L)=F_L.\]

A prescribed displacement instead imposes \(\delta u(L)=0\), leaving its reaction as an output. Keeping this boundary term prevents prescribing displacement and independent traction simultaneously at the same end of a second-order rod.

Determine the energy flux and characteristic impedance

Assume time-independent coefficients. Multiply the field equation by \(u_t\) and rearrange to obtain

\[\partial_t[\rho A u_t^2/2+EAu_x^2/2]+\partial_x[-EAu_xu_t]=0.\]

The energy flux is \(-Nu_t\), with positive sign denoting energy moving towards increasing \(x\). The minus sign follows the convention of positive tensile \(N\): positive mechanical power entering through a right face is \(Nu_t\), which is inward with respect to the rod on its left. This identity controls energy transport across both smooth material changes and sharp joints.

For a homogeneous right-moving wave \(u=F(x-ct)\), \(c=\sqrt{E/\rho}\), particle velocity \(v=u_t=-cF'\) and axial force \(N=EAF'=-Zv\), where \(Z=\rho A c=EA/c\). A left-moving wave has \(N=+Zv\). The impedance is force divided by particle velocity and has units \({\rm kg/s}\). If one instead uses stress, impedance is \(\rho c\) per unit area. Doubling the area of the same material keeps wave speed unchanged but doubles the force–velocity impedance. A transit-time measurement and a reflection measurement therefore provide independent material or geometry information.

For a rod with \(E=70\,{\rm GPa}\), \(\rho=2700\,{\rm kg/m^3}\) and \(A=1.0\times10^{-4}\,{\rm m^2}\), \(c\approx5092\,{\rm m/s}\) and \(Z\approx1375\,{\rm kg/s}\). A right-going compressive pulse with particle speed \(0.020\,{\rm m/s}\) carries axial force \(-27.5\,{\rm N}\), compressive stress \(0.275\,{\rm MPa}\), and instantaneous power \(Zv^2=0.550\,{\rm W}\) across a section. A rectangular approximation lasting \(100\,\mu{\rm s}\) carries about \(55\,\mu{\rm J}\) and occupies \(0.509\,{\rm m}\). The pulse speed is kilometres per second; the material particles move only millimetres per second. Treating these as the same velocity would spoil force, impulse and energy estimates.

Match a bonded interface and distinguish amplitude from power

At a perfect massless bond displacement and axial force are continuous. For an incident right-going velocity amplitude \(v_i\) in rod 1, let \(v_r\) be reflected left-going velocity and \(v_t\) transmitted right-going velocity. Velocity continuity gives

\[v_i+v_r=v_t.\]

Force continuity gives

\[-Z_1v_i+Z_1v_r=-Z_2v_t.\]

Thus

\[r_v=\frac{Z_1-Z_2}{Z_1+Z_2},\]
\[t_v=\frac{2Z_1}{Z_1+Z_2},\]
\[{\cal R}=r_v^2,\]
\[{\cal T}=\frac{Z_2}{Z_1}t_v^2=\frac{4Z_1Z_2}{(Z_1+Z_2)^2}.\]

The power fractions add to one for real positive impedances. The reflected force coefficient has opposite sign to the reflected velocity coefficient because the wave direction reverses. At a free end \(Z_2\to0\), reflected velocity equals incident velocity, so end velocity doubles while total force vanishes. At a rigid end \(Z_2\to\infty\), velocity reverses and force doubles. The sign a strain gauge reports can therefore differ from that of a velocity-sensitive optical measurement at the same reflection.

A step from the worked rod into one of the same material with twice the cross-sectional area gives \(Z_2=2Z_1\), \(r_v=-1/3\), \(t_v=2/3\), and power fractions \(1/9\) and \(8/9\). A reduced transmitted velocity amplitude does not imply that most energy is reflected. If the interface includes a concentrated mass \(M_b\), force jumps instead obey \(N_2-N_1=M_b\dot v_b\) with signs determined by forces exerted on that mass from either side. At high frequency the reaction of that mass can mimic a much stiffer termination. Frequency-dependent reflection is then an expected boundary effect, rather than evidence that the bulk modulus varies with frequency.

Connect continuum modes to their lattice predecessor

For a periodic chain the exact discrete equation is

\[m_s\ddot u_j=k_s(u_{j+1}-2u_j+u_{j-1}).\]

Substitute \(u_j=U e^{i(kja-\omega t)}\) to obtain

\[\omega=2\sqrt{k_s/m_s}\,|\sin(ka/2)|.\]

In the first positive Brillouin zone, \(\omega/(ck)=\sin(ka/2)/(ka/2)\) and group velocity \(d\omega/dk=c\cos(ka/2)\), where \(c=a\sqrt{k_s/m_s}\). The continuum rod retains only the leading low-\(ka\) term. A wave with eight sites per wavelength has phase speed about \(0.9745c\) and group speed \(0.9239c\). A narrowband packet's peak can arrive later than the continuum prediction even when a single crest is timed fairly accurately.

A finite-difference code approximating the continuum rod can produce the same spatial dispersion with its mesh spacing in place of a physical lattice spacing. Distinguish them experimentally or numerically by changing the computational mesh while holding the physical structure fixed. Lattice effects persist as the numerical grid is refined; artificial spatial dispersion diminishes. A separate time-step study is needed if a time integrator also disperses the wave. Comparing both peak arrival and phase at two frequencies tests more of the dynamics than fitting a single transit time.

Derive transverse beam waves from curvature energy

A slender beam bending laterally is governed by a different elastic energy from the axial rod. Let \(w(x,t)\) denote small transverse deflection of its neutral axis. Under the Euler–Bernoulli assumption that cross sections remain plane and normal to that axis, the axial strain a distance \(z\) from the neutral axis is approximately \(-z w_{xx}\). Integrating the local elastic energy \(E\epsilon_{xx}^2/2\) across the section gives \(EI_Aw_{xx}^2/2\) per unit length, where \(I_A=\int z^2\,dA\) is a geometrical second moment of area, with units \({\rm m^4}\). It is distinct from a mass moment of inertia. The kinetic contribution uses line density \(\rho A\) as before.

Varying \({\cal L}=\rho A w_t^2/2-EI_Aw_{xx}^2/2\) requires integrating twice by parts in space. With constant coefficients the interior variation gives

\[\rho A w_{tt}+EI_A w_{xxxx}=0.\]

The boundary terms are \(-[EI_Aw_{xx}\delta w_x]+[(EI_Aw_{xx})_x\delta w]\). Thus slope variations pair with bending moments and displacement variations with shear forces, with signs set by the chosen face orientation. A clamped end prescribes both deflection and slope; a free end sets moment and shear to zero. A simply supported end prescribes deflection and zero bending moment. Using only one boundary condition per end, as for the axial rod, leaves the fourth-order beam problem underdetermined.

A sinusoid \(e^{i(kx-\omega t)}\) gives

\[\omega=\sqrt{EI_A/(\rho A)}\,k^2.\]

Phase speed grows proportionally to wavenumber and group speed is twice phase speed in this model. A narrow transverse pulse in a long beam consequently spreads even in a perfectly homogeneous non-dissipative continuum. By contrast the axial rod was nondispersive in its long-wavelength continuum approximation. At high enough frequency the simple bending model omits rotary inertia, shear deformation and eventually three-dimensional elastic behaviour. Extrapolating its unbounded speed to arbitrary \(k\) would use the slender, low-frequency approximation far beyond its derivation.

For a simply supported beam with length \(L\), the sine modes satisfy both end conditions and give

\[\omega_n=(n\pi/L)^2\sqrt{EI_A/(\rho A)}.\]

For a rectangular section of width \(w_b\) and thickness \(d\) in the bending direction, \(I_A=w_bd^3/12\) and \(A=w_bd\). Doubling thickness doubles all the natural angular frequencies at fixed \(L,E,\rho\), whereas doubling width alone leaves the ideal frequencies unchanged. The stiffness increases and so does the inertia. A beam with \(L=0.50\,{\rm m}\), \(d=5.0\,{\rm mm}\) and the earlier aluminium properties has \(\sqrt{EI_A/(\rho A)}\approx7.35\,{\rm m^2/s}\), giving fundamental \(46.2\,{\rm Hz}\). The second bending mode is near four times that frequency, a clear difference from the approximately harmonic axial mode sequence.

Match a force pulse to a support spring and dashpot

A right termination exerts force on the rod through a dashpot with mechanical impedance \(Z_L\). For a real positive dashpot impedance the reflected velocity fraction is \(r=(Z-Z_L)/(Z+Z_L)\). Taking \(Z_L=Z\) gives zero reflection at the termination even though energy leaves a finite rod: the dashpot dissipates the arriving power. With \(Z_L=3Z\) one obtains a reflected velocity of \(-1/2\) of the incident value, a reflected energy fraction one quarter and absorbed power fraction three quarters. A free or rigid end also reflects energy, but it absorbs no net power in the ideal limit. A measured weak reflection alone is therefore not proof of weak damping inside the rod.

For a pure end spring of stiffness \(k_L\) attached to a rigid support, the velocity impedance is \(Z_L=k_L/(i\omega)\) under \(e^{i\omega t}\). It is imaginary, so the reflection coefficient has unit magnitude at every frequency and a frequency-dependent phase. At low frequency the spring impedance is large and the end looks nearly fixed. At high frequency its impedance is small and the end looks nearly free within the lumped approximation. An impulsive signal contains many frequencies and can return with a changed waveform even without any transmitted or dissipated energy. A support combining a resistor-like dashpot and a spring gives both amplitude loss and phase variation.

A measurement with strain gauges at two positions can separate forward and backward waves if their path delays are resolved. In a narrow frequency band the two records are linear combinations of advancing and returning phase factors. If the gauge spacing corresponds to an integer number of half wavelengths, these combinations become linearly dependent and the separation is ill-conditioned. Change the spacing, use a broadband pulse, or combine a velocity measurement with a strain measurement at one station so that the two characteristic directions enter with opposite signs. The relation \(v=(v_++v_-)\), \(N=Z(-v_++v_-)\) then gives a direct local decomposition.

Derive sound propagation from mass and momentum conservation

The displacement-action argument has a fluid analogue. Take an initially uniform fluid of density \(\rho_0\) and pressure \(p_0\), moving little from equilibrium in one spatial dimension. Write small perturbations \(\rho',p',v\). Linearised mass conservation is

\[\partial_t\rho'+\rho_0\partial_x v=0.\]

Momentum balance for a short fluid parcel is \(\rho_0\partial_tv=-\partial_xp'\). If compression over an acoustic cycle is approximately isentropic, \(p'=c_s^2\rho'\) with \(c_s^2=(\partial p/\partial\rho)_s\). Differentiate the first equation in time, eliminate the velocity derivative with momentum balance, and obtain \(\partial_t^2p'=c_s^2\partial_x^2p'\).

The thermodynamic derivative matters because pressure can respond differently when compression is slow enough for heat exchange. For a perfect gas with ratio of specific heats \(\gamma\), isentropic perturbations give

\[c_s^2=\gamma p_0/\rho_0.\]

Taking an isothermal derivative would give \(p_0/\rho_0\) instead. For \(p_0=101\,{\rm kPa}\), \(\rho_0=1.20\,{\rm kg/m^3}\), and \(\gamma=1.40\), the isentropic speed is about \(343\,{\rm m/s}\), while the isothermal calculation gives \(290\,{\rm m/s}\). A measured transit time can discriminate between these constitutive conditions. Wall heat exchange in a very narrow tube can alter which approximation is appropriate over a chosen frequency band.

For a right-moving sound wave \(p'=\rho_0c_s v\), with the pressure positive in compression. This differs in sign from the tensile-positive axial force used for the rod, so match physical force conventions before borrowing formulas across the two examples. The acoustic power per area is \(p'v\). For sinusoidal pressure with rms amplitude \(1.0\,{\rm Pa}\) in the stated gas, the mean intensity is

\[p_{\rm rms}^2/(\rho_0 c_s)=2.43\times10^{-3}\,{\rm W/m^2}.\]

A peak amplitude of \(1.0\,{\rm Pa}\) would yield half this number. Writing rms or peak explicitly prevents a routine factor-of-two error when comparing a microphone measurement with an energy flux.

Determine whether a measured transit reveals a modulus or a geometry

Suppose two axially loaded slender rods have measured wave speeds agreeing within their uncertainties. That alone determines only the ratio \(E/\rho\) under the slender-rod assumptions. Measuring force–velocity impedance \(Z=\rho A c\) and cross section as well gives \(\rho=Z/(Ac)\) and \(E=Zc/A\). With \(Z=1375\,{\rm kg/s}\), \(c=5092\,{\rm m/s}\) and \(A=1.0\times10^{-4}\,{\rm m^2}\), the inversion gives

\[\rho=2700\,{\rm kg/m^3},\]
\[E=70.0\,{\rm GPa}.\]

If area were overestimated by five percent, both inferred quantities would be underestimated by almost five percent while their ratio remained correct.

Now examine a thick elastic solid under a narrow compressional disturbance with wavelengths short compared with its transverse dimensions. Lateral deformation can be constrained by surrounding material. In an isotropic three-dimensional continuum the longitudinal plane-wave modulus is \(\lambda+2\mu_s\), where \(\lambda,\mu_s\) are Lamé coefficients, rather than the uniaxial-stress Young modulus of a slender rod. The shear-wave speed satisfies \(c_T^2=\mu_s/\rho\) and longitudinal speed \(c_L^2=(\lambda+2\mu_s)/\rho\). Measuring both, together with density, can recover the two independent elastic moduli. Using only one longitudinal speed to infer Young modulus without specifying the deformation geometry can give a physically incorrect value.

For \(\rho=2500\,{\rm kg/m^3}\), \(c_L=5000\,{\rm m/s}\) and \(c_T=3000\,{\rm m/s}\), these relations give

\[\mu_s=22.5\,{\rm GPa},\]
\[\lambda=17.5\,{\rm GPa}.\]

The implied Young modulus \(E=\mu_s(3\lambda+2\mu_s)/(\lambda+\mu_s)=54.8\,{\rm GPa}\), while \(\rho c_L^2=62.5\,{\rm GPa}\). Both numbers represent material stiffness, but they enter different mechanical boundary conditions. A long thin specimen of the same material should have an axial speed closer to \(\sqrt{E/\rho}=4680\,{\rm m/s}\). Comparing the bulk and rod experiments tests the constitutive and geometrical assumptions behind the measured speed.

Derive orthogonality when a rod changes material along its length

For a rod with positive varying density \(\rho(x)\), area \(A(x)\) and modulus \(E(x)\), a separated free oscillation \(u(x,t)=\phi(x)\cos\omega t\) satisfies

\[-[EA\phi']'=\omega^2\rho A\phi.\]

Suppose two modes \(\phi_n,\phi_m\) satisfy the same homogeneous fixed or free boundary conditions and the correct continuity of displacement and axial force across every perfectly bonded interface. Multiply the first equation by \(\phi_m\), the second by \(\phi_n\), subtract and integrate. Interior terms produced by integration by parts cancel pairwise, including the interface flux terms, and the endpoint terms vanish. Thus

\[(\omega_n^2-\omega_m^2)\int\rho A\phi_n\phi_m\,dx=0.\]

Mode shapes with distinct frequencies are orthogonal under the mass-weighted inner product, not generally under a simple average of displacements measured at uniformly spaced stations. An initial velocity distribution \(v_0(x)\) projects onto mode \(n\) with coefficient \(\int\rho A v_0\phi_n\,dx/\int\rho A\phi_n^2\,dx\). In a rod with a heavy section, the same imposed velocity there stores more energy and carries more modal weight. An experiment interpreting raw camera amplitudes without line-density weighting can misassign energy among modes. Normalising each measured mode shape to unit maximum does not fix the mass weighting needed for energies.

Multiplying one eigenvalue equation by its own shape gives

\[\omega_n^2=\int EA(\phi_n')^2dx/\int\rho A\phi_n^2dx.\]

For an admissible trial function satisfying prescribed displacement conditions, the same quotient bounds the fundamental squared frequency from above when rigid translations are excluded. Consider a uniform fixed–free rod and trial \(\phi=x/L\). The numerator is \(EA/L\) and denominator \(\rho A L/3\), giving \(\omega_{\rm trial}=\sqrt3\,c/L\). The exact fundamental is \(\pi c/(2L)\), so this one-parameter shape overestimates frequency by about \(10.3\%\). It need not satisfy the free-end traction condition itself because that is a natural condition of the variational minimiser; it does need to satisfy the essential fixed-end displacement.

For a free–free rod the constant displacement mode has zero frequency. Using an arbitrary positive trial function without removing its mass-weighted mean can drive a quotient towards zero by adding a large constant. To estimate the first deforming mode impose orthogonality to the rigid translation, \(\int\rho A\phi\,dx=0\). This has an immediate mechanical interpretation: the deformation mode should not translate the centre of mass of an isolated rod. The null mode and its mass-weighted constraint reappear in numerical eigenproblems built from discretised stiffness and mass matrices.

Find where a discrete elastic chain ceases to look continuous

Shorten the wavelength relative to the lattice spacing. Compare the phase and group velocities with those inferred from a continuum action.

Track work and impulse in a one-dimensional pulse experiment

A finite displacement pulse provides a useful warning about integrating strain and velocity records. A right-going strain pulse of one sign can carry net momentum \(\int\rho A v\,dx\). Because \(v=-cu_x\), its integrated material momentum is \(-\rho Ac[u(+\infty)-u(-\infty)]\) at a fixed time. A localised displacement bump that returns to the same displacement on both sides has zero net ordinary material momentum, even though its energy is positive and travels to the right. Its strain and particle-velocity records contain positive and negative parts. A unipolar velocity pulse leaves behind a displacement step, produced by a source that has supplied net impulse.

For a right-moving rectangular velocity pulse of amplitude \(0.020\,{\rm m/s}\), duration \(100\,\mu{\rm s}\) in the worked rod, the local displacement jump measured in time is \(2.0\,\mu{\rm m}\). Its impulse magnitude across a section is \(Z v\Delta t=2.75\times10^{-3}\,{\rm N\,s}\), while its transmitted energy is

\[Zv^2\Delta t=55.0\,\mu{\rm J}.\]

A second equal pulse of opposite velocity sign launched later cancels the net displacement and material momentum but doubles the transmitted energy. Thus integrating a signed velocity signal and integrating its square distinguish different properties of the same experimental record.

A displacement sensor has a small linear drift during a burst. Which inferred observables are particularly sensitive?

Work through the solution

Differentiating adds a constant offset to particle velocity. Integrating that apparent velocity over a long window produces a growing spurious displacement jump and momentum estimate. Squaring it adds both a cross term with the physical velocity and a positive baseline energy. Measure a pre-pulse baseline, choose an integration interval covering the physical pulse, and test that the result is stable when the window is moderately extended. An independent strain gauge gives another characteristic combination; comparison with \(N=-Zv\) can expose drift or an overlapping reflection.

Can a finite-element rod model with a plausible first eigenfrequency still fail an impulse test?

Work through the solution

The first frequency mostly probes a long-wavelength weighted stiffness-to-mass ratio. A brief pulse contains higher modes and is sensitive to temporal resolution, dispersion, boundary tractions and the way discrete source work enters. Verify modal frequencies at several wavelengths, check the pulse's positive energy and signed impulse separately, and compare the measured incoming and reflected characteristic fluxes. A single standing-wave eigenvalue cannot validate all of those physically independent balances.

Recover a jump condition at an interface with a point mass

For a concentrated mass \(M_b\) joining two rods include \(M_bu_t(x_b)^2/2\) as a separate contribution to the Lagrangian. Its time variation contributes \(-M_bu_{tt}\delta u\) at the joint. The left and right rod boundary terms contribute respectively \(-N_1\delta u\) and \(+N_2\delta u\). Requiring stationarity for an independently varying shared displacement gives exactly \(N_2-N_1=M_bu_{tt}\). This derivation identifies both the sign and the constitutive assumption of a perfectly bonded, nonslipping joint.

For identical rods and a sinusoidal drive at angular frequency \(\omega\), the reflected velocity coefficient becomes \(r=-i\omega M_b/(2Z+i\omega M_b)\) under the stated phasor convention. At \(\omega M_b=2Z\) it reflects half the power and transmits half. The mass itself absorbs no cycle-averaged energy, though it stores kinetic energy during a cycle. For \(Z=100\,{\rm kg/s}\) and \(M_b=0.10\,{\rm kg}\), the equal-power frequency is about \(318\,{\rm Hz}\). A real joint that loses appreciable power at that frequency needs a damping or radiation term in addition to its measured mass.

Tutorial on stress waves

A gauge \(0.80\,{\rm m}\) from a free end records the echo of a sharp disturbance in the worked rod. What echo delay and strain sign should it expect?

Work through the solution

The extra path from gauge to end and back is \(1.60\,{\rm m}\), giving \(1.60/5092=0.314\,{\rm ms}\). A free end has zero net axial force, so the reflected force and strain have opposite signs to the incident ones. The velocity reflection keeps its sign. Finite pulse width and any change of material between gauge and end can obscure that simple result.

A bonded step has measured reflected velocity coefficient \(-0.20\) and no detectable dissipation. Infer its impedance ratio and transmitted energy fraction.

Work through the solution

Rearranging \(r_v=(1-r)/(1+r)\) gives

\[r=Z_2/Z_1=(1-r_v)/(1+r_v)=1.50.\]

The energy reflection is \(0.04\) and transmission \(0.96\). The velocity transmission is \(0.80\), whose square alone is only \(0.64\). Multiplying by the transmitted-to-incident impedance ratio recovers the correct energy fraction.

A rod model with a prescribed displacement at its right end reports nonzero work there, even though the variational boundary term vanished in deriving its equation. Is there a contradiction?

Work through the solution

Vanishing of \(N\delta u\) follows because the allowed virtual displacement at a prescribed boundary is zero. Actual boundary velocity can be nonzero when the prescribed displacement varies in time. The actuator supplies power \(Nu_t\) at the right boundary. Compare the time-integrated input with the change of stored energy plus any losses or outgoing energy rather than identifying an admissible variation with actual displacement.

Compare a finite chain with its long-wavelength continuum.

Fließbach includes string vibrations, beam bending and sound in his continuum mechanics treatment.

From binary collisions to the Boltzmann equation

An initially anisotropic velocity distribution can relax even though every individual collision conserves energy and momentum. Describe a dilute gas with a phase-space density, derive the structure of its collision term and prove which distribution can stop producing entropy. Then examine the assumptions behind that proof and the measurements most likely to reveal their failure.

What the one-particle function counts

Let \(f(\mathbf r,\mathbf v,t)d^3r\,d^3v\) be the expected number of particles in a small phase-space cell. Integrating over velocities gives number density \(n\), and the mean velocity is \(\mathbf u=n^{-1}\int\mathbf v f\,d^3v\). Define the peculiar velocity \(\mathbf c=\mathbf v-\mathbf u\); its second moment sets local kinetic energy after removing the organised flow. A gas can have large bulk speed but low temperature.

Follow a particle ballistically over a short interval under acceleration \(\mathbf a=\mathbf F/m\). With no collisions, phase-space probability is advected along its trajectories. For a standard position-dependent force, phase-space flow has zero divergence, giving the streaming operator \(\partial_t f+\mathbf v\cdot\nabla_r f+\mathbf a\cdot\nabla_v f\). Magnetic Lorentz acceleration also has zero velocity-space divergence. A dissipative velocity-dependent drag generally requires the divergence form \(\nabla_v\cdot(\mathbf a f)\) instead. It should not silently be inserted into the Hamiltonian streaming expression.

We now assume a dilute classical gas of identical particles with short-ranged binary elastic collisions, approximated as local on the spatial scale resolved by \(f\). Different particles approaching collision are assumed uncorrelated apart from their individual one-particle distributions at that position. This molecular-chaos approximation is an assumption about incoming pairs, not a claim that the outgoing particles remain uncorrelated. It is the step that allows the evolution to close on a one-particle function.

Count pairs crossing a scattering area

Consider a tagged incident velocity \(\mathbf v\) and a possible partner \(\mathbf v_1\). Their relative speed \(g=|\mathbf v-\mathbf v_1|\) converts a differential scattering cross section \(d\sigma/d\Omega\) into the swept interaction volume per unit time. A binary collision rotates the relative velocity in the centre-of-mass frame while preserving its magnitude. With equal masses, set \(\mathbf V=(\mathbf v+\mathbf v_1)/2\) and \(\mathbf g=\mathbf v-\mathbf v_1\). The partner and tagged postcollision velocities are \(\mathbf V\pm\mathbf g'/2\), where \(|\mathbf g'|=|\mathbf g|\). This parametrisation enforces momentum and kinetic energy conservation before choosing a scattering direction.

The loss term counts incoming pairs with velocities \(\mathbf v,\mathbf v_1\). The gain counts inverse collisions that produce the specified velocity. Microreversibility of elastic scattering and invariance of the integration measure allow the compact expression

\[C[f](\mathbf v)=\int d^3v_1\,d\Omega\,g\frac{d\sigma}{d\Omega}\left[f(\mathbf v')f(\mathbf v_1')-f(\mathbf v)f(\mathbf v_1)\right].\]

Both products refer to the same position and time. A change in which pair is called primed merely swaps gain and loss if one reverses the parametrisation consistently. This formula uses a consistent distinct-partner convention for the full scattering measure. When counting the total number of collision events per volume rather than the loss of tagged particles, divide the sum over all ordered pairs by two. Confusing those two observables gives an erroneous collision frequency.

For hard spheres of molecular diameter \(d\), the total geometric cross section is \(\pi d^2\). In an equilibrium Maxwellian the mean relative speed is \(\sqrt2\) times the mean single speed for identical masses. The mean free path under the usual hard-sphere convention is \(\ell=1/(\sqrt2 n\pi d^2)\). For \(d=0.36\) nm, \(n=2.4\times10^{25}\) per cubic metre and molecular mass 28 unified atomic units at 300 K, \(\ell=72.4\) nm and \(\bar v=476\) m/s. Their ratio gives a characteristic flight time 0.152 ns.

Take a weak moment of the collision operator

For a test function \(\psi(\mathbf v)\), multiply the collision term by \(\psi\) and integrate over tagged velocity. Exchange the identities of both particles and then exchange incoming and outgoing velocities in the gain integral. The result expresses the change of the pair's total test-function value:

\[\int\psi C[f]\,d^3v=\frac12\int d^3v\,d^3v_1\,d\Omega\,g\frac{d\sigma}{d\Omega}ff_1[\psi'+\psi_1'-\psi-\psi_1] .\]

For \(\psi=1\), \(m\mathbf v\) and \(mv^2/2\) the square bracket vanishes collision by collision. Integrating the kinetic equation gives exact local conservation of mass, momentum and energy with appropriate streaming fluxes, regardless of how close the distribution is to Maxwellian. Conservation alone leaves a hierarchy: the momentum flux depends on the pressure tensor and the energy flux on a heat flux, both higher velocity moments.

A numerical collision solver should check all these invariants separately. Equal masses allow a direct test with velocities \((300,100,0)\) and \((-100,100,0)\) m/s. Their centre velocity is \((100,100,0)\) and relative velocity has magnitude 400 m/s. Rotating it from \(x\) to \(y\) gives outgoing velocities \((100,300,0)\) and \((100,-100,0)\). Total velocity and total squared speed agree before and after, but the directional kinetic energy has changed. A field of such collisions can isotropise the pressure tensor while leaving total energy fixed.

Derive a sign-definite entropy production

Define the local kinetic \(H\) density as \(\int f\log(f/f_\star)d^3v\) with a constant reference of matching units. The reference only changes a conserved number contribution. For a homogeneous isolated gas the collision contribution to its time derivative follows by applying the weak form with \(\psi=\log f\). Average the result with its incoming–outgoing interchange. Setting \(A=ff_1\), \(B=f'f_1'\), one obtains

\[\frac{dH}{dt}=-\frac14\int d^3v\,d^3v_1\,d\Omega\,g\frac{d\sigma}{d\Omega}(A-B)\log(A/B)\le0 .\]

For positive \(A,B\), logarithm and difference have the same sign; appropriate limits handle zero occupation. Thus the Boltzmann entropy \(-k_BH\) does not decrease from these local binary collisions. In an inhomogeneous region, advection additionally transports entropy through the boundaries. A local cell's kinetic entropy can drop because entropy leaves the cell, while collision production remains nonnegative.

Equality requires \(ff_1=f'f_1'\) for collisions connected by the scattering kernel. Equivalently \(\log f+\log f_1\) is a collision invariant. For sufficiently rich elastic scattering in three dimensions the smooth additive collision invariants are linear combinations of particle number, momentum and energy. Therefore \(\log f=a+\mathbf b\cdot\mathbf v+c v^2\), with \(c<0\) for normalisation. Completing the square and matching moments yields the local Maxwellian:

\[f_M=n\left(\frac{m}{2\pi k_BT}\right)^{3/2}\exp[-m|\mathbf v-\mathbf u|^2/(2k_BT)] .\]

A Maxwellian at each location makes the collision term zero locally, but spatial gradients usually leave a nonzero streaming term. Such a distribution can evolve because neighbouring cells exchange particles. Conversely, a truly global equilibrium in an external conservative potential includes the appropriate spatial Boltzmann factor. In one-dimensional equal-mass elastic collisions particles merely exchange velocities, so the assumed richness of three-dimensional scattering fails; an arbitrary velocity histogram need not thermalise through those collisions.

Assess the kinetic and hydrodynamic descriptions separately

Define Knudsen number \(Kn=\ell/L\) using the length over which the distribution or boundary condition changes. In the earlier gas \(Kn=7.2\times10^{-5}\) for a 1 mm chamber feature but 0.072 for a 1 micrometre channel gap. The same binary collision model can remain dilute in both, yet a no-slip bulk hydrodynamic closure may be much less accurate in the microchannel. A mean free path small relative to the overall device length is insufficient if a sharp boundary layer develops on a much shorter scale.

A useful relaxation-time collision approximation is \(C_{\rm BGK}=-(f-f_M)/\tau\), with \(f_M\) computed from the local conserved moments of \(f\). This enforces their conservation and models return to local Maxwellian without evaluating an angular integral. If an externally fixed Maxwellian is used irrespective of actual local density, momentum and energy, the approximation can remove these quantities spuriously. A single fitted relaxation time also need not reproduce both stress and heat transport for a real gas.

A particle simulation resolving binary encounters must choose spatial cells small enough to represent local variation, and event or collision timesteps short against relevant flight or collision times. Statistical noise decreases with independent sampled pairs; refining cells while keeping total simulated particle count fixed can make local collision estimates noisier. Compare conservation, relaxation of anisotropic moments and a transport observable under separate refinements of geometry and sample count. A correct mean pressure alone is a weak test of a collision operator.

Compare the flux-weighted velocities of escaping particles with the bulk velocity distribution

Take the next moment and exhibit the source of viscosity

Write momentum density as \(\rho u_i=m\int v_i f\,d^3v\). The flux of \(i\)-momentum through a surface with normal in direction \(j\) is \(m\int v_iv_j f\,d^3v=\rho u_i u_j+P_{ij}\), where \(P_{ij}=m\int c_i c_j f\,d^3v\). The scalar pressure is one third of its trace in three dimensions. Multiplying the kinetic equation by \(mv_i\) and using collision invariance yields the momentum balance with \(\partial_j P_{ij}\) explicitly. No constitutive assumption has yet set the off-diagonal components to zero or made them proportional to strain rate.

For a local Maxwellian, the odd moments of peculiar velocity vanish and \(P_{ij}=nk_BT\delta_{ij}\). Now consider slow shear with mean velocity \(u_x(y)\), and approximate collisions by a relaxation time \(\tau\). In a local coordinate frame moving with the fluid write \(f\simeq f_M-\tau v_y\partial_y f_M\) to first order in gradient. At constant density and temperature,

\[\partial_y f_M=(m c_x/k_BT)f_M\partial_y u_x.\]

The off-diagonal momentum flux correction is therefore a fourth Gaussian velocity moment:

\[P_{xy}=-\tau\frac{m^2}{k_BT}\partial_yu_x\int c_x^2c_y^2 f_Md^3v=-nk_BT\tau\,\partial_yu_x .\]

The integral factorises into variances \(k_BT/m\) in the two directions. Under the kinetic pressure-tensor convention the result has a minus sign, because random motion transports high \(x\)-momentum toward lower mean velocity. The viscous part of the Cauchy stress is commonly written with the opposite sign convention. State which tensor enters the balance before declaring a predicted shear stress negative. The dynamic viscosity of this simple model is \(\eta=p\tau\).

If \(p=1.0\times10^5\) Pa and the fitted stress relaxation time is \(1.8\times10^{-10}\) s, this gives \(1.8\times10^{-5}\) Pa s. At a shear rate of \(10^3\) per second the dissipative stress magnitude is 0.018 Pa, tiny compared with equilibrium pressure and with dimensionless shear rate \(\tau|\partial_yu_x|=1.8\times10^{-7}\). A stress measurement must resolve a small anisotropic contribution on top of a large isotropic pressure. A pressure gauge alone cannot test this kinetic viscosity relation.

In a dilute hard-sphere gas the mean collision time scales inversely with density. The simultaneous pressure factor then makes dynamic viscosity approximately independent of density at fixed temperature in the dilute continuum regime. The kinematic viscosity, \(\eta/\rho\), still changes strongly. A gas made sufficiently rarefied no longer supports ordinary no-slip continuum flow through a fixed channel, so an apparent pressure-dependent flow resistance can coexist with an essentially density-independent bulk dynamic viscosity.

Infer accommodation from a wall momentum measurement

The interior collision operator does not prescribe the boundary condition at a solid wall. Specular reflection reverses normal velocity while preserving tangential velocity in the wall frame. Diffuse thermal re-emission from a fully accommodating stationary wall instead draws outgoing velocities from a wall-temperature distribution appropriate to the outward flux and erases incident tangential drift. A real clean or rough surface may lie between these limits. The boundary scattering model matters particularly when particles encounter the wall as often as other particles.

For a simple moving plate in a dilute gas at the same temperature, suppose a fraction \(\alpha\) of incident particles accommodates tangentially to plate speed \(U\), and the rest reflects specularly. To leading order in small tangential drift, accommodated particles carry away an average tangential momentum increment \(mU\) if incident gas has zero mean tangential speed. The incident number flux on one plate face is \(n\bar v/4\). Thus the leading tangential drag magnitude on the plate is \(\alpha mUn\bar v/4\) per area in this ideal free-molecular geometry.

Take \(n=10^{21}\) per cubic metre, molecular mass \(4.65\times10^{-26}\) kg, \(\bar v=480\) m/s, \(U=2.0\) m/s and \(\alpha=0.80\). The predicted shear is about \(8.93\times10^{-3}\) Pa per exposed face. The effect scales linearly with density here, unlike the dilute continuum viscosity at a fixed macroscopic velocity gradient. Both results derive from momentum transport, but the first describes particles crossing a wall-bounded collisionless region and the second local shear sustained by many intermolecular collisions. Compare them only after specifying the Knudsen number and wall geometry.

To test the accommodation model, reverse the plate motion to remove static force offsets, vary density across a regime that remains free molecular and change the exposed surface while keeping area fixed. A single measurement gives the combination of accommodation fraction, incident number flux and velocity difference. It cannot separate a changing incident gas drift from a changing material accommodation coefficient. Measuring the upstream velocity distribution or using opposed plates with known relative motion supplies additional constraints.

A discrete collision quartet demonstrates the H theorem numerically

A single allowed reversible collision connects two incoming velocity cells to two outgoing cells. Suppose cell-volume and scattering factors have been normalised so that its net flux is \(K(A-B)\), with \(A=f_1f_2\), \(B=f_3f_4\). It removes particles from cells one and two and adds them to three and four when \(A>B\). Conservation requires the representative cell velocities to satisfy the same pair momentum and energy constraints used for a physical collision. Assigning arbitrary four velocities may conserve the number of particles but will generally create energy.

Choose the velocities from the earlier rotated-pair example and occupancies \(f_1=4,f_2=1,f_3=2,f_4=1\) in a common dimensionless reference. Then \(A=4\), \(B=2\) and the forward flux is \(2K\). Its contribution to \(dH/dt\) is \(-2K\log2\), negative. The exact continuous rate tends to zero as the products equalise. A forward Euler step larger than \(f_2/(2K)\) would make the second occupancy negative and destroy the logarithm's meaning. Nonnegative entropy production for the continuum collision model does not guarantee it for an arbitrary numerical time step.

An implicit or positivity-preserving update can avoid this failure, but still requires independent tests of conserved moments and of the correct equilibrium. For this isolated quartet the condition \(f_1f_2=f_3f_4\) alone leaves many possible stationary cell distributions. A network of collision quartets sufficiently connecting the velocity space is needed to enforce a Maxwellian-like equilibrium. On a coarse discrete velocity lattice too few permitted momentum- and energy-conserving quartets may leave artificial invariants. A code can display exactly conserved energy and monotonically decreasing \(H\) while relaxing to the wrong distribution because its collision graph is incomplete.

A velocity-selective aperture tests collision equilibration

A thin aperture feeding a vacuum produces a flux-weighted distribution from a local Maxwellian reservoir. A detector placed downstream generally selects a finite angular cone and may respond differently to fast and slow particles. Consider two narrow speed bins with the same width in speed and the same angular acceptance. For an effusive Maxwellian their flux ratio contains a cube of speed multiplied by a Boltzmann exponential. A bulk sampler instead has a square of speed. Confusing these prefactors shifts a temperature inferred from ratios even if the gas truly is locally equilibrated.

For bins at speeds \(v\) and \(2v\), and choosing \(mv^2/(2k_BT)=1\), the effusive high-to-low ratio is

\[8e^{-3}=0.398.\]

The bulk number-density ratio at those speeds would be \(4e^{-3}=0.199\). A downstream detector measuring particles present in a fixed optical observation volume may weight by travel time, introducing an additional approximate inverse speed that moves the response closer to density weighting. Distinguish arrivals counted per time from particles counted during an exposure.

Changing aperture diameter is an independent control. A broad opening or high upstream density can produce collisional expansion and a directed jet, altering both angular and speed distributions. Measure pressure and beam shape across aperture sizes and compare the small-aperture limit before attributing a non-Maxwellian downstream spectrum to a failure of local thermal equilibrium throughout the reservoir.

A flight-time measurement tests free paths and speed selection separately

Imagine a dilute molecular tracer introduced into a uniform bath. For a deliberately simplified constant collision-rate model with rate \(r\), probability of no collision by time \(t\) is \(e^{-rt}\). For tracers conditioned to have one speed \(v\), the distribution of collision-free distance is then exponential with mean \(v/r\). If the collision rate itself depends on speed through the average relative velocity against the bath, the conditional mean free path is \(v/r(v)\). Mixing all initial speeds need not produce a single exponential in distance, even if every conditional waiting time is exponential.

Place a detector a distance \(L\) downstream that accepts only trajectories maintaining their initial direction. For a narrow injected speed class, the unscattered fraction is approximately \(e^{-r(v)L/v}\) if any collision removes it from the acceptance. For a class at 500 m/s and mean free path 0.20 m, a detector at 0.10 m receives an unscattered fraction 0.607; at 0.30 m it receives 0.223. A ratio of the two readings removes the unknown injection strength and recovers the attenuation coefficient if detector acceptances and geometric factors match.

If forward-scattered trajectories remain inside the acceptance, the apparent attenuation is smaller than the total collision rate. Angularly narrowing the receiver should approach the total-removal model for suitable scattering. A finite source pulse and finite time-of-flight bin also select velocities even if the source initially emitted a Maxwellian. Fit survival separately in narrow speed bins first. A nonexponential whole-beam attenuation then need not imply that the microscopic collision process has memory; it can arise purely from an unresolved distribution of rates.

A simulation can distinguish these alternatives by logging every collision event and comparing the full collision count with the detector-defined removed count. First test conditional survival for a prepared monochromatic beam, then add a known distribution of incident speeds and calculate the mixture prediction explicitly. Finally include a finite angular acceptance and integrate the differential cross section over the appropriate retained directions. These steps separate the kinetic collision operator, the initial distribution and the observation rule.

The same logic applies to a relaxation experiment reporting a single characteristic mean free time. The decay time of a directional flux depends on how much momentum is deflected per collision, not simply on how often particles meet. Strongly forward-peaked scattering can have a large total cross section and a much smaller momentum-transfer cross section weighted by \(1-\cos\theta\). A measured attenuation and a measured viscosity may consequently constrain different moments of precisely the same differential scattering process.

For example, if every collision deflects a test particle through a small fixed angle of ten degrees in the relevant frame, the momentum-transfer weighting is

\[1-\cos10^\circ=0.0152.\]

The corresponding transport cross section can then be far smaller than the total cross section even when collisions are frequent. A velocity-randomising approximation that uses the total collision time as its stress-relaxation time would predict much faster momentum relaxation than this angular picture supports. Actual stress and energy transport involve additional angular weights and velocity averages, so this numerical comparison is a scale diagnostic rather than an exact viscosity formula. Measure several angular moments of the differential scattering kernel or compare at least two independently sensitive transport observables before assigning a universal relaxation time to a real collisional gas.

Follow an H functional during a reversible elementary collision

Prepare unequal populations in two velocity pairs. Count forward and reverse collision rates and compare the sign of entropy change with the population imbalance.

Tutorial · Find the equilibrium temperature of an anisotropic preparation

A homogeneous gas has zero mean flow and component kinetic temperatures 600, 300 and 150 K, defined by \(m\langle v_i^2\rangle=k_BT_i\). In an isolated elastic gas, predict its equilibrium temperature and pressure tensor change. Could a thermostat holding the velocity variance in one direction at its original value permit the same inference?

Retain all three conserved energy contributions

Conservation of total kinetic energy implies \(T_f=(600+300+150)/3=350\) K. Initially the diagonal kinetic pressure components are \(nk_BT_i\); ultimately each becomes \(nk_B(350\,{\rm K})\). Their sum is unchanged. A component singled out by a thermostat can exchange work or heat with its environment. Its final common temperature, if one exists, must be obtained from the full energy balance including that exchange. Isotropisation cannot simply be assumed to retain the initial isolated mean.

Tutorial · Estimate the error in a collision-frequency inference

A detector reports a mean speed of 480 m/s and a geometric collision cross section \(4.0\times10^{-19}\) square metres at \(n=2.0\times10^{25}\) per cubic metre. Estimate the collision rate per tagged particle and total events per unit volume per second for an equilibrium identical-particle gas. What changes in a molecular beam with almost parallel velocities?

Use the relative rather than the single-particle speed

The equilibrium mean relative speed is \(\sqrt2(480)=679\) m/s. The rate per tagged particle is \(ng\sigma\simeq5.43\times10^9\) per second. Multiplying by \(n/2\) gives event rate \(5.43\times10^{34}\) per cubic metre per second. In a nearly monoenergetic collimated beam the relative speed can be much less than the mean laboratory speed. Evaluate its pair-distribution average explicitly; translating every velocity by a common vector leaves all collision rates unchanged at fixed distribution of relative velocities.

Tutorial · Does reversing all velocities contradict the H theorem?

In a dilute-gas simulation, reverse all particle velocities at a chosen instant with exact precision. An ideal reversible microscopic integrator would retrace the prior trajectory. Explain how this outcome can coexist with a kinetic equation predicting nondecreasing entropy, and propose a comparison that isolates the missing information.

State which distributions are controlled by the reversal

The reversed incoming pairs carry precise correlations inherited from earlier outgoing collisions. Their two-particle distribution generally does not factor into the product of their one-particle distributions just before future collisions. The molecular-chaos step used to derive the collision operator therefore fails for this deliberately prepared history. Microscopic Hamiltonian evolution and the coarse one-particle closure make different state specifications.

Prepare a second gas with the same reversed one-particle velocity histogram but with spatial and partner correlations randomised while conserving total momentum and energy. Compare the two subsequent anisotropy histories. The kinetic equation has the same initial one-particle input for both, while a microscopic simulation can distinguish them through higher-order correlations. Imperfect numerical reversal introduces a separate error; test exactness and time-step dependence before interpreting a failure to retrace as a fundamental thermodynamic observation.

Cambridge Kinetic Theory · the Boltzmann equation, collision invariants and hydrodynamics

Solving transport while conserving mass

Follow control-volume reasoning onto a grid. Compare diffusion, interface fluxes and advective remapping. Check how a travelling perturbation moves at different resolutions.

  1. Flux differences for an elliptic balance
  2. Finite volumes and moving fronts
  3. Time-dependent diffusion
  4. Interfaces, contact resistance and Robin data
  5. Cell Péclet number and monotonicity
  6. What a periodic grid does to a decaying Fourier mode
  7. Moving a cell average without inventing or losing material
  8. Splitting a stiff relaxation from a slowly varying drive
  9. Transport coefficients from equilibrium fluctuations

Flux differences for an elliptic balance

Assemble a conservative boundary-value problem from face fluxes, trace the effect of boundary conditions and establish a discrete energy identity.

From first principles

Derive a cell equation by integrating the physical balance

Consider steady one-dimensional conduction in a rod with area \(A(x)\), conductivity \(k(x)>0\) and heating per unit length \(s(x)\). Define heat current \(F\) positive to the right. Conservation in any finite interval requires that the current leaving equals the current arriving plus generation. Integrating over cell \(i\) fixes a discrete equation without yet approximating a derivative:

\[F_{i+1/2}-F_{i-1/2}=\int_{x_{i-1/2}}^{x_{i+1/2}}s(x)\,dx .\]

Each shared face must use the same current in its two adjacent cells. To close a face between constant-material regions with no intervening source, integrate Fourier’s law from one cell centre to the other. The heat current is constant on that interval, so it can be taken outside the integral. Defining the face resistance \(R_{i+1/2}\) makes the sign of the temperature drop explicit:

\[\begin{aligned} R_{i+1/2} &= \int_{x_i}^{x_{i+1}}\frac{dx}{k(x)A(x)},\\ T_{i+1}-T_i &= -F_{i+1/2}\,R_{i+1/2},\\ F_{i+1/2} &= \frac{T_i-T_{i+1}}{R_{i+1/2}}. \end{aligned}\]

On a uniform homogeneous mesh this reduces to \(kA(T_i-T_{i+1})/h\). Across a material change the half-cell resistances must instead be added. Substituting face currents into the cell balances produces the matrix system. Boundary temperatures, prescribed currents or film laws determine which additional boundary equations close it.

Background · Conservative face flux
\[|C_i|\dot u_i+\sum_{f\subset\partial C_i}F_{if}=|C_i|s_i\]

Use the same face flux with opposite orientations in neighbouring cells. Interior contributions then cancel in the global balance.

Three neighbouring cells share two interior faces, with both oriented flux arrows pointing right. The central cell has width Delta x.Open full-size diagram
Why an internal face must enter its neighbours with opposite signs A positive rightward flux brings material into cell i through its left face and removes material through its right. Dividing the difference by Δx gives the rate of change of the cell average. Summing over cells cancels each shared flux once; only the two outside faces survive.

Derivation and applications

Why a flux-only boundary requires a compatibility condition

An insulated or flux-controlled steady diffusion calculation can fail even when each individual face law is correct. Consider a one-dimensional bar of unit area, positive conductivity \(k\), and cell sources \(s_i\) per unit length. Define \(F_{i+1/2}\) as heat current positive to the right everywhere, including both boundaries. At steady state the current leaving the right face minus the current entering the left face equals the total source in that cell:

\[F_{i+1/2}-F_{i-1/2}=s_i\Delta x_i .\]

Summing over cells cancels every shared interior current. No detail of the face-gradient approximation can change the remaining global condition:

\[F_R-F_L=\sum_i s_i\Delta x_i .\]

With only prescribed fluxes, the discrete gradient also cannot determine a temperature offset. For a connected linear system with positive face transmissibilities, its assembled quadratic form is a sum of squared temperature differences:

\[\mathbf T^\mathsf{T}K\mathbf T=\sum_{\text{interior faces}}g_{ij}(T_i-T_j)^2,\]
\[K\mathbf 1=0 .\]

The nullspace consists precisely of constant temperatures. A compatible right-hand side gives a family of solutions; prescribe one reference temperature or a weighted mean to select a member. An incompatible right-hand side gives no steady solution. Physically, the imbalance would accumulate energy. Removing one algebraic equation or pinning a temperature without checking global balance can inadvertently create an unreported heat sink.

Worked example

Reconstruct temperatures from compatible flux data

Take three equal cells with source totals \(1,2,1\) W, left incoming current \(F_L=2\) W and right outgoing current \(F_R=6\) W. Internal face currents are successively \(3\) and \(5\) W. With both conductances equal to \(2\) W/K, the temperature drops are \(1.5\) and \(2.5\) K from left to right. For a prescribed arithmetic mean of \(300\) K the temperatures are \(301.833\), \(300.333\) and \(297.833\) K. Adding a common constant would leave every face measurement unchanged.

Second application

Diagnose an unbalanced insulated test

Seal both ends so \(F_L=F_R=0\) but retain the same sources. Their total is \(4\) W. If the combined heat capacity is \(200\) J/K, the heat-capacity-weighted mean temperature must rise at \(4/200=0.0200\) K/s. A steady solver reporting fixed temperatures under those conditions should be checked for a hidden imposed temperature or a dropped residual. The missing four watts have a direct transient interpretation.

Place fluxes where conservation uses them

Consider steady conduction on \(0<x<L\) with heat flux \(q=-k(x)T'\) and volumetric generation \(f\). Taking unit cross-sectional area, steady energy balance gives \(q'=f\). On uniform nodes separated by \(h\), integrate the balance over a control segment centred on \(x_i\):

\[q_{i+1/2}-q_{i-1/2}\simeq h f_i.\]

A shared face must have the same numerical flux in both adjacent equations, otherwise summing local equations can create an artificial internal source or sink.

Use \(q_{i+1/2}=-k_{i+1/2}(T_{i+1}-T_i)/h\). Then row \(i\) of the discrete operator has diagonal \((k_{i-1/2}+k_{i+1/2})/h^2\) and off-diagonals \(-k_{i\pm1/2}/h^2\). For positive \(k\) the off-diagonals are negative and the diagonal balances them. With zero source, an unconstrained interior value is a weighted average of its neighbours. This relation explains why a source-free discrete conductor with fixed end temperatures cannot develop an interior temperature larger than both ends.

Compute the face law across an interface

For smooth \(k\) an arithmetic average of neighbouring nodal coefficients provides a second-order face approximation on a uniform grid. A sharp material interface calls for a different physical calculation. Consider two half-segments in series with constants \(k_L,k_R\) and no interface storage or contact resistance. The same flux crosses both halves. Adding their temperature drops gives \(T_L-T_R=q[h/(2k_L)+h/(2k_R)]\), hence \(k_{\rm eff}=2/(1/k_L+1/k_R)\). This is a harmonic average for equal half-widths.

With \(k_L=1,\ k_R=9\) W/(m·K) and a 10 K drop over a 0.1 m pair, the effective conductivity is 1.8 W/(m·K) and the flux is 180 W/m². Using the arithmetic mean would give 500 W/m², severely underestimating the resistance of the poorer conductor. In the limit \(k_L\to0^+\), the physical flux tends to zero while that arithmetic estimate remains finite. For unequal layer thicknesses use the actual layer resistances rather than either unweighted average.

Examine uniqueness and the role of the boundary

For homogeneous fixed temperatures and an interior vector \(u\) extended by zero at both ends, grouping adjacent row contributions gives

\[h\sum_i u_i(A_hu)_i=\sum_{\rm faces}\frac{k_{i+1/2}}h(u_{i+1}-u_i)^2.\]

Each term is nonnegative. Vanishing energy requires a constant vector, and the fixed ends force that constant to be zero. Thus the interior matrix is symmetric positive definite. This reasoning justifies CG and gives a uniqueness argument that does not depend on inspection of a particular numerical matrix. With only prescribed heat fluxes a spatial constant instead remains undetermined. A solution then requires overall heat compatibility and one temperature reference or a mean constraint.

As a check, take constant \(k=1\), \(L=1\), zero end temperatures and generation 2. The exact profile \(T=x(1-x)\) has central value 0.25. Central differences recover its second derivative exactly, so all uniform grid nodes satisfy the balance without truncation error. This successful check verifies signs, boundary handling and the quadratic patch. To measure a convergence order use a smooth field with a nonzero leading truncation term, such as a sine profile, and compare at common physical positions.

Background · Can fixing one node hide an incompatible heat balance?

With specified flux at both ends, a steady source must exactly equal the net heat leaving the domain. After moving boundary terms to the right, the discrete equations have the form \(KT=b\), where \(K\) is symmetric and its rows sum to zero. Consequently

\[\boldsymbol 1^T b=\boldsymbol 1^T KT=0.\]

Pinning a temperature removes the undetermined additive constant. If the vector \(b\) fails this sum test, however, the pinned solve creates a reaction at that node. Physically that reaction is an unmodelled heat supply or heat sink. After solving, restore the original equation at the pinned node and inspect its residual. It exposes exactly the load that would have to be supplied to maintain the supposed steady state.

Why fixing one boundary value controls the solution

Suppose the left end of a conducting rod is held at zero temperature and the right end is insulated. A finite system of flux balances may be invertible on one mesh. We would also like a bound which survives refinement. In the continuous problem, use the space \(V=\{v\in H^1(0,L):v(0)=0\}\). Its members have square-integrable first derivatives and a well-defined endpoint value. Every admissible difference between two temperature fields belongs to this same space. The fundamental theorem of calculus and Cauchy–Schwarz give

\[|v(x)|^2=\left|\int_0^x v'(s)\,ds\right|^2\le x\int_0^x|v'(s)|^2\,ds,\qquad \|v\|_2\le\frac{L}{\sqrt{2}}\|v'\|_2 .\]

The second inequality follows by integrating the first and bounding its inner integral by the full derivative norm squared. Thus a small temperature gradient forces the temperature itself to be small in this particular space. Take a possibly discontinuous conductivity with \(0<k_0\le k(x)\le k_1\) almost everywhere and a square-integrable heat source \(f\). Testing the balance and integrating once gives \(a(u,v)=\ell(v)\) for every \(v\in V\), with

\[a(u,v)=\int_0^L ku'v'\,dx,\]
\[\ell(v)=\int_0^L fv\,dx .\]

The upper bound on conductivity gives

\[|a(u,v)|\le k_1\|u'\|_2\|v'\|_2.\]

The lower bound gives \(a(v,v)\ge k_0\|v'\|_2^2\), called coercivity. The endpoint inequality bounds \(|\ell(v)|\) by \(L\|f\|_2\|v'\|_2/\sqrt2\). These are the hypotheses of the Lax–Milgram theorem on the Hilbert space with norm \(\|v'\|_2\). Consequently the weak solution exists and is unique. For two loads, subtract the weak equations and test with their solution difference. Cancelling one derivative norm gives

\[\|(u-\tilde u)'\|_2\le L\|f-\tilde f\|_2/(\sqrt2\,k_0).\]

Every conforming discrete subspace inherits the same estimate.

How large a change can a load error produce?

In scaled units let \(L=1,\ k=2,\ f=3\). Integration of \(-2u''=3\), first from the insulated end and then from the fixed end, gives

\[u'=1.5(1-x),\]
\[u=1.5x-0.75x^2.\]

Its derivative norm is

\[1.5/\sqrt3=0.8660.\]

The theorem guarantees at most \(3/(2\sqrt2)=1.0607\). Raising the source everywhere by \(0.12\) changes that norm of the difference by \(0.06/\sqrt3=0.03464\), within the guaranteed \(0.04243\). The estimate also applies to nonuniform perturbations of the same load norm. If both ends are insulated, constants have zero derivative and can be added freely. A net heat input then rules out steady balance altogether.

Eliminate boundary values with the correct sign

With four intervals on a unit rod, fixed left temperature 10, fixed right temperature 20 and zero source, multiply each row by \(h^2/k\). The three unknowns then satisfy a tridiagonal system with diagonal two, off-diagonal minus one and load \((10,0,20)^T\). Moving a fixed value to the right changes its sign, producing positive boundary contributions here. Solving gives the linearly spaced interior temperatures 12.5, 15 and 17.5. Every discrete face reports the same flux for constant \(k\).

This deliberately simple case isolates boundary elimination and sign conventions. Reversing only one load sign can generate a plausible-looking smooth curve with entirely wrong end-to-end transport. After checking the values, also sum all interior balances and verify cancellation of the internal face contributions. The resulting global statement includes only boundary fluxes and any source integrated over the interior control volumes.

Prove a discrete maximum principle from the face balances

Let positive conductances \(G_{i-1/2}\) and \(G_{i+1/2}\) connect each internal node to its neighbours, with both end temperatures specified. In the absence of internal sources its balance reads \(G_{i-1/2}(u_i-u_{i-1})+G_{i+1/2}(u_i-u_{i+1})=0\). Dividing by the sum of the conductances makes \(u_i\) a convex combination of its two neighbours. If a strict global maximum occurred inside the domain above both prescribed boundary values, its neighbours would each have to equal this maximum. Repeating along the connected grid would carry the same value to a boundary, contradicting the assumption.

The same reasoning applied to the negative field bounds the minimum. With a nonnegative internal heat source \(s_i\) on the right, an interior minimum below both boundaries would have both outgoing temperature differences nonpositive. Their positive weighted sum cannot equal a positive source, and if the sum is zero, propagation again carries the minimum to the boundary. A positive source may raise an interior maximum while preserving the lower comparison bound. Negative face conductances or a disconnected component invalidate the argument; symmetry and a small algebraic residual do not by themselves restore it.

Compare two thermal loads without inverting their matrices

Connect internal nodes 1 and 2 to end temperatures zero and ten, using consecutive conductances 1, 2 and 4 W/K. With no source the equations are

\[3u_1-2u_2=0,\]
\[-2u_1+6u_2=40.\]

The first gives \(u_1=2u_2/3\), and the second gives

\[u_2=60/7,\ u_1=40/7.\]

Both values lie between the boundary temperatures. The common leftward heat flow has magnitude \(40/7\) W, checked independently from each of the three temperature drops times its conductance.

Add a heat source of 7 W at node one. The difference \(v\) between new and old solutions has zero boundary values and satisfies

\[3v_1-2v_2=7,\ -2v_1+6v_2=0.\]

The second relation gives \(v_1=3v_2\), so

\[v_2=1,\ v_1=3.\]

Both internal states warmed, consistent with the comparison principle applied to the difference. The additional outflow at the left boundary is \(1\cdot3=3\) W and at the right is \(4\cdot1=4\) W, accounting for the full applied source.

This provides two independent implementation tests. Conservation checks that the boundary power change equals the injected power. Monotonicity checks the signs of all changes in the field. A sign error in a face contribution can violate one of these checks even while the computed algebraic residual for the incorrectly assembled matrix is tiny. Both tests use physically accessible quantities and remain meaningful when no exact closed-form solution of a complex geometry is available.

The argument extends to a connected graph, since a weighted average at a maximising node requires equality along every positive-conductance edge. This observation is useful for testing an unstructured implementation. Deliberately disconnecting an entirely insulated component produces a free constant there, so boundary comparisons cannot control that component until a temperature reference or independent constraint is supplied.

Change parameters · Flux differences for an elliptic balance

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

Finite volumes and moving fronts

Derive an upwind transport update by conservation, interpret the Courant number as a fraction of cell contents and determine what conservation says about front speed.

From first principles

Derive a conservative update from storage in a cell

Consider the one-dimensional conservation law \(u_t+\partial_x f(u)=0\) with no distributed source. Let \(\bar u_i\) denote the average over cell \(i\) of width \(\Delta x\). The integral of \(u\) over the cell is what the discrete variable stores. Integrate first over the cell and then over one time step. Only fluxes crossing the two faces can change its inventory:

\[\Delta x(\bar u_i^{n+1}-\bar u_i^n)=-\int_{t_n}^{t_{n+1}}[f_{i+1/2}(t)-f_{i-1/2}(t)]\,dt .\]

Replace each time-averaged face flux by one numerical function \(\hat f\) of neighbouring states, using the same value from both sides. For constant positive advection speed \(a\), the state reaching a face comes from upstream. With piecewise-constant cell data and \(C=a\Delta t/\Delta x\le1\) this gives

\[\hat f_{i+1/2}=a\bar u_i^n,\]
\[\bar u_i^{n+1}=(1-C)\bar u_i^n+C\bar u_{i-1}^n .\]

The update conserves total mass on a periodic grid because every internal face cancels. Nonlinear fluxes also need a rule selecting the physically admissible interface state, especially when a jump separates two different initial cell values.

Background · Courant number
\[C=|a|\Delta t/\Delta x\]

For scalar advection this compares a transported distance with a cell width. An admissible range depends on the spatial method and time integrator jointly.

Derivation and applications

Quantify the quadratic quantity lost by an upwind update

A conservative finite-volume method for advection preserves the sum of cell contents under periodic boundary conditions. It need not preserve their contrast. Consider the constant-speed transport equation \(u_t+a u_x=0\) with \(a>0\), uniform cells of width \(\Delta x\) and periodic indexing. Exact translation preserves \(\int u^2\,dx\). The first-order upwind scheme transports a fraction \(C=a\Delta t/\Delta x\) of a cell's content across its right boundary per step:

\[u_i^{n+1}=(1-C)u_i^n+C u_{i-1}^n .\]

For \(0\le C\le1\) this is a convex combination and cannot create a value outside its two inputs. To see precisely how much variation is removed, square one update and complete a difference square:

\[[(1-C)x+Cy]^2=(1-C)x^2+Cy^2-C(1-C)(x-y)^2 .\]

Sum over all cells. Periodicity allows the shifted sum of old squared values to be relabelled. The exact discrete identity, with \(E^n=(\Delta x/2)\sum_i(u_i^n)^2\), becomes

\[E^{n+1}-E^n=-\frac{\Delta x}{2}C(1-C)\sum_i(u_i^n-u_{i-1}^n)^2 .\]

This loss vanishes for spatially constant data and for \(C=1\), when the update shifts by one complete cell. Strong cell-to-cell jumps dissipate much more of the quadratic quantity than smooth profiles sampled with the same grid. Total mass still telescopes exactly; the two balance laws diagnose different aspects of accuracy.

Worked example

Follow one step on four periodic cells

Take \(\Delta x=1\), \(C=1/2\) and initial averages \((1,1,0,0)\). The updated values are \((0.5,1,0.5,0)\). Both arrays sum to two. The quadratic energy falls from \(1.00\) to \(0.750\). There are two unit jumps at the start, and the loss formula gives \((1/2)(1/2)(1/2)(2)=0.250\), accounting for the full change.

Second application

Use an alternating pattern as an instability detector

For \((1,-1,1,-1)\) each neighbour has opposite sign, so one step multiplies the amplitude by \(1-2C\). At \(C=1/2\) all variation disappears in one step although the exact wave would keep its amplitude. At \(C=1.10\) the factor is \(-1.20\) and energy grows by \(1.44\). The sign reversal in \(C(1-C)\) therefore predicts growth at this resolved wavelength. Conservation of the zero mean still holds in both experiments and alone cannot detect the instability.

Store quantities over cells

Consider a passive concentration satisfying \(u_t+(au)_x=0\) with positive constant speed \(a\) on a periodic line. Let \(\bar u_i=h^{-1}\int_{x_{i-1/2}}^{x_{i+1/2}}u\,dx\) be its cell mean. Integrating the conservation law in space and time shows that every change in cell inventory comes from fluxes through its two faces. If neighbouring cells use the same face flux, summing all updates cancels every internal transfer exactly. On a periodic line the total stays fixed, even for a discontinuous concentration.

For positive speed, material reaching the right face during a short step comes from the cell to its left. Approximate the outgoing state by that cell’s mean, giving \(F_{i+1/2}=a\bar u_i\). Forward Euler in time yields

\[\bar u_i^{n+1}=(1-C)\bar u_i^n+C\bar u_{i-1}^n,\]

where \(C=a\Delta t/h\). For \(0\leq C\leq1\) this is a convex average, preserving the range of neighbouring values. At \(C=1\) the entire array shifts exactly by one cell per step. If \(a<0\), information comes from the other side of the face and the upwind direction must reverse.

Identify the source of artificial spreading

Start with one cell mean equal to one and zeros everywhere else. With \(C=1/2\), one step gives adjacent means \(1/2,1/2\). A second step gives \(1/4,1/2,1/4\), while the total remains one. Exact advection over two such steps shifts the original pulse by one cell with no change in shape. The scheme has conserved mass yet broadened the pulse. Peak height or variance therefore tests information not supplied by a global balance.

For smooth \(u\), Taylor-expand the upwind update in space and time. Replace the leading \(u_{tt}\) using the exact transport equation, \(u_{tt}=a^2u_{xx}\). The leading modified equation is

\[u_t+a u_x=[ah(1-C)/2]u_{xx}+\cdots.\]

The bracket acts as numerical diffusivity. It is positive for the monotone range and vanishes at \(C=1\). This local smooth expansion helps interpret observed spreading, but the Taylor expansion itself does not hold across a jump.

Choose a flux when speed depends on the state

For a nonlinear conservation law \(u_t+f(u)_x=0\), characteristics can intersect and create a discontinuity. Enclose a moving jump in a thin control volume. The net flux imbalance fixes its speed \(s=(f(u_R)-f(u_L))/(u_R-u_L)\). For Burgers flux \(f=u^2/2\) with left state 2 and right state 0, this gives \(s=1\). The faster characteristics on the left overtake the slower ones to form a shock. Reversing these states produces a spreading fan under the entropy condition even though the algebraic jump formula alone would still supply a speed.

A numerical face flux must be consistent when the two cells agree and must incorporate information from both sides when a nonlinear wave can travel either way. A conservative method that converges can reproduce the weak jump balance, while selection of a physically admissible solution also requires an entropy criterion. For practical assessment, monitor total inventory, motion of the front, overshoot and the number of cells over which it is smeared. The four measurements address distinct properties, and reducing one defect need not reduce all of them.

Move the control surface instead of the grid

Across a front moving with speed \(s\), flux in the front’s own frame is \(f(u)-su\). The jump relation enforces equality of this quantity on both sides. For the Burgers jump from 2 to 0 with speed one, the left flux in the moving frame is \(2-1\cdot2=0\), and the right flux is also zero. The laboratory flux differs across the front because a moving interface is sweeping conserved material through stationary space.

This distinction helps when checking a simulation by counting material in a region that tracks a front. Differentiating an integral over moving endpoints adds boundary-motion terms. In a periodic fixed window the update should conserve total amount without those extra terms. In a moving measurement window, physical transport through the window and motion of the window both influence the recorded inventory, even under a perfectly conservative scheme.

Distinguish a conservative jump from the physical weak solution

For inviscid Burgers flow \(u_t+(u^2/2)_x=0\), integrating conservation across a moving jump gives the Rankine–Hugoniot speed \(s=[f]/[u]=(u_L+u_R)/2\). It uses only balance, so a discontinuity with that speed satisfies the weak conservation equation for either orientation of its left and right states. To select the physically relevant solution one needs an entropy condition. For a compressive shock characteristic speeds enter it from both sides: \(u_L>s>u_R\). If \(u_L<u_R\), the characteristics separate and a continuous rarefaction fan fills the gap.

For example the entropy \(\eta(u)=u^2/2\) has entropy flux \(q(u)=u^3/3\), because \(q'=\eta'f'\). A jump produces distributional entropy \([q]-s[\eta]\), which must be nonpositive for a dissipative solution. At equal-magnitude opposite states the entropy jump \([\eta]\) is zero, so orientation alone changes the sign of the entropy production. A conservative scheme can preserve every cell total correctly yet converge to an inadmissible expansion shock if it fails this additional condition.

Choose the correct interface flux for two opposite Riemann data

Take \(u_L=-1,\ u_R=1\). Both endpoint fluxes equal one half, and the jump-speed formula gives zero. Holding this discontinuity fixed would conserve the cell totals. Its entropy production, however, is

\[1/3-(-1/3)=2/3>0.\]

The admissible Riemann solution is the self-similar fan: at coordinate \(\xi=x/t\), \(u=-1\) for \(\xi\le-1\), \(u=\xi\) between minus one and one, and \(u=1\) for \(\xi\ge1\). At the interface \(\xi=0\), the flux is therefore zero. Using an arithmetic average of the two endpoint fluxes would instead maintain the inadmissible jump.

For a finite-volume update with \(\Delta t/\Delta x=0.5\) and initially constant states on either side, the neighbouring left cell changes from \(-1\) to \(-1-0.5(0-0.5)=-0.75\). The right cell changes from one to \(1-0.5(0.5-0)=0.75\). Their sum remains zero. A direct integration of the fan gives the same cell averages: the disturbance occupies half of each cell and linearly brings that half from its far-state value toward zero. Thus both conservation and the local wave pattern can be verified independently.

Reverse the initial states to \(u_L=1,\ u_R=-1\). The zero-speed jump now has entropy production \(-2/3\), and both families of characteristics enter it. Its correct interface flux is one half. The same numerical update then leaves both neighbouring cell averages unchanged, exactly as required for a stationary shock. Testing both orientations is more revealing than testing a single conserved jump: they have identical endpoint flux magnitudes and the same Rankine–Hugoniot speed but different physically admissible interface states.

A further integration test shifts the interface by precisely one cell and reruns the update. On a uniform periodic grid with unchanged physical states, the new solution should be a one-cell translation of the old one. A difference between the two calculations could reveal an indexing error in the face flux even when a global conservation diagnostic remains identically zero.

Measure numerical spreading in a conservative transport step

Start with all mass in one cell. For positive velocity the explicit upwind update keeps fraction \(1-C\) and transfers fraction \(C\) to the next cell each step. Thirty updates produce a binomial distribution on an unbounded uniform grid.

Measure numerical spreading in a conservative transport step. Horizontal axis: Cell offset from initial pulse. Vertical axis: Fraction of total pulse mass. Data follow the figure.
Each profile sums to one. Its centre moves 30C cells and its variance is 30C(1−C) cells². Conservation and the correct mean travel distance can coexist with artificial broadening of a pulse that should translate without changing shape.
Read values from the plot
Fraction of total pulse mass at selected values of Cell offset from initial pulse.
Cell offset from initial pulseCourant number 0.25Courant number 0.5Courant number 0.85
00.000178589.3132e−101.9175e−25
80.159310.0054511.1933e−12
150.00193050.144465.9335e−6
223.3308e−80.0054510.042007
308.6736e−199.3132e−100.0076308

Download all 31 plotted samples (CSV)

Change parameters · Measure numerical spreading in a conservative transport step

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

Time-dependent diffusion

Derive the diffusion time-step restriction from two independent arguments and compare explicit and implicit decay of spatial modes.

From first principles

Derive the explicit heat step and its grid-dependent time scale

Take the heat equation \(T_t=\alpha T_{xx}\) with constant positive diffusivity on a uniform one-dimensional grid. Fourier conduction through each side of a cell produces a temperature update proportional to the difference of the two neighbour gradients. With forward Euler timing, collect those fluxes to obtain

\[T_i^{n+1}=T_i^n+r(T_{i-1}^n-2T_i^n+T_{i+1}^n),\]
\[r=\alpha\Delta t/h^2 .\]

When \(0\le r\le1/2\) the new temperature is a convex average of three old ones, preserving bounds on a source-free grid. To check whether a higher step could still be stable for all periodic grid disturbances, substitute \(T_j^n=g^n e^{ij\theta}\), where \(j\) is the node index. The amplification simplifies to

\[g=1+r(e^{-i\theta}-2+e^{i\theta})=1-4r\sin^2(\theta/2).\]

The alternating mode at \(\theta=\pi\) gives \(g=1-4r\), so \(|g|\le1\) again requires \(r\le1/2\). Halving spatial spacing therefore quarters the largest explicit time step for this discretization. Implicit stepping changes this restriction but still has to resolve any transient relevant to the measurement.

Derivation and applications

Can an energy-stable heat step create an alternating transient?

A diffusion mode should decay rather than oscillate. To distinguish decay of a norm from preservation of sign, examine the finite-element or finite-volume semidiscrete system \(M\dot u+Ku=0\), with symmetric positive definite mass matrix \(M\) and thermal stiffness \(K\) positive semidefinite. An eigenvector satisfying \(Kv=\lambda Mv\) has scalar amplitude \(y(t)\) obeying \(y'=-\lambda y\). A generalized \(\theta\) step applied to this mode gives

\[[1+\theta z]y^{n+1}=[1-(1-\theta)z]y^n,\]
\[z=\Delta t\,\lambda .\]

For Crank–Nicolson take \(\theta=1/2\). The factor \(G=(1-z/2)/(1+z/2)\) has \(|G|\le1\) for all \(z\ge0\) but changes sign when \(z>2\). An initial grid-scale component can therefore alternate in time. To test a remedy, replace the first full step by two half backward-Euler steps. Their combined factor is

\[G_{\rm start}=(1+z/2)^{-2}.\]

Thereafter return to the second-order Crank–Nicolson update. After \(n\) further full steps the mode amplitudes, with and without the initial damping, are

\[y_{\rm damped}=G_{\rm start}G^ny^0,\]
\[y_{\rm plain}=G^{n+1}y^0 .\]

For small \(z\), both startup strategies agree through first order, while for large \(z\) the two half steps strongly suppress the unresolved mode. This argument explains a startup treatment for nonsmooth initial data; sign preservation of every physical grid value is a stronger matrix property than sign preservation of one mode.

Worked example

Check damping of a near-grid-scale eigenmode

Take \(\lambda=2000\) s⁻¹ and \(\Delta t=0.0100\) s. Then \(z=20\). A single Crank–Nicolson step leaves \(-9/11=-0.818\) of the amplitude; two backward-Euler half steps leave \(1/121=0.00826\). The exact amplitude factor is

\[e^{-20}=2.06\times10^{-9}.\]

Both discrete results are bounded, but the startup treatment removes almost all of a mode that the time grid cannot resolve.

Second application

Check the cost for a physically slow component

For the same mesh and step, a slow mode with \(\lambda=2.00\) s⁻¹ has \(z=0.0200\). Crank–Nicolson gives \(0.99/1.01=0.980198\), the startup gives \(1/1.01^2=0.980296\) and the exact factor is \(0.980199\). The slow component changes by less than \(10^{-4}\) in this comparison. A timestep must still resolve a transient that is itself part of the desired output.

Discretise space and time separately

A heat pulse in a thin insulated rod smooths over time according to \(u_t=D u_{xx}\) for constant positive diffusivity \(D\). Use a uniform grid of spacing \(h\), and initially examine interior points or periodic boundaries so the stencil is unchanged everywhere. Replacing the second derivative by a centred difference gives a system of ordinary differential equations for the nodal temperatures. The time method still has to resolve the fastest rate that this spatial operator can generate.

An explicit Euler step yields \(u_i^{n+1}=r u_{i-1}^n+(1-2r)u_i^n+r u_{i+1}^n\) with \(r=D\Delta t/h^2\). If \(0\leq r\leq1/2\), the update is a convex combination of three temperatures. The maximum cannot rise and the minimum cannot fall in a source-free interior step. Starting with one hot node at 1 and neighbours at zero, \(r=0.4\) gives a centre value 0.2 and neighbours 0.4 after a single step. At \(r=0.6\) the centre would become negative although the continuum heat equation preserves nonnegativity.

Identify the spatial modes that set the limit

Insert \(u_j^n=g^n e^{\mathrm{i}j\theta}\), where \(\mathrm{i}\) is the imaginary unit and \(j\) indexes the grid. The two neighbouring values contribute factors \(e^{\pm\mathrm{i}\theta}\), yielding \(g=1-4r\sin^2(\theta/2)\). Long waves have \(\sin^2(\theta/2)\simeq\theta^2/4\), so their decay approaches the continuum rate as the mesh is refined. The alternating grid mode \(\theta=\pi\) has the most negative amplification and enforces \(r\leq1/2\) for bounded magnitude.

At the limiting value \(r=1/2\) the alternating mode flips sign without losing amplitude. A strict margin damps it. For \(D=10^{-4}\) m²/s and \(h=2\) mm, the maximum explicit step is

\[h^2/(2D)=0.020\,\mathrm{s}.\]

Refining to 1 mm reduces that limit to 0.005 s. The mesh gives a sharper temperature profile yet can cost four times more steps over the same physical interval, besides the increased number of spatial degrees of freedom.

Compare backward Euler and Crank–Nicolson

Writing the semidiscrete system as \(u'=-A_hu\), backward Euler solves \((I+\Delta t A_h)u^{n+1}=u^n\). Crank–Nicolson averages the old and new diffusive fluxes, giving \((I+\Delta t A_h/2)u^{n+1}=(I-\Delta t A_h/2)u^n\). For a Fourier mode put \(s=4r\sin^2(\theta/2)\). Their factors are \(1/(1+s)\) and \((1-s/2)/(1+s/2)\), respectively. Both remain bounded at arbitrarily large \(s\), but Crank–Nicolson may alternate for under-resolved sharp features.

With \(s=20\), backward Euler retains only \(1/21\) per step. Crank–Nicolson yields \(-9/11\), retaining much more of the fast component and reversing its sign. For a smooth low-frequency mode Crank–Nicolson generally gives more accurate temporal decay because it is second order. Decide whether early sharp transients or later smooth behaviour is the relevant physical quantity. To identify spatial and temporal error separately, refine \(\Delta t\) first on a fixed mesh, then refine space with time error kept well below spatial error. Merely halving both at once cannot reveal which term dominated the original discrepancy.

Apply a prescribed heat input without confusing it with temperature

An insulated periodic rod with uniform heating rate \(s\) measured in K/s has an average temperature that must rise by \(s\Delta t\) each step. Sum the centred second differences over the periodic indices: each nodal value appears with coefficients \(1,-2,1\), which cancel. The source alone changes the mean. For \(s=3\) K/s and a step of 0.02 s the numerical average must increase by 0.06 K, independently of the diffusivity and initial profile.

A code can pass this global test while still mishandling short-wave damping, since an alternating error has zero spatial mean. Pair a mean-temperature test with a nonconstant mode-decay test. Use a homogeneous periodic run for isolates of diffusion, and a uniform temperature with prescribed source for the storage term. A failure in one test then identifies a different part of the mathematical balance than a failure in the other.

Prove decay of a discrete thermal energy

Let a closed semidiscrete diffusion model be \(M\dot u+Ku=0\), with \(M\) symmetric positive definite and \(K\) symmetric positive semidefinite. Assume \(K{\bf1}=0\), expressing zero flux for a uniform temperature. Backward Euler satisfies \(M(u^{n+1}-u^n)+\Delta t Ku^{n+1}=0\). Multiplying by the constant vector and using symmetry gives

\[{\bf1}^TMu^{n+1}={\bf1}^TMu^n.\]

Thus the capacity-weighted sum, proportional to stored sensible heat for constant capacities and a fixed reference, is conserved for any step size.

Now multiply by \(u^{n+1}\). The identity \(a^TM(a-b)=[\|a\|_M^2-\|b\|_M^2+\|a-b\|_M^2]/2\) yields the exact balance

\[\tfrac12\|u^n\|_M^2-\tfrac12\|u^{n+1}\|_M^2=\Delta t\,(u^{n+1})^TKu^{n+1}+\tfrac12\|u^{n+1}-u^n\|_M^2 .\]

Both terms are nonnegative. The quadratic quantity therefore decays although total sensible heat is conserved. Subtracting the conserved mean first yields the same decay statement for temperature variation around equilibrium. The first term represents spatial smoothing measured at the new time, and the second reflects the numerical time update. This derivation gives a stability certificate on nonuniform grids without assuming Fourier modes.

Audit two cells with different heat capacities

Choose capacities 1 and 3 J/K, conductance 2 W/K, and initial temperature deviations \((4,0)^T\) K. The conserved sensible heat is 4 J, so the final equilibrium in a closed system must be one kelvin above reference. At \(\Delta t=0.5\) s the matrix \(M+\Delta tK\) has rows \((2,-1)\) and \((-1,4)\), and the right-hand side is \((4,0)^T\). The new temperatures are \((16/7,4/7)^T\). Checking their weighted sum gives \(16/7+3(4/7)=4\), as required. The unweighted average changes, which is physically appropriate for unequal capacities.

The quadratic quantity at the start is \(4^2/2=8\). After the step it is

\[[(16/7)^2+3(4/7)^2]/2=152/49.\]

Its drop is \(240/49\). The conductive contribution is \((0.5)(2)(12/7)^2=144/49\); the time-update contribution is

\[[(-12/7)^2+3(4/7)^2]/2=96/49.\]

Their sum recovers the measured drop exactly. Neither contribution equals a loss of the 4 J of sensible heat. The quadratic measure depends on squared temperatures and has different physical units.

A positive heat supply or a prescribed exterior temperature introduces a boundary or source work term into these identities. Applying the closed-system decay test to an externally heated experiment would therefore diagnose the wrong physical model. Verify which conserved or dissipated quantity is actually implied by the capacity matrix, boundary conditions and source terms before comparing numerical integrators.

The conserved mean suggests another check after many large steps. The steady state must have zero conductance dissipation, which for two connected cells requires equal temperatures. Together with the weighted heat total this fixes both temperatures at one kelvin above reference. A scheme that instead approaches the unweighted initial average of two would be converging to the wrong conserved quantity despite producing a visually smooth, uniform endpoint. The measured quadratic variation about the correct mean tends to zero; the uncentred squared quantity tends to a positive constant because the remaining uniform state still has temperature above the chosen reference.

What happens to a grid-scale temperature ripple?

The alternating spatial mode on a uniform heat grid has discrete Laplacian eigenvalue \(-4/\Delta x^2\). Substitute this mode into each method and compare the amplitude after one step. The plot isolates the shortest resolvable pattern.

What happens to a grid-scale temperature ripple?. Horizontal axis: Diffusion number αΔt/Δx². Vertical axis: Signed amplitude after one time step. Data follow the figure.
Forward Euler reverses the mode above 1/4 and becomes unstable above 1/2. Crank–Nicolson stays bounded for every plotted step but also reverses the mode above 1/2. Smooth initial data can hide this high-frequency diagnostic.
Read values from the plot
Signed amplitude after one time step at selected values of Diffusion number αΔt/Δx².
Diffusion number αΔt/Δx²Forward EulerBackward EulerCrank–Nicolson
0111
0.275−0.10.476190.29032
0.55−1.20.3125−0.047619
0.825−2.30.23256−0.24528
1.1−3.40.18519−0.375

Download all 221 plotted samples (CSV)

Change parameters · What happens to a grid-scale temperature ripple?

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

Interfaces, contact resistance and Robin data

Derive a face flux that transports the same heat through two different materials and through a convective boundary.

From first principles

Derive an interface flux from two half-cell temperature drops

Two neighbouring cell centres can lie in materials with sharply different conductivities. Consider a planar interface between them, normal to a one-dimensional steady heat flow. Let \(d_L,d_R\) be the distances from the centres to the interface, and suppose there is no interface source, storage or contact resistance. Steady conservation requires one heat flux \(q\), positive to the right, and perfect contact requires one interface temperature \(T_I\). Applying Fourier’s law to each half gives

\[q=k_L(T_L-T_I)/d_L=k_R(T_I-T_R)/d_R .\]

Solve each expression for its temperature drop, add the two drops and eliminate \(T_I\). The conductance follows from the actual material distances:

\[q=\frac{T_L-T_R}{d_L/k_L+d_R/k_R},\]
\[k_{\rm eff}=\frac{d_L+d_R}{d_L/k_L+d_R/k_R}.\]

For equal distances this is the harmonic mean; only equal conductivities recover the same result as the arithmetic mean. If one material approaches zero conductivity with positive thickness, the flux approaches zero. A finite thermal contact resistance adds another temperature drop \(qR_c\), while a heat-generating interface alters the flux-continuity condition itself.

Derivation and applications

Enforce the flux jump at a heat-generating interface

Two materials in series carry the same conductive current only if their common interface stores and generates no energy. Consider two homogeneous slabs with an idealized thin heater between them. Let \(T_L,T_R\) be prescribed outer surface temperatures, \(R_L,R_R\) the positive thermal resistances per unit area in m² K/W, and \(s\) the heater release in W/m². Assume perfect thermal contact, steady conduction and negligible thickness of the heater. Define the interface temperature as \(T_I\) and flux \(q\) positive to the right.

Fourier’s law integrated through each slab relates its own constant flux to its temperature drop. The pillbox balance across the heater requires the right flux to exceed the left one by the generated heat:

\[q_L=(T_L-T_I)/R_L,\]
\[q_R=(T_I-T_R)/R_R,\]
\[q_R-q_L=s .\]

Substitute the two face laws into the balance. With \(g_j=1/R_j\) as the two conductances per area, the interface temperature and individual fluxes are

\[T_I=\frac{g_LT_L+g_RT_R+s}{g_L+g_R},\]
\[q_R=g_R(T_I-T_R),\]
\[q_L=g_L(T_L-T_I).\]

Alternatively eliminate \(T_I\) to express the fluxes as through-flow plus a split source. The resistances determine the fraction of added heat directed to each boundary:

\[q_L=\frac{T_L-T_R-sR_R}{R_L+R_R},\]
\[q_R=\frac{T_L-T_R+sR_L}{R_L+R_R}.\]

Setting \(s=0\) restores a single common flux. Equal outside temperatures send more generated heat toward the lower resistance. For an interface at a mesh face the two cells therefore need distinct physical face fluxes linked by the stated jump; assigning exactly the same flux while adding no source anywhere violates energy balance.

Worked example

Determine both heat flows through an instrumented wall

Let \(T_L=320\) K, \(T_R=300\) K, \(R_L=0.100\), \(R_R=0.200\) m² K/W and \(s=150\) W/m². The interface sees conductances \(10.0\) and \(5.00\) W/(m² K) and reaches \(323.33\) K. The left flux is \(-33.3\) W/m² and the right flux \(116.7\) W/m². Heat leaves on both sides, including toward the hotter external surface. Their oriented difference equals \(150\) W/m².

Second application

Select a heater setting that makes one sensor read zero

Keeping the same temperatures and layers, impose \(q_L=0\). Then

\[T_I=T_L=320\,\mathrm{K},\]
\[s=(T_L-T_R)/R_R=100\,\mathrm{W/m^2}.\]

All generated heat exits on the right. Reducing \(s\) to zero instead gives \(66.7\) W/m² from left to right through both layers. A zero left-side flux in the heated experiment therefore does not imply an insulating left layer.

Touch two long solids: which temperature does the interface acquire?

Two long blocks, initially at temperatures \(T_L>T_R\), are pressed into ideal thermal contact at \(x=0\). Denote conductivity by \(k\), volumetric heat capacity by \(C\), and diffusivity by \(\alpha=k/C\). At early times the penetration distance on each side is small compared with its length. Model the blocks as half-spaces with a common interfacial temperature \(T_*\). This transient contact problem has no fixed layer thickness to insert into a pair of steady thermal resistances.

In the right half-space the similarity coordinate is \(x/(2\sqrt{\alpha_R t})\). Substituting a function \(F\) of this coordinate into the heat equation gives

\[F''+2\eta F'=0.\]

Its bounded solution matching a fixed surface and a uniform distant temperature has an error-function shape. Thus \(T_R(x,t)=T_*+(T_R-T_*)\operatorname{erf}[x/(2\sqrt{\alpha_R t})]\). The left solution uses distance \(-x\), its own diffusivity and the initial left temperature. These profiles share their interface temperature by construction; conservation still requires their heat fluxes to match.

Differentiate the error functions at zero and apply Fourier's law. The left flux equals \(e_L(T_L-T_*)/\sqrt{\pi t}\), and the right flux is \(e_R(T_*-T_R)/\sqrt{\pi t}\), both oriented from left to right. Here \(e=\sqrt{kC}\) is thermal effusivity. Equating the fluxes gives

\[T_*=(e_LT_L+e_RT_R)/(e_L+e_R).\]

The interfacial temperature is independent of time within this idealisation, while the penetration layers broaden continuously.

Temperature profiles on both sides at two contact times and a logarithmic graph of transmitted flux against time.Open full-size diagram
The two temperature gradients differ because flux continuity weights each gradient by its own conductivity. The common temperature depends on heat capacity as well as conductivity.

For the notebook's \(k_L=4,\ k_R=1\,\mathrm{W/(m\,K)}\) and equal capacities of \(10^6\,\mathrm{J/(m^3\,K)}\), the effusivity ratio is two. Between 80 and 20 degrees Celsius the common temperature is 60 degrees Celsius. The initially infinite ideal flux is integrable: the energy transferred by time \(t\) equals \(2tq(t)\) per unit contact area. The notebook independently integrates temperature loss and gain throughout the two bodies and checks this balance. A real surface resistance, a finite approach time or the far surface of a finite specimen would eventually invalidate different parts of the idealisation.

A finite-volume scheme offers a sensitive check of this benchmark. On a sufficiently long computational domain, sum nodal or cell-average energies on each side at the same time. Internal face fluxes cancel in the total by conservation. A scheme may pass that global check while partitioning energy incorrectly between materials. Compare both individual energy changes, the early flux integrated over the first step and the temperature nearest the interface. This combination tests the material weighting and the time integration independently.

Keep both initial temperatures and conductivities fixed, but multiply the right-hand volumetric heat capacity by four. Predict \(T_*\) and the right-hand penetration depth at the same time.

Work through the solution

The right effusivity doubles and now equals the left one. The interface becomes 50 degrees Celsius. At fixed \(k_R\) the right diffusivity falls to one quarter, so the penetration distance proportional to \(\sqrt{\alpha_Rt}\) halves. A larger local capacity can draw more flux while confining the altered temperature to a narrower region.

Change parameters · Explore this notebook example

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

One flux through resistances in series

Let \(q=-kT'\) be heat flux in the positive coordinate direction, with unit cross-sectional area and no internal source. Between two cell centres separated by an interface, let the left and right centre-to-interface distances be \(d_L,d_R\). Piecewise constant conductivities \(k_L,k_R>0\) make the equilibrium temperature linear in each segment. If the interface has perfect contact, its temperature \(T_f\) is continuous. Integrating Fourier's law on each side gives

\[T_L-T_f=q\,d_L/k_L,\]
\[T_f-T_R=q\,d_R/k_R.\]

Adding eliminates the unknown interface temperature.

\[q=\frac{T_L-T_R}{d_L/k_L+d_R/k_R}.\]

For equal distances this amounts to using the harmonic mean conductivity over the full centre spacing. Inserting the same signed \(q\) as the outflow of the left cell and the inflow of the right cell produces cancellation when their balances are added. If a material interface stores energy or supplies heat independently, a flux jump belongs in the balance and this steady series calculation must be modified.

Measure the temperature drop

Take \(d_L=d_R=0.01\) m, \(k_L=2,\ k_R=10\) W/(m K) and \(T_L=30,\ T_R=18\) °C. The series resistance per unit area is \(0.005+0.001=0.006\) m²K/W. The flux is \(2000\) W/m² and the interface temperature is \(30-2000(0.005)=20\) °C. The lower conductivity carries the larger temperature drop despite carrying the same flux. Using the arithmetic mean 6 with the centre difference over 0.02 m instead predicts \(3600\) W/m².

Introduce a contact resistance \(R_c=0.002\) m²K/W. Its temperature jump is \(qR_c\); the total resistance rises to 0.008, reducing the heat flux to 1500 W/m². The two sides of the contact now have temperatures 22.5 and 19.5 °C. Imposing a single interface temperature on this model would remove the physically measured 3 K jump.

OneSimulation · Resolve a temperature jump at imperfect contact

Two slabs are each 0.06 m thick, with conductivities 12 and 3 W/(m K). Their outer surfaces are held 30 K apart. A contact resistance \(R_c\) permits two distinct temperatures at the shared physical location. The flux stays continuous. The face law and the exact reference for the whole assembly are

\[T_{f,L}-T_{f,R}=qR_c,\]
\[q=\frac{T_L-T_R}{L_1/k_1+R_c+L_2/k_2}.\]

The code adds \(R_c\) only to the resistance between the two cells adjacent to the contact. OneSimulation solves the resulting balance system. The flux falls from 1200 to 800 W/m² for \(R_c=0.0125\) m² K/W. Reconstructing the two face temperatures gives 326 K and 316 K. Connecting only the cell-centre temperatures would smear this 10 K jump over one mesh cell. Refining an ideal-contact model would converge to the wrong interface law.

"""Find the temperature jump at an imperfect contact between two slabs."""
import matplotlib.pyplot as plt
import numpy as np
from onesim.numerics.linear.matrices.dense_linear_algebra import solve_dense

n = 12  # even number of equal, cell-centred control volumes
length = 0.12  # m
dx = length / n
k = np.repeat([12., 3.], n // 2)  # W/(m K)
left, right = 330., 300.  # K
centres = (np.arange(n) + 0.5) * dx
fig, ax = plt.subplots(figsize=(6.8, 3.8), constrained_layout=True)
for contact, colour in [(0.0, "#a4492b"), (0.0125, "#176879")]:  # m² K/W
    resistance = np.r_[dx/(2*k[0]), dx/(2*k[:-1]) + dx/(2*k[1:]), dx/(2*k[-1])]
    resistance[n//2] += contact
    g = 1 / resistance
    matrix = np.diag(g[:-1]+g[1:]) - np.diag(g[1:-1], 1) - np.diag(g[1:-1], -1)
    rhs = np.zeros(n)
    rhs[0], rhs[-1] = g[0]*left, g[-1]*right
    temperature = solve_dense(matrix, rhs)
    fluxes = -np.diff(np.r_[left, temperature, right]) / resistance
    q = fluxes[0]
    assert np.allclose(fluxes, (left-right)/(length/2/k[0]+contact+length/2/k[-1]))
    hot_face = temperature[n//2-1] - q*dx/(2*k[0])
    cold_face = temperature[n//2] + q*dx/(2*k[-1])
    assert np.isclose(hot_face-cold_face, q*contact)
    x = np.r_[0, centres[:n//2], length/2, length/2, centres[n//2:], length]
    y = np.r_[left, temperature[:n//2], hot_face, cold_face, temperature[n//2:], right]
    ax.plot(100*x, y, color=colour, label=f"Contact resistance {contact:g} m² K/W")
    print(f"Flux {q:.0f} W/m²; interface jump {hot_face-cold_face:.1f} K")
ax.set(xlabel="Distance through slabs (cm)", ylabel="Temperature (K)")
ax.legend()
ax.grid(alpha=0.2)
fig.savefig("partial-differential-equations.png", dpi=160)
Perfect contact gives a continuous piecewise linear temperature, while finite contact resistance produces a 10 K downward jump at 6 cm.
The vertical segment reconstructs both surface temperatures at the same location. All control-volume faces carry the same steady flux, including the imperfect contact.

Download the Python example

Apply a convective boundary

At an exterior face the outward heat flux obeys \(q=h_c(T_s-T_\infty)\), a Robin condition. Eliminate the unknown surface temperature as above to obtain

\[q=(T_P-T_\infty)/(d/k+1/h_c).\]

If \(h_c\) tends to zero, the boundary becomes insulating. With very large \(h_c\), the surface approaches ambient temperature while the finite centre-to-face resistance remains. For \(d=0.01\) m, \(k=2\), \(h_c=100\) W/(m² K), \(T_P-T_\infty=15\) K, the predicted flux is 1000 W/m² and the surface is 10 K above ambient. Multiplying by face area converts this flux to the power used in a cell energy balance. Mixing up these two quantities makes the result depend incorrectly on mesh area.

A jump located inside a cell

If the materials change at a known position inside a segment, the fractions of that segment matter. Moving the interface so that 75 percent of the length has conductivity 2 and 25 percent has conductivity 10 produces effective conductivity \(1/(0.75/2+0.25/10)=2.5\) W/(m K). Giving each material half the segment instead would give \(10/3\) W/(m K). The harmonic rule depends on actual layer thicknesses. A mesh-refinement study that snaps the interface to different positions at every refinement can mix geometric representation error with flux-discretisation error.

Derive effective transport parallel and normal to layers

A fine laminate of isotropic materials can have a direction-dependent macroscopic conductivity. Consider two perfectly bonded planar layers occupying thickness fractions \(\theta\) and \(1-\theta\), with conductivities \(k_1,k_2\). Assume steady conduction, no internal sources, and boundary conditions that permit a one-dimensional field for the loading orientation being tested. For transport normal to the layers, continuity forces equal flux. Adding their temperature drops across a total thickness \(L\) gives

\[k_\perp=[\theta/k_1+(1-\theta)/k_2]^{-1}.\]

For transport parallel to the layers the imposed longitudinal gradient is common and the area-weighted fluxes add, giving \(k_\parallel=\theta k_1+(1-\theta)k_2\).

The arithmetic and harmonic expressions are thus both correct, but apply to different geometries of imposed transport. Their ordering follows without a conductivity table: multiplying the two positive weighted sums \(\theta k_1+(1-\theta)k_2\) and \(\theta/k_1+(1-\theta)/k_2\) gives \(1+\theta(1-\theta)(k_1-k_2)^2/(k_1k_2)\ge1\). Equality requires identical conductivities or a missing layer. Spatial averaging performed before identifying the flux direction would erase precisely the distinction that determines the coarse physics.

Predict two experiments on the same material sample

Suppose a repeated laminate consists of 40 percent material with conductivity 1 and 60 percent with conductivity 10 W/(m K). Then \(k_\parallel=0.4+6=6.4\) W/(m K) and \(k_\perp=1/(0.4+0.06)=50/23\approx2.174\) W/(m K). A temperature drop of 4 K over 0.02 m imposes gradient magnitude 200 K/m. Perfectly normal loading produces flux magnitude about 434.8 W/m², whereas the same gradient parallel to the layers yields 1280 W/m². The larger flux is consistent with the fast material providing a continuous path in the latter orientation.

For the normal experiment the low-conductivity phase occupies 0.008 m and accounts for a drop \(434.8(0.008)/1\approx3.478\) K. The high-conductivity phase occupies 0.012 m and drops only \(434.8(0.012)/10\approx0.522\) K. Adding recovers the imposed four kelvin. For the parallel experiment individual flux densities are 200 and 2000 W/m². Averaging by their area fractions gives

\[0.4(200)+0.6(2000)=1280\,\mathrm{W/m^2}.\]

These local checks use the same two material properties and explain the difference in the observed coarse responses.

Using the effective tensor assumes the observation scale spans representative layers. A sensor within one layer may respond to its local temperature slope instead. Finite contact resistance adds a temperature jump in the normal direction; if the number of interfaces per macroscopic length changes, the effective normal resistance changes even at identical material fractions. Measuring both orientations can distinguish geometric or contact effects that a single scalar fitted conductivity would conceal.

Rotating a laminate specimen through ninety degrees interchanges the roles of these two effective values without changing its volume fractions. This makes an orientation experiment particularly discriminating: a fit that happened to reproduce the first orientation by adjusting a scalar conductivity predicts the same flux for the rotated specimen, whereas the fine-layer balance predicts a factor of about \(6.4/(50/23)=2.94\) between them.

Repeating the test over multiple layer spacings also probes the assumption of negligible contact resistance.

Separate the temperature jump from the bulk gradient

A steady one-dimensional stack has two positive bulk conduction resistances in series with a contact resistance \(R_c\). Flux is common to all three. Scale \(R_c\) by the sum of bulk resistances and predict where probes would measure the imposed end-to-end temperature difference.

Separate the temperature jump from the bulk gradient. Horizontal axis: Contact resistance / combined bulk resistance. Vertical axis: Fraction of total temperature drop. Data follow the figure.
When contact resistance equals the bulk sum, half the end-to-end drop occurs at a geometrically thin interface. A numerical scheme that enforces temperature continuity there can converge smoothly to the wrong interface model.
Read values from the plot
Fraction of total temperature drop at selected values of Contact resistance / combined bulk resistance.
Contact resistance / combined bulk resistanceAt interfaceWithin the two layers
001
1.250.555560.44444
2.50.714290.28571
3.750.789470.21053
50.833330.16667

Download all 241 plotted samples (CSV)

Change parameters · Separate the temperature jump from the bulk gradient

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

Cell Péclet number and monotonicity

Derive the sign restriction for centred transport, identify a numerical boundary layer and quantify the diffusion introduced by upwinding.

From first principles

Derive the Péclet restriction for a centred steady stencil

Take steady one-dimensional transport with constant speed \(a>0\), diffusivity \(D>0\) and no interior source. Conservation requires constant total flux \(J=au-Du'\). On a uniform mesh of spacing \(h\), approximate the advective face value by the arithmetic mean and the face gradient by a difference. The right face flux becomes

\[J_{i+1/2}=a(u_i+u_{i+1})/2-D(u_{i+1}-u_i)/h .\]

Equating the two neighbouring face fluxes and collecting the centre coefficient gives a relation among the three consecutive values:

\[2u_i=(1+\mathrm{Pe}_h/2)u_{i-1}+(1-\mathrm{Pe}_h/2)u_{i+1},\]
\[\mathrm{Pe}_h=ah/D .\]

For \(|\mathrm{Pe}_h|\le2\) the centre value is a positive weighted average of its neighbours. Above that threshold one weight becomes negative and the discrete solution can overshoot even when the continuum solution is monotone. This restriction is on the local cell Péclet number, not on \(aL/D\) for the whole physical domain. Smaller cells, an upwind flux or an exponentially fitted flux can change the discrete behaviour.

Derivation and applications

Distinguish an imposed inlet flux from an imposed inlet concentration

With diffusion, a concentration measurement alone does not specify the total material entering a channel. Consider steady one-dimensional advection at constant speed \(a>0\) and diffusion coefficient \(D>0\), constant area, no reaction, and coordinate \(0<x<L\). Concentration is \(u(x)\). The net species flux is the sum of advection and diffusive backflow. Conservation makes it constant throughout the interval:

\[J=a u-Du',\]
\[J'=0 .\]

Suppose the upstream supply delivers a specified total flux \(J=a u_f\), where \(u_f\) is the incoming feed concentration used to normalize the supply rate. Prescribe an outlet concentration \(u(L)=u_L\) maintained by a reservoir. Subtract the uniform particular solution \(u_f\). The resulting first-order homogeneous equation for the excess has a convenient outlet-referenced solution:

\[(u-u_f)'=(a/D)(u-u_f),\]
\[u(x)=u_f+(u_L-u_f)e^{-a(L-x)/D}.\]

At the inlet the interior concentration can differ from the feed because diffusion also contributes to the prescribed mass rate. Define \(\mathrm{Pe}=aL/D\) and evaluate both terms at \(x=0\):

\[u(0)=u_f+(u_L-u_f)e^{-\mathrm{Pe}},\]
\[-D u'(0)=-a[u(0)-u_f] .\]

For large Péclet number the outlet affects only a layer of thickness \(D/a\). For small Péclet number the outlet reservoir can affect the whole channel. Imposing both \(u(0)=u_f\) and the specified total flux at the inlet would impose more conditions than this problem needs. A numerical method should record which physical boundary condition it approximates.

Worked example

Compute a moderate-Péclet-number channel profile

Take \(L=1.00\) m, \(a=0.0200\) m/s, \(D=0.0100\) m²/s, \(u_f=1.00\) and \(u_L=0\) kg/m³. The inlet concentration is \(1-e^{-2}=0.8647\) kg/m³ and the midpoint is \(1-e^{-1}=0.6321\) kg/m³. Inlet advection carries \(0.01729\) kg/(m² s) and diffusion supplies \(0.00271\) kg/(m² s), giving the prescribed total \(0.0200\).

Second application

Quantify a boundary-condition error

If a code instead fixes \(u(0)=1.00\) and \(u(L)=0\), its exact constant flux for those Dirichlet data satisfies

\[u(0)=(J/a)(1-e^{-\mathrm{Pe}}).\]

Hence \(J=0.0200/(1-e^{-2})=0.0231\) kg/(m² s), about \(15.7\%\) too large for the original feed problem. Grid refinement can converge cleanly to that incorrect-for-purpose value because the error lies in the boundary model.

Which length sets the balance?

Model a steady scalar on \([0,L]\) with \(a u'-\kappa u''=0\), constant speed \(a>0\) and diffusivity \(\kappa>0\). Advection and diffusion balance over length \(\ell=\kappa/a\). On a mesh with spacing \(h\), the cell Péclet number \(P=ah/\kappa\) measures how many layer lengths fit into one cell. This definition uses the full cell spacing; some conventions divide it by two. Stating the convention matters when quoting a threshold.

Write the centred interior equation in flux form. Its coefficients multiplying \(u_{j-1},u_j,u_{j+1}\) are \(-\kappa/h^2-a/(2h),2\kappa/h^2,-\kappa/h^2+a/(2h)\). For \(P\le2\), the neighbour coefficients are nonpositive and the row sum is zero, so each interior value is a weighted average of its neighbours. For \(P>2\), one weight changes sign. The discrete maximum principle can fail even though the centred derivative is formally second-order accurate on smooth resolved fields.

Watch a node cross below the boundary range

Take \(L=1,a=1,\kappa=0.1\), \(u(0)=0,u(1)=1\) and two equal cells. Then

\[h=0.5,P=5.\]

At the only interior node the coefficients are \(-1.4,0.8,0.6\). The numerical value is \(-0.75\), outside the prescribed boundary range. The exact solution is \((e^{ax/\kappa}-1)/(e^{aL/\kappa}-1)\), increasing and close to zero except near the outlet. At \(x=0.5\) it is \(1/(e^5+1)\approx0.00669\). The coarse grid does not resolve a physical layer of width 0.1.

Using the upstream difference \((u_j-u_{j-1})/h\) changes the coefficients to \(-2.4,2.8,-0.4\); the computed midpoint is \(1/7\). The value lies in range but the layer is excessively broad. A monotone method can replace an oscillation with a large smoothing error. Plot the magnitude of the profile at fixed physical locations while refining to distinguish those outcomes.

Explain the extra diffusion

Expand \(u_{j-1}=u_j-hu'_j+h^2u''_j/2+\cdots\). The upstream derivative is \(u'_j-hu''_j/2+O(h^2)\). The leading modified equation therefore contains effective diffusivity \(\kappa+ah/2\). In the example the artificial addition is 0.25, larger than the physical diffusivity 0.1. Reducing \(h\) below 0.2 restores the coefficient-sign requirement for the centred formula, while resolving the layer shape accurately generally needs several cells across \(\ell\). A convergence study should report both bounds compliance and the actual layer width or flux.

Fit the face flux to a constant-coefficient cell

For smooth constant coefficients the total flux \(J=au-\kappa u'\) is constant in a source-free cell. Solve this first-order equation between endpoints separated by \(h\). The exact relation is \(u_R=e^P u_L+(J/a)(1-e^P)\), hence \(J=a(e^P u_L-u_R)/(e^P-1)\). At large positive \(P\), the flux approaches \(a u_L\), the value carried from upstream. As \(P\) tends to zero, expansion gives a diffusive difference \(-\kappa(u_R-u_L)/h\) plus the centred advective contribution \(a(u_L+u_R)/2\). This exponential fitting uses additional local knowledge of the differential equation. It reproduces the constant-coefficient cell relation exactly, but variable material properties and sources require new local approximations.

Allocate grid points to a singularly perturbed outflow layer

For steady positive advection and small diffusivity the outflow layer shape is approximately \(e^{-(L-x)/\ell}\), with physical thickness scale \(\ell=\kappa/a\). A uniform grid that resolves that scale at a fixed number of points may waste most of its cells where the solution is almost flat. A simple layer-adapted strategy divides the domain into a coarse interval and a fine interval ending at the outflow boundary. Choose the fine-region width \(\tau\) by specifying how small the layer should already be at their interface.

If \(e^{-\tau/\ell}=N^{-2}\) for a grid with \(N\) total cells, then \(\tau=2\ell\log N\). Capping this width at \(L/2\) prevents a separate-layer construction when the physical layer is no longer thin. Place half the cells on each subinterval. This produces a piecewise-uniform grid, often called a Shishkin mesh for this boundary-layer setting. The amplitude threshold motivates its construction; it is not itself a proof of a particular numerical convergence rate. Such a proof must also control truncation, stability and matching across the grid transition.

Compare the information captured by sixty-four cells

Consider \(L=1\) m, \(a=1\) m/s and \(\kappa=0.002\) m²/s. Then \(\ell=0.002\) m. A uniform mesh of 64 cells has spacing 0.015625 m, almost eight physical layer lengths per cell. The first interior point back from the outflow has layer amplitude about \(e^{-7.8125}\approx0.000405\). Most of the transition from nearly zero to one takes place in a single cell. A method may fit an acceptable boundary value while giving a poor near-wall shape or slope.

The two-region design instead places its transition \(\tau=0.004\log64\approx0.01664\) m before the end. With 32 fine cells, their width is approximately 0.000520 m, so the fine cell Péclet number is about 0.260. At the last interior point the layer amplitude is now \(e^{-0.260}\approx0.771\). Several distinct intermediate values are available near the wall. At the coarse-to-fine transition the amplitude is \(64^{-2}\approx0.000244\), just as designed.

The coarse cells on the remaining 0.98336 m have width about 0.03073 m and cell Péclet number about 15.4. Their small expected layer amplitude does not license an unstable or nonmonotone coarse discretisation. Use a spatial scheme whose behaviour is controlled there, and check flux continuity through the changing cell sizes. If advection reverses, the thin layer moves to the opposite boundary; retaining the old mesh would concentrate cells in the wrong region. In time-dependent transport, moving layers may similarly call for adaptive tracking instead of a fixed partition.

The wall derivative supplies a more demanding check than a prescribed boundary value. For the exponential layer its exact slope at outflow has magnitude \(1/\ell=500\) per metre. A backward difference across the final fine cell gives approximately \((1-0.771)/0.000520=440\) per metre. Even this substantially improved mesh still underestimates the wall slope by about twelve percent, which matters if wall flux is the reported observable.

Expose a monotonicity failure on ten cells

For constant positive advection and diffusion solve \(u''-\mathrm{Pe}\,u'=0\) with end values zero and one. At cell Péclet number three, the centred recurrence has ratio \((1+\mathrm{Pe}_h/2)/(1-\mathrm{Pe}_h/2)=-5\); the upwind ratio is four.

Expose a monotonicity failure on ten cells. Horizontal axis: Position / domain length. Vertical axis: Nodal scalar, end values 0 and 1. Data follow the figure.
The centred solution overshoots the allowed interval by oscillating below zero near the outflow. Upwinding gives a monotone but overly broad layer. Neither the small algebraic residual nor a monotone curve alone establishes spatial accuracy.
Read values from the plot
Nodal scalar, end values 0 and 1 at selected values of Position / domain length.
Position / domain lengthExactCentred cellsFirst-order upwind
0000
0.23.7658e−112.4576e−61.4305e−5
0.53.059e−7−0.00032010.00097561
0.80.00247880.040.062499
1111

Download all 11 plotted samples (CSV)

Change parameters · Expose a monotonicity failure on ten cells

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.

What a periodic grid does to a decaying Fourier mode

A periodic diffusion solver predicts the shape of a sampled wave while its amplitude decays too slowly. Fourier analysis separates spatial differentiation error, an unresolved physical mode and errors caused by the time integrator.

Diagonalise the differential operator on the periodic interval

Use a dimensionless coordinate \(0\le x<2\pi\) and solve \(u_t=\kappa u_{xx}\) with periodic values and periodic derivatives. The complex exponentials \(e^{imx}\), with integer m, satisfy both conditions and are eigenfunctions of the second derivative. Put \(u(x,t)=A_m(t)e^{imx}\) and cancel the common exponential. The scalar amplitude equation is

\[A'_m=-\kappa m^2 A_m.\]

Thus every cosine or sine mode decays by \(\exp(-\kappa m^2t)\), with no phase shift, while the m=0 mean is conserved.

On a uniform grid \(x_j=2\pi j/N\), the samples of \(m\) and \(m+\ell N\) agree for every integer \(\ell\). A discrete Fourier transform returns coefficients in one representative band. For the real cosine test with even N we can fold a positive physical mode into \(k=\min(r,N-r)\), \(r=m\bmod N\). A Fourier spectral Laplacian multiplies that coefficient by \(-k^2\). For a resolved mode it differentiates the trigonometric interpolant exactly, up to arithmetic. For unresolved data it differentiates the aliased representative; no operation using only those samples can identify the original m.

Apply the centred difference stencil to a single wave

The standard second difference is \((u_{j+1}-2u_j+u_{j-1})/h^2\), \(h=2\pi/N\). Put the grid wave \(u_j=e^{ikjh}\) into the stencil. Factor out the common phase and simplify with \(e^{i\xi}+e^{-i\xi}=2\cos\xi\). This gives the symbol and its small-h expansion:

\[{e^{ikh}-2+e^{-ikh}\over h^2}=-{4\over h^2}\sin^2(kh/2)=-k^2+{k^4h^2\over12}+O(k^6h^4).\]

The effective squared wavenumber is smaller than \(k^2\) for every nonconstant mode in the resolved band, so this spatial approximation decays too slowly if the time equation is integrated exactly. The error is modest when \(kh\ll1\), but at the Nyquist mode \(kh=\pi\) the ratio is

\[4/\pi^2=0.4053.\]

A stable time integrator cannot repair this spatial attenuation error without additional modeling. The experiment exponentiates both discretizations' symbols exactly, isolating space and sampling here.

Measure separate errors with the same sampled initial data

Choose \(\kappa=0.5,\ m=3,\ N=16\). The true squared wavenumber is 9 and the difference stencil gives 8.006. Starting at unit amplitude, at \(t=0.20\) exact and spectral amplitudes are 0.40657; finite differences give 0.44906. Doubling N to 32 changes the difference result to 0.41716. The absolute amplitude error falls from 0.04249 to 0.01059, a ratio of 4.01 consistent with the second-order expansion. This is a spatial-convergence study because time evolution introduces no truncation error.

Now take \(m=12,\ N=16\). Every sampled cosine equals the low mode \(k=4\) at \(t=0\). At \(t=0.02\), the continuum amplitude for the true physical mode is \(e^{-1.44}=0.237\), whereas the spectral grid predicts

\[e^{-0.16}=0.852.\]

A spectral computation can therefore agree exactly with its trigonometric interpolant and disagree strongly with the evolution of the intended signal. Sampling on a finer grid or obtaining prior bandwidth information resolves that ambiguity. The mean mode is particularly revealing when a nonconstant physical cosine aliases to a constant.

Start at mode 3 and successively double N from 8 to 32. Compute two amplitude-error ratios at the same time. Then use mode 12 on 16 points to observe an alias, and increase N until the Fourier grid represents the intended mode.

Tutorial · resolve a damping rate to a target tolerance

For a mode well inside the grid bandwidth, estimate the number of samples per wavelength needed for a relative error below 1% in the decay rate with centred differences. Test the estimate for \(m=2\). How could the time integrator contaminate a measurement of this spatial error?

Show the resolution estimate

Writing p for samples per wavelength gives

\[kh=2\pi/p.\]

The relative rate error is approximately \((kh)^2/12\). Requiring at most 0.01 gives \(p\gtrsim18.14\); try 19 samples per wavelength, or \(N=38\) for \(m=2\). The exact ratio \([\sin(\pi/19)/(\pi/19)]^2\) is about 0.991. A forward-Euler step would replace exponential propagation by \(1-\kappa k_{\rm eff}^2\Delta t\). Its repeated-step error could partly mask the underdamping of the spatial stencil. Compare with the exponential of the discrete symbol before attributing a measured rate to space alone.

Further reading · Lloyd N. Trefethen, Spectral Methods in MATLAB · periodic grids, Fourier differentiation and downloadable programs

Check the discrete eigenvalue with OneSimulation

A spatial sine also diagonalises the five-point Dirichlet Laplacian on a square. Use the same modified wave-number argument in both coordinate directions. Run python poisson-mode.py --mode 2 --cells 8 16 32 and compare the observed nodal error with the discrete eigenvalue prediction in the CSV. This is a steady forced problem whose spatial operator can be checked independently of any time integrator. Download the OneSimulation verification model.

Moving a cell average without inventing or losing material

Derive a conservative transport step from cell overlap and measure how a monotone scheme spreads a pulse despite conserving its total mass exactly.

Transport is a translation

For constant \(a>0\), the solution to \(u_t+au_x=0\) is \(u(x,t)=u_0(x-at)\). Consider periodic cells of width \(h\). Over one step \(\Delta t\), a cell translated back through distance \(a\Delta t\) overlaps part of its original cell and part of its left neighbour. If the initial reconstruction is constant in each cell and \(C=a\Delta t/h\) lies between zero and one, the new average is

\[u_j^{n+1}=(1-C)u_j^n+C u_{j-1}^n.\]

Summing all cells telescopes on a periodic grid, preserving total material \(h\sum_j u_j\). Each new value is a convex combination, so the maximum cannot increase and the minimum cannot fall. For \(C>1\) this particular two-cell overlap ceases to describe the translated interval.

Derive the spreading instead of reading it off a plot

Start from one unit of material in one cell and follow its distribution on an effectively unbounded grid. After one step its index increment behaves like a Bernoulli choice: zero with weight \(1-C\), one with weight \(C\). Repeated convolution gives a binomial profile. Its mean index after \(n\) steps is \(nC\) and variance \(nC(1-C)\). Multiplying by \(h^2\) and using \(n=t/\Delta t\) gives a physical variance \(a h(1-C)t\). Equating this with \(2D_\mathrm{num}t\) gives

\[D_\mathrm{num}=ah(1-C)/2.\]

This growth describes numerical spreading of a translated shape even though the scheme conserves mass.

Two ways to reach the same physical time

A pulse should move 12 cells. Taking 12 steps with \(C=1\) shifts data by exactly 12 indices. Taking 24 steps with \(C=0.5\) has the same mean displacement but an added variance of six cell widths squared. In a source-free transport test, peak height and width reveal an error hidden from the total-mass budget.

The experiment starts with one full cell on a ring of 80 cells. Up to 40 steps avoid wraparound across the displayed pulse for the chosen starting index. The blackboard binomial calculation predicts centroid and spread independently of the plotted recurrence.

Tutorial on interpreting artificial diffusion

If \(C=0.25\) and the pulse has moved ten cells on average, what is its added variance?

Worked solution

Mean travel requires \(n=40\) steps. Variance in cell units is \(40(0.25)(0.75)=7.5\). Multiplying by \(h^2\) gives the physical variance.

Is a larger time step always the cure for pulse spreading?

Worked solution

For constant transport on this uniform grid \(C=1\) happens to align the translation with cell boundaries. Multiple speeds, nonuniform meshes and source physics generally preclude such alignment everywhere. A higher-order bounded reconstruction can reduce spreading while preserving conservation.

Read the university treatment

Use the advection examples to compare convergence in a norm with conservation of an integral and propagation of an extremum. Randall LeVeque · Finite Difference Methods for Ordinary and Partial Differential Equations

Splitting a stiff relaxation from a slowly varying drive

A sensor tries to follow a changing reference while a fast relaxation damps departures. An explicit method may oscillate wildly even though the underlying transient decays monotonically. Treating the restoring term implicitly can resolve the slow motion using steps longer than the transient time. Whether those steps measure the transient accurately is a different question.

Construct an exact benchmark with two time scales

Let \(s(t)=\sin t\) and choose a relaxation time \(\varepsilon>0\). Consider \(y'=s'(t)+(s(t)-y)/\varepsilon\), with \(y(0)=1\). Set \(e=y-s\). Subtraction of \(s'\) gives \(e'=-e/\varepsilon\), hence the reference solution \(y(t)=\sin t+e^{-t/\varepsilon}\). The slow reference changes over times of order one, while the initial mismatch decays significantly over \(\varepsilon\). We know both pieces exactly and can diagnose errors even when a stable result looks visually smooth.

Explicit Euler applied to a perturbation of the state multiplies that perturbation by \(1-r\), with \(r=h/\varepsilon\). It damps monotonically only for \(0<r\le1\), changes sign while damping for \(1<r<2\), and grows for \(r>2\). These statements compare nearby solutions at equal drive. The full signal also contains the time variation of \(s\). At the boundary \(r=2\) a state perturbation alternates without decaying. Refining the step to follow a slow input alone can therefore give the wrong choice of \(h\).

Solve only the fast part implicitly

Split \(f_{\rm slow}(t)=\cos t\) from \(f_{\rm fast}(t,y)=(\sin t-y)/\varepsilon\). Evaluate the slow part at \(t_n\) and the fast part at \(t_{n+1},y_{n+1}\). This first-order additive implicit-explicit Euler step needs one scalar linear solve:

\[(1+r)y_{n+1}=y_n+h\cos t_n+r\sin t_{n+1}.\]

The state perturbation now multiplies by \(1/(1+r)\). It is damped at every positive step and tends to zero as \(r\) grows. Subtract \(\sin t_{n+1}\) from both sides after solving. The mismatch obeys \(e_{n+1}=[e_n+h\cos t_n-(\sin t_{n+1}-\sin t_n)]/(1+r)\). The bracketed forcing defect is \(O(h^2)\) for smooth input. In the stiff limit at fixed \(h\), the endpoint approaches the current reference. Moving the reference in the fast term to the old time would instead drag it one sample behind in that limit. The choice of what to treat implicitly includes the time at which a fast equilibrium is imposed.

Test early-time accuracy and late-time stability

For \(\varepsilon=0.02\), \(h=0.05\), \(r=2.5\). At the first step the exact value is

\[\sin(0.05)+e^{-2.5}=0.1321.\]

Explicit Euler gives

\[1+0.05(1-50)=-1.45.\]

The implicit-explicit value is

\[[1+0.05+2.5\sin(0.05)]/3.5=0.3357.\]

The latter is stable but visibly overestimates the surviving transient. Its damping factor \(1/3.5=0.286\) differs substantially from \(e^{-2.5}=0.0821\). A question about peak rate or initial settling requires shorter steps even if the late-time reference is recovered.

The experiment holds the final time at one while the number of steps changes. The vertical coordinate is the base-ten logarithm of absolute error, with values below \(10^{-15}\) drawn at that floor. Negative heights therefore correspond to errors less than one. Track the maximum error separately from the final error as the transient dies out. Try an initially unstable explicit run, then double the number of steps. The stiffness criterion depends on the ratio \(h/\varepsilon\), while accuracy on the reference also depends on \(h\) itself.

Tutorial on identifying which component is stiff

Keep \(h=0.04\) and reduce \(\varepsilon\) from 0.04 to 0.004. For each case compare exact, explicit and implicit amplification of a state perturbation. What quantity would force a reduction of \(h\) even with the implicit-explicit method?

Work through the solution

At \(r=1\) the three factors are \(e^{-1}=0.368\), zero and \(1/2\). At \(r=10\) they are \(4.54\times10^{-5}\), \(-9\) and \(1/11=0.0909\). For a measurement of the initial decay rate the implicit discretisation substantially misrepresents both exact factors. Bounding error during that transient requires smaller steps relative to \(\varepsilon\), even though its numerical amplification is stable.

Further reading · Ascher, Ruuth and Wetton, implicit-explicit time discretisations.

Transport coefficients from equilibrium fluctuations

How can a fluid in equilibrium reveal the diffusion constant that would govern a spreading drop, or the viscosity that would resist an applied shear? Derive an exact connection between displacements and velocity correlations, generalise it to stress and heat currents and test how a finite record can bias each number. The assumptions behind convergence matter as much as the prefactor.

Integrate the velocity correlation before taking a long-time limit

Observe one Cartesian coordinate of a tagged particle in a homogeneous equilibrium fluid with zero mean drift. The displacement over time \(t\) is the integral of its velocity. Square that integral, average over the equilibrium ensemble and use stationarity to replace the two-time expectation by \(C_v(t_1-t_2)\). For a scalar component in a time-reversal-symmetric equilibrium state this correlation is even. Integrate over the two triangles of the time square:

\[\langle[x(t)-x(0)]^2\rangle=2\int_0^t(t-s)C_v(s)\,ds,\]
\[\frac12\frac{d}{dt}\langle\Delta x^2(t)\rangle=\int_0^t C_v(s)\,ds .\]

If the correlation is integrable and boundary effects remain absent, the long-time slope yields a diffusion coefficient \(D=\int_0^\infty C_v(s)ds\). In \(d\) isotropic dimensions one may use \(D=(1/d)\int\langle\mathbf v(s)\cdot\mathbf v(0)\rangle ds\) or the mean-square-displacement slope divided by \(2d\). Using the full vector dot product without division by dimension gives an overestimate. Directional diffusion in an anisotropic material requires tensor components rather than a forced scalar average.

The derivation is kinematic and does not assume a Markovian motion. A fluid with velocity memory or an oscillating solid still obeys the finite-time relation. Those systems need not exhibit the same long-time proportionality to time. A bound oscillator can have persistent or alternating velocity correlations and a bounded displacement. An observation window in which the mean square grows over a fraction of an oscillation is insufficient to claim diffusion.

A solvable benchmark from ballistic to diffusive motion

For one coordinate take the underdamped Langevin equation \(m\dot v=-\zeta v+\xi\), with zero-mean white noise satisfying \(\langle\xi(t)\xi(t')\rangle=2k_BT\zeta\,\delta(t-t')\). In equilibrium \(\langle v^2\rangle=k_BT/m\). Condition on \(v(0)\) and integrate for positive time. The later random force has no correlation with the initial velocity, giving \(C_v=(k_BT/m)e^{-t/\tau_v}\), where \(\tau_v=m/\zeta\). Its area and the resulting displacement are

\[D=\frac{k_BT}{\zeta},\]
\[\langle\Delta x^2(t)\rangle=2D[t-\tau_v(1-e^{-t/\tau_v})].\]

At \(t\ll\tau_v\), the constant and linear terms inside the brackets cancel and displacement is ballistic:

\[\langle\Delta x^2\rangle\simeq(k_BT/m)t^2.\]

At \(t\gg\tau_v\) the slope approaches \(2D\). Fitting a line through the origin at times only a few relaxation times overestimates the influence of the negative intercept in this long-time expression and underestimates \(D\). Comparisons at multiple lags distinguish crossover curvature from a true anomalous power law.

For an inert sphere of radius 0.50 micrometres and density \(2000\) kg per cubic metre in water with \(\eta=1.00\) mPa s at 298 K, its bare mass is \(1.05\times10^{-15}\) kg and Stokes drag \(9.42\times10^{-9}\) kg/s. The estimate \(\tau_v=0.111\) microseconds is far faster than ordinary video tracking. \(D=0.437\) square micrometres per second and the one-coordinate rms displacement over 10 ms is 0.0935 micrometres. Hydrodynamic added mass and memory affect very short-time behaviour; the simple exponential is an analytical reference, not a claim that a water suspension remains Markovian down to arbitrary times.

Relate a weak imposed force to equilibrium motion

In the same soluble model a small constant force \(F\) turns the mean velocity into \(F(1-e^{-t/\tau_v})/\zeta\), so the mobility \(b=\lim\langle v\rangle/F=1/\zeta\). Together with equilibrium diffusion this gives the Einstein relation \(D=k_BTb\). A broader equilibrium argument considers a dilute suspension in a weak conservative potential \(U(x)\). Its current is

\[j=-D\,\partial_x n+bFn,\]

with \(F=-\partial_xU\). The Boltzmann distribution \(n\propto e^{-U/k_BT}\) must carry zero current; substitution gives the same relation without assuming exponential velocity relaxation.

Linear response connects the full weak-force impulse response to an equilibrium correlation. For a perturbation coupled as \(-F(t)x\), classical equilibrium response of velocity has causal kernel \(C_v(t)/(k_BT)\) for \(t>0\) under the usual microreversibility assumptions. Integrating the response kernel for a constant weak force gives

\[b=(1/k_BT)\int_0^\infty C_v(t)dt,\]

which recovers the kinematic diffusion relation. Strong forcing, an active bath or a nonequilibrium steady state need not obey this simple equilibrium identity.

A direct check compares independently measured weak sedimentation or calibrated drift with freely diffusing trajectories. For the previous bead a force 10 fN would produce a mean drift about 1.06 micrometres per second in the ideal Stokes regime. During a 10 ms frame its mean drift is about 0.011 micrometres, much smaller than rms Brownian motion, so many frames or many particles are needed. A single short jagged record can appear to move against the force. Use equal positive and negative applied forces to cancel constant stage drift in the estimated mobility.

Work through diffusion and mobility in the random-walk chapter

Stress and heat current carry their own normalisations

In a homogeneous isotropic laboratory fluid, define \(P_{xy}\) as a spatially averaged off-diagonal microscopic stress, with units Pa. Its equilibrium mean is zero in an isotropic state without imposed shear. A weak velocity gradient couples to momentum transport. The Green–Kubo expression for dynamic shear viscosity is

\[\eta=\frac{V}{k_BT}\int_0^\infty\langle P_{xy}(t)P_{xy}(0)\rangle\,dt .\]

If a program outputs an extensive stress moment \(J_{xy}=V P_{xy}\), the prefactor is \(1/(Vk_BT)\). Multiplying an already extensive current by volume again is a common orders-of-magnitude error. Check dimensions: pressure squared times time times volume divided by energy gives pascal seconds. Kinetic and interaction contributions to microscopic stress must both be included according to the model; a calculation with ideal kinetic flux alone need not reproduce the viscosity of a dense fluid.

Similarly for a component of total heat current \(J_{Q,x}\) with units energy times length per time, the thermal conductivity in an isotropic equilibrium single-component system is

\[\kappa=\frac{1}{Vk_BT^2}\int_0^\infty\langle J_{Q,x}(t)J_{Q,x}(0)\rangle\,dt .\]

Here \(k_BT^2\) means \(k_B\) times \(T^2\). If a heat-flux density is used instead, the volume prefactor moves as for stress. Heat current must exclude energy carried by a net mass flow as appropriate to the chosen thermodynamic constraint. In mixtures several conserved species currents can couple, and the measured conductivity at zero mass flux can differ from one unprojected current coefficient. The meaning of the measured flux and the imposed condition must be specified before comparing coefficients.

For an illustrative volume \(10^{-24}\) cubic metres at 300 K, assume one stress autocorrelation \(C_P(t)=(2.0\times10^6\ {\rm Pa})^2 e^{-t/(2.0\,{\rm ps})}\). Its area is 8.0 square pascal seconds. Multiplication by \(V/(k_BT)\) gives viscosity \(1.93\times10^{-3}\) Pa s. Doubling the simulated volume of an otherwise similar homogeneous fluid generally reduces the variance of its volume-averaged stress, keeping the physical transport coefficient intensive. Holding the same numerical stress variance while merely changing the prefactor would describe a different equilibrium fluctuation model.

Find a correlation integral's useful time window

An estimate at lag \(s\) averages over pairs of samples separated by that lag. In a record of duration \(T_{\rm rec}\), the number of available pairs decreases with lag. Overlapping time origins strongly correlate the estimates, so plotting one error bar per raw pair exaggerates precision. Integrating an estimated correlation to the maximum possible lag frequently accumulates late random noise rather than useful signal. Conversely stopping too early omits a physical tail.

For a positive single-exponential reference, integrating to three correlation times retains \(1-e^{-3}=95.0\) percent of the area. Five times retain 99.3 percent. A correlation containing a small, much slower component can look essentially flat on the main decay scale while contributing appreciably to the area. Divide a long run into blocks, compare running integrals and check several window lengths. Report the variation between independent blocks and any explicit tail model used beyond the measured interval.

At short lags, finite exposure averages correlated positions or velocities. Uncorrelated localisation errors in position increase nonzero-lag displacement variance by a constant \(2s_x^2\) per coordinate. Numerically differentiating those same noisy positions creates large artificial velocity variance and negative correlations between adjacent increments. An apparent negative velocity lobe can therefore be physical backscattering or a measurement artefact. Comparing a raw displacement fit with the velocity integral after independently characterising detector noise is more informative than differentiating first and interpreting every feature as fluid memory.

A forced shear wave gives a second viscosity measurement

An equilibrium stress correlation estimates viscosity without imposing any flow. A separate driven measurement can test that coefficient against a directly observed penetration depth. Take a Newtonian fluid filling \(y>0\), driven by a laterally oscillating plate at \(y=0\) with speed \(U_0\cos\omega t\). Neglect boundaries at large \(y\), compressibility and nonlinear convective effects in this spatially uniform tangential shear. The momentum equation reduces to

\[\partial_tu=\nu\partial_y^2u,\]

with kinematic viscosity \(\nu=\eta/\rho\).

Seek \(u=\operatorname{Re}[U_0e^{-\lambda y-i\omega t}]\) and choose the square root with positive real part. Then \(\lambda=(1-i)/\delta\),

\[\delta=\sqrt{2\nu/\omega}.\]

Both amplitude decay and phase lag carry information: at distance one penetration depth the amplitude is \(e^{-1}\) of the wall speed and the lag magnitude is one radian. A single complex velocity map can determine viscosity from either slope and use their agreement to test the simple model.

For a fluid of density \(1000\) kg per cubic metre and measured penetration depth 0.126 mm at 20 Hz, \(\nu=\omega\delta^2/2\simeq1.00\times10^{-6}\) square metres per second and \(\eta\simeq1.00\) mPa s. A stress-fluctuation integral yielding a value twice as large would predict a penetration depth larger by \(\sqrt2\), approximately 0.178 mm. Such a comparison can discriminate a missing component or volume factor in the equilibrium calculation if density, temperature and fluid composition match.

At high enough frequency the fluid may have a complex frequency-dependent viscosity rather than the zero-frequency coefficient from a Green–Kubo area. In linear response that generalisation is the one-sided Fourier transform of the equilibrium stress correlation with appropriate prefactors. A single-exponential stress memory gives a frequency-dependent response with a characteristic roll-off and phase lag. Comparing a high-frequency penetration measurement directly to a zero-frequency area without checking the timescale can therefore produce a genuine difference, not a statistical failure.

Remove a centre-of-mass mode only when the observable requires it

In a finite periodic particle simulation total momentum may be exactly conserved. If the initial centre of mass has a random velocity and no thermostat removes it, every particle's measured laboratory coordinate includes the common drift \(V_{\rm CM}t\). Its mean-squared displacement gains a ballistic term \(\langle V_{\rm CM}^2\rangle t^2\). In a canonical ensemble the centre-of-mass velocity variance in one direction is \(k_BT/M_{\rm tot}\). Though it falls with system size, at sufficiently long times its quadratic contribution exceeds the linear diffusive part.

For 1000 equal particles of mass \(m\), an equilibrium centre-of-mass mode contributes one thousandth of the single-particle instantaneous velocity variance. In a long-time autocorrelation this small constant never integrates to a finite diffusion coefficient. Subtract centre-of-mass displacement or work in a zero-total-momentum ensemble before taking the long-time integral of an internal tracer's motion. In a real sample with externally imposed drift, decide whether the physical quantity sought is diffusion about that drift or absolute laboratory displacement; the subtraction has a physical meaning rather than merely a cosmetic improvement.

Conversely, indiscriminately subtracting the mean velocity of a tiny observation subregion separately at every time can remove genuine hydrodynamic long-wavelength motion. A strongly applied single-particle thermostat can alter current correlations and suppress transport even while maintaining the correct static temperature histogram. Check the thermostat strength and system size; compare an equilibrium-prepared weakly thermostatted trajectory with an energy-conserving production segment where appropriate. Maintaining the correct one-time distribution is not sufficient to preserve all dynamical correlation functions.

The distinction also matters when removing an estimated mean stress before integrating its fluctuations. The true shear mean may vanish by symmetry, but a short noisy record has a nonzero sample mean. Subtracting a slowly varying trend on the same timescale as a genuine stress tail can erase physical viscosity. Use independent samples, separately measured drifts and explicit sensitivity to the subtraction window. A persistent nonzero off-diagonal stress under nominal isotropic conditions may indicate incomplete equilibration, a deformed box or an unrelaxed solid rather than a fluid transport coefficient.

Heat and particle currents can share fluctuations

Consider two thermodynamic fluxes \(J_1,J_2\) driven weakly by conjugate forces \(X_1,X_2\), chosen so entropy production density is \(J_1X_1+J_2X_2\). Linear response writes \(J_i=\sum_jL_{ij}X_j\). Near time-reversal-symmetric equilibrium, with flux parities chosen appropriately and no magnetic-field reversal complications, reciprocal relations give

\[L_{12}=L_{21}.\]

The symmetric part must be positive semidefinite so that entropy production is nonnegative for every small force. Thus \(L_{11},L_{22}\ge0\) and \(L_{12}^2\le L_{11}L_{22}\).

Suppose a thermal measurement enforces \(J_1=0\) by allowing a compensating force \(X_1\) to develop, as when a concentration or electrochemical gradient cancels a coupled particle flux. Solving the first row gives

\[X_1=-L_{12}X_2/L_{11}.\]

Substitution into the second yields response coefficient \(L_{22}-L_{21}L_{12}/L_{11}\). The measured constrained heat response can therefore be smaller than the coefficient at fixed \(X_1=0\). The difference has a simple operational origin in the boundary condition enforced during the experiment.

Take consistent normalised coefficients \(L_{11}=4,L_{22}=3,L_{12}=L_{21}=2\). At zero first force the heat flux slope is three. At zero first flux it is \(3-4/4=2\). Both are positive and consistent with the same equilibrium correlation matrix. Comparing a simulated heat-current autocorrelation corresponding to the unconstrained coefficient against a zero-particle-flux experiment requires the mixed-current correlation too. Apparent disagreement by a factor of one and a half can arise entirely from this distinction.

Green–Kubo cross-correlations must use properly defined conjugate fluxes and units. Redefining heat current by adding a constant multiple of particle current changes the matrix entries but must leave a physically defined zero-particle-flux heat measurement invariant when the forces are transformed consistently. This reference invariance is analogous to subtracting a per-particle energy reference in grand-canonical covariance. It provides a powerful test of a multicomponent transport implementation without relying on any empirical transport value.

A lattice trajectory provides an exactly known correlation integral

For a one-dimensional nearest-neighbour walk with steps of length \(a\) every interval \(\Delta t\), suppose successive step directions have correlation \(\langle s_{j+k}s_j\rangle=r^k\) with \(|r|<1\), and zero mean. Squaring the sum of \(n\) steps gives

\[a^2[n+2\sum_{k=1}^{n-1}(n-k)r^k].\]

In the large-\(n\) limit divide by \(2n\Delta t\) to obtain

\[D=a^2(1+r)/[2\Delta t(1-r)].\]

The uncorrelated random-walk value is recovered at \(r=0\).

With \(a=1\) micrometre and \(\Delta t=0.10\) s, uncorrelated diffusion is five square micrometres per second. Persistence \(r=0.5\) raises it to fifteen, while anticorrelation \(r=-0.5\) lowers it to \(5/3\). All three walks have the same step-size variance, so an estimate based only on one-frame displacement misses the entire correlation effect. The finite-lag autocorrelation sum and a long-time displacement fit should recover the same value on a long simulated record.

The discrete formula also clarifies the special zero-lag weight in numerical integration. An integral approximated from sampled symmetric correlations gives half weight to the zero lag on a one-sided trapezoidal rule. A careless double count of the instantaneous self term predicts twice the uncorrelated diffusion. Benchmark a numerical estimator with this exact walk before applying it to molecular data with unknown late tails and noisy velocity derivatives.

Measure an off-diagonal diffusion coefficient after rotating the sample

In an anisotropic sheet a tracer's two-dimensional displacement covariance need not align with the camera axes. Let its long-time principal diffusion coefficients be \(D_1,D_2\) and the first principal axis make angle \(\theta\) with laboratory \(x\). In matrix form the laboratory tensor is \(R\,{\rm diag}(D_1,D_2)R^{\mathsf T}\), with \(R\) the planar rotation. At sufficiently large lag in an effectively unbounded drift-free region, the displacement covariance matrix tends to \(2D t\). An off-diagonal covariance is a measurable correlation between displacement components even if the noise is independent in the material principal directions.

Take \(D_1=2.0\) and \(D_2=0.50\) square micrometres per second with \(\theta=30^\circ\). Laboratory components are \(D_{xx}=1.625\), \(D_{yy}=0.875\) and \(D_{xy}=0.650\), in the same units. At 0.10 s the cross covariance is 0.130 square micrometres. Rotating the physical sheet by ninety degrees interchanges the two diagonal values and reverses the sign of the off-diagonal one. An instrument-fixed camera readout artefact would not generally follow this material rotation.

To infer the principal axes from data, fit each covariance component versus lag using a common drift subtraction and independent position calibration. Diagonalise the symmetric fitted diffusion matrix. Positive semidefiniteness requires

\[D_{xy}^2\le D_{xx}D_{yy}.\]

A strong violation indicates incompatible estimates, unit conversion errors or statistical uncertainty, not a physically permissible strongly anisotropic diffusion tensor. Near-degenerate principal values make the orientation poorly determined even when the mean diffusion coefficient is precise. Report uncertainties on eigenvalues and orientation separately.

A finite field of view introduces a further bias. Fast particles along the high-diffusion direction leave the image sooner, and a tracking pipeline retaining only long trajectories can favour slow or fortuitously confined paths. Compare different fields of view and minimum track durations, or fit a measurement model incorporating censoring. A physical material anisotropy should persist after correcting these effects; apparent anisotropy aligned with the short direction of a rectangular observation window demands particular scrutiny.

A weak calibrated force along different axes supplies an independent check through the tensor Einstein relation under equilibrium conditions. If the diffusion tensor predicts off-axis mean drift, the mobility experiment should observe its sign and magnitude after reversing the force. A discrepancy could reveal active forcing, nonstationarity, an incorrect temperature or a mismatch between the mobility and displacement observables. It cannot be diagnosed from a scalar mean square alone.

Another rotational invariant is the trace of the diffusion tensor. In the example its value stays 2.50 square micrometres per second for every sample orientation, while the determinant stays one square micrometre to the fourth per second squared. A comparison of two camera orientations therefore provides numerical checks independent of the fitted angle. A drift mistakenly left in the displacement covariance can violate the expected linear dependence on lag, making the inferred effective eigenvalues grow with the selected fitting window. Subtract the ensemble mean displacement at each lag and record that mean separately as a flow measurement. Conversely do not subtract an individual best-fit line from every short trajectory without modelling the resulting loss of long-time fluctuations; that procedure can bias both diffusion coefficients downward.

Choose an integration window for a transport coefficient

Integrate an oscillatory velocity correlation over a finite record. Compare a short apparent plateau with the independently computed infinite-time result.

Tutorial · Invert diffusion measurements at two lags

In a one-dimensional diffusive window a measured displacement variance is 0.024 square micrometres at 10 ms and 0.064 at 50 ms. Assume long-time Brownian displacements plus independent frame-localisation variance per position measurement. Estimate \(D\) and localisation precision.

Fit slope and intercept separately

The variance slope is \((0.064-0.024)/(0.050-0.010)=1.00\) square micrometre per second, so \(D=0.500\) square micrometres per second. The intercept is 0.014 square micrometres, equal to twice the single-frame localisation variance. The implied rms localisation error is \(\sqrt{0.007}=0.0837\) micrometres. Forcing the fit through the origin at the shortest lag would give \(D=1.20\), more than twice the inferred value.

Acquire more lags to test the linear model. A static drift contributes a term growing as \(t^2\) if its mean displacement is not removed, while finite exposure can lower the physically measured short-lag variance. Two points always define a line and cannot independently validate either noise model.

Tutorial · Estimate a hidden slow tail in viscosity

A stress correlation is modelled as \(A[e^{-t/\tau}+0.02e^{-t/(40\tau)}]\). What fraction of its true area comes from the low-amplitude tail? How much does a cutoff at \(5\tau\) capture?

Weight a correlation by its duration

The fast and slow areas are \(A\tau\) and \(0.80A\tau\). The slow contribution is 44.4 percent of total. Integration to five fast times captures \(A\tau[(1-e^{-5})+0.80(1-e^{-5/40})]\simeq1.087A\tau\), or about 60.4 percent. Visual disappearance of the dominant peak therefore does not establish convergence of the transport coefficient.

The slow contribution must be supported by independent long blocks or a physically motivated model. A fitted tiny constant baseline can generate arbitrarily large apparent area if extrapolated indefinitely. Subtracting a sample mean estimated from the same short record can conversely suppress a genuine slow mode. Compare records much longer than the proposed tail time before trusting the extrapolation.

Tutorial · Is an algebraic tail compatible with ordinary diffusion?

Suppose a measured long-time velocity correlation remains positive and scales as \(t^{-\alpha}\). Determine when its Green–Kubo area exists and infer the displacement growth for \(0<\alpha<1\) and for \(\alpha=1\). Why would a finite periodic simulation require care?

Integrate the time-dependent slope before naming a diffusion coefficient

For \(\alpha>1\) the tail integral converges. For \(0<\alpha<1\), the running area grows as \(t^{1-\alpha}\), so displacement variance grows as \(t^{2-\alpha}\) under the stated persistent positive tail. At \(\alpha=1\), the running area grows logarithmically and the displacement variance is of order \(t\log t\). Sign oscillations, finite-size termination or another late-time crossover can alter these conclusions.

A periodic box admits only discrete long-wavelength modes and may cut off a hydrodynamic tail. Repeating at larger sizes and comparing the range before signals traverse the box helps identify a bulk regime. Unwrap particle coordinates crossing periodic boundaries before calculating a displacement. A wrapped coordinate can falsely saturate and imitate a confined particle even in a freely diffusing periodic fluid.

Cambridge Kinetic Theory · correlations, response and transport