Giter VIP home page Giter VIP logo

python-vpp's Introduction

Python-VPP

3-DOF Velocity Prediction Program based on the ORC aero and hydro dynamic models.

Please see the demo hosted at https://yacht-vpp.streamlit.app/ and go for a test sail!

Using the code

To use the code, first clone or download this repository then install the required dependencies (see below).

The main files that are used are runVPP.py and righting_moment.json. These have to be filled with the data of your boat. By default they are using the YD-41 (from Principle of Yacht Design).

The VPP is run with.

$ python runVPP.py

Once the code has run, it should generate the following figure (or a similar one)

YD-41 VPP results

See the documentation.

Input variables

Here is a list of the key variables used in the VPP.

  1. Appendages :
    • Cu : Root Chord / Upper Chord (m)
    • Cl : Tip Chord / Lower Chord (m)
    • Span : Span (m)
  2. Yacht :
    • Lwl : Length waterline (m)
    • Vol : Displ. volume of canoebody (m^3)
    • Bwl : Beam waterline (m)
    • Tc : Canoe body draft (m)
    • WSA : Wetted surface area (m^2)
    • Tmax : Draft max, i.e. Keel (m)
    • Amax : Max. section area (m^2)
    • Mass : Total mass of the yacht, including keel (kg)
    • Ff : Freeboard height fore (m)
    • Fa : Freeboard height aft (m)
    • Boa : Beam overall (m)
    • Loa : Length overall (m)
    • App : List of appendages
    • Sails : List of Sails
  3. Sails: Standard measurements, except Roach is defined as 1-A/(0.5PE) Kite only takes area and vce estimate (this is very rough)
  4. VPP.set_analysis()
    • TWA range : range of TWA to use
    • TWS range : range of TWS, must be between [2, 35]

Contributing

We are very keen to see contributions to code, documentation and feature development!

When you make a contribution please make sure that any new functionality is covered with additional tests.

Follow the steps below to contribute to this project.

Install dependencies

Install the required dependencies from the requirements.txt file.

If using pip then pip install requirements.txt.

If using conda then follow these steps to create an environment with the right dependencies:

conda create --name Python-VPP \
    && conda config --add channels conda-forge \
    && conda activate Python-VPP \
    && conda install -y --file requirements.txt

Run tests

Tests are implemented using pytest.

You can run tests with

pytest -vv

You can run a benchmark against the YD-41 results from WinVPP by running the benchmark.py script.

$ python benchmark/benchmark.py -g -o

Acknowledgements

License

This project is licensed under the MIT License - see the LICENSE file for details

python-vpp's People

Contributors

tajd avatar marinlauber avatar fraxy-v avatar mg-ng avatar eli-mason 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.