Giter Club home page Giter Club logo

wec-sim_applications's Introduction

WEC-Sim_Applications

This repository contains applications of the WEC-Sim code, including tutorials by the WEC-Sim team as well as user-shared examples.

To contribute an example follow these guidelines:

  • Create a folder on the top level with a single example.
  • Do not include results as these take up space and can easily be generated by running the example.
  • Using the README_template.md file create a README.md file for your example. Include the example name, the author, WEC-Sim version, and description.
  • Using the TestB2B.m test as a template, create a TestCASE.m file that will run BEMIO and check the functionality of your application when changes are made to the WEC-Sim source code.
  • Create a pull request. The WEC-Sim team will review your example and add it to the repo.

Testing Applications

Tests are provided for the applications using the MATLAB unit testing framework.

Individual test files are typically found at the same level as a hydroData directory, with a file name like Test<Something>.m. These test files may test multiple application cases that use the same hydrodynamic data.

To run the tests it is assumed that the latest version of WEC-Sim is installed. For tests containing the name "MoorDyn", it is also necessary to install the MoorDyn module into WEC-Sim. The tests in the Desalination folder require the Simscape Fluids toolbox.

Assuming that the WEC-Sim_Applications source code is located at some path \path\to\WEC-Sim_Applications, then to test the Body-to-Body Interaction application cases, the following commands can be given in the MATLAB interface:

>> cd \path\to\WEC-Sim_Applications\Body-to-Body_Interactions
>> runtests("TestB2B.m")
...

Alternatively, the TestB2B.m file can be opened in the MATLAB editor and then the tests can be run by selecting the Run Tests action in the EDITOR ribbon.

A shortcut for running all the tests in the repository is provided at the root level with the wecSimAppTest.m function. This function can be run from the root directory, as follows:

>> cd \path\to\WEC-Sim_Applications
>> wecSimAppTest
...

Alternatively, the function can also be used to run tests in a particular directory. For instance, run the tests in the End_Stops directory as follows:

>> wecSimAppTest End_Stops
...

wec-sim_applications's People

Contributors

kmruehl avatar glennond avatar dforbush2 avatar cmichelenstrofer avatar dav-og avatar akeeste avatar h0r5e avatar salhus avatar lilnguy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.