---
# System prepended metadata

title: Nondimensionalization
tags: [Math360]

---

# Nondimensionalization


## Overview
Differential equations used in *mathematical modeling* often contain numerous physical parameters, making them complex to solve and analyze. **Nondimensionalization** is a powerful technique that uses fundamental principles of physics to simplify these models. By choosing appropriate *scaling factors* (characteristic units), we can convert physical variables into *dimensionless quantities*, significantly reducing the number of independent parameters and revealing the underlying, universal behavior of the system. This method allows us to study a broad class of problems with a single, simplified equation.

### Bid Ideas
* All **physical quantities** are combinations of base quantities such as time, length, mass, and temperature.
* The **dimensions** of a physical quantity refer to its expression in terms of the base quantities.
* **Nondimensionalization** is the process of **scaling variables** in a differential equation to **simplify the model** and to identify key properties of the model in terms of **dimensionless parameters**.



## Dimensions and Units


### Base Quantities
All physical quantities are expressed in terms of **base quantities** and **standard international (SI) units**:

| Base Quantity | Symbol | SI Unit | SI Unit Symbol |
| :---: | :---: | :---: | :---: |
| time | T | second | s |
| length | L | meter | m |
| mass | M | kilogram | kg |
| temperature | $\Theta$ | kelvin | K |
| electric current | I | ampere | A |
| amount of substance | N | mole | mol |
| luminous intensity | J | candela | cd |


### Dimensions of Physical Quantities
Other physical quantities are **derived quantities** because their dimensions are expressed in terms of base quantities. For example:

| Physical Quantity | Dimensions | Base SI Units |
| :---: | :---: | :---: |
| velocity | L T<sup>-1</sup> | m s<sup>-1</sup> |
| acceleration | L T<sup>-2</sup> | m s<sup>-2</sup> |
| area | L<sup>2</sup> | m<sup>2</sup> |
| volume | L<sup>3</sup>| m<sup>3</sup> |
| density | M L<sup>-3</sup>| kg m<sup>-3</sup> |

Some derived quantities have their own SI units:
 
| Physical Quantity | Dimensions | SI Unit | SI Unit Symbol | Base SI Units |
| :---: | :---: | :---: | :---: | :---: |
| force | M L T<sup>-2</sup> | newton | N | kg m s<sup>-2</sup> |
| pressure | M L<sup>-1</sup> T<sup>-2</sup> | pascal | Pa | kg m<sup>-1</sup> s<sup>-2</sup> |
| energy | M L<sup>2</sup> T<sup>-2</sup> | joule | J | kg m<sup>2</sup> s<sup>-2</sup> |
| molar concentration | N L<sup>-3</sup> | molar | M | N m<sup>-3</sup> |
| power | M L<sup>2</sup> T<sup>-3</sup> | watt |  W | kg m<sup>2</sup> s<sup>-3</sup> |
| frequency | T<sup>-1</sup> | hertz | Hz | s<sup>-1</sup> |
| angle | 1 | radian | rad | 1 |


Note that an angle is a ratio of lengths (arc length over radius), so its dimensions are L L<sup>-1</sup> = 1. This is an example of a **dimensionless quantity**.


### Dimensional Homogeneity
An equation is **dimensionally homogeneous** if the expressions on both sides have the same dimensions. You should always check for dimensional homogeneity during the mathematical modeling process.

For example, consider the mass-spring-damper equation from Newton's second law of motion:

$$
m x'' + c x' + k x = F(t)
$$

Each term in the equation is a force, so each side has dimensions $M L T^{-2}$, and the equation is dimensionally homogeneous.

| Variable/Parameter | Symbol | Dimensions |
| :---: | :---: | :---: |
| position | $x$ | L |
| velocity | $x'$ | L T<sup>-1</sup> |
| acceleration | $x''$ | L T<sup>-2</sup> |
| mass | $m$ | M |
| damping coefficient | $c$ | M T<sup>-1</sup> |
| spring coefficient | $k$ | M T<sup>-2</sup> |
| external force | $F(t)$ | M L T<sup>-2</sup> |



## Scaling
```python
import numpy as np
import scipy.integrate as spi
import matplotlib.pyplot as plt
```


### Simple Example
Consider a simple model of exponential growth for a population P, starting with $P(0)=P_0$ and increasing at a rate proportional to its size. The model is:

$$
\frac{dP}{dt} = rP \ , \ \ P(0) = P_0 
$$

where $r$ has dimension T<sup>-1</sup>. We scale the variables $P$ and $t$ relative to the parameters $P_0$ and r to define new dimensionless variables $P^*$ and $t^*$:

$$
P = P_0 P^* \hspace{10mm} t = \frac{t^*}{r}
$$

Substituting these into the equation yields the nondimensionalized equation:

$$
\frac{dP^*}{dt^*} = P^* \ , \ \ P^*(0) = 1 
$$

**Interpretation:** The original parameters $P_0$ and $r$ only affect the scale of the solution $P(t)$; they don't change the intrinsic behavior of the system. We should measure population in multiples of the initial value $P_0$ and time in multiples of $r^{−1}$


### Nondimensionalization Procedure
The goals of **nondimensionalization** are:

1. To simplify a mathematical model by *reducing the number of parameters* and removing units.
2. To *identify key properties* of the model in terms of dimensionless variables and parameters.

Nondimensionalization requires choosing a **scaling factor** $[x]$ (also called a **characteristic unit**) for each variable $x$.

1. **Identify Variables:** List all independent and dependent variables.
2. **Substitute:** Replace each variable $x$ with $x = [x]x^*$, where $[x]$ is the scaling factor and $x^*$ is the new dimensionless variable.
3. **Normalize:** Divide all equations by the coefficient of the highest order polynomial or derivative term.
4. **Simplify Coefficients:** Choose the scaling factors to make the coefficients of as many terms as possible equal to 1.
5. **Rewrite:** Express the system of equations and initial/boundary conditions using the new dimensionless quantities.

In the previous example, we chose the scaling factors $[P]=P_0$ and $[t]=\frac{1}{r}$.


### Scaling Derivatives
When scaling variables, the transformation of derivatives follows a simple rule derived from the chain rule. If $x=[x]x^*$ and $t=[t]t^*$, the derivative transforms as:

$$
\frac{dx}{dt} = [x] \frac{dx^*}{dt} = 
[x] \frac{dx^*}{dt^*} \frac{dt^*}{dt} = 
[x] \frac{dx^*}{dt^*} \left( \frac{1}{[t]} \right) = 
\frac{[x]}{[t]} \frac{dx^*}{dt^*}
$$

In general, for the $n$-th derivative:

$$
\frac{d^n x}{dt^n} = \frac{[x]}{[t]^n} \frac{d^n x^*}{dt^{*n}}
$$


### Nondimensionalization Examples

:::warning
**Mass Spring Equation**
Apply the nondimensionalization process to the mass-spring equation:
$$
m \frac{d^2x}{dt^2} + k x = 0 \ , \ \ x(0) = x_0 \ , \ \ \frac{dx}{dt}(0) = 0
$$

#### Step 1 & 2 (Variables and Substitution)
$t$ is the independent variable, $x$ is the dependent variable. Let $t=[t]t^*$ and $x=[x]x^∗$.

* Substituting the derivatives rule: $$m \frac{[x]}{[t]^2} \frac{d^2x^∗}{dt^{*2}} + k [x]x^∗ = 0$$
* The initial conditions become: $$[x]x^∗(0) = x_0, \quad \frac{[x]}{[t]} \frac{dx^*}{dt}(0) = 0$$

#### Step 3 (Normalize)
Divide the differential equation by $m 
\frac{[t]^2}{[x]}$ and rearrange the initial conditions:
$$
\frac{d^2 x^*}{dt^{* 2}} + \frac{k [t]^2}{m} x^* = 0, \quad x^*(0) = \frac{x_0}{[x]}, \quad \frac{dx^*}{dt^*}(0) = 0
$$

#### Step 4 (Simplify Coefficients)
Choose scaling factors $[t]$ and $[x]$ to make coefficients equal to 1:
$$
[t] = \sqrt{ \frac{m}{k} } \hspace{10mm} [x] = x_0
$$

#### Step 5 (Rewrite System)
$$
\frac{d^2 x^*}{dt^{* 2}} + x^* = 0, \quad x^*(0) = 1, \quad \frac{dx^*}{dt^*}(0) = 0
$$

**Interpretation:** The general solution $x^*(t^*) = \cos(t^*)$ implies the physical solution is $x(t)=x_0 \cos(\omega_0 t)$, where $\omega_0= 
\sqrt{k/m} = 1/[t]$ is the *natural frequency* and $x_0$ is the *amplitude*. Since no parameters remain, $m$, $k$, and $x_0$ only affect the scale, not the behavior, of the system.
:::

:::warning
**Logistic Equation**
The [logistic equation](https://en.wikipedia.org/wiki/Logistic_function) models population growth $P$ at rate $r$ limited by a carrying capacity $K$:
$$
\frac{dP}{dt} = rP(1 - P/K), \quad P(0) = P_0
$$

The dimensions are: $P$ is N, $t$ is T, $r$ is T<sup>-1</sup>, and $K$ is N.

#### Step 1 & 2 (Variables and Substitution)
$t = [t] t^*$ and $P = [P] P^*$.
$$
\frac{[P]}{[t]} \frac{dP^*}{dt^*} = r[P]P^* - \frac{r[P]^2}{K} (P^*)^2, \quad [P]P^*(0) = P_0
$$

#### Step 3 (Normalize)
Divide by the coefficient of the quadratic term, $\frac{r[P]^2}{K}$:
$$
\frac{K}{r[P][t]} \frac{dP^*}{dt^*} = \frac{K}{[P]} P^* - (P^*)^2, \quad P^*(0) = \frac{P_0}{[P]}
$$

#### Step 4 (Simplify Coefficients)
Choose scaling factors such that 
$$
\frac{K}{r[P][t]} = 1, \quad \frac{K}{[P]} = 1
$$

Solving gives: $[P] = K$ and $[t] = r^{-1}$.

#### Step 5 (Rewrite System)
$$
\frac{dP^*}{dt^*} = P^*(1 - P^*) \ \ , \ \ P^*(0) = \kappa
$$

where the single dimensionless parameter is the initial condition: $\kappa = \frac{P_0}{K}$.

**Interpretation:** The dimensionless variable $P^*$ is measured in multiples of the capacity $K$, and $t^*$ is measured in multiples of $r^{-1}$ (the inverse growth rate).


```python=
f = lambda P,t: P*(1 - P)
t = np.linspace(0,5,100)
for P0K in [0.,0.25,0.5,1.,1.5]:
    P = spi.odeint(f,P0K,t)
    plt.plot(t,P,'b')
plt.grid(True)
plt.show()
```

![ae607800-61bd-40b6-bca8-d1157a8e020e](https://hackmd.io/_uploads/BkvwaE-3lx.png)
:::

:::warning
**Lotka-Volterra Equations**
The [Lotka-Volterra equations](https://en.wikipedia.org/wiki/Lotka–Volterra_equations) equations model predator $y$ and prey $x$ population dynamics:
\begin{align}
\frac{dx}{dt} &= \alpha x - \beta xy \\
\frac{dy}{dt} &= \delta xy - \gamma y
\end{align}

* **Dimensions:** $x, y$ are N (amount of substance); $\alpha, \gamma$ are T<sup>-1</sup>; $\beta, \delta$ are N<sup>-1</sup> T<sup>-1</sup>.

#### Step 1 & 2 (Variables and Substitution) 
$t = [t] t^*$, $x = [x] x^*$, $y = [y] y^*$.
\begin{align}
\frac{[x]}{[t]} \frac{dx^*}{dt^*} &= \alpha [x] x^* - \beta [x] [y] x^* y^* \\
\frac{[y]}{[t]} \frac{dy^*}{dt^*} &= \delta [x][y] x^* y^* - \gamma [y]y^*
\end{align}

#### Step 3 (Normalize)
Divide the $x$ equation by $\beta [x] [y]$ and the $y$ equation by $\delta [x] [y]$:
\begin{align}
\frac{1}{\beta [y] [t]}  \frac{dx^*}{dt^*} &= \frac{\alpha}{\beta [y]} x^* - x^* y^* \\
\frac{1}{\delta [x] [t]} \frac{dy^*}{dt^*} &= x^* y^* - \frac{\gamma}{\delta [x]}y^*
\end{align}

#### Step 4 (Simplify Coefficients)
We choose the scaling factors for $x$ and $y$ to eliminate coefficients:
\begin{align}
\frac{\alpha}{\beta [y]} = 1 &\Rightarrow [y] = \frac{\alpha}{\beta} \\
\frac{\gamma}{\delta [x]} &\Rightarrow [x] = \frac{\delta}{\gamma}
\end{align}

Now, substitute these into the derivative coefficients:
\begin{align}
\frac{1}{\beta [y] [t]}  &= \frac{1}{\beta (\alpha / \beta) [t]} = \frac{1}{\alpha [t]} \\
\frac{1}{\delta [x] [t]} &= \frac{1}{\delta (\gamma/\delta) [t]} = \frac{1}{\gamma [t]}
\end{align}

Since $\alpha$ and $\gamma$ are independent parameters, we cannot set both coefficients to $1$. We arbitrarily choose to set $\frac{1}{\alpha [t]}=1$, which gives $[t] = \alpha^{-1}$.

#### Step 4 Rewrite System
The new dimensionless system has only one parameter, $c=\frac{\gamma}{\alpha}$:
\begin{align}
\frac{dx^*}{dt^*} &= x^* - x^* y^* \\
\frac{dy^*}{dt^*} &= c \left( x^* y^* - y^* \right)
\end{align}

where $c = \frac{\gamma}{\alpha}$.

**Interpretation:** The parameter $c=\frac{\gamma}{\alpha}$ is the ratio of the predator death rate $\gamma$ to the prey growth rate $\alpha$. This parameter controls the relative speed of change between the two populations.

```python=
u0 = [1.5,1.5]
t = np.linspace(0,10,1000)
for c in [0.1,0.5,1,2,5]:
    f = lambda u,t: np.array([u[0] - u[0]*u[1],c*(u[0]*u[1] - u[1])])
    U = spi.odeint(f,u0,t)
    plt.plot(U[:,0],U[:,1])
plt.grid(True), plt.xlim([0,3]), plt.ylim([0,3])
plt.show()
```

![d2d942ff-d657-42a5-a4aa-3a91da6d2a6f](https://hackmd.io/_uploads/BkGJR4b2gl.png)

```python=+
u0 = [1.5,1.5]
t = np.linspace(0,20,1000)
c = 5
f = lambda u,t: np.array([u[0] - u[0]*u[1],c*(u[0]*u[1] - u[1])])
U = spi.odeint(f,u0,t)
plt.figure(figsize=(10,4))
plt.plot(t,U[:,0],t,U[:,1])
plt.ylim([0,3]), plt.grid(True), plt.legend(['$x^*(t)$','$y^*(t)$'])
plt.show()
```

![077f65d7-c191-421e-8a57-ae637465febb](https://hackmd.io/_uploads/H1jx0E-hxg.png)