srmainwaring / asv_wave_sim

This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
GNU General Public License v3.0
114 stars 31 forks source link

Linear potential wave-body model #69

Open srmainwaring opened 1 year ago

srmainwaring commented 1 year ago

Overview

We would like to combine the non-linear hydrostatic restoring force model used in asv_wave_sim with a linear potential flow wave-body interaction model.

The initial application is to buoys and other structures that satisfy the requirement that the displacements about an initial condition are expected to be small. However some of the features may be useful for surface vehicles, in particular the wave radiation damping and added mass contributions from the linear model may provide a better mechanism than the current model, particularly for larger / more massive vessels.

Approach

The linear wave-body model resolves the interaction into a number of different forces and the way these are incorporated in the simulation differs depending on the type of waves.

Forces

Waves

The proposed approach is to progress through the cases starting with the simplest model, no waves with linear hydrostatic restoring forces, and progressively work through the additional forces for each wave category before moving onto a more complex wave model.

Implementation

A working demonstration of the model is available on the demo/linear-wave-body branch which will be used to track progress:

srmainwaring commented 1 year ago

Ellipsoid buoy test case

The test case is an ellipsoid buoy with same dimensions used in the WEC-Sim Nonlinear_Hydro example.

The first step towards the general case of random FFT generated waves, non-linear hydrostatics and a linear potential model for wave body interactions is to look at a simple standalone linear wave-body model in the absence of waves and in regular waves of fixed period and height.

The following tests cases build up to a model synchronised with the wave visuals that implements combined hydrostatic, radiation and excitation forces assuming constant BEM coefficients for a regular wave with period T = 6s and height H = 4m.

Hydrostatics

Forces

Figures: response from initial conditions: z=3m, pitch=45deg, no waves, no damping

https://user-images.githubusercontent.com/24916364/192846546-61b6c1f9-3874-4f4b-befb-8f379789db0b.mov

01_4_ellipsoid_f5244_fhs_3m_45deg

Radiation damping and added mass

Forces

Figures: response from initial conditions: z=3m, pitch=45deg, no waves. There are two plots for each DOF, the higher frequency / lower amplitude plots correspond to damping only.

https://user-images.githubusercontent.com/24916364/192847749-bdcd6b74-90fc-4bc6-bb28-a59514a82632.mov

02_6_ellipsoid_f5244_fhs_frd_fam_3m_45deg

Incorporating added mass in the Gazebo physics solver

Modifications to Gazebo

Gazebo Garden (sdformat13) allows an added mass term to be included in the <inertial> element according to the proposal:

http://sdformat.org/tutorials?tut=added_mass_proposal&branch=chapulina/added_mass

An entry for the fluid added mass has been added to the Inertial class in gz-math7 and is accessed using the method Inertial::FluidAddedMass. This may be written to directly in the plugin Configure method via the component::Inertial attached to a link entity.

The following issues and PRs track including the fluid added mass in the DART physics engine.

With the patches from this branch to correct the conversion from a Gazebo inertia matrix and the DART spatial inertia tensor:

Edit 10 Oct 2022

The added mass input into the Gazebo Inertia class is expected to be taken about the link frame origin and with reference to the link frame (rather than about the CoM with reference to the CoM frame). In this case no additional transform is required.

Gravity

The DART solver includes gravity at the world level, and assumes that the inertial mass in the spatial inertia tensor is equivalent to gravitation mass. This is not valid when the tensor contains added mass elements.

To get the correct gravitation forces the world gravity must be disabled by setting the element <gravity>0 0 0</gravity>, with gravity added back in for the inertial mass only in the plugin.

Excitation

Forces

Figures: combined response in regular waves with constant period 6s and amplitude 2m. The initial excitation forces are suppressed over the first 10s using the ramp function implemented in the WEC-Sim Simulink model.

https://user-images.githubusercontent.com/24916364/192851231-e947be57-0278-4ca0-80a6-2584f0ddceef.mov

03_2_ellipsoid_f5244_fhs_fex_frd_fam_0m_v2