<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.wikiwaves.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pun+Wong</id>
	<title>WikiWaves - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikiwaves.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pun+Wong"/>
	<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php/Special:Contributions/Pun_Wong"/>
	<updated>2026-04-17T21:31:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11541</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11541"/>
		<updated>2010-03-28T13:39:35Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution with Waves Incident at an Angle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations, we set the upper limit of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; to be &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
B_{00}           &amp;amp; B_{01}      &amp;amp; \cdots &amp;amp; B_{0N}      &amp;amp; -C_{0}          &amp;amp; 0                &amp;amp; \cdots    &amp;amp; 0        \\&lt;br /&gt;
B_{10}           &amp;amp; B_{11}      &amp;amp; \cdots &amp;amp; B_{1N}      &amp;amp; 0                &amp;amp; -C_{1}          &amp;amp; \cdots    &amp;amp; \vdots   \\&lt;br /&gt;
\vdots           &amp;amp; \vdots      &amp;amp; \ddots &amp;amp; \vdots      &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; 0        \\&lt;br /&gt;
B_{N0}           &amp;amp; B_{N1}      &amp;amp; \cdots &amp;amp; B_{NN}      &amp;amp; 0                &amp;amp; \cdots           &amp;amp; 0         &amp;amp; -C_{N}  \\&lt;br /&gt;
     k_{0}A_{0} &amp;amp; 0           &amp;amp; \cdots &amp;amp; 0           &amp;amp; \kappa_{0}B_{00} &amp;amp; \kappa_{1}B_{10} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N0} \\&lt;br /&gt;
        0        &amp;amp; k_{1}A_{1} &amp;amp; \cdots &amp;amp; \vdots      &amp;amp; \kappa_{0}B_{01} &amp;amp; \kappa_{1}B_{11} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N1} \\&lt;br /&gt;
      \vdots     &amp;amp;   \vdots    &amp;amp; \ddots &amp;amp; 0           &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; \vdots           \\&lt;br /&gt;
         0       &amp;amp;   \cdots    &amp;amp; 0      &amp;amp; k_{N}A_{N} &amp;amp; \kappa_{0}B_{0N} &amp;amp; \kappa_{1}B_{1N} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{NN} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\ a_{1} \\ \vdots \\ a_{N} \\ b_{0} \\ b_{1} \\ \vdots \\ b_{N} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=\begin{bmatrix}&lt;br /&gt;
-B_{00} \\ -B_{10} \\ \vdots \\ -B_{N0} \\ k_{0}A_{0} \\ 0 \\ \vdots \\ 0 \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-\hat{k}_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}\hat{k}_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11539</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11539"/>
		<updated>2010-03-28T13:38:31Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution with Waves Incident at an Angle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations, we set the upper limit of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; to be &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
B_{00}           &amp;amp; B_{01}      &amp;amp; \cdots &amp;amp; B_{0N}      &amp;amp; -C_{0}          &amp;amp; 0                &amp;amp; \cdots    &amp;amp; 0        \\&lt;br /&gt;
B_{10}           &amp;amp; B_{11}      &amp;amp; \cdots &amp;amp; B_{1N}      &amp;amp; 0                &amp;amp; -C_{1}          &amp;amp; \cdots    &amp;amp; \vdots   \\&lt;br /&gt;
\vdots           &amp;amp; \vdots      &amp;amp; \ddots &amp;amp; \vdots      &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; 0        \\&lt;br /&gt;
B_{N0}           &amp;amp; B_{N1}      &amp;amp; \cdots &amp;amp; B_{NN}      &amp;amp; 0                &amp;amp; \cdots           &amp;amp; 0         &amp;amp; -C_{N}  \\&lt;br /&gt;
     k_{0}A_{0} &amp;amp; 0           &amp;amp; \cdots &amp;amp; 0           &amp;amp; \kappa_{0}B_{00} &amp;amp; \kappa_{1}B_{10} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N0} \\&lt;br /&gt;
        0        &amp;amp; k_{1}A_{1} &amp;amp; \cdots &amp;amp; \vdots      &amp;amp; \kappa_{0}B_{01} &amp;amp; \kappa_{1}B_{11} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N1} \\&lt;br /&gt;
      \vdots     &amp;amp;   \vdots    &amp;amp; \ddots &amp;amp; 0           &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; \vdots           \\&lt;br /&gt;
         0       &amp;amp;   \cdots    &amp;amp; 0      &amp;amp; k_{N}A_{N} &amp;amp; \kappa_{0}B_{0N} &amp;amp; \kappa_{1}B_{1N} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{NN} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\ a_{1} \\ \vdots \\ a_{N} \\ b_{0} \\ b_{1} \\ \vdots \\ b_{N} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=\begin{bmatrix}&lt;br /&gt;
-B_{00} \\ -B_{10} \\ \vdots \\ -B_{N0} \\ k_{0}A_{0} \\ 0 \\ \vdots \\ 0 \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-\hat{k}_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}\hat{k}_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11537</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11537"/>
		<updated>2010-03-28T13:32:21Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Numerical Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations, we set the upper limit of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; to be &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
B_{00}           &amp;amp; B_{01}      &amp;amp; \cdots &amp;amp; B_{0N}      &amp;amp; -C_{0}          &amp;amp; 0                &amp;amp; \cdots    &amp;amp; 0        \\&lt;br /&gt;
B_{10}           &amp;amp; B_{11}      &amp;amp; \cdots &amp;amp; B_{1N}      &amp;amp; 0                &amp;amp; -C_{1}          &amp;amp; \cdots    &amp;amp; \vdots   \\&lt;br /&gt;
\vdots           &amp;amp; \vdots      &amp;amp; \ddots &amp;amp; \vdots      &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; 0        \\&lt;br /&gt;
B_{N0}           &amp;amp; B_{N1}      &amp;amp; \cdots &amp;amp; B_{NN}      &amp;amp; 0                &amp;amp; \cdots           &amp;amp; 0         &amp;amp; -C_{N}  \\&lt;br /&gt;
     k_{0}A_{0} &amp;amp; 0           &amp;amp; \cdots &amp;amp; 0           &amp;amp; \kappa_{0}B_{00} &amp;amp; \kappa_{1}B_{10} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N0} \\&lt;br /&gt;
        0        &amp;amp; k_{1}A_{1} &amp;amp; \cdots &amp;amp; \vdots      &amp;amp; \kappa_{0}B_{01} &amp;amp; \kappa_{1}B_{11} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N1} \\&lt;br /&gt;
      \vdots     &amp;amp;   \vdots    &amp;amp; \ddots &amp;amp; 0           &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; \vdots           \\&lt;br /&gt;
         0       &amp;amp;   \cdots    &amp;amp; 0      &amp;amp; k_{N}A_{N} &amp;amp; \kappa_{0}B_{0N} &amp;amp; \kappa_{1}B_{1N} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{NN} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\ a_{1} \\ \vdots \\ a_{N} \\ b_{0} \\ b_{1} \\ \vdots \\ b_{N} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=\begin{bmatrix}&lt;br /&gt;
-B_{00} \\ -B_{10} \\ \vdots \\ -B_{N0} \\ k_{0}A_{0} \\ 0 \\ \vdots \\ 0 \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11535</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11535"/>
		<updated>2010-03-28T13:31:46Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Numerical Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations, we set the upper limit of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; to be &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
B_{00}           &amp;amp; B_{01}      &amp;amp; \cdots &amp;amp; B_{0N}      &amp;amp; -C_{00}          &amp;amp; 0                &amp;amp; \cdots    &amp;amp; 0        \\&lt;br /&gt;
B_{10}           &amp;amp; B_{11}      &amp;amp; \cdots &amp;amp; B_{1N}      &amp;amp; 0                &amp;amp; -C_{11}          &amp;amp; \cdots    &amp;amp; \vdots   \\&lt;br /&gt;
\vdots           &amp;amp; \vdots      &amp;amp; \ddots &amp;amp; \vdots      &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; 0        \\&lt;br /&gt;
B_{N0}           &amp;amp; B_{N1}      &amp;amp; \cdots &amp;amp; B_{NN}      &amp;amp; 0                &amp;amp; \cdots           &amp;amp; 0         &amp;amp; -C_{NN}  \\&lt;br /&gt;
     k_{0}A_{00} &amp;amp; 0           &amp;amp; \cdots &amp;amp; 0           &amp;amp; \kappa_{0}B_{00} &amp;amp; \kappa_{1}B_{10} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N0} \\&lt;br /&gt;
        0        &amp;amp; k_{1}A_{11} &amp;amp; \cdots &amp;amp; \vdots      &amp;amp; \kappa_{0}B_{01} &amp;amp; \kappa_{1}B_{11} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{N1} \\&lt;br /&gt;
      \vdots     &amp;amp;   \vdots    &amp;amp; \ddots &amp;amp; 0           &amp;amp; \vdots           &amp;amp; \vdots           &amp;amp; \ddots    &amp;amp; \vdots           \\&lt;br /&gt;
         0       &amp;amp;   \cdots    &amp;amp; 0      &amp;amp; k_{N}A_{NN} &amp;amp; \kappa_{0}B_{0N} &amp;amp; \kappa_{1}B_{1N} &amp;amp; \cdots    &amp;amp; \kappa_{N}B_{NN} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\ a_{1} \\ \vdots \\ a_{N} \\ b_{0} \\ b_{1} \\ \vdots \\ b_{N} \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=\begin{bmatrix}&lt;br /&gt;
-B_{00} \\ -B_{10} \\ \vdots \\ -B_{N0} \\ k_{0}A_{00} \\ 0 \\ \vdots \\ 0 \\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11533</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11533"/>
		<updated>2010-03-28T13:29:27Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11531</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11531"/>
		<updated>2010-03-28T13:28:24Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solving the equations above will yield the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11529</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11529"/>
		<updated>2010-03-28T13:26:49Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11527</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11527"/>
		<updated>2010-03-28T13:26:29Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
&amp;amp;=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &amp;amp;= &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11525</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11525"/>
		<updated>2010-03-28T13:25:12Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11523</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11523"/>
		<updated>2010-03-28T13:24:49Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d \\&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11521</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11521"/>
		<updated>2010-03-28T13:24:40Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11519</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11519"/>
		<updated>2010-03-28T13:24:21Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\quad \quad \quad 0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11517</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11517"/>
		<updated>2010-03-28T13:23:35Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), \quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11515</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11515"/>
		<updated>2010-03-28T13:22:54Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), -h&amp;lt;z&amp;lt;-d&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&amp;lt; &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11513</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11513"/>
		<updated>2010-03-28T13:22:31Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z), &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}\phi_{0}\left(  z\right) +\sum_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
0,\quad -d&amp;lt;z&amp;lt;0 \\&lt;br /&gt;
-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi_{m}(z),\quad -h&amp;lt;z&amp;lt;-d&amp;lt; &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11511</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11511"/>
		<updated>2010-03-28T13:18:01Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{0}\delta_{0n} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}, n\in\mathbb{N}\cup\left\{0\right\}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11509</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11509"/>
		<updated>2010-03-28T13:16:46Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11507</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11507"/>
		<updated>2010-03-28T13:16:32Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}, \for &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11505</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11505"/>
		<updated>2010-03-28T13:15:44Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain: For &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} = b_{m}C_{m}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} = -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11503</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11503"/>
		<updated>2010-03-28T13:15:10Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain: For &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} &amp;amp;= -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11501</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11501"/>
		<updated>2010-03-28T13:14:12Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\in\mathbb{N}\cup\left\{0\right\}.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain: For &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} &amp;amp;= b_{m}C_{m}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} &amp;amp;= -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11499</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11499"/>
		<updated>2010-03-28T13:13:45Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain: For &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} &amp;amp;= b_{m}C_{m}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} &amp;amp;= -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11497</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11497"/>
		<updated>2010-03-28T13:12:45Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the first equation we multiply both sides by &amp;lt;math&amp;gt;\psi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;-d&amp;lt;/math&amp;gt; to obtain: For &amp;lt;math&amp;gt;n\in\mathbb{N}\cup\left\{0\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{n0} + \sum^{\infty}_{m=0}a_{m}B_{nm} &amp;amp;= b_{m}C_{m}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for the second equation we multiply both sides by &amp;lt;math&amp;gt;\phi_{n}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}A_{00} + k_{m}a_{m}A_{m} &amp;amp;= -\sum^{\infty}_{m=0}\kappa_{m}b_{m}B_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This equation gives the required equations to solve for the coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11495</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11495"/>
		<updated>2010-03-28T12:54:27Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
, for &amp;lt;math&amp;gt;-d&amp;lt;z&amp;lt;0&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) = 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11493</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11493"/>
		<updated>2010-03-28T12:49:58Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain for &amp;lt;math&amp;gt;-h&amp;lt;z&amp;lt;-d&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11491</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11491"/>
		<updated>2010-03-28T12:48:11Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;math&amp;gt;For $-h&amp;lt;z&amp;lt;-d$&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11489</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11489"/>
		<updated>2010-03-28T12:47:46Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* An infinite dimensional system of equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;math&amp;gt;\text{For $-h&amp;lt;z&amp;lt;-d$}&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11487</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11487"/>
		<updated>2010-03-28T12:38:47Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Inner product between free surface and dock modes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11485</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11485"/>
		<updated>2010-03-28T12:36:33Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Inner product between free surface and dock modes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}=\frac{\kappa_{m}\sin(\kappa_{m}h)\cos(k_{n}h)-k_{n}\cos(\kappa_{m}h)\sin(k_{n}h)}&lt;br /&gt;
{\cos(k_{n}h)(\kappa_{m}^{2}-k_{n}^{2})}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11483</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11483"/>
		<updated>2010-03-28T12:23:19Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inner product between free surface and dock modes ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn} = \int\nolimits_{-h}^{-d}\psi_{m}(z)\phi_{n}(z) \mathrm{d} z &lt;br /&gt;
= \int\nolimits_{-h}^{0} \frac{\cos(\kappa_{m}(z+h))\cos(k_{n}(z+h))}{\cos(k_{n}h)} \mathrm{d} z&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
B_{mn}=\frac{k_{n}\sin k_{n}h\cos\kappa_{m}h-\kappa_{m}\cos k_{n}h\sin&lt;br /&gt;
\kappa_{m}h}{\left(  \cos k_{n}h\right)  \left(  k_{n}&lt;br /&gt;
^{2}-\kappa_{m}^{2}\right)  }&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11481</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11481"/>
		<updated>2010-03-28T12:12:54Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2} \left( \frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}} \right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11479</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11479"/>
		<updated>2010-03-28T12:12:01Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2}\frac{\cos(\kappa_{m}(h-d))\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11477</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11477"/>
		<updated>2010-03-28T12:11:37Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = \frac{1}{2}\frac{\cos(\kappa_{m}(h-d)\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11475</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11475"/>
		<updated>2010-03-28T12:10:30Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{1}{2}\frac{\cos(\kappa_{m}(h-d)\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}},\quad m=n \\&lt;br /&gt;
0,\,\,\,m\neq n&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11473</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11473"/>
		<updated>2010-03-28T12:09:44Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
\frac{1}{2}\frac{\cos(\kappa_{m}(h-d)\sin(\kappa_{m}(h-d))+\kappa_{m}(h-d)}{\kappa_{m}},\quad m=n \\&lt;br /&gt;
0,\,\,\,m\neq n&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11471</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11471"/>
		<updated>2010-03-28T12:01:09Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of Variables for a Dock */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{-d}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11469</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11469"/>
		<updated>2010-03-28T11:51:49Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for the fully submerged dock is given by:&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-d) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h-d} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{0}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
h,\quad m=0 \\&lt;br /&gt;
\frac{1}{2}h,\,\,\,m\neq 0&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11467</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11467"/>
		<updated>2010-03-28T11:47:22Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for a floating dockkkkkk&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (0) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{0}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
h,\quad m=0 \\&lt;br /&gt;
\frac{1}{2}h,\,\,\,m\neq 0&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11465</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11465"/>
		<updated>2010-03-28T11:46:39Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Solution Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
=== Separation of Variables for a Dock ===&lt;br /&gt;
&lt;br /&gt;
The separation of variables equation for a floating dock&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime\prime} + k^2 Z =0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
subject to the boundary conditions&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (-h) = 0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z^{\prime} (0) = 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The solution is &lt;br /&gt;
&amp;lt;math&amp;gt;k=\kappa_{m}= \frac{m\pi}{h} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq 0&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Z = \psi_{m}\left(  z\right)  = \cos\kappa_{m}(z+h),\quad&lt;br /&gt;
m\geq 0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We note that&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{0}\psi_{m}(z)\psi_{n}(z) \mathrm{d} z=C_{m}\delta_{mn},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
C_{m} = &lt;br /&gt;
\begin{cases}&lt;br /&gt;
h,\quad m=0 \\&lt;br /&gt;
\frac{1}{2}h,\,\,\,m\neq 0&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Template:Separation_of_variables_for_a_free_surface&amp;diff=11463</id>
		<title>Template:Separation of variables for a free surface</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Template:Separation_of_variables_for_a_free_surface&amp;diff=11463"/>
		<updated>2010-03-28T11:43:43Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of variables for a free surface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Separation of variables for a free surface ===&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] &lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface first part}}&lt;br /&gt;
&lt;br /&gt;
We denote the&lt;br /&gt;
positive imaginary solution of this equation by &amp;lt;math&amp;gt;k_{0} \,&amp;lt;/math&amp;gt; and&lt;br /&gt;
the positive real solutions by &amp;lt;math&amp;gt;k_{m} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq1&amp;lt;/math&amp;gt;.  We define&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{m}\left(  z\right)  =\frac{\cos k_{m}(z+h)}{\cos k_{m}h},\quad m\geq0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
as the vertical eigenfunction of the potential in the open&lt;br /&gt;
water region. From [http://en.wikipedia.org/wiki/Sturm-Liouville_theory Sturm-Liouville theory] the &lt;br /&gt;
vertical eigenfunctions are orthogonal. They can be normalised to be orthonormal, but&lt;br /&gt;
this has no advantages for a numerical implementation. It can be shown that&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{0}\phi_{m}(z)\phi_{n}(z) \mathrm{d} z=A_{n}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{n}=\frac{1}{2}\left(  \frac{\cos k_{n}h\sin k_{n}h+k_{n}h}{k_{n}\cos&lt;br /&gt;
^{2}k_{n}h}\right).&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Template:Separation_of_variables_for_a_free_surface&amp;diff=11461</id>
		<title>Template:Separation of variables for a free surface</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Template:Separation_of_variables_for_a_free_surface&amp;diff=11461"/>
		<updated>2010-03-28T11:43:01Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Separation of variables for a free surface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Separation of variables for a free surface ===&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] &lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface first part}}&lt;br /&gt;
&lt;br /&gt;
We denote theee&lt;br /&gt;
positive imaginary solution of this equation by &amp;lt;math&amp;gt;k_{0} \,&amp;lt;/math&amp;gt; and&lt;br /&gt;
the positive real solutions by &amp;lt;math&amp;gt;k_{m} \,&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m\geq1&amp;lt;/math&amp;gt;.  We define&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{m}\left(  z\right)  =\frac{\cos k_{m}(z+h)}{\cos k_{m}h},\quad m\geq0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
as the vertical eigenfunction of the potential in the open&lt;br /&gt;
water region. From [http://en.wikipedia.org/wiki/Sturm-Liouville_theory Sturm-Liouville theory] the &lt;br /&gt;
vertical eigenfunctions are orthogonal. They can be normalised to be orthonormal, but&lt;br /&gt;
this has no advantages for a numerical implementation. It can be shown that&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\int\nolimits_{-h}^{0}\phi_{m}(z)\phi_{n}(z) \mathrm{d} z=A_{n}\delta_{mn}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{n}=\frac{1}{2}\left(  \frac{\cos k_{n}h\sin k_{n}h+k_{n}h}{k_{n}\cos&lt;br /&gt;
^{2}k_{n}h}\right).&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11459</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11459"/>
		<updated>2010-03-28T11:37:05Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11457</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11457"/>
		<updated>2010-03-28T11:36:32Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. \\&lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11455</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11455"/>
		<updated>2010-03-28T11:36:22Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. &lt;br /&gt;
The boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11453</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11453"/>
		<updated>2010-03-28T11:35:33Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11451</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11451"/>
		<updated>2010-03-28T11:35:18Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;-d, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-d,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11449</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11449"/>
		<updated>2010-03-28T11:32:35Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0, \,\, x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=0,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We&lt;br /&gt;
must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11447</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11447"/>
		<updated>2010-03-28T11:31:52Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\,  -h&amp;lt;z&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=0,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We&lt;br /&gt;
must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11445</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11445"/>
		<updated>2010-03-28T11:31:35Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Governing Equations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0,  -h&amp;lt;z&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=0,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We&lt;br /&gt;
must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
	<entry>
		<id>https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11443</id>
		<title>Eigenfunction Matching for a Semi-Infinite Rectangle</title>
		<link rel="alternate" type="text/html" href="https://www.wikiwaves.org/index.php?title=Eigenfunction_Matching_for_a_Semi-Infinite_Rectangle&amp;diff=11443"/>
		<updated>2010-03-28T11:22:43Z</updated>

		<summary type="html">&lt;p&gt;Pun Wong: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{incomplete pages}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The problem consists of a region to the left with a free water surface and a region to the right with a rigid semi infinite rectangular block with height &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; fully submerged through which not flow is possible. &lt;br /&gt;
We begin with the simply problem when the waves are normally incident (so that the problem is truly two-dimensional) and later we also consider the case when the waves are incident at an angle.&lt;br /&gt;
&lt;br /&gt;
[[Image:semiinfinite_dock.jpg|thumb|right|300px|Wave scattering by a semi-infinite dock]]&lt;br /&gt;
&lt;br /&gt;
== Governing Equations ==&lt;br /&gt;
&lt;br /&gt;
We begin with the [[Frequency Domain Problem]] for a  submerged dock which occupies&lt;br /&gt;
the region &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt; (we assume &amp;lt;math&amp;gt;e^{i\omega t}&amp;lt;/math&amp;gt; time dependence).&lt;br /&gt;
The depth of submergence is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;.&lt;br /&gt;
The water is assumed to have constant finite depth &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;-direction points vertically&lt;br /&gt;
upward with the water surface at &amp;lt;math&amp;gt;z=0&amp;lt;/math&amp;gt; and the sea floor at &amp;lt;math&amp;gt;z=-h&amp;lt;/math&amp;gt;. The&lt;br /&gt;
boundary value problem can therefore be expressed as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\Delta\phi=0, \,\, -h&amp;lt;z&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=-h,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=\alpha\phi, \,\, z=0,\,x&amp;lt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\partial_z\phi=0, \,\, z=0,\,x&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We&lt;br /&gt;
must also apply the [[Sommerfeld Radiation Condition]]&lt;br /&gt;
as &amp;lt;math&amp;gt;|x|\rightarrow\infty&amp;lt;/math&amp;gt;. This essentially implies&lt;br /&gt;
that the only wave at infinity is propagating away and at negative infinity there is a unit incident wave&lt;br /&gt;
and a wave propagating away.&lt;br /&gt;
&lt;br /&gt;
== Solution Method ==&lt;br /&gt;
&lt;br /&gt;
We use [http://en.wikipedia.org/wiki/Separation_of_Variables separation of variables] in the two regions, &amp;lt;math&amp;gt;x&amp;lt;0&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;x&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{separation of variables in two dimensions}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a free surface}}&lt;br /&gt;
&lt;br /&gt;
{{separation of variables for a dock}}&lt;br /&gt;
&lt;br /&gt;
{{free surface dock relations}}&lt;br /&gt;
&lt;br /&gt;
=== Expansion of the potential === &lt;br /&gt;
&lt;br /&gt;
We need to apply some boundary conditions at plus and minus infinity, &lt;br /&gt;
where are essentially the the solution cannot grow. This means that we&lt;br /&gt;
only have the positive (or negative) roots of the dispersion equation.&lt;br /&gt;
However, it does not help us with the purely imaginary root. Here we&lt;br /&gt;
must use a different condition, essentially identifying one solution&lt;br /&gt;
as the incoming wave and the other as the outgoing wave. &lt;br /&gt;
&lt;br /&gt;
Therefore the scattered potential (without the incident wave, which will&lt;br /&gt;
be added later) can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}a_{m}e^{k_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\kappa_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;a_{m}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
are the coefficients of the potential in the open water and&lt;br /&gt;
the dock covered region respectively.&lt;br /&gt;
&lt;br /&gt;
{{incident potential for two dimensions}}&lt;br /&gt;
&lt;br /&gt;
=== An infinite dimensional system of equations ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The potential and its derivative must be continuous across the&lt;br /&gt;
transition from open water to the plate covered region. Therefore, the&lt;br /&gt;
potentials and their derivatives at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt; have to be equal.&lt;br /&gt;
We obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi_{0}\left(  z\right) + \sum_{m=0}^{\infty}&lt;br /&gt;
a_{m} \phi_{m}\left(  z\right) &lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}\psi_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
 -k_{0}\phi_{0}\left(  z\right)  +\sum&lt;br /&gt;
_{m=0}^{\infty} a_{m}k_{m}\phi_{m}\left(  z\right) &lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}\psi&lt;br /&gt;
_{m}(z)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
for each &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
We solve these equations by multiplying both equations by&lt;br /&gt;
&amp;lt;math&amp;gt;\phi_{l}(z) \,&amp;lt;/math&amp;gt; and integrating from &amp;lt;math&amp;gt;-h&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;0&amp;lt;/math&amp;gt; to obtain:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{m=0}^{\infty}b_{m}B_{ml}\,\,\,(3)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-k_{0}A_{0}\delta_{0l}+a_{l}k_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\kappa_{m}B_{ml} \,\,\,(4)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If we mutiply equation (3) by &amp;lt;math&amp;gt;k_l \,&amp;lt;/math&amp;gt; and subtract equation (4)&lt;br /&gt;
we obtain &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
(k_{0}+k_l)A_{0}\delta_{0l}&lt;br /&gt;
 =\sum_{m=0}^{\infty}b_{m}(k_l + \kappa_{m})B_{ml} \,\,\,(5)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
This equation gives the required equations to solve for the&lt;br /&gt;
coefficients of the water velocity potential in the dock covered region.&lt;br /&gt;
&lt;br /&gt;
== Numerical Solution ==&lt;br /&gt;
&lt;br /&gt;
To solve the system of equations (3) and (5), we set the upper limit of &amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt; to&lt;br /&gt;
be &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. This resulting system can be expressed in the block matrix form below,&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
A_0&amp;amp;0 \quad \cdots&amp;amp;0\\&lt;br /&gt;
0&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;A_l&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;0\\&lt;br /&gt;
0&amp;amp;\cdots \quad 0 &amp;amp;A_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
-B_{00}&amp;amp;\cdots&amp;amp;-B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;-B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
-B_{M0}&amp;amp;\cdots&amp;amp;-B_{MM}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\\&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0\\&lt;br /&gt;
\vdots&amp;amp;\ddots&amp;amp;\vdots\\&lt;br /&gt;
0&amp;amp;\cdots&amp;amp;0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;amp;&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
(k_0 + \kappa_0) \, B_{00}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{0}) \, B_{0M}\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
\vdots&amp;amp;(k_l + \kappa_{m}) \, B_{ml}&amp;amp;\vdots\\&lt;br /&gt;
&amp;amp;&amp;amp;\\&lt;br /&gt;
(k_0 + \kappa_M) \, B_{M0}&amp;amp;\cdots&amp;amp;(k_M + \kappa_{M}) \, B_{MM}\\&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
a_{0} \\&lt;br /&gt;
a_{1} \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
a_M \\&lt;br /&gt;
\\&lt;br /&gt;
b_{0}\\&lt;br /&gt;
b_1 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
b_M&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
- A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0 \\&lt;br /&gt;
\\&lt;br /&gt;
2k_{0}A_{0} \\&lt;br /&gt;
0 \\&lt;br /&gt;
\vdots \\&lt;br /&gt;
\\&lt;br /&gt;
0&lt;br /&gt;
\end{bmatrix}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
We then simply need to solve the linear system of equations.&lt;br /&gt;
&lt;br /&gt;
== Solution with Waves Incident at an Angle ==&lt;br /&gt;
&lt;br /&gt;
We can consider the problem when the waves are incident at an angle &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{incident angle}}&lt;br /&gt;
&lt;br /&gt;
Therefore the potential can&lt;br /&gt;
be expanded as&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=e^{-\hat{k}_0x}\phi_0(z)+\sum_{m=0}^{\infty}a_{m}e^{\hat{k}_{m}x}\phi_{m}(z), \;\;x&amp;lt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\phi(x,z)=\sum_{m=0}^{\infty}b_{m}&lt;br /&gt;
e^{-\hat{\kappa}_{m}x}\psi_{m}(z), \;\;x&amp;gt;0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\hat{k}_{m} = \sqrt{k_m^2 - k_y^2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\kappa}_{m} = \sqrt{\kappa_m^2 - k_y^2}&amp;lt;/math&amp;gt;&lt;br /&gt;
where we always take the positive real root or the root with positive imaginary part. &lt;br /&gt;
&lt;br /&gt;
The equations are derived almost identically to those above and we obtain&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
A_{0}\delta_{0l}+a_{l}A_{l}&lt;br /&gt;
=\sum_{n=0}^{\infty}b_{m}B_{ml}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
-\hat{k_{0}}A_{0}\delta_{0l}+a_{l}\hat{k}_{l}A_l&lt;br /&gt;
 =-\sum_{m=0}^{\infty}b_{m}\hat{\kappa}_{m}B_{ml} &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
and these are solved exactly as before.&lt;br /&gt;
&lt;br /&gt;
== Matlab Code ==&lt;br /&gt;
&lt;br /&gt;
A program to calculate the coefficients for the semi-infinite dock problems can be found here&lt;br /&gt;
{{semiinfinite_dock code}}&lt;br /&gt;
&lt;br /&gt;
=== Additional code ===&lt;br /&gt;
&lt;br /&gt;
This program requires&lt;br /&gt;
* {{free surface dispersion equation code}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Eigenfunction Matching Method]]&lt;/div&gt;</summary>
		<author><name>Pun Wong</name></author>
	</entry>
</feed>