From 449b12339eb7e812ba2e9ef9317bf212a8041d02 Mon Sep 17 00:00:00 2001 From: Thomas Dickson Date: Sat, 10 Feb 2024 21:33:07 +0000 Subject: [PATCH] updates to readme --- README.md | 100 ++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index 829a71c..daf9faa 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,20 @@ # Python-VPP -3-DOF Velocity Prediction Program base on the [ORC](https://www.orc.org/index.asp?id=21) aero and hydro dynamic models. The code makes use of Object-oriented-Programming to be as general as possible. +3-DOF Velocity Prediction Program based on the [ORC](https://www.orc.org/index.asp?id=21) aero and hydro dynamic models. -## Contributing - -### Installing 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: - -```bash -conda create --name Python-VPP \ - && conda config --add channels conda-forge \ - && conda activate Python-VPP \ - && conda install -y --file requirements.txt -``` - -### Running tests - -Tests are implemented using [pytest](https://docs.pytest.org/en/8.0.x/). - -You can run tests with - -```bash -pytest -vv -``` - -You can run a benchmark against the YD-41 results from WinVPP by running the `benchmark.py` script. - -```bash -$ python benchmark/benchmark.py -g -o -``` +## Using the code -with `save`, `graph` and `output` as optional keyboard arguments and `output` only working in combination with `save`. +To use the code, first clone or download this repository then install the required dependencies (see below). -## Using the code +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). -To use the code, first 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 +The VPP is run with. ```bash $ 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) +Once the code has run, it should generate the following figure (or a similar one)

YD-41 VPP results @@ -53,9 +22,9 @@ into your console, and the code should run. Once the code has run, it should gen See the [documentation](https://marinlauber.github.io/Python-VPP/). -### Input variable +### Input variables -This is a crude list of all the input variables and their meaning, as well as the units they are expected to be in. +Here is a list of the key variables used in the VPP. 1. Appendages : * Cu : Root Chord / Upper Chord (m) @@ -83,24 +52,51 @@ This is a crude list of all the input variables and their meaning, as well as th * TWA range : range of TWA to use * TWS range : range of TWS, must be between [2, 35] +## Contributing -## Authors +We are very keen to see contributions to code, documentation and feature development! -* **[Otto Villani](https://www.linkedin.com/in/otto-villani-552760108/)** - *Initial idea, model selection* - [github](https://github.com/ottovillani) -* **[Marin Lauber](https://www.linkedin.com/in/marin-lauber/)** - *Initial idea, developement* - [github](https://github.com/marinlauber) -* **[Thomas Dickson](https://tajd.co.uk/about)** - *Developer* - [github](http://github.com/TAJD) +When you make a contribution please make sure that any new functionality is covered with additional tests. -## License +Follow the steps below to contribute to this project. -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details +### 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: + +```bash +conda create --name Python-VPP \ + && conda config --add channels conda-forge \ + && conda activate Python-VPP \ + && conda install -y --file requirements.txt +``` + +### Run tests -## Acknowledgments +Tests are implemented using [pytest](https://docs.pytest.org/en/8.0.x/). + +You can run tests with + +```bash +pytest -vv +``` + +You can run a benchmark against the YD-41 results from WinVPP by running the `benchmark.py` script. + +```bash +$ python benchmark/benchmark.py -g -o +``` + +## Acknowledgements -* Hat tip to anyone whose code was used -* Inspiration +* **[Otto Villani](https://www.linkedin.com/in/otto-villani-552760108/)** - *Initial idea, model selection* - [GitHub](https://github.com/ottovillani) +* **[Marin Lauber](https://www.linkedin.com/in/marin-lauber/)** - *Initial idea, development* - [GitHub](https://github.com/marinlauber) +* **[Thomas Dickson](https://tajd.co.uk/about)** - *Developer* - [GitHub](http://github.com/TAJD) -## Modifications +## License -1. Formatted using [Black](https://github.com/psf/black). -1. Added a "name" to the Yacht class which can be passed to plotting function. -1. Renamed instances of Keel and Rudder objects in the example function. +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details