Difference between revisions of "Category:Boundary Element Method"

From WikiWaves
Jump to navigationJump to search
 
(8 intermediate revisions by one other user not shown)
Line 18: Line 18:
 
= Two-Dimensional Equations =  
 
= Two-Dimensional Equations =  
  
We begin with the [[Standard Linear Wave Scattering Problem]]
+
We apply [http://en.wikipedia.org/w/index.php?title=Green%27s_identities&action=edit Green's second identity]  
in [[Finite Depth]],
+
to a finite region <math>\Omega</math>. This gives us
<center><math>
+
<center><math> \int_\Omega \left( G \nabla^2 \phi - \phi \nabla^2 G\right)\, \mathrm{d}V = \oint_{\partial \Omega} \left( G {\partial \phi \over \partial n} - \phi {\partial G \over \partial n}\right)\, \mathrm{d}S
\nabla^{2}\phi=0, \, -h<z<0,\,\,\,\mathbf{x}\notin \Omega
 
</math></center>
 
<center><math>
 
\frac{\partial\phi}{\partial z}=0, \, z=-h,
 
</math></center>
 
<center><math>
 
\frac{\partial\phi}{\partial z} = \alpha \phi,\,z=0,\,\,\mathbf{x}\notin\Omega,
 
</math></center>
 
<center><math>
 
\frac{\partial\phi}{\partial z} = L\phi, \, z\in\partial\Omega.
 
</math></center>
 
 
 
We then apply [http://en.wikipedia.org/w/index.php?title=Green%27s_identities&action=edit Green's second identity]  
 
to a finite region ''U'' containing the wetted
 
body surface <math>\partial\Omega</math>, the free surface <math>z=0</math>,
 
the bottom surface <math>z=-h</math> and two vertical boundaries. This gives us
 
<center><math> \int_U \left( G \nabla^2 \phi - \phi \nabla^2 G\right)\, dV = \oint_{\partial U} \left( G {\partial \phi \over \partial n} - \phi {\partial G \over \partial n}\right)\, dS
 
 
</math></center>
 
</math></center>
 
We then substitute  
 
We then substitute  
Line 55: Line 38:
 
G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x}
 
G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x}
 
^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi
 
^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi
_{n}\left( \mathbf{x}^{\prime }\right) \right) d\mathbf{x}^{\prime }
+
_{n}\left( \mathbf{x}^{\prime }\right) \right) \mathrm{d}\mathbf{x}^{\prime }
 
   =
 
   =
 
\left(
 
\left(
 
\begin{matrix}
 
\begin{matrix}
0, \,\,\,x\notin U \cup \partial U, \\
+
0, \,\,\,x\notin \Omega \cup \partial \Omega, \\
\phi(\mathbf{x})/2,\,\,\,\mathbf{x} \in \partial U, \\
+
\phi(\mathbf{x})/2,\,\,\,\mathbf{x} \in \partial \Omega, \\
\phi(\mathbf{x}),\,\,\,\mathbf{x} \in U,
+
\phi(\mathbf{x}),\,\,\,\mathbf{x} \in \Omega,
 
\end{matrix}
 
\end{matrix}
 
\right.
 
\right.
Line 69: Line 52:
 
coordinate).
 
coordinate).
 
This gives us the following equation relating the potential
 
This gives us the following equation relating the potential
and its outward normal derivative on the boundary <math>\partial U </math>  
+
and its outward normal derivative on the boundary <math>\partial \Omega </math>  
 
<center><math>
 
<center><math>
\left. \frac{1}{2}\phi \left( \mathbf{x}\right) \right|_{\mathbf{x}\in\partial U}
+
\left. \frac{1}{2}\phi \left( \mathbf{x}\right) \right|_{\mathbf{x}\in\partial \Omega}
 
=\oint_{\partial \Omega }\left(
 
=\oint_{\partial \Omega }\left(
 
G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x}
 
G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x}
 
^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi
 
^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi
_{n}\left( \mathbf{x}^{\prime }\right) \right) d\mathbf{x}^{\prime },\;\;
+
_{n}\left( \mathbf{x}^{\prime }\right) \right) \mathrm{d}\mathbf{x}^{\prime },\;\;
 
\mathbf{x}\in \partial \Omega .   
 
\mathbf{x}\in \partial \Omega .   
 
</math></center>
 
</math></center>
Line 92: Line 75:
 
The outward normal derivative of the potential, <math>\vec{\phi}_{n},</math> and the
 
The outward normal derivative of the potential, <math>\vec{\phi}_{n},</math> and the
 
potential, <math>\vec{\phi},</math> are related by the conditions on the boundary <math>
 
potential, <math>\vec{\phi},</math> are related by the conditions on the boundary <math>
\partial U </math> given by <math>L</math>.
+
\partial \Omega </math>.
  
 
==Numerical Calculation of <math>\mathbf{G}</math> and <math>\mathbf{G}_{n}</math>==
 
==Numerical Calculation of <math>\mathbf{G}</math> and <math>\mathbf{G}_{n}</math>==
Line 108: Line 91:
 
<center><math>
 
<center><math>
 
\int_{\mathbf{x}_{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x}
 
\int_{\mathbf{x}_{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x}
^{\prime }\right) \phi \left( \mathbf{x}^{\prime }\right) d\mathbf{x}
+
^{\prime }\right) \phi \left( \mathbf{x}^{\prime }\right) \mathrm{d}\mathbf{x}
 
^{\prime }\approx \phi \left( \mathbf{x}_{i}\right) \int_{\mathbf{x}
 
^{\prime }\approx \phi \left( \mathbf{x}_{i}\right) \int_{\mathbf{x}
 
_{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x}^{\prime }\right)
 
_{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x}^{\prime }\right)
d\mathbf{x}^{\prime },  
+
\mathrm{d}\mathbf{x}^{\prime },  
 
</math></center>
 
</math></center>
 
where <math>\mathbf{x}_{i}</math> is the midpoint of the panel and <math>h</math> is the panel
 
where <math>\mathbf{x}_{i}</math> is the midpoint of the panel and <math>h</math> is the panel
Line 118: Line 101:
  
 
It is well known that, for higher accuracy, a higher order boundary element method works
 
It is well known that, for higher accuracy, a higher order boundary element method works
better.  
+
better.
  
 
= Matlab Code =
 
= Matlab Code =
  
A program to calculate the matrics <math>G</math> and <math>G_{n}</math> can be found here
+
{{boundary element code}}
[http://www.math.auckland.ac.nz/~meylan/code/eigenfunction_matching/bem_constant_panel.m bem_constant_panel.m]
 
 
 
  
 
[[Category:Pages with Matlab Code]]
 
[[Category:Pages with Matlab Code]]
 
[[Category:Numerical Methods]]
 
[[Category:Numerical Methods]]

Latest revision as of 10:01, 24 June 2009

Introduction

The boundary element method is a method for solving Laplace's equation (and other related elliptic equation). It is a very general and powerful method well suited to the linear wave scattering problem and forms the basis for many commercial wave scattering codes. The are two boundary element method for linear water waves, standard boundary element method, in which the fundamental solution to Laplace's Equation is used, which we decribe here and the Green Function Solution Method, in which the the Free-Surface Green Function is used so that the problem reduces to solving only on the wetted body surface.

The theory for solving a wave scattering problem is described in Boundary Element Method for a Rigid Body in Finite Depth

Two-Dimensional Equations

We apply Green's second identity to a finite region [math]\displaystyle{ \Omega }[/math]. This gives us

[math]\displaystyle{ \int_\Omega \left( G \nabla^2 \phi - \phi \nabla^2 G\right)\, \mathrm{d}V = \oint_{\partial \Omega} \left( G {\partial \phi \over \partial n} - \phi {\partial G \over \partial n}\right)\, \mathrm{d}S }[/math]

We then substitute

[math]\displaystyle{ G\left( \mathbf{x},\mathbf{x}^{\prime }\right) =\frac{1}{2\pi }\ln \,\left| \mathbf{x}-\mathbf{x}^{\prime }\right| , }[/math]

which is the free space Green function which satisfies

[math]\displaystyle{ \nabla^{2}G=\delta(\mathbf{x}-\mathbf{x}^{\prime }), }[/math]

where [math]\displaystyle{ \delta }[/math] is the Dirac delta function. This leads to

[math]\displaystyle{ \oint_{\partial \Omega }\left( G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x} ^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi _{n}\left( \mathbf{x}^{\prime }\right) \right) \mathrm{d}\mathbf{x}^{\prime } = \left( \begin{matrix} 0, \,\,\,x\notin \Omega \cup \partial \Omega, \\ \phi(\mathbf{x})/2,\,\,\,\mathbf{x} \in \partial \Omega, \\ \phi(\mathbf{x}),\,\,\,\mathbf{x} \in \Omega, \end{matrix} \right. }[/math]

where [math]\displaystyle{ G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) }[/math] is the outward normal derivative of [math]\displaystyle{ G }[/math] (with respect to the [math]\displaystyle{ \mathbf{x}^{\prime } }[/math] coordinate). This gives us the following equation relating the potential and its outward normal derivative on the boundary [math]\displaystyle{ \partial \Omega }[/math]

[math]\displaystyle{ \left. \frac{1}{2}\phi \left( \mathbf{x}\right) \right|_{\mathbf{x}\in\partial \Omega} =\oint_{\partial \Omega }\left( G_{n}\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi \left( \mathbf{x} ^{\prime }\right) -G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \phi _{n}\left( \mathbf{x}^{\prime }\right) \right) \mathrm{d}\mathbf{x}^{\prime },\;\; \mathbf{x}\in \partial \Omega . }[/math]


We solve this equation by a modified constant panel method which reduces it to the following matrix equation

[math]\displaystyle{ \frac{1}{2}\vec{\phi}=\mathbf{G}_{n}\vec{\phi}-\mathbf{G}\vec{\phi}_{n}. }[/math]

In this equation [math]\displaystyle{ \vec{\phi}\mathcal{\ } }[/math]and [math]\displaystyle{ \vec{\phi} _{n} }[/math] are vectors which approximate the potential and its normal derivative around the boundary [math]\displaystyle{ \partial \Omega }[/math], and [math]\displaystyle{ \mathbf{G} }[/math] and [math]\displaystyle{ \mathbf{G}_{n} }[/math] are matrices corresponding to the Green function and the outward normal derivative of the Green function respectively. The outward normal derivative of the potential, [math]\displaystyle{ \vec{\phi}_{n}, }[/math] and the potential, [math]\displaystyle{ \vec{\phi}, }[/math] are related by the conditions on the boundary [math]\displaystyle{ \partial \Omega }[/math].

Numerical Calculation of [math]\displaystyle{ \mathbf{G} }[/math] and [math]\displaystyle{ \mathbf{G}_{n} }[/math]

We solve the boundary element equation numerically by a modified constant panel method. In this method, the boundary is divided into panels over which the potential, [math]\displaystyle{ \phi , }[/math] or its outward normal derivative, [math]\displaystyle{ \phi _{n}, }[/math] are assumed to be constant. The free-space Green's function, [math]\displaystyle{ G, }[/math] and its normal derivative, [math]\displaystyle{ G_{n} }[/math] are more rapidly varying and have a singularity at [math]\displaystyle{ \mathbf{x}=\mathbf{x}^{\prime } }[/math]. For this reason, over each panel, while [math]\displaystyle{ \phi }[/math] and [math]\displaystyle{ \phi _{n} }[/math] are assumed constant, [math]\displaystyle{ G }[/math] and [math]\displaystyle{ G_{n} }[/math] are integrated exactly. For example, we use the following approximation to calculate the integral of [math]\displaystyle{ G }[/math] and [math]\displaystyle{ \phi }[/math] over a single panel

[math]\displaystyle{ \int_{\mathbf{x}_{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x} ^{\prime }\right) \phi \left( \mathbf{x}^{\prime }\right) \mathrm{d}\mathbf{x} ^{\prime }\approx \phi \left( \mathbf{x}_{i}\right) \int_{\mathbf{x} _{i}-h/2}^{\mathbf{x}_{i}+h/2}G\left( \mathbf{x},\mathbf{x}^{\prime }\right) \mathrm{d}\mathbf{x}^{\prime }, }[/math]

where [math]\displaystyle{ \mathbf{x}_{i} }[/math] is the midpoint of the panel and [math]\displaystyle{ h }[/math] is the panel length. The integral on the right hand side, because of the simple structure of [math]\displaystyle{ G }[/math], can be calculated exactly.

It is well known that, for higher accuracy, a higher order boundary element method works better.

Matlab Code

A program to calculate the matrices [math]\displaystyle{ G }[/math] and [math]\displaystyle{ G_{n} }[/math] bem_constant_panel.m

Pages in category "Boundary Element Method"

The following 2 pages are in this category, out of 2 total.