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

Base class for all wave pressure solvers. Calculates wave pressure using Bernoulli equation.

Derived classes
Types
  • using vec3 = Vector3< T >
  • using array4 = Array< T, 4 >
  • using array3 = Array< T, 3 >
  • using array2 = Array< T, 2 >
  • using grid4 = Grid< T, 4 >
  • using grid3 = Grid< T, 3 >
  • using panel_array = std::vector< panel_type >
  • using panel_type = Ship_hull_panel< T, 3 >
Fields
  • Grid< T, 3 > _velocity_potential_grid
  • Array< T, 4 > _velocity_potential

    Past values of velocity potential.

Methods
  • store_past_values(const Array< T, 3 > & phi, const Grid< T, 3 > & grid) -> voidprotected
  • resistance() const -> bool
  • resistance(bool rhs) -> void

    Take into acccount ship resistance to flow. Ship resistance to flow is calculated for each ship hull panel using the following formula. Here is water density, is volume of the tetrahedron with panel as a base and centre of floatation as the origin, is ship linear velocity, is ship linear acceleration, is ship angular velocity, is ship angular acceleration, is a vector from ship centre of gravity to the centre of the panel, is panel surface normal. Total force acting on the panel is calculated as .

  • clip() const -> bool

    Clamp grid to panels?

  • clip(bool b) -> void
  • solve(Array< T, 2 > wavy_surface, const Grid< T, 4 > & velocity_potential_grid, Array< T, 3 > velocity_potential, panel_array & panels, const Ship< T > & ship) -> voidvirtual

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

    wavy_surface
    two-dimensional surface elevation array

    velocity_potential_grid
    Four-dimensional grid for each point of which velocity potential is calculated.

    velocity_potential
    three-dimensional fluid velocity potential array

    panels
    Triangular panels comprising wetted part of the ship hull.

    ship
    The ship.

    • Compute pressure using Bernoulli equation: where — fluid density, — gravitational acceleration, — velocity potential.
    • Determne pressure force for each panel as where — panel area, — radius vector of the panel centre relative to the ship hull centre of mass, — normal vector of the panel facing outside the hull. Multiplication is pointwise.

    Date
    2018-08-23
    Author
    Ivan Gankevich
  • ~Wave_pressure_solver()virtual
template <class T, Policy P>
make_wave_pressure_solver() -> std::unique_ptr< Wave_pressure_solver< T > >