Home
WEC-Sim User Manual
Contents
1. Flap body 1 Conn Base body 2 Conn Showing WEC SiniFrames Global Reference Frame Ready 250 ode45 Figure 6 9 Adding a Global Reference Frame block to the OSWEC WEC Sim model 42 Step 4 Place a fixed constraint block to connect the base to the seafloor This is done because the OSWEC base is fixed relative to the global reference frame Step 4 and 5 connections are shown in Figure 6 10 tala Pome cee Fle NE AAE JA CDd a 8 gop dv wo Momar QO Caren vecsmrros sao locas e Paloswec BIBFA BBFH BFE a mo ronan reiro oaa Conn a a Flap body 1 A Rotational PTO m Local RY pto 1 Conn bo Base B body 2 Jue y constraint 1 Conn A Global Reference Frame Showing WECSmPTOS Ready 250 odels Figure 6 10 Adding pto and constraint blocks to the OSWEC WEC Sim Simulink model Step 5 Place a rotational PTO block to connect the base to the flap This is done because the flap is restricted to pitch motion relative to the base For the OSWEC simulation the rotational PTO is used to model the WEC s PTO as a linear rotary damper The input parameters are defined in the OSWEC MATLAB Input File section Section 6 2 2 When setting up a WEC Sim model it is important to note the base and follower frames For example for the constraint between the base
2. WEC Sim Org WEC Sim New 1 E e o oO I 1 2 360 380 400 360 380 400 time s time s Figure 6 13 WEC Sim test plot for RM3 Full simulation top last six periods bottom 46 6 3 2 OSWEC Test Case For the OSWEC the test case is set up for direct comparison using the following model parameters Wave Environment Wave Type Regular Waves Sinusoidal Steady State Wave Height H m 2 5 Wave Period T sec 8 WEC Sim Simulation Settings Time Marching Solver Fourth Order Runge Kutta Formula Start Time sec 0 End Time sec 400 Time Step Size sec 0 1 Ramp Function Time sec 100 List of PTO s Number of PTOs 1 PTO Stiffness Nm rad 0 PTO Damping Nsm rad 0 I T WEC Sim Org WEC Sim New Pitch deg o 1 1 1 1 fi 1 1 o 50 100 150 200 250 300 350 400 time s Figure 6 14 WEC Sim test plot for OSWEC full simulation 47 Bibliography 1 13 Y Li and Y H Yu A Synthesis of Numerical Methods for Modeling Wave Energy Converter Point Absorbers Renewable and Sustainable Energy Reviews vol 16 no 6 pp 4352 4364 2012 A Babarit J Hals M Muliawan A Kurniawan T Moan and J Krokstad Numerical Benchmarking Study of a Selection of Wave Energy Converters Renewable Energy vol 41 pp 44 63 2012 C Lee and J Newman WAMIT User Manual Chestnut Hill MA USA 2006 ANSYS Aqwa
3. Figure shows the comparison of the JONSWAP spectrum obtained from the a fit and the ITTC description It is clear that the two methods have very good agreement 2 4 4 Ramp Function A ramp function Rf necessary to avoid strong transient flows at the earlier time steps of the simulation is used to calculate the wave excitation force The ramp function is given by R fa cos m E E lt 2 23 3 11 Wave Spectrum m s 0 0 1 0 2 03 0 4 0 5 0 6 0 7 Frequency 1 s Figure 2 4 Comparison of a fit to the ITTC description of the JONSWAP spectrum with Hmo 2 m and peak period Tp of 8 sec where t is the simulation time and t is the ramp time 2 5 Power Take off Forces The PTO mechanism is represented as a linear spring damper system where the reaction force is given by Fpro K proXre CproXret 2 24 where Kpro is the stiffness of the PTO Cpro is the damping of the PTO and X and Xe are the relative motion and velocity between two bodies The power consumed by the PTO is given by Pero FeroXra KproXraXra Cpro a 2 25 However the relative motion and velocity between two bodies is out of phase by 7 2 resulting in a time averaged product of 0 This allows the absorbed power to be written as Ppro CproX 2 26 12 2 6 Mooring Forces The mooring load is represented using a linear quasi static mooring stiffness which can be calculated by Fm KmX 2 27
4. lt pto name gt For rotational ptos Local RY the user also needs to set its location The users also have the option to specify the damping pto lt pto number gt c and stiffness pto lt pto number gt k values to represent the PTO system Both have a default value of 0 and the users can overwrite the default values in the input file For example the users can specify a damping value by entering the following pto lt pto number gt c lt pto damping value gt 34 Chapter 6 Applications In this section we describes how to use WEC Sim to model two different WECs The first application models a two body point absorber WEC and the second application models an OSWEC 6 1 Reference Model 3 Two Body Point Absorber 6 1 1 Geometry Definition As the first application of the WEC Sim code We selected the Reference Model 3 RM3 two body point absorber design Although the WEC is free to move in all 6DOF in response to wave motion power is captured in the relative heave direction The RM3 device was selectedonly because the design has already been well characterized both numerically and experimentally as a result of the DOE funded Reference Model Project more information on this project available at In addition the device has relatively simple operating principles and is representative of what WEC industry is currently pursuing RMB is a simple two body point absorber consisting of a float and a reaction plate The fu
5. Property Summary CiTime Convolution integral time default 60 s Cikt CTTime Convolution integral time series default dependent caseDir WEC Sim case directory default NOT DEFINED domainSize Size of free surface and seabed This variable is only used for visualization default 200 m at Simulation time step default 0 1 s endTime Simulation end time default 500 s explorer SimMechanics Explorer on or off default on a Acceleration due to gravity default 9 81 m s hydroDataWamit Equal to 1 if data from 1 WAMIT file Equal to 0 if data from more than 1 input file default 0 inputFile Name of WEC Sim input file default wecSiminputFile logFile maxit Total number of simulation time steps default dependent Clkt Calculate the number of convolution integral timesteps default dependent mode normal accelerator rapid accelerator default normal numConstraints Number of contraints in the wec model default NOT DEFINED numFreq Number of wave frequencies for interpolation default 201 numPtos Number of power take off elements in the model default NOT DEFINED numWecBodies make these dependent variables Number of hydrodynamic bodies that comprise the WEC device default NOT DEFINED outputDir Data output directory name rampT Ramp time for wave forcing default 100 s rho Density of water default 1000 kg m 3 simMechanicsFile Simuli
6. 4 PTOs sublibrary 4 5 2 Translation PTO Local X Block The Translation PTO Local X is identical to the Surge constraint but additionally applies a linear stiffness and damping coefficient to the connection The user has to name the PTOs as described earlier The user then specifies the stiffness coefficient in N m and damping coefficient in Ns m in the input file 4 5 3 Rotational PTO Local RY Block The Rotational PTO Local RY is identical to the Pitch constraint but adds a linear rotational stiffness and damping coefficient to the connection The user has to name the PTOs as described earlier The user then specifies the stiffness coefficient in Nm rad and damping coefficient in Nms rad in the input file 25 4 6 Other SimMechanics Blocks In some situations users may have to use SimMechanics blocks not included in the WEC Sim Library to build their WEC model One commonly used block is the Rigid Transform which can be used to rotate the frames on PTOs cconstraints and bodies This is also explained in the SimMechanics User s Guide 11 26 Chapter 5 Code Structure and Input Parameters This section describes the WEC Sim source code and the code structure For the purposes of this document we define the the source code as the MATLAB m files that read the user input data perform pre processing calculations that take place before the Simulink Sim Mechanics time domain simulations are performed 5 1 Units
7. All units within WEC Sim are in the MKS meters kilograms seconds system and angular measurements are specified in radians unless otherwise specified 5 2 WEC Sim Input File A WEC Sim input file is required for each run It MUST be placed inside the case directory for the run and MUST be named wecSimInputFile m Figure shows an example of the input file for a two body point absorber The input file contains information needed to run WEC Sim simulations Specifically it serves four primary functions each of which will be described in the following paragraphs 5 2 1 Specification of Simulation Parameters Within the input file the user specifies simulation parameters such as simulation duration and time step As shown in Figure 5 1 simulation parameters are specified within the simu variable which is a member of the simulationClass Users also specify the name of the Simulink SimMechanics WEC model within the simu variable The simulation parameters that are available for the user to set within the simulationClass are described in more detail in Section 5 3 1 5 2 2 Specification of Body Parameters WEC Sim assumes that every WEC devices is composed of rigid bodies that are exposed to wave forces For each body users MUST specify body properties within the body variable in the input file including mass moment of inertia center of gravity and the WAMIT files 27 that describe the hydrodynamic properties see Figure 5 1 The body pa
8. Explorer on off Wave Height m Wave Period s Specify Type of Waves Initialize bodyClass for Float Specify BEM solver Location of WAMIT x out file Mass from WAMIT kg Cg from WAMIT m Moment of Inertia kg m 2 Geometry File Initialize bodyClass for Spar Plate Specify BEM solver Location of WAMIT x out file Mass from WAMIT kg Cg from WAMIT m Moment of Inertia Geometry File kg m 2 Initialize Constraint Class o for Constraint Initialize ptoClass for PTOL PTO Stiffness Coeff N m PTO Damping Coeff Ns m Figure 6 5 WEC Sim input file for the RM3 point absorber RM3 WEC Sim Model Once the WEC Sim Simulink model is set up and the RM3 properties are defined in the MATLAB input file the user can then run the RM3 model in WEC Sim Figure 6 6 shows 39 the final RM3 Simulink model and the WEC Sim GUI during the simulation For more information on using WEC Sim to model the RM3 device refer to and 13 E Translational PTO a Local Z pto 1 Conn 3 y Plate body 2 H Floating ET constraint 1 Conn 4 Global Reference Frame Figure 6 6 RM3 modeled in WEC Sim left hand side and with the GUI right hand side 6 2 Oscillating Surge Pitch Device 6 2 1 Geometry Definition As the second application of the WEC Sim code the oscillating surge WEC OSWEC device We selected the OSWEC because its design is fun
9. Heave Bloeck a a g 2 Ob Ae Rp en OR Oe ee Ee OE Eee E AE 44A Pitch A ek be ee Oe oe eee ee ee ek bee 4 4 5 Fixed EI 4 5 PTOs Sublibrary s 36 4 III 4 5 1 Translation PTO Local Z Block 644 44 Gaede pe ee eee 4 5 2 Translation PTO Local X Block 4404 0 aa 4 5 3 Rotational PTO Local RY Block ga 00000 IDO Ripa w Ww bo 14 14 15 15 16 18 19 4 6 Other SimMechanics Blocks 0 0 000000000000000 4 26 5 Code Structure and Input 27 A 2 ees ak ee este A SRE Go Gr ahs Bas a oe i ee 27 goes ee a ee a Be ee Ge ee Gn ee Gas 27 AAA 27 SA Bee ae eee 27 ode eh eae fi hoes Ge ees es a S 29 eee 29 5 3 WEC Sim Gadea 29 0 3 1 SimulationClass 0 0 00000 eee ee eee 29 coca ee ee e S 30 if Sb Ke Oe Re ae Ra ee ee ee ke ae le 32 D34 CONStPaAINtCCLAS S lt lt sia y a ace Bees a ee ew ee ee A 33 aes he ee Be Le eG oe As 34 35 he td eth A ae 4 wd 35 Nee te eee eee te gee te eee 35 eee ee eye ees Be ae es 36 wy Gh a he ee eee eS ae en ee 40 foe Mo Bebe er Ge oes a a ees a A 40 se Ste ey a es ee eee ee ee aa 40 6 3 WEC Sim Test Cases 0 a aa a a a a 45 6 3 1 RM3 Test Casal 45 6 3 2 OSWEC Test Case 2 a 47 Chapter 1 Introduction WEC Sim Wave Energy Converter SIMulator is an open source wave energy converter WEC simulation tool The code is developed in MATLAB and Simulink using the multi body dynamics solver SimMechanics WEC Sim has the ability to
10. Online Available http www ansys com Products Other Products ANSYS AQWA Nemoh a Open source BEM Online Available http openore org tag nemoh J D Nolte and R C Ertekin Wave power calculations for a wave energy conversion device connected to a drogue Journal of Renewable and Sustainable Energy vol 6 no 1 2014 W Cummins The Impulse Response Function and Ship Motions David Taylor Model Dasin DTNSRDC Tech Rep 1962 W J Pierson and L A Moskowitz Proposed Spectral Form for Fully Developed Wind Seas Based on the Similarity Theory of S A Kitaigorodskii Geophysical Research vol 69 pp 5181 5190 1964 K Hasselman T P Barnett E Bouws H Carlson D E Cartwright K Enke J A Ewing H Gienapp D E Hasselmann P Kruseman A Meerburg P Mller D J Olbers K Richter W Sell and H Walden Measurements of wind wave growth and swell decay during the Joint North Sea Wave Project JONSWAP German Hydrographic Institute Tech Rep 12 1973 MATLAB Online Available http http www mathworks com MATLAB SimMechanics Link User s Guide R2014a 2014 Kelley Ruehl Carlos Michelen Samuel Kanner Michael Lawson and Y Yu Prelim inary verfification and validation of WEC Sim and open source wave energy converter design tool in Proceedings of OMAE 2014 San Francisco CA 2014 Y Yu Michael Lawson Kelley Ruehl and Carlos Michelen Develo
11. accelerator rapid accelerator P output 7 simu explorer on gt geometry 8 simu hydroDataWamit 1 9 Case 10 Wave Information ana waves H 2 5 Directory a2 waves T 8 13 waves type regular 4 14 15 Body Data 16 bodv 1 bodvClass Float Command Line Window Details A Ready Figure 3 4 An example of running WEC Sim 3 2 3 Simulation Outputs All simulation outputs are saved in the output variable within the MATLAB workspace Specifically the output variable contains forces and motions of the WEC bodies PTSs and constraints The output data file also contains time step information from the simulation At the completion of a simulation WEC Sim also saves all simulation data in the output directory within the WEC Sim case file in three data files lt case name gt _simulationLog txt This ascii text file contains all information displayed in the MATLAB command window during a simulation lt caseName gt _output mat This MATLAB data file contains forces and motions of the WEC bodies PTSs and constraints The data file also contains time step information from the simulation lt caseName gt _matlabWorkspace This MATLAB data file contains all workspace variables from the simulation Note that this variable also contains the output mat data in a variable named output 18 3 2 4 Postprocessing using User Defined Functions UDFs Just before completion of a simulation WE
12. and the seabed the seabed should be de fined as the base because it is the Global Reference Frame OSWEC MATLAB Input File In this section the WEC Sim MATLAB input file wecSimInputFile m for the OSWEC model is defined Each of the lines are commented to explain the purpose of the defined parameters For the OSWEC model the user must define the simulation parameters body properties PTO and constraint definitions Each of the specified parameters for OSWEC are defined below The specified input parameters for RM3 are shown in Figure 6 11 43 o Simulation Data simu startTime 0 Simulation Start Time s simu endTime 400 Simulation End Time s simu dt 0 1 Simulation Delta_Time s simu simMechanicsFile OSWEC s1x Specify Simulink Model File simu mode normal Specify Simulation Mode o normal accelerator rapid accelerator Turn SimMechanics Explorer on off A simu explorer on o Wave Information waves H 2 5 waves T 8 waves type Wave Height m Wave Period s Specify Type of Waves JP Ae al regular Body Data body 1 bodyClass Flap Initialize bodyClass for Flap body 1 hydroDataType wamit Specify BEM solver body 1 hydroDataLocation Location of WAMIT out file g wamit oswec out body 1 mass 127000 User Defined mass kg body 1 cg wamit Cg from WAMIT m body 1 momOfIn
13. constraint variables that are instances of the simulationClass bodyClass wavesClass and jointClass objects respectively These objects are created in The user can interact with these variables within the WEC Sim input file wecSimInputFile m see Figure B 1 The remainder of this section describes the data within the WEC Sim objects and how to interact with the objects to set relevant simulation input parameters Examples of using WEC Sim to simulate WEC devices and input files are described in Chapter 6 5 3 1 simulationClass The simulationClass contains the simulation parameters and solver settings needed to exe cute WEC Sim The user can set the relevant simulation properties in the wecSimInputFile m The user MUST specify the name of the Simulink SimMechanics WEC model which can be set by entering the following command in the input file simu simMechanicsFile lt WEC Model Name gt slx By doing nothing users have the option of accepting the default values for all the other simulation parameters Available simulation properties and the default values for each shown in Figure can be explored further by typing doc simulationClass from within the MATLAB Command Window The users can also specify simulation parameters and solver settings in the input file to overwrite the default values For example the end time of a simulation can be set by entering the following command simu endTime lt user specified end time gt 29
14. height irregular waves default 1 s Wave period regular waves or peak period irregular waves default 8 make dependent Number of wave frequencies from WAMIT Period of BEM simulation used to determine hydrodynamic coefficients for simulations with no wave This option is only used with the noWave wave type make dependent Number of interpolated wave frequencies default NOT DEFINED rad Random wave phase only used for irregular waves Type of wave spectra Only PM BS JS and Imported spectra are supported Data file that contains the spectrum data file Wave type Options for this varaibale are noWave no waves regular regular waves regularClC regular waves using convolution integral to calculate radiation effects irregular irregular waves irregularPRE irregular waves with pre defined phase The default is regular make dependent Number to represent different type of waves make dependent rad s Wave frequency regular waves or wave frequency vector irregular waves make dependent m Water depth from WAMIT m Wave elevation time history Figure 5 4 Data contained within the waveClass 5 3 5 ptoClass The pto object extracts power from body motion with respect to a fixed reference frame or another body The pto objects can also constrain motion to certain degrees of freedom The pto variable should be initiated by entering pto lt pto number gt ptoClass
15. of Energy Efficiency and Renewable Energy operated by the Alliance for Sustainable Energy LLC under contract No DE AC36 08GO28308 2Sandia National Laboratories is a multi program laboratory managed and operated by Sandia Corpo ration a wholly owned subsidiary of Lockheed Martin Corporation for the U S Department of Energys National Nuclear Security Administration under contract DE AC04 94AL85000 Contents 1 Introduction 2 Theory 2 1 tru 2 2 Boundary Element Method 124 pos e de e A goa oe eee GG oe 2 4 Time Domain Numerical Method 00 0000 aed Anh Hoan eh PELE a as nh oe ees ae st 2 4 3 Wave Spectrumf lt a eii a ou RSE EEO REE RSS See G A ae A ae eee ee SS ec once 2 5 Power Take off Forces a a a a a Re ones Ge Be egy Gere ee ee ea SP Ge ee th nee el VISCOUS Drag oe a kG RAS READS REREE A KREGER ES 3 Getting Started den A a a i ee ee ee 3 2 1 File Structure Overview e ie ria eerie a Ge ee ee oa 3 2 3 Simulation Outputs 3 2 4 Postprocessing using User Defined Functions UDFs Rara es a 4 2 Body Elements Sublibrary sico KOE LE RPS COSA DE eS 4 2 1 Rigid Body Block 4 4424 46 i4dR sierras BE DEG 4 3 Frames DUDNDTALY grs sies 2 tec de p wae Se we CGR a 4 3 1 Global Reference Frame Block 4 4 Constraints Sublibrary cosucias ars bee ee bee te ee eee ee 4 4 1 Floating Bloch 44 s 64 44 eee ee eee Ea ee ae es 4 4 2
16. peak wave period The irregular excitation force can be calculated as the real part of an integral term across all wave frequencies as follows Fog R Ry VIS Elie a Ado 2 5 0 where S is the wave spectrum and is a random phase angle PM Spectrum forHs 2 rn and Tp 10 s Wave Surface Elevation r T T T T T 5 Im H2 nim o L E 1 1 1 0 3 4 T 0 20 40 60 80 100 120 Frequency Hz Time 3 Figure 2 3 An example of wave spectrum and irregular wave elevation generated by WEC Sim Pierson Moskowitz spectrum 2 4 3 Wave Spectrum The ability to generate regular waves provides an opportunity to observe the response of a model under specific conditions Sea states with constant wave heights and periods are rarely found outside wave tank test Normal sea conditions are more accurately represented by random wave time series that model the superposition of various wave forms with differ ent amplitudes and periods This superposition of waves is characterized by a sea spectrum Through statistical analysis spectra are characterized by specific parameters such as signif icant wave height peak period wind speed fetch length and others The common types of spectra that are used by the offshore industry are discussed in the following sections The general form of the sea spectrums available in WEC Sim is given by S f Af exp Bf 2 6 where f is the wave frequency in Her
17. the WEC Sim source code directory referred to as wecSimSource in this document Copy the code in the wecSimStartup m file and paste it into the startup m file within the Set the wecSimPath variable to the location of the wecSimSource folder on your com puter Close MATLAB restart the code and then run the path command from the MAT LAB Command Window to verify that that the directories listed in wecsim path setup m are in the Step 4 Add the WEC Sim Blocks to the Simulink Library Browser Open the Simulink Library Browser by typing simulink from the MATLAB Command Window Once the Simulink Library Browser opens select View gt Refresh Tree View At this point you should be able to expand the WEC Sim menu in the Libraries pane to view the WEC Sim Body Constraints PTOs and Frame blocks The function of these blocks will be explained in From now on every time you open Simulink in the WEC Sim Library Browser the WEC Sim Body Elements Constraints PTOs and Frames blocks will be available For more help using and modifying library blocks please refer to the Simulink Documentation http www mathworks com help simulink 3 2 Running WEC Sim This section gives an overview of the WEC Sim work flow and how to run WEC Sim Here we describe the file structure of the WEC Sim runs and the steps for setting up and running a WEC Sim simulation Detailed descriptions and options for input parameters for the input file are described in Specific exampl
18. C Sim looks for a MATLAB m file named userDef inedFunctions m within the WEC Sim case directory If the file exist and WEC Sim executes any commands within this m file The user can add code to this m file to per form common post processing tasks before the simulation exits One example would be to plot the device motions and forces acting on the bodies and joints of a WEC device The RM3 test case provides an example of how to plot force and response using user defined functions Note that the user can perform any calculation desired within the userDefinedFunctions m and the user has access to all data within the MATLAB workspace 19 Chapter 4 Library Structure 4 1 Library Structure Overview The WEC Sim library is divided into 4 sublibraries The user should be able to model their WEC device using the available WEC Sim blocks and possibly some SimMechanics blocks Table 4 1 lists the WEC Sim blocks and their organization into sublibraries Table 4 1 WEC Sim library structure WEC Sim Library Sublibrary Blocks Body Elements Rigid Body Frames Global Reference Frame Heave Pitch Constraints Surge Fixed Floating Rotational PTO Local RY PTOs Translational PTO Local X Translational PTO Local Z In the following sections we will describe the four sublibraries and their general purpose The Body Elements sublibrary contains the Rigid Body block used to simulate the different bodies The Frames sublibrary contai
19. TLAB R2014a and we recommend using this MATLAB version In this chapter we describe how to download and install WEC Sim Section 3 1 and how to run a WEC Sim simulation Section 3 2 3 1 Downloading and Installing WEC Sim Step 1 Install MATLAB Download and install MATLAB and the MATLAB toolboxes presented in Table 3 1 Ensure you have the required toolboxes installed by running the ver command from the MATLAB Command Window Figure 3 1 Consult the MathWorks website http www mathworks com for more information on performing this step MATLAB Version 8 3 0 532 R2014a MATLAB License Number 653557 Operating System Mac OS X Version 10 9 3 Build 13D65 Java Version Java 1 7 0_11 b21 with Oracle Corporation Java HotSpot TM 64 Bit Server VM mixed mod MATLAB Version 8 3 R2014a Simulink Version 8 3 R2014a SimMechanics Version 4 4 R2014a Simscape Version 3 11 R2014a fe gt gt Figure 3 1 Running the ver command from the MATLAB Command Window Step 2 Download WEC Sim Download WEC Sim from the OpenEI website http en openei org wiki WEC Sim Table 3 1 Required MATLAB toolboxes Matlab package Required release MATLAB Base R2014a Version 8 3 Simulink R2014a Version 8 3 Sim Mechanics R2014a Version 4 4 Simscape R2014a Version 3 11 14 Step 3 Add the WEC Sim Source Code to the MATLAB Search Path Open the wecSimStartup m file that is located in the functions folder within
20. UST be output at the center of gravity In ad dition the user needs to specify the 3 D geometry file in the form of a lt STL file name gt stl file with the origin of the coordinate system at the center of gravity for the WEC Sim visu alizations For the RM3 run consisting of a buoy and a spar plate these files correspond to the float stl and plate stl files respectively which are located in the geometry subfolder RM3 Simulink Model File The first step to initiate a WEC Sim simulation is to create the Simulink model file by dragging and dropping blocks from the WEC Sim library into the lt WEC model name gt slx file see for more details Step 1 Place two Rigid Body blocks from the WEC Sim library in the Simulink model file one for each RM3 rigid body as shown in Figure Step 2 Double click on the Rigid Body block and rename the instances of the body The first body should be titled body 1 and the second body should be titled body 2 36 Additional properties of these body blocks are defined in the following Input File section Section 6 1 2 RM3 MATLAB BB Simulink Library Browser Ele Edit Vies MO en MOS Library WEC SimfBedy Eements Search Rasuts none Frequenty Ussa ee arme Conn Rigid Bedy RMS le Edit Mew Depay Diagram Simulabon Analysis Code Tools Help bajan Buds BodyElements mask link This block represents a rigid
21. WEC Sim USER MANUAL Version 1 0 June 30 2014 License Copyright 2014 the National Renewable Energy Laboratory and Sandia Corporation Licensed under the Apache License Version 2 0 the License you may not use this file except in compliance with the License You may obtain a copy of the License at http www apache org licenses LICENSE 2 0 Unless required by applicable law or agreed to in writing software distributed under the Li cense is distributed on an AS IS BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied See the License for the specific language governing permissions and limitations under the License Acknowledgments WEC Sim is a multilaboratory project sponsored by the U S Department of Energy s Wind and Water Power Technologies Office WEC Sim code development is a collaboration be tween the National Renewable Energy Laboratory NREL land Sandia National Laborato ries SNLP Principal Developers Kelley Ruehl SNL Michael Lawson NREL Carlos Michelen SNL Yi Hsiang Yu NREL Contributors Nathan Tom NREL Adam Nelessen Georgia Tech Sam Kanner University of Chris McComb Carnegie California at Berkeley Mellon University U S DEPARTMENT OF ENERGY sie E ENREL andia National gt Laboratories NATIONAL RENEWABLE ENERGY LABORATORY The National Renewable Energy Laboratory is a national laboratory of the U S Department of Energy Office
22. and mooring forces are calculated 4 3 Frames Sublibrary The Frames sublibrary shown in Figure contains one block that is necessary in every model The Global Reference Frame block defines global references and can be thought of as the seabed 4 3 1 Global Reference Frame Block The Global Reference Frame block defines the solver configuration seabed and free surface description simulation time and other global settings It can be useful to think of the Global Reference Frame as being the seabed when creating a model Every model requires one 21 instance of the Global Reference Frame block The Global Reference Frame block uses the simulation class variable simu and the wave class variable waves which must be defined in the input file File Edit View Help a O gt Entersearchterm v Qi eS Library WEC Sim Frames Conn JE 4 Pa WEC Sim Global Reference Frame Body Elements Constraints Frames PTOs Showing WEC Sim Frames Figure 4 2 Frames sublibrary 4 4 Constraints Sublibrary The blocks within the Constraints sublibrary shown in Figure are used to define the DOF of a specific body Constraints blocks define only the DOF but do not otherwise apply any forcing or resistance to the body motion Each Constraints block has two connections a base B and a follower F The Constraints block restricts the motion of the block that is connected to the follower relative to
23. body The variable name input below where i 1 2 Parameters Body Name Conn Float body 1 Conn A Plate body 2 Showing WEC SimiBody Elements Ready 189 Figure 6 2 Adding two Rigid Body blocks to the RM3 WEC Sim model Step 3 Place the Global Reference Frame from the WEC Sim library in the Simulink model file as shown in Figure The global reference frame acts as the seabed to which all other bodies are linked through joints or constraints B Simulink Library Browser file Edit View Help fa I gt Entersearch term MA Library WEC Siriframes Seerch Resuts rone Frequenty Used Saa file Edit View Display Diagem Simulation Analysis Code Tools Help Plate body 2 Rk A m2 B Od O uo mu Y an a paje y a a Conn E Float a body 1 Conn E Global Reference Frame Showing WEC SimiFranes Ready 180 Figure 6 3 Adding the Global Reference Frame block to the RM3 WEC Sim model 37 Step 4 Use the Floating constraint block to connect the plate to the seabed This is done because the RM3 is free to move in all 6 DOF relative to the global reference frame Step 4 and 5 connections are shown in Figure alas slay Disgrem Simulation Analyss Code Jools Help 15 0 E 49D 02 toma gt Such Rests pen r
24. cment of cog axis of rotation used for decay tests format x y z default 1 O 0 dd a Initial displacment of center fo gravity used for decay tests format displacment in m default 0 0 initLinDisp 0 mass Body mass options wamitDisplacment or mass default wamitDisplacement massCalcMethod Method of calculating the center of gravity default dependent momOfinertia Moment of inertia format Ixx lyy Izz default 999 999 999 mooring Data structure that contains the mooring stiffness and damping matrices name Name of the body used default NOT DEFINED storage Structure to store simulation data for post processing Figure 5 3 Data contained within the bodyClass 31 9 3 3 waveClass The waveClass contains all the information that defines the wave conditions for the time domain simulation Specifically Table 5 1 lists the types of wave environment that is sup ported by WEC Sim Table 5 1 List of supported wave environments Option Additional required inputs Description waves type Free decay test with noWave waves noWaveHydrodynamicCoeffT constant hydrodynamic coefficients waves type Free decay test with noWaveCIC None convolution integral waves type waves H Sinusoidal steady state regular waves T Reponse Scenario waves type waves H Regular waves with regularCIC waves T convolution integral waves type waves H waves T Irregu
25. damentally different from the RM3 This is critical because WECs span an extensive design space and it is important to model devices in WEC Sim that operate under different principles The OSWEC is fixed to the ground and has a flap that is connected through a hinge to the base that restricts the flap to pitch about the hinge The full scale dimensions of the OSWEC are shown in Figure and the mass properties are defined in Table 6 2 6 2 2 Modeling OSWEC in WEC Sim In this section we provide a step by step tutorial on how to set up and run the OSWEC simulation in WEC Sim As described in Chapter 3 all WEC Sim models consist of a input file wecSimInputFile m and a Simulink model file OSWEC s1x The WAMIT hydrodynamic results were also pre 40 generated The WAMIT output file corresponds to the oswec out file contained in the wamit subfolder In addition the user needs to specify the 3 D geometry file in the form of a lt WEC model name gt stl file about the center of gravity for the WEC Sim visualizations For the OSWEC run consisting of a flap and a base these files correspond to the flap stl and base stl files respectively which are located in the geometry subfolder m 18 mm Figure 6 7 OSWEC pitching device full scale dimensions Table 6 2 OSWEC pitching device full scale mass properties gry Full Scale Properties Pitch Moment of Inertia kg m o 227 000 2 850 000 OSWEC Simulink Model File The first s
26. e X and Z axis and rotation about the Y axis Its most common use is for a rigid body fixed to the seabed 4 5 PTOs Sublibrary The PTOs sublibrary shown in Figure is used to simulate simple PTO systems and to restrict relative motion between multiple bodies or between one body and the seabed The PTO blocks can simulate simple PTO systems by applying a linear stiffness and damping to the connection Similar to the Constraints blocks the PTO blocks have a base B and a follower F Users MUST name each PTO block pto i where i 1 2 and then define their properties in the input file 4 5 1 Translation PTO Local Z Block The Translation PTO Local Z is identical to the Heave constraint but applies a linear stiffness and damping coefficient to the connection The user has to name the PTOs as described earlier The user then specifies the stiffness coefficient in N m and damping coefficient in Ns m in the input file 24 l Simulink Library Browse X File Edit View Help Ba Enter search term v Ma Libraries Library WEC Sim PTOs Search gt gt Pa Simulink i l HDL Coder l fal Simscape Simulink 3D Animation E gt Pal Simulink Coder B F gt Pal Simulink Extras Stateflow Pal WEC Sim Rotational PTO Local RY Body Elements Constraints Translational PTO Local X Frames Translational PTO Local Z Showing WEC Sim PTOs Figure 4
27. emera ed BF BF E o E 4 3 B F 3 O Losi RY Traraltional PTO Local gt Translational PTO Local Z BHU s o sl lz ED ey le Float body 1 l Translational PTO Local Z pto 1 Plate body 2 Floating YT constraint 1 nn Glokal Reference Frame A w 180 Figure 6 4 Adding the pto and constraint blocks to the RM3 WEC Sim Simulink model Step 5 Placea Translational PTO Local Z PTO block to connect the float to the spar This is necessary because the float is restricted to heave motion relative to the plate For the RM3 simulation the translational PTO block is used to model the WEC s PTO as a linear damper The parameters are defined in the RM3 MATLAB Input File section Section 6 1 2 When setting up a WEC Sim model it is important to note the base and follower frames For example for the constraint between the plate and the seabed the seabed should be de fined as the base because it is the Global Reference Frame Similarly for the PTO between the float and the plate the plate should be defined as the base RM3 MATLAB Input File In this section we define the WEC Sim MATLAB input file for the RM3 model Each of the lines are commented to explain the purpose of the defined parameters For the RM3 model the user must define the
28. eration vector of the device m is the mass matrix Fert is the wave excitation force vector Fraa is the force vector resulting from wave radiation Fpro is the PTO force vector F is the viscous damping force vector Fg is the net buoyancy restoring force vector and Fm is the force vector resulting from the mooring connection Both Fo and Fraa are calculated from values provided by the frequency domain BEM solver The radiation term includes an added mass and wave damping term associated with the ac celeration and velocity of the floating body respectively The wave excitation term includes a Froude Krylov force component generated by the undisturbed incident waves and a diffrac tion component that results from the presence of the floating body WEC Sim can be used for regular and irregular wave simulations but note that Fest and Fog are calculated differently for sinusoidal steady state response scenarios and random sea simulations The sinusoidal steady state response is often used for simple WEC designs with regular incoming waves However for random sea simulations or any simulations where fluid memory effects of the system are essential the convolution integral method is recommended to represent the fluid memory retardation force on the floating body 2 4 1 Sinusoidal Steady State Response Scenario This approach assumes that the system response is in sinusoidal steady state form and is only valid for regular wave simulations The radia
29. ertia 1 85e6 1 85e6 1 85e6 Moment of Inertia kg m 2 body 1 geometry geometry flap stl Geometry File body 2 bodyClass Base Initialize bodyClass for Base body 2 hydroDataType wamit Specify BEM solver body 2 hydroDataLocation Location of WAMIT out file Jl wamit oswec out body 2 geometry geometry base stl body 2 fixed 1 Geometry File Creates Fixed Body A ol o PTO and Constraint Parameters constraint 1 Initialize ConstraintClass constraintClass Constraint1 for Constraintl pto 1 ptoClass PTO1 Initialize ptoClass for PTOI pto 1 k 0 PTO Stiffness Coeff Nm rad pto 1 c 0 PTO Damping Coeff Nsm rad pto 1 loc 0 0 8 9 PTO Global Location m Figure 6 11 WEC Sim input file for the OSWEC OSWEC WEC Sim Model Once the WEC Sim Simulink model is set up and the OSWEC properties are defined in the MATLAB input file the user can then run the OSWEC model in WEC Sim Figure 6 12 shows the final OSWEC Simulink model and the WEC Sim GUI showing the OSWEC during the simulation For more information on using WEC Sim to model the OSWEC 44 device refer to 13 and 14 pog Ka Globes Aeae Seabed Figure 6 12 OSWEC modeled in WEC Sim left hand side and with the GUI right hand side 6 3 WEC Sim Test Cases Provided within the applications folder in the WEC Sim directory are the two applications of the WEC Sim c
30. es of using WEC Sim to simulate WEC devices are presented in 3 2 1 File Structure Overview Table 3 2 shows the default file structure for WEC Sim All the necessary files for running WEC Sim are located within a user defined folder referred to herein as the WEC Sim case folder or case directory Table 3 2 Default files names and their locations File name Location Input file wecSimInputFile m Case directory WEC Model WEC Model Name slx Case directory WAMIT WAMIT File Name out wamit Geometry STL File Name stl geometry 15 3 2 2 Steps To Run WEC Sim The overview of the WEC Sim work flow is shown in Figure We describe the steps in setting up and running a WEC Sim simulations in the following Step 1 Pre Processing Run WAMIT to generate the hydrodynamic coefficients for each body of the WEC device WEC Sim will read the WAMIT generated hydrodynamic coefficients from the WAMIT out put file lt wamit file name gt out To ensure that WEC Sim uses the correct hydrodynamic coefficients to model the WEC system the center of gravity for each body MUST be at the origin of the body coordinate system XBODY in WAMIT Note that the current version of WEC Sim does not account for the multidirectional wave heading and WEC Sim will use whatever wave heading was modeled in WAMIT More details on WAMIT setup are given in the WAMIT User Manual 3 Next the user must create representations of the WEC bodies in
31. he case of the Heave block connecting two bodies the relative motion of the two bodies is constrained to be only along their Z axes The Z axis of the follower and base will always be parallel and their perpendicular distance will be constant The actual direction of movement of the follower depends on the orientation of the base 23 4 4 3 Surge Block The Surge block constrains the motion of the follower relative to the base to be along the X axis If the base is connected to the Global Reference Frame seabed the body is allowed to move only in the horizontal X direction If Surge block is connects two bodies the relative motion of the two bodies is constrained to be only along their X axes The X axis of the follower and base will always be parallel and their perpendicular distance will be constant The actual direction of movement of the follower depends on the orientation of the base 4 4 4 Pitch Block The Pitch block constrains the relative motion between the follower and the base to be pitch rotation only about the Y axis The distance from both body fixed coordinate systems to the point of rotation stays constant The orientation of both body fixed Y axes also stays constant The user MUST enter the point about which the rotation occurs as the constraint s location in the input file 4 4 5 Fixed Block The Fixed block is a rigid connection that constrains all motion between the base and follower It restricts translation in th
32. hodology for WEC Sim 2 2 Boundary Element Method A common approach to determining the hydrodynamic forces is to presume that they are the sum of incident radiated and diffracted wave components These forcing components are modeled using linear coefficients ideally obtained from a frequency domain potential flow BEM solver e g WAMIT 3 AWQA FER 4 and Nemoh 5 The BEM solutions are obtained by solving the Laplace equation for the velocity potential which assumes the flow is inviscid incompressible and irrotational More details on the theory for the frequency domain BEM can be found in 3 2 3 Coordinate System in WEC Sim Figure 2 2 illustrates a 3 D floating point absorber subject to incoming waves in water The figure also defines the coordinates and the 6 DOF in WEC Sim The WEC Sim coordinate system assumes that the X axis is in the direction of wave propagation if the wave heading angle is equal to zero The Z axis is in the vertical upwards direction and the Y axis direction is defined by the right hand rule Incident wave direction Figure 2 2 Sketch defining the coordinate system 2 4 Time Domain Numerical Method The dynamic response of the system was calculated by solving the equation of motion for WEC systems 2 6 The equation of motion for a floating body about its center of gravity can be given as l mX Font Fraa Fpro F Fg Fm 2 1 where X is the translational and rotational accel
33. ile as follows body lt body number gt cd 0 0 1 300 0 body lt body number gt characteristicArea 0 0 100 0 0 O Property Summary Drag coefficient format Cd_x Cd_y Cd_z Cd_rotationX Cd_rotationY Cd_rotationZ default 0 000 ed 00 cg Center of gravity format x y z cgCalcMethod Method of setting the body cg options user or wamit default wamit ae Characteristic area for viscous drag calculations format Area Area Area Area Area Area default 0 characteristicArea 00000 Default is O If the value is equal to 1 it means the body is fixed to the ground and the mass MOI and fixed p A A CG will equal to the defaut value and are meaning less in the calculation S Structure that defines the geometry for visualization and non linear buoyancy and excitation force calculations geometry Location of the stl file that defines the geometry of the body default NOT DEFINED bare Structure that contains the hydrodynamic data for the body This structure is currently populated by reading WAMIT data hydroDataLocation Location of the wamit out file default NOT DEFINED hydroDataType Code used to generate hydrodynamic coefficients options wamit default wamit hydroForce Structure used to calculate hydrodynamic forces acting on the body initAngularDispAngle Initial displacement of cog Angle of rotation used for decay tests format radians default 0 initAngularDispAxis Initial displa
34. integral waves type regularCIC The wave type is the same as waves type regular except the radiation forces are calculated using the convolution integral and the infinite frequency added mass 32 e Irregular waves waves type irregular It is the wave type for irregular wave simulations using given wave spectrum Significant wave height wave H peak period wave T and wave spectrum type waves spectrumtype need to be specified in the input file The available wave spectrum options are listed in Table Table 5 2 WEC Sim wave spectrum options with waves type irregular Wave Spectrum Type Input File Parameter Pierson Moskowitz waves spectrumType PM Bretschneider waves spectrumType BS JONSWAP waves spectrumType JS e Irregular waves with user defined spectrum waves type irregularImport It is the wave type for irregular wave simulations using user defined wave spectrum Users need to specify the wave spectrum file name in input file as follows waves spectrumDataFile lt wave spectrum file gt txt The user defined wave spectrum must be defined with the wave frequency Hz in the first row and the spectral energy density m in the second row An example of which is given in the ndbcBuoyData txt file in the applications folder of the WEC Sim download This format can be copied directly from NDBC buoy data For more infor mation on NDBC buo
35. lar waves with irregular waves spectrumType typical wave spectrum waves type Irregular waves with irregularlmport waves spectrumDataFile user defined wave spectrum e No waves waves type noWave It is the wave type for running simulations with out waves and using constant added mass and radiation damping coefficients Ac cordingly the user must still run WAMIT before executing WEC Sim In addition users MUST specify the period from which the hydrodynamic coefficients are selected by setting the waves noWaveHydrodynamicCoeffT variable This option is typically used for decay tests for comparison with analytical solutions that use given radiation added mass and damping coefficients e No waves with convolution integral calculation waves type noWaveCIC The wave type is the same as noWave except the radiation forces are calculated using the convolution integral and the infinite frequency added mass e Regular waves waves type regular It is the wave type for running simulations using regular waves with constant added mass and radiation damping coefficients Wave period wave T and wave height wave H need to be specified in the input file Using this option we assume that the system dynamic response is in sinusoidal steady state form where constant added mass and damping coefficients are used and the convolution integral is NOT used to calculate wave radiation forces e Regular waves with convolution
36. ll scale dimensions of the RM3 are shown in Figure 6 1 and the mass properties are defined in Table SWL Float to SWL2 m 38 m Figure 6 1 RM3 heaving two body point absorber full scale dimensions 35 Table 6 1 RM3 heaving two body point absorber full scale mass properties Float Full Scale Properties coim massitonne moment of inertia fkg m ol 209oz301 of ol 72701 of 213060907 _ 4304 89323 o 430489823 _ 37085481 1 Plate Full Scale Properties CG m Moment of Inertia kg m 944196146 94407091 2 217592 785 21 285 217592 785 28542224 8 6 1 2 Modeling RM3 in WEC Sim In this section we provide a step by step tutorial on how to set up and run the RM3 simulation in WEC Sim We have also created a supplemental RM3 WEC Sim Tutorial Video to demonstrate how to set up and run the RM3 simulation in WEC Sim The tutorial video is included in the WEC Sim code download package under the documentation folder As described in Chapter 3 all WEC Sim models consist of a input file wecSimInputFile m and a Simulink model file RM3 s1x To run the WEC Sim simulation the user needs to provide results from the WAMIT frequency domain BEM solver to populate the WEC Sim hydrodynamic coefficients The WAMIT hydrodynamic results were pregenerated The WAMIT output file corresponds to the buoywamit out file contained in the wamit subfolder Note that all the hydrodynamic coefficients M
37. model devices that are comprised of rigid bodies power take off PTO systems and mooring systems Hydrody namic forces are modeled using a radiation and diffarction method and the system dynamics is performed in the time domain by solving the governing WEC equations of motion in 6 degrees of freedom DOF In this user manual the theory of WEC Sim is described in The installation of MATLAB and WEC Sim and how to run WEC Sim is described in The pre developed WEC component library structure is presented in The code WEC Sim structure and the input parameters for running WEC Sim are described in Chapter 5 Finally the application of WEC Sim to model a point absorber and a oscillating surge device is presented in Chapter 6 Chapter 2 Theory 2 1 Introduction Modeling a WEC involves the interaction between the incident waves device motion PTO mechanism and mooring Figure 2 1 WEC Sim uses a radiation and diffraction method to predict power performance and design optimization The radiation and diffraction method generally obtains the hydrodynamic forces from a frequency domain boundary el ement method BEM solver using linear coefficients to solve the system dynamics in the time domain WEC performance motions and loads Multibady La dynamics mm Ji E Hydrodynamics PTO amp mooring WEC device specification Relevant physics y Tapai Response 10 Power kW o B88 amp se 5 61 71 Figure 2 1 Met
38. nk SimMecahnics model file default NOT DEFINED solver PDE solver used by the Simulink SimMechanics simulation default ode4 startTime Simulation start time default 0 s time Simulation time s default 0 s version WEC Sim version zeroVel Matrix of zeros with a size of 6 0bj Clkt 1 default dependent Figure 5 2 Data contained within the simulationClass 5 3 2 bodyClass The bodyClass object contains the mass and hydrodynamic properties of each body that comprises the WEC device being simulated Each body must have a bodyClass initiated in the input file we recommend that these body objects be named body lt body number gt as shown in the input file in Figure Each body object MUST be initiated by entering the command body lt body number gt bodyClass lt body name gt 30 Users can specify the mass and hydrodynamic properties after the body object is initiated for each body Note that the hydroDataType hydroDataLocation mass cg mom0fInertia and geometry parameters all have to be specified for each body as shown in Figure The users have the option of accepting the default values for the remaining body parameters by doing nothing or specify their own values The options available within the bodyClass are shown in Figure For example the viscous drag can be specified by entering the viscous drag coefficient nondimensional and the projected characteristic area in m in vector format the input f
39. ns the Global Reference Frame block necessary for every simulation The Constraints sublibrary contains blocks that are used to constrain the DOF of the bodies without including any additional forcing or resistance The PTOs sublibrary contains blocks used to both simulate a PTO system and restrict the body motion Both constraints and PTOs can be used to restrict the relative motion between multibody systems 4 2 Body Elements Sublibrary The Body Elements sublibrary Figure contains one block Rigid Body block It is used to represent rigid bodies At least one instance of this block is required in each model 20 fr Fal Simulink Library Browser File Edit View Help Bl O Entersearchtem v HG Libraries WEC Sim Body Elements Simulink HDL Coder gt Pal Pal Simscape gt Pa Simulink 3D Animation Conn E Simulink Coder gt Simulink Extras gt Stateflow WEC Sim iai Body Elements Rigid Body Constraints Frames PTOs Pal Showing WEC Sim Body Elements Figure 4 1 Body Elements sublibrary 4 2 1 Rigid Body Block The Rigid Body block is used to represent a rigid body in the simulation The user has to name the blocks body i where i 1 2 The mass properties hydrodynamic data geometry file mooring and other properties are then specified in the input file Within the body block the wave radiation wave excitation hydrostatic restoring viscous damping
40. ode The first application uses the WEC Sim code to model the the RM3 WEC and the second application uses the code to model the OSWEC device Should the WEC Sim user make changes to the WEC Sim code scripts are provided that compare the previous version of WEC Sim to the latest run for debugging purposes These test cases can be used by running the RunTestCase m script This script imports the mat file that contains results from the original WEC Sim run and then plots a comparison of the original run to the latest run of WEC Sim 6 3 1 RM3 Test Case For the RM3 the test case is set up for direct comparison using the following model param eters Wave Environment Wave Type Regular Waves Sinusoidal Steady State 45 Wave Height H m 2 5 Wave Period T sec 8 WEC Sim Simulation Settings Time Marching Solver Fourth Order Runge Kutta Formula Start Time sec 0 End Time sec 400 Time Step Size sec 0 1 Ramp Function Time sec 100 List of PTO s Number of PTOs 1 PTO Stiffness N m 0 PTO Damping Ns m 1 2E 06 Float 1DOF 1200PTO Heave m o Heave m 0 200 400 time s Heave m o Heave m 360 380 400 time s 0 2 0 1 0 1 0 2 0 2 0 1 0 1 0 2 Spar Plate 1DOF 1200PTO Relative Motion 1DOF 1200PTO 2 i 1 E 0 I 1 2 0 200 400 200 400 time s time s 2
41. orer Wave Height m Wave Period s Specify Type of Waves Initialize bodyClass for Float Specify BEM solver Location of WAMIT out file Mass from WAMIT kg Cg from WAMIT m Moment of Inertia kg m 2 Geometry File Initialize bodyClass for Spar Plate Specify BEM solver Location of WAMIT out file Mass from WAMIT kg Cg from WAMIT m Moment of Inertia Geometry File kg m 2 Initialize Constraint Class o for Constraintl Initialize ptoClass for PTOL PTO Stiffness Coeff N m PTO Damping Coeff Ns m Figure 5 1 Example of a WEC Sim input file same to Figure 6 5 28 5 2 3 Specification of Wave Parameters Within the input file users MUST provide information on the wave condition for the simu lation The user MUST specify the wave condition within the waves variable The options that are available for the user to set within the waveClass are discussed in more detail in Section 5 3 3 5 2 4 Specification of Power Take Off and Constraint Parameters PTO and constraint blocks connect WEC bodies to each other and possibly to the seabed The properties of the PTO and constraint are defined within pto variable and constraint variable respectively The options that are available for the user to specify are described in more detail in Sections and 5 3 WEC Sim Code All data that are needed for a WEC Sim simulation are contained within simu body waves pto and
42. over a range of conditions including developing and decaying seas In general the parameters depend on wind speed most important wind direction as well as fetch and locations of storm fronts The spectrum is given as S f Lal 1 057 fp f 3 exp l 2 13 A 1057 S ae a 2 14 BELO a 2 15 where Hmo is the significant wave height which is generally defined as the mean wave height of the one third highest waves 10 JONSWAP Joint North Sea Wave Project Spectrum Spectrum used in WEC Sim The spectrum was purposed by Hasselmann et al 9 and the original formulation was given as 8 f hs ap 5 r Ein lt T exp 4 C 0 07 fS fy 2 16 20 0 09 f gt f A aay y B 2 fp 2 17 where a is a nondimensional variable that is a function of the wind speed and fetch length Empirical fits were applied in an attempt to find a mean value that would capture the spectral shape of most measured sea states To fit a to match the desired significant wave height the following calculation must be performed Hmo A 8 texn i lar 2 19 F Gayl exp 3 7 a 2 19 Spectrum purposed at ITTC Another form of JONSWAP spectrum was purposed at the 17th International Towing Tank Conference ITTC It was defined as 4 S f ant tinto exp 5 E f Z as ia ff exp l 3 4 fe I 2 20 ay 0 07 f lt T exp 4 Sfo 2 21 20 0 09 f gt f A Goto ip a a 2 22
43. pment and demon station of the WEC SIm wave energy convereter simulation tool in Proceedings of the 2nd Marine Energy Technology Symposium Seattle WA USA 2014 48 14 Y Yu Ye Li Kathleen Hallett and Chad Hotimsky Design and analysis for a floating oscillating surge wave energy converter in Proceedings of OMAE 2014 San Francisco CA 2014 49
44. rameters that are available for the user to set within the bodyClass are described in more detail in Section o Simulation Data simu startTime 0 endTime 400 dt 0 1 simMechanicsFile mode normal sim sim sim sim u u RMS aly u simu explorer on o Wave Information waves H 2 5 waves T 8 waves type regular Body Data body 1 bodyClass Float body 1 hydroDataType wamit body 1 hydroDataLocation t mamit rm3 out body 1 mass wamitDisplacement body 1 cqg wamit body 1 momO0fInertia 20907301 21306090 66 37085481 body 1 geometry geometry float body 2 bodyClass Spar_Plate body 2 hydroDataType wamit body 2 hydroDataLocation wamit rm3 out body 2 mass wamitDisplacement body 2 wamit body 2 R 94419614 57 94407091 24 28542224 82 body 2 geometry geometry plate o PTO and Constraint Parameters constraint 1 constraintClass Constraintl pto 1 ptoClass PTO1 pto 1 k 0 pto 1 c 1200000 11 stl stl AP A e ye o ol AP A oO AP Ae oO AP A ye ole ole A ol ae ol ae ol ole JP e ol Simulation Start Time s Simulation End Time s Simulation Delta_Time s Specify Simulink Model File Specify Simulation Mode normal accelerator rapid accelerator Turn SimMechanics amp on off o Expl
45. re 3 4 In the input file the simulation settings sea state body mass properties PTO and constraints are specified In addition users MUST specify the Simulink SimMechanics model file name in the wecSimInputFile m which is simu simMechanicsFile lt WEC Model Name gt slx Step 4 Execute WEC Sim Finally execute the simulation by running the wecSim command from the MATLAB Com mand Window Figure 3 4 The wecSim command must be executed in the WEC Sim case directory where the wecSimInputFile m is located WEC Sim simulations should always be executed from the MATLAB Command Window and not from the Simulink SimMechanics model This ensures that the correct variables are in the MATLAB workspace during simulation 17 PUBLISH L3 Find Files Insert El fe a a L Compare y Comment ee or AVIGATE BREAKPOINT RUN F A B Users yyu Dropbox WorksNREL GitHub WEC Sim Tests RM3_2Body_3DOF_OPTO Current Folder O 7 Editor Users yyu Dropbox WorksNREL GitHubLWEC Sim T ests 2Body_3DO O x D Name v wecSim m x waveSetup m x bodyClass m wecSiminputFile m E wecSiminputFile m RunTestCase m 1 Simulation Data i 2 simu startTime 0 RM3_2Body_3DOF_0 3 simu endTime 400 WEC Sim Input File HH Response_org mat ae simu dt 0 1 gt le wamit 5 simu simMechanicsFile RM3_2Body_3DOF_0PTO s1x gt output_previous 6 simu mode normal normal
46. simulation parameters body properties PTO and constraint defi nitions The specified input parameters for RM3 are shown in Figure 38 o Simulation Data simu startTime 0 endTime 400 dt 0 1 simMechanicsFile mode normal sim sim RM3 slx u u simu u sim simu explorer on o Wave Information waves H 2 5 waves T 8 waves type regular Body Data body 1 bodyClass Float body 1 hydroDataType wamit body 1 hydroDataLocation t wamit rm3 out body 1 mass wamitDisplacement body 1 cg wamit body 1 momOf Inertia 20907301 21306090 66 37085481 11 body 1 geometry geometry float stl body 2 bodyClass Spar Plate body 2 hydroDataType wamit body 2 hydroDataLocation wamit rm3 out body 2 mass wamitDisplacement body 2 wamit body 2 pa N le 94419614 57 94407091 24 28542224 82 body 2 geometry geometry plate stl o PTO and Constraint Parameters constraint 1 constraintClass Constraintl pto 1 ptoClass PTO1 pto 1 k 0 pto 1 c 1200000 5 JP AP A ye Ol Ao ole AP A ol ae ol AP Ae oO ole ole A ol oP ol ole ole oe A Ae ol Simulation Start Time s Simulation End Time s Simulation Delta_Time s Specify Simulink Model File Specify Simulation Mode normal accelerator amp rapid accelerator Turn SimMechanics
47. tep to set up a WEC Sim simulation is to populate the Simulink model file by dragging and dropping blocks from the WEC Sim library into the lt WEC model name gt slx file see Chapter 4 Step 1 Place two Rigid Body blocks from the WEC Sim library in the Simulink model file one for each OSWEC rigid body as shown in Figure 41 E Sirmulink Library Browser Search Resuts none Frequently Used Pa OSWEC File tdt View wa Display Diagram Smulation Analysis Code Tools Help bal Bel S eg tes Showing WEC Sin Body Elements Conn Flap body 1 Conn Base body 2 Ready 250 Figure 6 8 Adding two Rigid body blocks to the OSWEC WEC Sim model Step 2 Double click on the body block and rename the instances of the body The first body should be titled body 1 and the second body should be titled body 2 Additional properties of these body blocks are defined in the OSWEC MATLAB Input File section Section 6 2 2 Step 3 Place the Global Reference block from the WEC Sim library in the Simulink model file as shown in Figure The global reference frame acts as the base to which all other bodies are linked through joints or constraints gt Py OSWEC File Edit View Display Digam Simulation Analysis Code Tools Help Cele Conn
48. the STL file format The STL files are used to visualize the WEC bodies in the WEC Sim MATLAB graphical user interface Pre Processing e Build the device CAD model Run WAMIT Build WEC Simulink SimMechanics Model Use WEC component library to build multi body model of the device User input setup e Wave conditions e Simulation settings Define inertia properties and parameters Execute WEC Sim Simulations e From MATLAB input script NOT from WEC Simulink SimMechanics Model Figure 3 2 Work flow diagram for running WEC Sim simulations 16 Step 2 Build Device Simulink SimMechanics Model Next the user must build the device model using the Simulink SimMechanics toolboxes and the WEC Sim Library see Chapter 4 Figure 3 3 shows an example of a a two body point absorber modeled in Simulink SimMechanics e Pg wecModel File Edit View Display Diagram Simulation Analysis Code Tools Help fl S GO bd Oy o Normal Or Pa wecModel hd Q Float E Heave Joint Translation 1 Global References Seabed gt Ready 151 ode4 Figure 3 3 An example of device Simulink SimMechanics model for a two body point ab sorber Step 3 Create WEC Sim Input File A WEC Sim input file needs to be created in the case directory and it MUST be named wecSimInputFile m An example of the input file for a two body point absorber is shown in Figu
49. the block that is connected to the base The base of these blocks is typically the Global Reference Frame which can be thought of as the seabed and the follower is a Rigid Body There are five Constraints blocks including three that restrict motion to one DOF Heave Surge Pitch a free floating Floating block and a rigid connection Fixed block The rest of this section will describe each Constraints block in more detail 22 File Edit View Help a O Entersearchterm v a Libraries Library WEC Sim Constraints Search Results none lt i gt HDL Coder Simscape e gt fl Sul Cota WEC Sim Fixed Floating Body Elements Constraints Frames PTOs Surge Showing WEC Sim Constraints Figure 4 3 Constraints sublibrary 4 4 1 Floating Block The Floating block is used to simulate a free floating body It constrains the motion of the follower to be along the XZ plane of the base That is it allows translation in the X and Z axis and rotation about the Y axis It is usually used with the base connected to the Global Reference Frame seabed in which case the motion of the follower is along the global XZ plane 4 4 2 Heave Block The Heave block constrains the motion of the follower relative to the base to be along the Z axis In the case of the base connected to the Global Reference Frame seabed the body is allowed to move only in the vertical Z direction In t
50. tion term can be calculated using the added mass and the wave radiation damping term for a given wave frequency which is obtained from Fue A 2 2 where A w and B w are the added mass and wave radiation damping matrices respec tively w is the wave frequency in rad sec and X is the velocity vector of the floating body The free surface profile is based on linear wave theory for a given wave height wave frequency and water depth The regular wave excitation force is obtained from H l Fert R Ry5 Fx wet N 2 3 where R denotes the real part of the formula Ry is the ramp function H is the wave height and Fx is the excitation vector including the magnitude and phase of the force 2 4 2 Convolution Integral Formulation To include the fluid memory effect on the system the convolution integral calculation which is based upon the Cummins equation 7 is used The radiation term can be calculated by Fad X fxe 7 X r dr 2 4 where A is the added mass matrix at infinite frequency and K is the impulse response function For regular waves Eq 2 3 is used to calculate the wave excitation force For irregular waves the free surface elevation is constructed from a linear superposition of a number of regular wave components It is often characterized using a wave spectrum Figure 2 3 that describes the wave energy distribution over a range of wave frequencies characterized by a significant wave height and
51. tz and exp stands for the exponential function 9 Pierson Moskowitz One of the simplest spectra was proposed by 8 It assumed that after the wind blew steadily for a long time over a large area the waves would come into equilibrium with the wind This is the concept of a fully developed sea where a long time is roughly 10 000 wave periods and a large area is roughly 5 000 wave lengths on a side The spectrum is calculated from APM 2 e S f amt f exp a ce A B tht 2 8 where apy 0 0081 g is gravitational acceleration and fp is the peak frequency of the spectrum However this spectrum representation does not allow the user to define the significant wave height To facilitate the creation of a power matrix in WEC Sim the apy coefficient was calculated such that the desired significant wave height of the sea state was met The apy fit was calculated as follows 2 Hi QPM EJ F 2 9 g 4 S f o exp 4 2 10 Note that related to the spectrum is a series of characteristic numbers called the spectral moments These numbers denoted mz k 0 1 2 are defined as ie f rsp 2 11 0 The spectral moment mo is the variance of the free surface which allows one to define Hmo 4 Mo z 2 12 Bretschneider Spectrum This two parameter spectrum is based on significant wave height and peak wave frequency For a given significant wave height the peak frequency can be varied to c
52. where Km is the stiffness matrix for the mooring system and X is the response of the body 2 7 Viscous Drag Generally the effect of viscosity on the WEC dynamics needs to be considered as neglecting this effect may lead to an overestimation of the power generation of the system particularly when a linear model is applied A common way of modeling the viscous damping is to add a Morison equation type quadratic damping term to the equation of motion 1 T Fy zCaPADX X 2 28 where Cy is the viscous drag coefficient p is the fluid density and Ap is the characteristic area The viscous drag coefficient for the device must be carefully selected I 2 however it is dependent on device geometry scale and relative velocity between the body and the flow around it The drag coefficient becomes much larger when the Reynolds and the Keule gan Carpenter number are smaller Note that empirical data on the drag coefficient can be found in various literature and standards The available data may however be limited to existing simple geometries For practical point absorber geometry the hydrodynamic forces may have to be evaluated by conducting wave tank tests or prescribed motion computational fluid dynamic simulations 13 Chapter 3 Getting Started WEC Sim is implemented in MATLAB 10 and running the code requires that you install MATLAB the MATLAB toolboxes presented in Table and the WEC Sim source code WEC Sim was developed in MA
53. y data measurement descriptions please refer to NDBC website at http www ndbc noaa gov measdes shtml Note that by default the random wave phase for irregular waves are generated arbitrarily waves randPreDefined 0 If the user specifies waves randPreDefined 1 in the input file the random phase of the waves will be generated using the rand function in MATLAB with a seed value of 1 This gives the user an option to generate the same random wave every time if needed Typing doc waveClass from the MATLAB Command Window provides more information on the class functionality and the available wave properties are shown and described in Figure 5 3 4 constraintClass The constraint object is used to connect bodies to the Global Reference Frame The con straint variable should be initiated by entering the following constraint lt constraint number gt constraintClass lt constraint name gt For rotational constraint i e pitch the user also needs to specify its location of the ro tational joint with respect to the global reference frame in the constraint lt constraint number gt loc variable 33 Property Summary gt i bemFreg noWaveHydrodynamicCoeffT numFreq phaseRand spectraType spectrumDataFile type typeNum w waterDepth waveAmpTime make dependent m Wave amplitude for regular waves or sqrt wave spectrum vector for irregular waves m Wave height regular waves or significant wave
Download Pdf Manuals
Related Search
Related Contents
Operating instructions R/C LightMasterTM USER MANUAL ファイル【PDF:727KB】 取扱説明書 (2.68 MB/PDF) SOLIDCAM 2010 取扱説明書 警告 注意 PLEASE READ BEF。RE USE 座 PYLE Audio PLTVD7IN User's Manual Copyright © All rights reserved.
Failed to retrieve file