Unit 1, lesson 6

Modeling, Units, and Nondimensionalization

How to choose a state and parameters, write a balance law for a well-mixed tank, check units and dimensional consistency, and rescale by characteristic scales into a nondimensional equation.

  • Video 6
  • Modeling and Units

Salt water flows into a tank, mixes, and flows out again. Before any solving method enters, someone has to decide which quantity the model follows, how it changes, and in which units each term is measured. Those decisions produce the differential equation, and checking the units catches many mistakes before they reach the solution. This lesson builds one such model, solves it, and rewrites it in variables without units, where its structure is easiest to see.

Key terms

State and parameter

Definition In a model built on a differential equation, the state is the changing quantity that the model follows, the unknown function whose rate of change the equation specifies. A parameter is a quantity that stays fixed while the model runs and selects one model from a family, such as a volume or a flow rate. An initial value such as M(0)M(0) is data for one initial-value problem, and a quantity computed from the state, such as a concentration, is not a separate state.

In plain words The state is what changes and gets a derivative. Parameters are the settings chosen before the clock starts. Confusing the two leads to differentiating a constant or to treating a changing quantity as fixed.

Example A tank holds V=10 LV = 10\ \mathrm{L} of salt water. Brine with concentration cin=3 g/Lc_{\text{in}} = 3\ \mathrm{g/L} flows in at qin=2 L/minq_{\text{in}} = 2\ \mathrm{L/min}, and the mixture flows out at qout=2 L/minq_{\text{out}} = 2\ \mathrm{L/min}, so the volume stays 10 L10\ \mathrm{L}. At the start the tank holds M(0)=10 gM(0) = 10\ \mathrm{g} of salt. A natural state is the salt amount M(t)M(t) in grams, with t≥0t \ge 0 in minutes. The numbers VV, qinq_{\text{in}}, qoutq_{\text{out}} and cinc_{\text{in}} are parameters, and the concentration in the tank is the derived quantity c(t)=M(t)/Vc(t) = M(t)/V.

Balance law

Definition A balance law for the amount M(t)M(t) of a substance in a region says that

dMdt=rate in−rate out+production−loss,\begin{aligned} \frac{dM}{dt} &= \text{rate in} - \text{rate out} \\[0.4em] &\quad + \text{production} - \text{loss}, \end{aligned}

where each rate is an amount per unit time, and production and loss happen inside the region. For a substance carried by a flow of liquid, the rate equals the volume flow rate times the concentration of that liquid.

In plain words The amount in the tank changes only because some enters, some leaves, or some is made or destroyed inside. Each of these is written as a rate, and the derivative is their signed sum.

Example For the tank, salt enters at qincin=6 g/minq_{\text{in}}c_{\text{in}} = 6\ \mathrm{g/min}. If the tank is well mixed, the outflow has the tank’s concentration M/VM/V, so salt leaves at qoutM/V=M/5q_{\text{out}}M/V = M/5 grams per minute, and no salt is produced or destroyed. With MM in grams and tt in minutes, the model is

dMdt=6−M5\frac{dM}{dt} = 6 - \frac{M}{5}

with M(0)=10M(0) = 10. The rate is zero at the equilibrium amount M=30M = 30. The difference D=M−30D = M - 30 satisfies dD/dt=−D/5dD/dt = -D/5, so D(t)=D(0)e−t/5=−20e−t/5D(t) = D(0)e^{-t/5} = -20e^{-t/5} and

M(t)=30−20e−t/5.M(t) = 30 - 20e^{-t/5}.

Its derivative 4e−t/54e^{-t/5} equals 6−M(t)/56 - M(t)/5, and M(0)=10M(0) = 10. The amount rises toward 30 g30\ \mathrm{g}, and the concentration M/V=3−2e−t/5M/V = 3 - 2e^{-t/5} in grams per liter approaches the incoming 3 g/L3\ \mathrm{g/L}. The model assumes perfect mixing, a constant incoming concentration and equal flow rates. If the flow rates differed, the volume V(t)V(t) would change and the outflow term would become qoutM/V(t)q_{\text{out}}M/V(t).

Units

Definition A unit is a fixed reference amount of a physical dimension, such as the gram for mass, the liter for volume and the minute for time. A physical quantity is a number times a unit, as in V=10 LV = 10\ \mathrm{L}, and units multiply, divide and cancel like algebraic factors. A derivative dM/dtdM/dt carries the units of MM divided by the units of tt, because it is a limit of quotients ΔM/Δt\Delta M/\Delta t. Converting units, as with 1 min=60 s1\ \mathrm{min} = 60\ \mathrm{s}, changes the number but not the quantity.

In plain words A number in a model means little until you know what it counts. Carrying the units through every step shows what each term measures.

Example In the inflow rate the liters cancel,

2 Lmin×3 gL=6 gmin.2\ \frac{\mathrm{L}}{\mathrm{min}} \times 3\ \frac{\mathrm{g}}{\mathrm{L}} = 6\ \frac{\mathrm{g}}{\mathrm{min}}.

The outflow coefficient qout/V=15 min−1q_{\text{out}}/V = \tfrac{1}{5}\ \mathrm{min}^{-1} has units of inverse minutes, so M/5M/5 is in grams per minute. Measured in seconds, with tsec=60tt_{\text{sec}} = 60t, the same rates are 6 g/min=0.1 g/s6\ \mathrm{g/min} = 0.1\ \mathrm{g/s} and 15 min−1=1300 s−1\tfrac{1}{5}\ \mathrm{min}^{-1} = \tfrac{1}{300}\ \mathrm{s}^{-1}, so the model reads dM/dtsec=0.1−M/300dM/dt_{\text{sec}} = 0.1 - M/300. Its solution M=30−20e−tsec/300M = 30 - 20e^{-t_{\text{sec}}/300} is the same curve, because tsec/300=t/5t_{\text{sec}}/300 = t/5.

Dimensional consistency

Definition An equation is dimensionally consistent if all terms that are added, subtracted or set equal have the same dimension, and every argument of a function such as exp⁡\exp, ln⁡\ln, sin⁡\sin or cos⁡\cos is dimensionless. A consistent equation stays true in every system of units once each quantity is converted. Consistency is necessary for a correct model, but it does not show that the model is correct.

In plain words You cannot add grams to grams per minute, and you cannot take the exponential of a time. If the units on the two sides of an equals sign disagree, the model is wrong somewhere. If they agree, it can still be wrong, for example in a sign.

Example Every term of

dMdt=6 gmin−M5 min\frac{dM}{dt} = 6\ \frac{\mathrm{g}}{\mathrm{min}} - \frac{M}{5\ \mathrm{min}}

is in grams per minute. In the solution 30−20e−t/530 - 20e^{-t/5} with tt in minutes, the 55 stands for 5 min5\ \mathrm{min}, so t/5t/5 is a pure number and the exponential makes sense. Writing the outflow as the amount MM itself, without a rate coefficient, would subtract grams from grams per minute, and the check fails at once. The equation dM/dt=6+M/5dM/dt = 6 + M/5 passes the check, but its sign says that the outflow adds salt, so it is still wrong.

Characteristic scales

Definition A characteristic scale for a variable is a fixed quantity with the same dimension as that variable, built from the parameters and sometimes the data, that measures the typical size of the variable or of its changes. For a constant-volume, well-mixed tank with flow rate q=qin=qoutq = q_{\text{in}} = q_{\text{out}}, natural scales for the amount and for time are

M∗=cinV,T=Vq.M_{*} = c_{\text{in}}V, \qquad T = \frac{V}{q}.

The amount scale is the equilibrium amount, and the time scale is the time the flow needs to carry in one tank volume. Scales are choices, and other choices lead to equivalent but less tidy equations.

In plain words A characteristic scale is a unit suggested by the problem itself rather than by a ruler or a clock. Good scales turn the main features of the solution, such as an equilibrium or a time constant, into simple numbers like 11.

Example For the tank, M∗=3 g/L×10 L=30 gM_{*} = 3\ \mathrm{g/L} \times 10\ \mathrm{L} = 30\ \mathrm{g} and T=(10 L)/(2 L/min)=5 minT = (10\ \mathrm{L})/(2\ \mathrm{L/min}) = 5\ \mathrm{min}. The time scale is a relaxation time. After t=Tt = T the gap to equilibrium has shrunk from 20 g20\ \mathrm{g} to 20e−1 g≈7.36 g20e^{-1}\ \mathrm{g} \approx 7.36\ \mathrm{g}, about 37%37\% of its starting size. It is not the time at which the tank reaches equilibrium, which never happens at a finite time, because 20e−t/5>020e^{-t/5} > 0 for every tt.

Nondimensionalization

Definition Nondimensionalization rewrites a model in dimensionless variables, obtained by dividing each variable by a characteristic scale of the same dimension, such as u=M/M∗u = M/M_{*} and τ=t/T\tau = t/T. Since M=M∗uM = M_{*}u and dτ/dt=1/Td\tau/dt = 1/T, the chain rule gives

dMdt=M∗T dudτ.\frac{dM}{dt} = \frac{M_{*}}{T}\,\frac{du}{d\tau}.

After dividing through by a common rate, the equation relates pure numbers, and any parameters that remain appear only in dimensionless combinations. The physical prediction does not change, only the units in which it is read.

In plain words Measure the amount in multiples of its natural scale and time in multiples of the natural time. The equation then shows its mechanism without the clutter of particular numbers.

Example For the tank, u=M/(30 g)u = M/(30\ \mathrm{g}) and τ=t/(5 min)\tau = t/(5\ \mathrm{min}), so dM/dt=6 du/dτdM/dt = 6\, du/d\tau in grams per minute. Substituting into dM/dt=6−M/5dM/dt = 6 - M/5 gives 6 du/dτ=6−6u6\, du/d\tau = 6 - 6u, and dividing by the common rate 66 leaves

dudτ=1−u,u(0)=13.\frac{du}{d\tau} = 1 - u, \quad u(0) = \frac{1}{3}.

Its solution u=1−23e−τu = 1 - \tfrac{2}{3}e^{-\tau} is the amount M(t)M(t) found above divided by 3030, with t=5τt = 5\tau. The same steps for any constant-volume, well-mixed tank with the scales M∗=cinVM_{*} = c_{\text{in}}V and T=V/qT = V/q give du/dτ=1−udu/d\tau = 1 - u again, so only the starting value u(0)=M(0)/(cinV)u(0) = M(0)/(c_{\text{in}}V) tells such tanks apart.

Check yourself

  1. A tank holds 50 L50\ \mathrm{L} of pure water. Brine with 2 g/L2\ \mathrm{g/L} of salt flows in at 5 L/min5\ \mathrm{L/min}, and the well-mixed liquid flows out at 5 L/min5\ \mathrm{L/min}. Write the balance law for the salt amount M(t)M(t) in grams, with tt in minutes, check its units, and find the equilibrium amount.
Show the answer

Salt enters at 5 L/min×2 g/L=10 g/min5\ \mathrm{L/min} \times 2\ \mathrm{g/L} = 10\ \mathrm{g/min} and leaves at 5 L/min×M/(50 L)=M/105\ \mathrm{L/min} \times M/(50\ \mathrm{L}) = M/10 grams per minute, so

dMdt=10−M10\frac{dM}{dt} = 10 - \frac{M}{10}

with M(0)=0M(0) = 0. Both terms are in grams per minute, since the coefficient 110\tfrac{1}{10} has units min−1\mathrm{min}^{-1}. Setting the rate to zero gives the equilibrium amount M=100 gM = 100\ \mathrm{g}, a concentration of 100 g/50 L=2 g/L100\ \mathrm{g}/50\ \mathrm{L} = 2\ \mathrm{g/L}, which matches the incoming brine.

  1. For the 10 L10\ \mathrm{L} tank of this lesson, a classmate writes the outflow term as qoutM=2Mq_{\text{out}}M = 2M and gets dM/dt=6−2MdM/dt = 6 - 2M. Use units to locate the error, and say what the wrong model would predict in the long run.
Show the answer

The product qoutMq_{\text{out}}M has units L/min×g\mathrm{L/min} \times \mathrm{g}, gram liters per minute, so it cannot be subtracted from a rate in grams per minute. The outflow carries the concentration M/VM/V, not the amount, and the correct term is qoutM/V=M/5q_{\text{out}}M/V = M/5 grams per minute. The wrong equation has the equilibrium M=3 gM = 3\ \mathrm{g}, a concentration of 0.3 g/L0.3\ \mathrm{g/L}, while a well-mixed tank of constant volume fed with 3 g/L3\ \mathrm{g/L} brine approaches 3 g/L3\ \mathrm{g/L}.

  1. Nondimensionalize the tank of question 1 with its natural scales, solve the dimensionless problem, and find the time at which the tank holds half its equilibrium amount.
Show the answer

The scales are M∗=2 g/L×50 L=100 gM_{*} = 2\ \mathrm{g/L} \times 50\ \mathrm{L} = 100\ \mathrm{g} and T=(50 L)/(5 L/min)=10 minT = (50\ \mathrm{L})/(5\ \mathrm{L/min}) = 10\ \mathrm{min}. With u=M/(100 g)u = M/(100\ \mathrm{g}) and τ=t/(10 min)\tau = t/(10\ \mathrm{min}), the chain rule gives dM/dt=10 du/dτdM/dt = 10\, du/d\tau, so 10 du/dτ=10−10u10\, du/d\tau = 10 - 10u, that is

dudτ=1−u,u(0)=0.\frac{du}{d\tau} = 1 - u, \quad u(0) = 0.

The solution is u=1−e−τu = 1 - e^{-\tau}, since its derivative e−τe^{-\tau} equals 1−u1 - u and u(0)=0u(0) = 0. Half the equilibrium amount means u=12u = \tfrac{1}{2}, so e−τ=12e^{-\tau} = \tfrac{1}{2} and τ=ln⁡2\tau = \ln 2. In minutes this is t=10ln⁡2≈6.93t = 10 \ln 2 \approx 6.93, when the tank holds 50 g50\ \mathrm{g} of salt.

How this lesson connects