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!
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)
See the documentation.
Here is a list of the key variables used in the VPP.
- Appendages :
- Cu : Root Chord / Upper Chord (m)
- Cl : Tip Chord / Lower Chord (m)
- Span : Span (m)
- 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
- Sails: Standard measurements, except Roach is defined as 1-A/(0.5PE) Kite only takes area and vce estimate (this is very rough)
- VPP.set_analysis()
- TWA range : range of TWA to use
- TWS range : range of TWS, must be between [2, 35]
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 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
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
- Otto Villani - Initial idea, model selection - GitHub
- Marin Lauber - Initial idea, development - GitHub
- Thomas Dickson - Developer - GitHub
This project is licensed under the MIT License - see the LICENSE file for details