Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear potential wave-body model #69

Open
srmainwaring opened this issue Sep 28, 2022 · 5 comments
Open

Linear potential wave-body model #69

srmainwaring opened this issue Sep 28, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@srmainwaring
Copy link
Owner

srmainwaring commented Sep 28, 2022

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

  • Buoyancy
  • Linear hydrostatic restoring forces
  • Wave radiation damping
  • Wave radiation added mass
  • Wave excitation

Waves

  • No waves (decay tests)
  • Regular waves, single frequency
  • Regular waves, multi-frequency
  • Random waves, multi-frequency (FFT methods)

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 srmainwaring self-assigned this Sep 28, 2022
@srmainwaring srmainwaring added the enhancement New feature or request label Sep 28, 2022
@srmainwaring
Copy link
Owner Author

srmainwaring commented Sep 28, 2022

Ellipsoid buoy test case

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

  • semi-axis: x=5.0m, y=5.0m, z=2.5m
  • mass: 134200kg
  • moments: Ixx=838750, Iyy=838750, Izz=1342000 kg m^2
  • water plane origin at (0, 0, 0)m, link origin at (0, 0, 0)m, CoM at (0, 0, -2.0)m, CoB at (0, 0, -0.935)m
  • BEM coefficients calculated using Capytaine and converted to WEC-Sim HDF5 using bemio.

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

  • Buoyancy
  • Linear hydrostatic restoring

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

01_4_ellipsoid_f5244_fhs_3m_45deg_480p.mov

01_4_ellipsoid_f5244_fhs_3m_45deg

Radiation damping and added mass

Forces

  • Buoyancy
  • Linear hydrostatic restoring
  • Wave radiation damping
  • Wave radiation added mass

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.

02_6_ellipsoid_f5244_fhs_frd_fam_3m_45deg_480p.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

  • Buoyancy
  • Linear hydrostatic restoring
  • Wave radiation damping
  • Wave radiation added mass
  • Wave excitation

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.

03_2_ellipsoid_f5244_fhs_fex_frd_fam_0m_480p.mov

03_2_ellipsoid_f5244_fhs_fex_frd_fam_0m_v2

@srmainwaring srmainwaring changed the title Linear wave-body model Linear potential wave-body model Oct 5, 2022
@lambert-gradientmarine
Copy link

This is excellent work and am encouraged by the incorporation of true added mass, damping, and excitation forces. What is the latest development of the linear wave-body model and what is the best way to get a working copy of the latest test case?

@srmainwaring
Copy link
Owner Author

srmainwaring commented Nov 5, 2024

What is the latest development of the linear wave-body model and what is the best way to get a working copy of the latest test case?

Hi @lambert-gradientmarine, there hasn't been any further development for a while as I've been focussing on other projects. The most up to date version of the code is in this branch: master...wips/demo/wip-lwb-nonlinear-fk.

There are additional documents in this branch explaining the model and implementation. In brief it adds corrections to the Jacques Kerner 'game model' implemented in the main branch so that the hydrodynamics correspond to a non-linear Froude-Krylov model, and does so for the Tessendorf style FFT wave field.

The model isn't particularly needed for providing a simulation environment for testing control algorithms on small watercraft. It is more relevant for larger objects such as wave buoys and ships. If there was sufficient interest this could be picked up again.

@lambert-gradientmarine
Copy link

Thanks @srmainwaring, I will look into this particular branch. If there are any extra compilation steps outside of the master, please let me know.

The aim to validate a virtual environment for these larger objects, including both buoys and ships. Eventually, a quasi-steady model that implements submergence-depth varied hydrodynamic parameters would be interesting. this would include the reduction in added mass as the object approaches the free-surface.

@lambert-gradientmarine
Copy link

Thanks @srmainwaring, I will look into this particular branch. If there are any extra compilation steps outside of the master, please let me know.

The aim to validate a virtual environment for these larger objects, including both buoys and ships. Eventually, a quasi-steady model that implements submergence-depth varied hydrodynamic parameters would be interesting. this would include the reduction in added mass as the object approaches the free-surface.

I have tried to compile the wip-lwb-nonlinear-fk branch but receive this error when attempting to run the spheroid_test1a.sdf case.

<<gz sim server: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:366: Eigen::DenseCoeffsBase<Derived, 1>::Scalar& Eigen::DenseCoeffsBase<Derived, 1>::operator()(Eigen::Index, Eigen::Index) [with Derived = Eigen::Matrix<double, 6, 1>; Eigen::DenseCoeffsBase<Derived, 1>::Scalar = double; Eigen::Index = long int]: Assertion `row >= 0 && row < rows() && col >= 0 && col < cols()' failed.>>

I am unable to find the source of this error.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants