3-DOF Velocity Prediction Program base on the ORC aero and hydro dynamic models. The code make use of Object-oriented-Programming to be as general as possible.
wrap rig into yacht class, and update measure functions- validate on YD-41 (Principle of Yacht Design), and write tests
optimize the boat velocity with the 3-DOF equlibrium as constraints (Lagrange multipliers)- Add all the windage contributions (mast, crew, rigging, etc.)
- Optional Delft hydro model
- Add dagerboards to the possible appendages
tidy plotting and results
There are only a few prerequisites to run this code, most python instalation will have them. We advise to use the environment.yml
file provided in this repo to set-up a new conda environment to use the code (this keeps you machine nice and tidy).
To create the environment simply run from the cloned/downloaded repo
$ conda env create -f environment.yml
and then active the new environment
$ conda activate Python-VPP
NOTE: If you want to change the conda environment name, edit the first line of the
environment.yml
file.
You can run a benchmark agains the YD-41 results from WinVPP by running the benchmark.py
script.
$ python benchmark/benchmark.py -g -o
with the graph
and output
optional keyboard arguments.
To use the code, forst clone or download this repository onto your own machine. The main file 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). To run the code simply type
$ python runVPP.py
into your console, and the code should run. Once the code has run, it should generate the following figure (or a similar one)
See the documentation.
This is a crude list of all the input variables and their meaning, as well as the units they are expected to be in.
- 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 waterine (m)
- Tc : Canoebody 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, includeing keel (kg)
- Ff : Freeboard heigt 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 esitmate (this is very rough)
- VPP.set_analysis()
- TWA range : range of TWA to use
- TWS range : range of TWS, must be between [2, 35]
- Otto Villani - Initial idea, model selection - github
- Marin Lauber - Initial idea, developement - github
- Thomas Dickson - Developer
This project is licensed under the MIT License - see the LICENSE file for details
- Hat tip to anyone whose code was used
- Inspiration
- Formatted using Black.
- Added a "name" to the Yacht class which can be passed to plotting function.
- Renamed instances of Keel and Rudder objects in the example function.