WEC-Sim Applications

The WEC-Sim Applications repository contains many more applications of the WEC-Sim code that demonstrate WEC-Sim Advanced Features. This includes tutorials by the WEC-Sim team as well as user-shared examples and covers topics such as body interactions, numerical set-up, batch runs, visualization, control examples, mooring and more. These applications highlight the versatility of WEC-Sim and can be used as a starting point for users interested in a given application. It is highly recommended that users go through an application case along with the relevant advanced feature section when learning to implement a new WEC-Sim feature. The WEC-Sim Applications repository is included as a submodule of the WEC-Sim repository. The applications are summarized below.

Body-to-Body Interactions

Example using Body-to-Body (B2B) to run WEC-Sim for the RM3 geometry. The scripts run and plot the RM3 model with B2B on/off and with Regular/RegularCIC. Execute the runB2B.m script to run this case.

Controls

Examples using Controllers. Examples of WEC-Sim models using various control methods are included for the RM3 float geometry. These examples include passive, reactive, latching, declutching, and model predictive control methods.

Desalination

Example using WEC-Sim for desalination based on the OSWEC geometry. Note the dependency on SimScape Fluids to run this desalination case.

Free Decay

Example using WEC-Sim to simulate free decay of a sphere in heave, using Multiple Condition Runs. Execute the runFreeDecay.m script to run this case.

Generalized Body Modes

Example using Generalized Body Modes in WEC-Sim. In this application a barge is allowed four additional flexible degrees of freedom. Note that this requires the BEM solver also account for these general degrees of freedom and output the appropriate quantities required by BEMIO.

Mooring

One example using the RM3 geometry coupled with MoorDyn to simulate a more realistic mooring system. And another example modeling the RM3 with a Mooring Matrix. The MoorDyn application consists of 3 catenary mooring lines attached to floating buoys and then to different points on the spar and anchored at the sea floor.

Multiple Condition Run

Example using Multiple Condition Runs to run the RM3. These examples demonstrate each of the 3 different ways to run WEC-Sim with MCR and generates a power matrix for each PTO damping value. The last example demonstrates how to use MCR to vary the imported sea state test file and specify corresponding phase. Execute wecSimMCR.m from the case directory to run an example.

  • MCROPT1: Cases defined using arrays of values for period and height.

  • MCROPT2: Cases defined with wave statistics in an Excel spreadsheet

  • MCROPT3: Cases defined in a MATLAB data file (.mat)

  • MCROPT4: Cases defined using several MATLAB data files (*.mat) of the wave spectrum

Nonhydrodynamic Body

Example using Non-Hydro Body to run WEC-Sim for the OSWEC. This example models the base as a nonhydro body, and the flap as a hydrodynamic body.

Nonlinear Hydrodynamic Body

Example using Nonlinear Hydro to run WEC-Sim for a heaving ellipsoid. Includes examples of running nonlinear hydrodynamics with different fixed and variable time-step solvers (ode4/ode45), and different regular wave formulations (with/without CIC). Execute the runNL.m script to run this case.

Paraview Visualization

Example using ParaView data visualization for WEC-Sim coupled with MoorDyn to simulate a more realistic mooring system for the RM3 geometry. Example consists of 3 catenary mooring lines attached to different points on the spar and anchored at the sea floor.

Example using ParaView data visualization for WEC-Sim with Nonlinear Hydro for the Flap and a Non-Hydro Body for the Base to run WEC-Sim for the OSWEC geometry.

Passive Yaw

Example on using Passive Yaw to run WEC-Sim for the OSWEC geometry. Execute the runYawCases.m script to run this case.

PTO-Sim

Examples using PTO-Sim. Examples of WEC-Sim models using PTO-Sim are included for the RM3 geometry and OSWEC geometry.

RM3 PTO Extension

Examples on using the PTO Extension advanced feature to set-up an initial displacement of the RM3 easily. This geometry is a special case with a large DOF in which different WEC bodies can be identified as the PTO mechanism with a cooresponding position change when setting the PTO Initial Displacement.

Visualization Markers

Examples of WEC-Sim with Wave Elevation visualization at User-Defined Locations. The setup for the visualization can be found at Advanced Features <https://github.com/WEC-Sim/advanced_features>

WECCCOMP

Numerical model for the WEC Control Competition (WECCCOMP) using WEC-Sim to model the WaveStar with various fault implementations can be found in the WECCCOMP repository. See the project report written by Erica Lindbeck in the “report” folder.

Write HDF5

This is an example of how to write your own h5 file using MATLAB. Can be useful if you want to modify your coefficients, use experimental coefficients, or coefficients from another BEM code other than WAMIT, NEMOH, AQWA, or CAPYTAINE. For more details see BEMIO documentation.