Virtual Testbed
Ship dynamics simulator for extreme conditions
Public Types | Public Member Functions | List of all members
vtb::core::Wave_pressure_solver< T > Class Template Referenceabstract

Base class for all wave pressure solvers. More...

#include <wave_pressure.hh>

Inheritance diagram for vtb::core::Wave_pressure_solver< T >:
[legend]

Public Types

using panel_type = Ship_hull_panel< T, 3 >
 
using panel_array = std::vector< panel_type >
 
using grid3 = Grid< T, 3 >
 
using grid4 = Grid< T, 4 >
 
using array3 = Array< T, 3 >
 
using array4 = Array< T, 4 >
 
using vec3 = Vector3< T >
 

Public Member Functions

virtual void solve (const Grid< T, 3 > &wavy_surface_grid, Array< T, 3 > wavy_surface, const Grid< T, 4 > &velocity_potential_grid, Array< T, 4 > velocity_potential, panel_array &panels)=0
 Compute pressure force applied to the centre of each ship hull panel. More...
 
density () const noexcept
 Fluid density.
 
void density (T rhs) noexcept
 
g () const noexcept
 Gravitational acceleration.
 
void g (T rhs) noexcept
 
void clip (bool b)
 
bool clip () const
 Clamp grid to panels?
 

Detailed Description

template<class T>
class vtb::core::Wave_pressure_solver< T >

Base class for all wave pressure solvers.

Date
2018-08-23
Author
Ivan Gankevich

Calculates wave pressure using Bernoulli equation.

Definition at line 23 of file wave_pressure.hh.

Member Function Documentation

◆ solve()

template<class T >
virtual void vtb::core::Wave_pressure_solver< T >::solve ( const Grid< T, 3 > &  wavy_surface_grid,
Array< T, 3 >  wavy_surface,
const Grid< T, 4 > &  velocity_potential_grid,
Array< T, 4 >  velocity_potential,
panel_array panels 
)
pure virtual

Compute pressure force applied to the centre of each ship hull panel.

Date
2018-08-23
Author
Ivan Gankevich
Parameters
[in]wavy_surface_gridThree-dimensional \((t,x,y)\) grid for each point of which wavy surface elevation is given.
[in]velocity_potential_gridFour-dimensional \((t,z,x,y)\) grid for each point of which velocity potential is calculated.
[in,out]panelsTriangular panels comprising wetted part of the ship hull.
  • Compute pressure using Bernoulli equation:

    \[ p(x,y,z,t) = -\rho \left( \phi_t + \frac{1}{2}\left( \phi_x^2 + \phi_y^2 + \phi_z^2 \right) + g z \right), \]

    where \(\rho\) — fluid density, \(g\) — gravitational acceleration, \(\phi\) — velocity potential.
  • Determne pressure force for each panel as

    \[ \vec{F} = \vec{x} \vec{n} S, \]

    where \(S\) — panel area, \(\vec{x}\) — radius vector of the panel centre relative to the ship hull centre of mass, \(\vec{n}\) — normal vector of the panel facing outside the hull. Multiplication is pointwise.