# Modeling with higher order linear differential equations, initial values

In structural analysis for civil engineering we deal with tasks which are

• static in time and
• dynamic in time.

The first one is the most common because civil engineering projects usually serves without motions during the lifetime.

Some case might require dynamic analysis of building/structure. For example the effects of earthquake, winds, explosion, collision and so on. This kind of problems is usually modeled by means of software for FEM (finite element method). The structure is divided into finite number of bodies/elements which interact by means of springs.

The finite element method is a numerical technique to simulate and study many kinds of real-world problems. For example the structure is divided into finite elements and it leads to solving systems of equations, in case of dynamic behaviour into system of differential equations.

Such system internally leads into system of differential equations

$$\boldsymbol{M\ddot{u} + C\dot{u} + Ku = f},$$

where $\boldsymbol{M}$ represents mass, $\boldsymbol{C}$ damping, $\boldsymbol{K}$ stiffness and $\boldsymbol{f,\ u,\ \dot{u}, \ \ddot{u}}$ are external force, displacement, velocity and acceleration (the latter four are functions of time).

Note: we will use rather symbol $x$ instead of $u$ for displacement in text below.

The solving leads to harmonic motions of frequency $\omega$

$$\boldsymbol{u}(t) = \boldsymbol{U} \cos(\omega t - \alpha),$$

where $\boldsymbol{U}$ is a vector that collects amplitudes.

The task is then to compute eigenvectors and eigenvalues to find natural frequencies, to study resonances and their desired or undesired impacts.

For a body on a spring we recognize 3 basic cases:

1. Free undamped motion.
2. Free damped motion.
3. Driven motion (induced by external load).

## Free undamped motion

Note: undamped = no resistance causing decreasing of amplitude. We will employ

• Hookes's law $F = ks$
$k$ is a property of the spring (spring constant, stiffness), $s$ is displacement from unstretched position
• Newton's second law $F = ma$
$m$ is a mass (weight), $g$ is acceleration

Let us study the case.    When the body on the spring is in equilibrium (no movement) then we can observe that force from the spring $ks$ has the same magnitude as gravity force $mg$, i.e. $mg=ks$ or $mg-ks = 0$ (displacement down is positive). The system is in equilibrium, the force $mg -ks = 0$, thus no movement nor acceleration.

The troubles start when the system is not in equilibrium. Instead of $ks$ the force from the spring is $k(s+x)$. The body is exposed to a force $mg-k(s+x)$, i.e.

\begin{align} m\ a(t) &= mg-k(s+x) \nonumber \end{align}

and since we want to study motion $x$:

$$m \frac{d^2 x}{dt^2} = mg-k(s+x) = (mg-ks) -kx.$$

It has been noticed from the equilibrium state that $mg - ks = 0$, so

\begin{align} & \color{red}{m \frac{d^2 x}{dt^2} = -kx}. \label{ref:mh-eq1} \end{align}

Note that if the distance $s(t)\ [\mathrm m]$ in time is known, then the speed $v(t)\ [\mathrm{m/s}]$ can be derived. If the speed at any time is known, then the acceleration $a(t)\ [m/s^2]$ can be derived.

$$v(t) = \frac{ds}{dt} = \frac{dx}{dt}, \hskip2em a(t) = \frac{d^2 x}{dt^2}.$$

If we divide $(\ref{ref:mh-eq1})$ by $m$, we get simple DE of second order

\begin{align} x'' + \frac k m x &= 0\nonumber \\ x'' + \omega^2 x &= 0, \hskip2em \omega^2 = \frac k m \nonumber \\ m^2 + \omega^2 &= 0 \implies m = \{i\omega, -i\omega\} \nonumber \end{align}

or

$$\begin{equation} \color{red}{x(t) = c_1 \cos \omega t + c_2 \sin \omega t}. \label{ref:mh-eq2} \end{equation}$$

Both $\sin()$ and $\cos()$ have a period of $2\pi$, thus for the motion being described $2\pi = \omega t \implies T = 2\pi / \omega$ is the period.

In physics or dynamics, it is a common practice to work with rather simplier description of the motion in the form of $u(t) = U \cos(\omega t -\alpha)$, which can be readily converted from $(\ref{ref:mh-eq2})$.

## Free damped motion

The description $(\ref{ref:mh-eq2})$ is unrealistic because in real world the movement of the body on spring will not last forever.  We know from physics, that the faster the movement is, the stronger is damping force. Damping force $F_c$ is proportional to speed ($F_c = cv$, where $c$ is positive damping constant).

$$\begin{equation} \color{red}{m \frac{d^2 x}{dt^2} = -kx-c\frac{dx}{dt}}. \label{ref:mh-eq3} \end{equation}$$

The sign is negative, because damping force (also the spring) acts the opposite side against the motion.

If we divide $(\ref{ref:mh-eq3})$ by $m$ and bring some substitutions for convenience, we get

\begin{align} x'' + 2\lambda x' + \omega^2x &= 0, \hskip2em 2\lambda = \frac{c}{m},\ \omega^2 = \frac k m, \nonumber \\ m^2 + 2\lambda m + \omega^2 &= 0 \implies \left \{ \begin{aligned} \color{red}{m_1} &= \color{red}{-\lambda + \sqrt{\lambda^2 - \omega^2}},\\ \color{red}{m_2} &= \color{red}{-\lambda - \sqrt{\lambda^2 - \omega^2}}. \end{aligned} \right. \hskip2em m_{1,2}= \frac{-b\pm \sqrt{b^2-4ac}}{2a} \nonumber \end{align}

It depends on $\lambda^2 - \omega^2$ whether roots $m_1,\ m_2$ repeat, are real or imaginary:

• Roots are real when $\lambda^2 -\omega^2 > 0$
The solution is $x(t) = c_1 e^{m_1 t} + c_2 e^{m_2 t} = \color{blue}{e^{-\lambda t}}(c_1 e^{\sqrt{\lambda^2 -\omega^2}\cdot t} + c_2 e^{\sqrt{\lambda^2 +\omega^2}\cdot t})$. The motion described by $x(t)$ has no periodicity, it is exponential function. The system is overdamped.
• Roots repeat when $\lambda^2 -\omega^2 = 0$
The solution is $x(t) = c_1 e^{m_1 t} + c_2 te^{m_2 t} = \color{blue}{e^{-\lambda t}}(c_1 +c_2 t)$. The motion is critically damped. There is no oscillatory motion but a slight change in parameters may result in oscillatory motion.
• Roots are imaginary when $\lambda^2 -\omega^2 < 0$
Since $i^2 = -1$ the solution is $x(t) = \color{blue}{e^{-\lambda t}}(c_1 \cos\sqrt{\omega^2 - \lambda^2} t + c_2 \sin\sqrt{\omega^2 - \lambda^2}t)$. The presence of $\sin()$ and $\cos()$ suggests that this case is oscillatory (underdamped).  All the above cases share the member $\color{blue}{e^{-\lambda t}}$ which represents the fact, that the amplitude of the motion is decreasing over time due to the damping.

## Driven motion

In the two previous examples the motion comes from given initial velocity and/or given initial displacement. The more general case is with external force $f(t)$ involved:

\begin{align} &m \frac{d^2 x}{dt^2} = -kx-c\frac{dx}{dt} + f(t) \hskip2em \text{or} \nonumber \\ &m \frac{d^2 x}{dt^2} +kx+c\frac{dx}{dt} = f(t) \label{ref:mh-eq4} \end{align}

DE $(\ref{ref:mh-eq4})$ is nonhomogeneous. Function on the right side (in this case $f(t)$) is sometimes refered as a driving or forcing function of the system.

### Example

A spring with a mass of 2 kg has natural length 0.5 m. A force of 25.6 N is required to maintain it stretched to a length of 0.7 m. If the spring is stretched to a length of 0.7 m and then released with initial velocity 0, find the position of the mass at any time.

From the above information we can calculate spring constant $k$.

$$k = \frac{25.6}{0.7-0.5} = 128\ \mathrm{N/m}$$

We have enough data to collect differential equation of the motion (see also $(\ref{ref:mh-eq1})$).

\begin{align} 2x'' &= -128 x \nonumber \\ x'' + 64x &= 0 \nonumber \end{align}

Auxiliary equation is

$$m^2 + 64 = 0 \implies m = \{ 8i, -8i \} \hskip2em (\alpha = 0,\ \beta = 8) \nonumber$$

And the solution is

$$x(t) = c_1 \cos 8t + c_2 \sin 8t$$

The task remains to find values of arbitrary constants. We know that at time $t =0$ velocity $v=x' = 0$ and initial displacement from the equilibrium position is $x =+0.2\ \textrm m$:

\begin{align} 0.2 &= c_1 \cos 8t + c_2 \sin 8t \nonumber \\ 0 &= -8c_1 \sin 8t + 8c_2\cos 8t \nonumber \\[2mm] 0.2 &= c_1\cdot 1 + c_2 \cdot 0 \nonumber \implies c_1 = 0.2\\ 0 &= -8c_1 \cdot 0 + 8 c_2 \cdot 1 \implies c_2 = 0 \nonumber \end{align}

Then

$$\underline{\underline{x(t)= 0.2 \cos 8t}}$$

is the description of the position of the mass at any time.

### Example

The same spring is immersed into fluid with damping constant c = 40 N.s/m. The motion starts from equilibrium position and is given initial velocity 0.6 m/s.

\begin{align} 2x'' &= -128x -40x' \nonumber \\ 2x'' + 40x' + 128x &= 0 \nonumber \\ x'' + 20x' + 64x &= 0 \nonumber \end{align}

Auxiliary equation is

$$m^2 + 20m+64 = 0 \implies m= \{-4, -16 \}$$

The solution is

$$x(t) = c_1 e^{-4t} + c_2 e^{-16t}$$

Now the task remains to find values of arbitrary constants $c_1,\ c_2$. At the time $t=0$: $x=0,\ x'=0.6$.

\left. \begin{align} 0 &= c_1e^0 + c_2e^0\nonumber \\ 0.6 &= -4c_1 - 16c_2 \nonumber \end{align} \right\} \implies c_1 = 0.05,\ c_2 = -0.05 \nonumber

Then

$$\underline{\underline{x(t)= 0.05 e^{-4t} - 0.05 e^{-16t} = 0.05 e^{-4t}(1 - e^{-12t})}}$$

is the description of the position of the mass at any time.  The motion of the body on the spring. Bottom axis is time t from 0 to 2 s. Left axis is x(t) from 0 to 0.25 m.

List of chapters