Derivation and energy relation
We consider a system where masses are connected with springs and dampers.
For simplicity, we assume that the mass \(m\), the spring constant \(k\), and the damping coefficient \(\eta\) take identical values for now.
Due to the force balance for each mass, we obtain a set of equations which govern the dynamics as
\[ \begin{align}\begin{aligned}\frac{d\pos{}{}}{dt}
&
=
\vel{}{},\\m
\frac{d\vel{}{}}{dt}
&
=
\force{}\\&
=
k
\left\{
\pos{}{} \left( x - \Delta x \right)
-
\pos{}{} \left( x \right)
\right\}
+
k
\left\{
\pos{}{} \left( x + \Delta x \right)
-
\pos{}{} \left( x \right)
\right\}\\&
+
\eta
\left\{
\vel{}{} \left( x - \Delta x \right)
-
\vel{}{} \left( x \right)
\right\}
+
\eta
\left\{
\vel{}{} \left( x + \Delta x \right)
-
\vel{}{} \left( x \right)
\right\}\\&
+
m a,\end{aligned}\end{align} \]
where \(\pos{}{}\) and \(\vel{}{}\) are the displacements and velocities, respectively, and \(m a\) is the external forcing.
In the limit of \(\Delta x \rightarrow 0\), by utilizing the Taylor series expansion, the second relation converges to
\[ \begin{align}\begin{aligned}\frac{\partial \vel{}{}}{\partial t}
=
\frac{\partial^2 \pos{}{}}{\partial t^2}
&
=
\frac{k \Delta x^2}{m}
\frac{\partial^2 \pos{}{}}{\partial x^2}
+
\frac{\eta \Delta x^2}{m}
\frac{\partial^2 \vel{}{}}{\partial x^2}
+
a\\&
=
c^2
\frac{\partial^2 \pos{}{}}{\partial x^2}
+
\nu
\frac{\partial^2 \vel{}{}}{\partial x^2}
+
a,\end{aligned}\end{align} \]
where \(c\) and \(\nu\) are coefficients having the dimensions of \(\left[ L T^{-1} \right]\) and \(\left[ L^2 T^{-1} \right]\), respectively.
At the boundaries, we impose Dirichlet boundary conditions:
\[ \begin{align}\begin{aligned}&
\pos{}{}
=
0,\\&
\vel{}{}
=
0,\end{aligned}\end{align} \]
to describe the boundaries being fixed.
To see the energy balance, we multiply \(\rho \vel{}{}\) with the equation of motion and volume-integrate it:
\[\int_{0}^{L_x}
\rho
\vel{}{}
\frac{\partial \vel{}{}}{\partial t}
dx
-
\int_{0}^{L_x}
\rho
\vel{}{}
c^2
\frac{\partial^2 \pos{}{}}{\partial x^2}
dx
-
\int_{0}^{L_x}
\rho
\vel{}{}
\nu
\frac{\partial^2 \vel{}{}}{\partial x^2}
dx
-
\int_{0}^{L_x}
\rho
\vel{}{}
a
dx
=
0,\]
where \(L_x\) is the length of the domain.
With some algebra, we see that the first term is equal to
\[\frac{\partial}{\partial t}
\left(
\int_{0}^{L_x}
\frac{1}{2}
\rho
\vel{}{}^2
dx
\right)
=
\frac{dK}{dt},\]
which describes the change of the total kinetic energy \(K\) in time.
To reformulate the second term, we adopt the integration by parts:
\[-
\int_{0}^{L_x}
\rho
c^2
\vel{}{}
\frac{\partial^2 \pos{}{}}{\partial x^2}
dx
=
-
\left[
\rho
c^2
\vel{}{}
\frac{\partial \pos{}{}}{\partial x}
\right]_{0}^{L_x}
+
\int_{0}^{L_x}
\rho
c^2
\frac{\partial \vel{}{}}{\partial x}
\frac{\partial \pos{}{}}{\partial x}
dx,\]
where the former term denotes the boundary contribution and is zero due to the prescribed condition, while the latter term can be written as
\[\int_{0}^{L_x}
\rho
c^2
\frac{\partial}{\partial t}
\left(
\frac{\partial \pos{}{}}{\partial x}
\right)
\frac{\partial \pos{}{}}{\partial x}
dx
=
\frac{\partial}{\partial t}
\left(
\int_{0}^{L_x}
\frac{1}{2}
\rho
c^2
\frac{\partial \pos{}{}}{\partial x}
\frac{\partial \pos{}{}}{\partial x}
dx
\right)
=
\frac{dU}{dt},\]
which describes the change of the total potential energy \(U\) in time.
Similarly, the third term can be reformulated by adopting the integration by parts:
\[-
\int_{0}^{L_x}
\rho
\nu
\vel{}{}
\frac{\partial^2 \vel{}{}}{\partial x^2}
dx
=
-
\left[
\rho
\nu
\vel{}{}
\frac{\partial \vel{}{}}{\partial x}
\right]_{0}^{L_x}
+
\int_{0}^{L_x}
\rho
\nu
\frac{\partial \vel{}{}}{\partial x}
\frac{\partial \vel{}{}}{\partial x}
dx,\]
where the former term is again zero whereas the latter denotes the energy dissipation.
The fourth term is simply the energy input due to the external factor and remain as it is.
In summary, we obtain
\[\frac{dE}{dt}
=
\frac{d}{dt}
\left(
K
+
U
\right)
=
-
\int_{0}^{L_x}
\rho
\nu
\frac{\partial \vel{}{}}{\partial x}
\frac{\partial \vel{}{}}{\partial x}
dx
+
\int_{0}^{L_x}
\rho
\vel{}{}
a
dx.\]
Spectral representation
The use of Dirichlet boundary conditions motivates the expansion of the fields using sinusoidal functions:
\[\pos{}{} \left( x, t \right)
=
\mysum{l_x}{\infty}
\kpos{l_x}{} \left( t \right)
\sin \left( \wavenumber{l_x}{x}{L_x} \right),\]
\[\vel{}{} \left( x, t \right)
=
\mysum{l_x}{\infty}
\kvel{l_x}{} \left( t \right)
\sin \left( \wavenumber{l_x}{x}{L_x} \right).\]
Utilizing these relations to the governing equations yields
\[ \begin{align}\begin{aligned}&
\mysum{l_x}{\infty}
\frac{d\kpos{l_x}{}}{dt}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
=
\mysum{l_x}{\infty}
\kvel{l_x}{}
\sin \left( \wavenumber{l_x}{x}{L_x} \right),\\&
\mysum{l_x}{\infty}
\frac{d\kvel{l_x}{}}{dt}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
=
-
\mysum{l_x}{\infty}
c^2
\left( \wavenumber{l_x}{}{L_x} \right)^2
\kpos{l_x}{}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
-
\mysum{l_x}{\infty}
\nu
\left( \wavenumber{l_x}{}{L_x} \right)^2
\kvel{l_x}{}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
+
\mysum{l_x}{\infty}
A_{l_x}
\sin \left( \wavenumber{l_x}{x}{L_x} \right),\end{aligned}\end{align} \]
and by adopting the orthogonality of the trial function:
\[ \begin{align}\begin{aligned}&
\int_{0}^{L_x}
q \left( x \right)
\sin \left( \wavenumber{k_x}{x}{L_x} \right)
dx\\=
&
\int_{0}^{L_x}
\mysum{l_x}{\infty}
Q_{l_x}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
\sin \left( \wavenumber{k_x}{x}{L_x} \right)
dx\\=
&
\int_{0}^{L_x}
\mysum{l_x}{\infty}
Q_{l_x}
\frac{1}{2}
\cos \left( \wavenumber{\left( l_x - k_x \right)}{x}{L_x} \right)
dx
-
\int_{0}^{L_x}
\mysum{l_x}{\infty}
Q_{l_x}
\frac{1}{2}
\cos \left( \wavenumber{\left( l_x + k_x \right)}{x}{L_x} \right)
dx\\=
&
\frac{L_x}{2}
Q_{k_x},\end{aligned}\end{align} \]
we see that each wavenumber has independent relations:
\[ \begin{align}\begin{aligned}&
\frac{d\kpos{k_x}{}}{dt}
=
\kvel{k_x}{}\\&
\frac{d\kvel{k_x}{}}{dt}
=
-
C_{k_x}
\kpos{k_x}{}
-
N_{k_x}
\kvel{k_x}{}
+
A_{k_x},\end{aligned}\end{align} \]
where
\[ \begin{align}\begin{aligned}C_{k_x}
&
\equiv
c^2
\left( \wavenumber{k_x}{}{L_x} \right)^2,\\N_{k_x}
&
\equiv
\nu
\left( \wavenumber{k_x}{}{L_x} \right)^2.\end{aligned}\end{align} \]
The total kinetic and potential energies (\(K\) and \(U\)) in spectral space lead to
\[ \begin{align}\begin{aligned}K
&
\equiv
\int_{0}^{L_x}
\frac{1}{2}
\rho
\vel{}{}^2
dx\\&
=
\int_{0}^{L_x}
\frac{1}{2}
\rho
\left(
\mysum{k_x}{\infty}
\kvel{k_x}{}
\sin \left( \wavenumber{k_x}{x}{L_x} \right)
\right)
\left(
\mysum{l_x}{\infty}
\kvel{l_x}{}
\sin \left( \wavenumber{l_x}{x}{L_x} \right)
\right)
dx\\&
=
\mysum{k_x}{\infty}
\frac{L_x}{2}
\frac{1}{2}
\rho
\left( \kvel{k_x}{} \right)^2,\\U
&
\equiv
\int_{0}^{L_x}
\frac{1}{2}
\rho
c^2
\frac{\partial \pos{}{}}{\partial x}
\frac{\partial \pos{}{}}{\partial x}
dx\\&
=
\int_{0}^{L_x}
\frac{1}{2}
\rho
c^2
\left(
\mysum{k_x}{\infty}
\kpos{k_x}{}
\wavenumber{k_x}{}{L_x}
\cos \left( \wavenumber{k_x}{x}{L_x} \right)
\right)
\left(
\mysum{l_x}{\infty}
\kpos{l_x}{}
\wavenumber{l_x}{}{L_x}
\cos \left( \wavenumber{l_x}{x}{L_x} \right)
\right)
dx\\&
=
\mysum{k_x}{\infty}
\frac{L_x}{2}
\frac{1}{2}
\rho
C_{k_x}
\left( \kpos{k_x}{} \right)^2,\end{aligned}\end{align} \]
respectively.