template <class T, int N>
class vtb::core::Gerstner_solver

Trochoidal waves solver named after Gerstner.

  • Fluid is inviscid and incompressible.
  • Fluid motion is irrotational.
  • Based on the first-order solution to equation of motion and equation of continuity, obtained by Gerstner two centuries ago.
  • Computes wave surface, velocity field and pressure.

Types
  • using C = std::complex< T >
  • using ship_type = Ship< T >
  • using wave_array = std::vector< wave_type >
  • using wave_type = Linear_wave< T, N >
  • using panel_array = std::vector< panel_type >
  • using panel_type = Ship_hull_panel< T, N >
  • using grid4 = Grid< T, N+1 >
  • using grid3 = Grid< T, N >
  • using scalar_field_3d = Array< T, 3 >
  • using vertex_field_3d = Array< vertex_type, 3 >
  • using vertex_field_2d = Array< vertex_type, 2 >
  • using vertex_type = blitz::TinyVector< T, N >
  • using scalar_type = T
Fields
  • bool _clip
  • bool _waterline_only
  • bool _radiation
  • bool _diffraction
  • scalar_type _diffraction_ratio
  • grid3 _velocity_grid_zxy
  • scalar_field_3d _potential
  • vertex_field_3d _velocity
  • vertex_field_2d _surface
  • wave_array _waves
  • scalar_type _depth
Methods
  • operator=(Gerstner_solver &&) -> Gerstner_solver &
  • Gerstner_solver(Gerstner_solver &&)
  • operator=(const Gerstner_solver &) -> Gerstner_solver &
  • Gerstner_solver(const Gerstner_solver &)
  • ~Gerstner_solver()virtual
  • Gerstner_solver()
  • velocity_grid() const -> const grid3 &
  • potential() const -> const scalar_field_3d &
  • velocity() const -> const vertex_field_3d &
  • surface() const -> const vertex_field_2d &

    Get fluid particle position field .

  • compute_forces(const ship_type & ship, const grid4 & grid_tzxy, panel_array & wetted_panels) -> voidvirtual

    Compute Froude—Krylov force acting on each panel.

    ship
    ship

    grid_tzxy
    full simulation grid with dimensions

    wetted_panels
    underwater panels

    As a side effect, computes velocity potential and velocity fields on and under the wave surface.

  • compute_positions(const ship_type & ship, const panel_array & panels, const grid3 & grid_txy) -> voidvirtual

    Fluid motion without diffraction/radiation.

    ship
    ship

    panels
    ship hull faces

    grid_txy
    grid with dimensions

    Calculates positions of fluid particles on the wave surface.

  • clip(bool rhs) -> void
  • clip() const -> bool

    Clamp grid to panels?

  • waterline_only(bool rhs) -> void
  • waterline_only() const -> bool

    Calculate radiation/diffraction using waterline only? Using waterline only is much faster than using all underwater panels.

  • radiation(bool rhs) -> void
  • radiation() const -> bool

    Calculate radiation forces? The effect of an oscillating rigid body on the still fluid.

  • diffraction(bool rhs) -> void
  • diffraction() const -> bool

    Calculate diffraction forces? The effect of the fluid particles hitting the rigid body.

  • diffraction_ratio(T rhs) -> void
  • diffraction_ratio() const -> T

    The ratio of wave reflection. If you set it to 0, no wave diffraction occurres. If you set it to 1, the wave is fully reflected from the hull and its amplitude is doubled. If you set it to 0.5, only half of the wave is reflected from the hull.

    Date
    2020-04-28
  • waves(const wave_array & rhs) -> void
  • waves(wave_array && rhs) -> void
  • waves() const -> const wave_array &
  • depth(T rhs) -> void
  • depth() const -> T

    Water depth.

template <class T, int N, Policy P>
make_gerstner_solver() -> std::unique_ptr< Gerstner_solver< T, N > >
template <class T, int N>
make_gerstner_solver(Policy policy) -> std::unique_ptr< Gerstner_solver< T, N > >