# Advanced Mathematics for Engineers and Scientists/Nondimensionalization
## Nondimensionalization
### Introduction

You may have noticed something possibly peculiar about all of the problems so far dealt with: "simple" numbers like $0$ or $1$ keep appearing in BCs and elsewhere. For example, we've so far dealt with BCs such as:
    $u(0,t)=0\,$
    $u(1,t)=0\,$
Is this meant to simplify this book because the author is lazy? No. Well, actually, the author is lazy, but it's really the result of what's known as nondimensionalization.
On a basic level, nondimensionalization does two things:
   * Gets all units out of the problem.
   * Makes relevant variables range from $0$ to $1$ or so.
The second point has very serious implications which will have to wait for later. We'll talk about getting units out of the problem for now: important because most natural functions don't have any meaning when fed a unit. For example, $\sin(2.0s)$ is a goofy expression which doesn't mean anything at all (consider its Taylor expansion if you're not convinced).
Do not misunderstand: you can solve any problem you like keeping units in place. That's why angular velocity has units of Hz ($s^{-1}$), so then $\sin(2.0Hzt)$ has meaning if $t$ is in seconds (or can be made to be).
A motivation for nondimensionalization can be seen by noting that ratios of variables to dimensions ("dimension" includes both a size and a unit) have a tendency to show up again and again. Examine what happens if steady state parallel plate flow (an ODE) with the walls separated by $D$, not $1$, is solved:
    ${\frac {d^{2}u}{dy^{2}}}={\frac {P_{x}}{\nu \rho }}\,$
    $u(0)=0\,$
    $u(D)=0\,$
Let's keep the dimensions of $y$ and $L$ unspecified for now. Solving this BVP:
    ${\frac {d^{2}u}{dy^{2}}}={\frac {P_{x}}{\nu \rho }}\qquad \Rightarrow \qquad u={\frac {P_{x}}{2\nu \rho }}y^{2}+C_{1}y+C_{0}\,$
    $u(0)=0={\frac {P_{x}}{2\nu \rho }}\cdot 0^{2}+C_{1}\cdot 0+C_{0}\qquad \Rightarrow \qquad C_{0}=0\,$
    $u(D)=0={\frac {P_{x}}{2\nu \rho }}D^{2}+C_{1}D\qquad \Rightarrow \qquad C_{1}=-{\frac {P_{x}}{2\nu \rho }}D\,$
       ${\Big \Downarrow }$
    $u(y)={\frac {P_{x}}{2\nu \rho }}(y^{2}-Dy)\,$
       ${\Big \Downarrow }$
    $u(y)={\frac {D^{2}P_{x}}{2\nu \rho }}\left(\left({\frac {y}{D}}\right)^{2}-{\frac {y}{D}}\right)\,$
Note that we have $y/D$ showing up. Not a coincidence; this implies that the dimensionless problem (or at least halfway dimensionless. We haven't discussed the dimensions of $u$) could be setup by altering the $y$ variable:
    ${\hat {y}}={\frac {y}{D}}\,$
${\hat {y}}$ is the normalized version of $y$, it ranges from $0$ to $1$ where $y$ varies from $0$ to $D$. It is said that $y$ is scaled by $L$.
This new variable may be substituted into the problem:
    $u({\hat {y}})={\frac {D^{2}P_{x}}{2\nu \rho }}({\hat {y}}^{2}-{\hat {y}})\,$
Since the new variable contains no unit, it should be obvious that the rational coefficient must have units of velocity if $u$ is to have units of velocity. With this in mind, the coefficient may be divided:
    ${\frac {u({\hat {y}})}{\cfrac {D^{2}P_{x}}{2\nu \rho }}}={\hat {y}}^{2}-{\hat {y}}\,$
We may define another new variable, a nondimensional velocity:
    ${\hat {u}}={\frac {u({\hat {y}})}{\cfrac {D^{2}P_{x}}{2\nu \rho }}}\,$
Substituting this into the equation:
    ${\hat {u}}({\hat {y}})={\hat {y}}^{2}-{\hat {y}}\,$
It's finally time to ask an important question: Why?
There are many benefits. The original problem involved 4 parameters: viscosity, density, pressure gradient, and wall separation distance. In this fully nondimensionalized solution, there happens to be none such parameters. The shortened equation above completely describes the behavior of the solution, it contains all of the relevant information.
The solution of one nondimensional problem is far more useful then the solution of a specific dimensional problem. This is especially true if the problem only yields a numeric solution: solving the nondimensional problem greatly reduces the number of charts and graphs that need to be made since you've reduced the number of parameters that could affect the solution.
This leads to another important question, and the culmination of this chapter: here, we first solved a generic dimensional problem and then nondimensionalized it. This luxury wouldn't be available with a more complicated problem. Could it have been nondimensionalized beforehand? Yep. Recalling the BVP:
    ${\frac {d^{2}u}{dy^{2}}}={\frac {P_{x}}{\nu \rho }}\,$
    $u(0)=0\,$
    $u(D)=0\,$
Note that $y$ varies from $0$ to $D$ in the domain we're interested in. For this reason, it is natural to scale $y$ with $D$:
    ${\hat {y}}={\frac {y}{D}}\,$
Note that we could have just as well scaled $y$ with numbers like $\pi D$ or e$^{10.0687}$ D and still ended up with $y$ nondimensionalized and everything mathematically sound. However, $D$ alone was the best choice since the resulting variable ${\hat {y}}$ would vary from $0$ to $1$. With this choice of scale, the variable is called normalized in addition to being nondimensional; being normalized is a desirable attribute for mathematic simplicity, accurate numeric evaluation, sense of scale, and other reasons.
What about $u$? The character of $y$ was known, the same can't be said for $u$ (why are we solving problems in the first place?). Let's come up with a name for the unknown scale of $u$, say $u_{s}$, and normalize $u$ using this unknown constant:
    ${\hat {u}}={\frac {u}{u_{s}}}\qquad \Rightarrow \qquad u=u_{s}{\hat {u}}\,$
Using the chain rule, the new variables may be put into the ODE:
    ${\frac {du}{dy}}={\frac {d}{dy}}(u)={\frac {d}{dy}}(u_{s}{\hat {u}})=u_{s}{\frac {d{\hat {u}}}{dy}}=u_{s}{\frac {d{\hat {u}}}{d{\hat {y}}}}\cdot {\frac {d{\hat {y}}}{dy}}=u_{s}{\frac {d{\hat {u}}}{d{\hat {y}}}}\cdot {\frac {d}{dy}}\left({\frac {y}{D}}\right)={\frac {u_{s}}{D}}{\frac {d{\hat {u}}}{d{\hat {y}}}}\,$
    ${\frac {d^{2}u}{dy^{2}}}={\frac {d}{dy}}\left({\frac {du}{dy}}\right)={\frac {d}{dy}}\left({\frac {u_{s}}{D}}{\frac {d{\hat {u}}}{d{\hat {y}}}}\right)={\frac {u_{s}}{D}}{\frac {d}{dy}}\left({\frac {d{\hat {u}}}{d{\hat {y}}}}\right)={\frac {u_{s}}{D}}{\frac {d}{d{\hat {y}}}}\left({\frac {d{\hat {u}}}{d{\hat {y}}}}\right)\cdot {\frac {d{\hat {y}}}{dy}}={\frac {u_{s}}{D}}{\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}\cdot {\frac {d}{dy}}\left({\frac {y}{D}}\right)={\frac {d^{2}u}{dy^{2}}}={\frac {u_{s}}{D^{2}}}{\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}\,$
       ${\Big \Downarrow }$
    ${\frac {d^{2}u}{dy^{2}}}={\frac {u_{s}}{D^{2}}}{\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}\,$
So we have our derivative now. It may be substituted into the ODE:
    ${\frac {d^{2}u}{dy^{2}}}={\frac {P_{x}}{\nu \rho }}\,$
    ${\frac {u_{s}}{D^{2}}}{\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}={\frac {P_{x}}{\nu \rho }}\,$
    $u_{s}{\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}={\frac {D^{2}P_{x}}{\nu \rho }}\,$
Remember that $u_{s}$ was some constant pulled out of thin air. Hence, it can be anything we want it to be. To nondimensionalize the equation and simplify it as much as possible, we may pick:
    $u_{s}={\frac {D^{2}P_{x}}{\nu \rho }}\,$
So that the ODE will become:
    ${\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}=1\,$
The BCs are homogeneous, so they simplify easily. Noting that ${\hat {y}}=1$ when $y=D$:
    ${\hat {u}}(0)=0\,$
    ${\hat {u}}(1)=0\,$
This may now be quickly solved:
    ${\frac {d^{2}{\hat {u}}}{d{\hat {y}}^{2}}}=1\qquad \Rightarrow \qquad {\hat {u}}={\frac {{\hat {y}}^{2}}{2}}+C_{1}{\hat {y}}+C_{0}\,$
    ${\hat {u}}(0)=0={\frac {0^{2}}{2}}+C_{1}\cdot 0+C_{0}\qquad \Rightarrow \qquad C_{0}=0\,$
    ${\hat {u}}(1)=0={\frac {1^{2}}{2}}+C_{1}\cdot 1\qquad \Rightarrow \qquad C_{1}=-{\frac {1}{2}}\,$
       ${\Big \Downarrow }$
    ${\hat {u}}({\hat {y}})={\frac {1}{2}}({\hat {y}}^{2}-{\hat {y}})\,$
So this isn't quite the same as the nondimensional solution developed from the dimensional solution: there's a factor of $1/2$ on the right side. Consequently, $u_{s}$ is missing the $2$. It's not a problem, both developments solve the problem and nondimensionalize it. Note that in doing this, we got the following result before even solving the BVP:
    $u_{s}={\frac {D^{2}P_{x}}{\nu \rho }}\,$
This tells much about the size of the velocity.
Before closing this chapter, it's worth mentioning that, generally, if ${\hat {u}}=uu_{s}+C_{u}$ and ${\hat {y}}=yy_{s}+C_{y}$, where $u_{s}$, $y_{s}$, $C_{u}$, and $C_{y}$ are all constants,
    ${\frac {\partial ^{n}u}{\partial y^{n}}}={\frac {\partial ^{n}{\hat {u}}}{\partial {\hat {y}}^{n}}}\cdot {\frac {u_{s}}{y_{s}^{n}}}\,$
Leibniz notation is definitely a good thing.