Skip to content

Commit

Permalink
updates to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TAJD committed Feb 10, 2024
1 parent a8031df commit 449b123
Showing 1 changed file with 48 additions and 52 deletions.
100 changes: 48 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,30 @@
# 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)

<p align="center">
<img src="Figure.png" alt="YD-41 VPP results" width="1024">
</p>

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)
Expand Down Expand Up @@ -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

0 comments on commit 449b123

Please sign in to comment.