Virtual Testbed
Ship dynamics simulator for extreme conditions
|
Uses formulae from linear wavy theory. More...
#include <velocity_potential.hh>
Public Member Functions | |
void | solve (const Grid< T, 4 > &grid_tzxy, const Array< T, 3 > &wavy_surface, Array< T, 4 > &velocity_potential) override |
Computes velocity potential \(\phi\). More... | |
void | window_function (const Grid< T, 2 > &wngrid, const T z, Array2< T > &result) |
Computes window (first) function \(\mathcal{W}\). More... | |
template<> | |
void | window_function (const Grid< T, 2 > &wngrid, const T z, Array2< T > &result) |
template<> | |
void | solve (const Grid< T, 4 > &grid_tzxy, const Array< T, 3 > &zeta, Array< T, 4 > &phi) |
![]() | |
void | second_function (const Grid< T, 4 > &grid_tzxy, const Array3< T > &wavy_surface, Array3< C > &result) |
Computes second function. More... | |
![]() | |
T | depth () const noexcept |
Get water depth. | |
void | depth (T rhs) |
Set water depth. | |
void | wave_number_grid (const Grid< T, 2 > &rhs) |
const Grid< T, 2 > & | wave_number_grid () const |
void | assumptions (Assumptions rhs) |
const Assumptions & | assumptions () const |
virtual void | solve (const Grid< T, N+1 > &grid_tzxy, const Array< T, N > &wavy_surface, Array< T, N+1 > &velocity_potential)=0 |
Calculate velocity potential for each grid point. More... | |
void | operator() (const Grid< T, 4 > &grid_tzxy, const Array< T, 3 > &wavy_surface, Array< T, 4 > &velocity_potential) |
Uses formulae from linear wavy theory.
Definition at line 151 of file velocity_potential.hh.
|
override |
Computes velocity potential \(\phi\).
The integration is implemented using FFT and is done over wave number range which is computed directly from the wavy surface.The main formula for velocity potential is
\[ \phi(x,y,z;t) = \mathcal{F}^{-1}_{x,y}\left\{ \mathcal{W}(u,v;z) \cdot \mathcal{F}_{u,v}\left\{\mathcal{S}(x,y;t)\right\} \right\}, \]
where \(\mathcal{W}\) is window function and \(\mathcal{S}\) is second function. For details see documentation of the corresponding methods.
void vtb::core::Linear_velocity_potential_solver< T, P >::window_function | ( | const Grid< T, 2 > & | wngrid, |
const T | z, | ||
Array2< T > & | result | ||
) |
Computes window (first) function \(\mathcal{W}\).
\[ \mathcal{W}(\vec{k}) = \frac{\exp\left(|\vec{k}|\right)}{|\vec{k}|}. \]
\[ \mathcal{W}(\vec{k}) = \frac {\cosh\left(|\vec{k}|(z+h)\right)} {|\vec{k}|\cosh\left(|\vec{k}|h\right)}. \]