HOME

PDF (letter size)

PDF (legal size)

Analytical solution to specific Stokes’ first problem PDE

Nasser M. Abbasi

June 12, 2017   Compiled on January 4, 2022 at 7:13am

Solve

\begin {align} \frac {\partial u}{\partial t} & =k\frac {\partial ^{2}u}{\partial x^{2}}\tag {1}\\ 0 & <x<L\nonumber \\ t & >0\nonumber \end {align}

Initial conditions

\[ u\left (0,x\right ) =0 \]

Boundary conditions

\begin {align*} u\left (0,t\right ) & =\sin \relax (t) \\ u\left (t,L\right ) & =0 \end {align*}

Let \begin {equation} u=v+u_{E} \tag {2} \end {equation} where \(u_{E}\left (x,t\right ) \) is steady state solution that only needs to satisfy boundary conditions and \(v\left (x,t\right ) \) satisfies the PDE itself but with homogenous B.C.  At steady state, the PDE becomes

\begin {align*} 0 & =k\frac {d^{2}u_{E}}{dx^{2}}\\ u_{E}\relax (0) & =\sin \relax (t) \\ u_{E}\relax (L) & =0 \end {align*}

The solution is \(u_{E}\relax (t) =\left (\frac {L-x}{L}\right ) \sin \relax (t) \).  Hence (2) becomes

\[ u\left (x,t\right ) =v\left (x,t\right ) +\left (\frac {L-x}{L}\right ) \sin \relax (t) \]

Substituting the above in (1) gives

\begin {align} \frac {\partial v}{\partial t}+\left (\frac {L-x}{L}\right ) \cos \left ( t\right ) & =k\frac {\partial ^{2}v}{\partial x^{2}}\nonumber \\ \frac {\partial v}{\partial t} & =k\frac {\partial ^{2}v}{\partial x^{2}}+\left (\frac {x-L}{L}\right ) \cos \relax (t) \nonumber \\ \frac {\partial v}{\partial t} & =k\frac {\partial ^{2}v}{\partial x^{2}}+Q\left (x,t\right ) \tag {3} \end {align}

With boundary conditions \(u_{0}\left (0,t\right ) =0,u\left (L,t\right ) =0\). This is now in standard form and separation of variables can be used to solve it. \[ Q\left (x,t\right ) =\left (\frac {x-L}{L}\right ) \cos \relax (t) \] Now acts as a source term. The eigenfunctions are known to be \(\Phi _{n}\left ( x\right ) =\sin \left (\sqrt {\lambda _{n}}x\right ) \) where \(\lambda _{n}=\left (\frac {n\pi }{L}\right ) ^{2}\). Hence by eigenfunction expansion, the solution to (3) is

\begin {equation} v\left (x,t\right ) =\sum _{n=1}^{\infty }B_{n}\relax (t) \Phi _{n}\relax (x) \tag {3A} \end {equation}

Substituting this into (3) gives

\begin {equation} \sum _{n=1}^{\infty }\frac {dB_{n}\relax (t) }{dt}\Phi _{n}\left ( x\right ) =k\sum _{n=1}^{\infty }B_{n}\relax (t) \Phi _{n}^{\prime \prime }\relax (x) +Q\left (x,t\right ) \tag {4} \end {equation}

Expanding \(Q\left (x,t\right ) \) using same basis (eigenfunctions) gives

\[ Q\left (x,t\right ) =\sum _{n=1}^{\infty }q_{n}\relax (t) \Phi _{n}\relax (x) \]

Applying orthogonality

\begin {align*} \int _{0}^{L}Q\left (x,t\right ) \Phi _{m}\relax (x) dx & =\int _{0}^{L}\sum _{n=1}^{\infty }q_{n}\relax (t) \Phi _{n}\relax (x) \Phi _{m}\relax (x) dx\\ & =\sum _{n=1}^{\infty }q_{n}\relax (t) \int _{0}^{L}\Phi _{n}\left ( x\right ) \Phi _{m}\relax (x) dx \end {align*}

But \(\sum _{n=1}^{\infty }\int _{0}^{L}\Phi _{n}\relax (x) \Phi _{m}\left ( x\right ) dx=\int _{0}^{L}\Phi _{m}^{2}\relax (x) dx=\frac {L}{2}\) since \(\Phi _{n}\relax (x) =\sin \left (\frac {n\pi }{L}x\right ) \) and the above simplifies to

\begin {align*} \int _{0}^{L}Q\left (x,t\right ) \Phi _{n}\relax (x) dx & =\frac {L}{2}q_{n}\relax (t) \\ q_{n}\relax (t) & =\frac {2}{L}\int _{0}^{L}Q\left (x,t\right ) \sin \left (\frac {n\pi }{L}x\right ) dx \end {align*}

But \(Q\left (x,t\right ) =\left (\frac {x-L}{L}\right ) \cos \relax (t) \), hence

\begin {align*} q_{n}\relax (t) & =\frac {2}{L}\int _{0}^{L}\left (\frac {x-L}{L}\right ) \cos \relax (t) \sin \left (\frac {n\pi }{L}x\right ) dx\\ & =\frac {-2}{n\pi }\cos \relax (t) \end {align*}

Therefore \(Q\left (x,t\right ) =\sum _{n=1}^{\infty }q_{n}\relax (t) \Phi _{n}\relax (x) =\sum _{n=1}^{\infty }\frac {-2}{n\pi }\cos \left ( t\right ) \sin \left (\frac {n\pi }{L}x\right ) \) and (4) becomes

\begin {align*} \sum _{n=1}^{\infty }\frac {dB_{n}\relax (t) }{dt}\Phi _{n}\left ( x\right ) & =k\sum _{n=1}^{\infty }B_{n}\relax (t) \Phi _{n}^{\prime \prime }\relax (x) -\sum _{n=1}^{\infty }\frac {2}{n\pi }\cos \left ( t\right ) \sin \left (\frac {n\pi }{L}x\right ) \\ \frac {dB_{n}\relax (t) }{dt}\sin \left (\frac {n\pi }{L}x\right ) & =kB_{n}\relax (t) \left (-\frac {n^{2}\pi ^{2}}{L^{2}}\sin \left ( \frac {n\pi }{L}x\right ) \right ) -\frac {2}{n\pi }\cos \relax (t) \sin \left (\frac {n\pi }{L}x\right ) \\ \frac {dB_{n}\relax (t) }{dt}+B_{n}\relax (t) k\frac {n^{2}\pi ^{2}}{L^{2}} & =-\frac {2}{n\pi }\cos \relax (t) \end {align*}

This is an ODE in \(B_{n}\relax (t) \) whose solution is

\[ B_{n}\relax (t) =C_{n}e^{-k\left (\frac {n^{2}\pi ^{2}}{L^{2}}\right ) t}-\frac {2L^{2}\left (kn^{2}\pi ^{2}\cos t+L^{2}\sin t\right ) }{n\pi \left ( L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\]

From (3A) \(v\left (x,t\right ) \) now becomes

\begin {equation} v\left (x,t\right ) =\sum _{n=1}^{\infty }C_{n}e^{-k\left (\frac {n^{2}\pi ^{2}}{L^{2}}\right ) t}\sin \left (\frac {n\pi }{L}x\right ) -\frac {2L^{2}\left ( kn^{2}\pi ^{2}\cos t+L^{2}\sin t\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\sin \left (\frac {n\pi }{L}x\right ) \tag {5} \end {equation}

To find \(C_{n}\), from initial conditions, at \(t=0\) the above becomes

\[ 0=\sum _{n=1}^{\infty }C_{n}\sin \left (\frac {n\pi }{L}x\right ) -\frac {2L^{2}\left (kn^{2}\pi ^{2}\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\sin \left (\frac {n\pi }{L}x\right ) \]

Hence

\[ C_{n}=\frac {2L^{2}\left (kn^{2}\pi ^{2}\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\]

Therefore (5) becomes

\[ v\left (x,t\right ) =\sum _{n=1}^{\infty }\left (\frac {2L^{2}\left (kn^{2}\pi ^{2}\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }e^{-k\left ( \frac {n^{2}\pi ^{2}}{L^{2}}\right ) t}-\frac {2L^{2}\left (kn^{2}\pi ^{2}\cos t+L^{2}\sin t\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\right ) \sin \left (\frac {n\pi }{L}x\right ) \]

And since \(u=v+u_{E}\) then the solution is

\[ u\left (x,t\right ) =\left (\sum _{n=1}^{\infty }\left (\frac {2L^{2}\left ( kn^{2}\pi ^{2}\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }e^{-k\left (\frac {n^{2}\pi ^{2}}{L^{2}}\right ) t}-\frac {2L^{2}\left ( kn^{2}\pi ^{2}\cos t+L^{2}\sin t\right ) }{n\pi \left (L^{4}+k^{2}n^{4}\pi ^{4}\right ) }\right ) \sin \left (\frac {n\pi }{L}x\right ) \right ) +\left ( \frac {L-x}{L}\right ) \sin \relax (t) \]

To simulate


Here is the animation from the above

  

Here is the numerical solution to compare with


Here is the animation from the above

  

Reference: stokes second problem question and answer