Skip to content

Commit 993b5b3

Browse files
committed
Merge branch 'dev' into hydro_2nd_order
2 parents c72e46e + 205ec04 commit 993b5b3

26 files changed

+1884
-2764
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Description
11+
_Describe the bug here_
12+
13+
### Steps to reproduce issue
14+
_Please provide a minimum working example (MWE) if possible_
15+
16+
1.
17+
2.
18+
3.
19+
20+
### Current behavior
21+
22+
23+
### Expected behavior
24+
25+
26+
27+
### Code versions
28+
_List versions only if relevant_
29+
- Python
30+
-
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
# Description of feature
11+
Describe the feature here and provide some context. Under what scenario would this be useful?
12+
13+
# Potential solution
14+
Can you think of ways to implement this?

.github/PULL_REQUEST_TEMPLATE.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Delete the text explanations below these headers and replace them with information about your PR.
2+
Please first consult the [developer guide](https://weis.readthedocs.io/en/latest/how_to_contribute_code.html) to make sure your PR follows all code, testing, and documentation conventions.
3+
4+
## Purpose
5+
Explain the goal of this pull request. If it addresses an existing issue be sure to link to it. Describe the big picture of your changes here, perhaps using a bullet list if multiple changes are done to accomplish a single goal. If it accomplishes multiple goals, it may be best to create separate PR's for each.
6+
7+
## Type of change
8+
What types of change is it?
9+
_Select the appropriate type(s) that describe this PR_
10+
11+
- [ ] Bugfix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (non-backwards-compatible fix or feature)
14+
- [ ] Code style update (formatting, renaming)
15+
- [ ] Refactoring (no functional changes, no API changes)
16+
- [ ] Documentation update
17+
- [ ] Maintenance update
18+
- [ ] Other (please describe)
19+
20+
## Testing
21+
Explain the steps needed to test the new code to verify that it does indeed address the issue and produce the expected behavior.
22+
23+
## Checklist
24+
_Put an `x` in the boxes that apply._
25+
26+
- [ ] I have run existing tests which pass locally with my changes
27+
- [ ] I have added new tests or examples that prove my fix is effective or that my feature works
28+
- [ ] I have added necessary documentation

.github/workflows/CI_RAFT.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI_RAFT
2+
3+
# We run CI on push commits and pull requests on all branches
4+
on: [push, pull_request]
5+
6+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
7+
jobs:
8+
build_conda:
9+
name: Conda Build (${{ matrix.os }}) - ${{ matrix.python-version }}
10+
runs-on: ${{ matrix.os }}
11+
defaults:
12+
run:
13+
shell: bash -l {0}
14+
15+
strategy:
16+
fail-fast: false #true
17+
matrix:
18+
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
19+
python-version: ["3.10", "3.11"]
20+
21+
steps:
22+
- name: checkout repository
23+
uses: actions/checkout@v3
24+
25+
- uses: conda-incubator/setup-miniconda@v2
26+
# https://github.com/marketplace/actions/setup-miniconda
27+
with:
28+
mamba-version: "*"
29+
miniconda-version: "latest"
30+
#auto-update-conda: true
31+
python-version: ${{ matrix.python-version }}
32+
environment-file: environment.yml
33+
channels: conda-forge
34+
channel-priority: true
35+
activate-environment: test
36+
auto-activate-base: false
37+
38+
# Install
39+
- name: Conda Install RAFT
40+
run: |
41+
pip install -e .
42+
43+
- name: Example run
44+
run: |
45+
cd examples
46+
python example_from_yaml.py false
47+
48+
- name: Test run
49+
run: |
50+
cd tests
51+
pytest .
52+

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*.egg-info
66
build/
77
develop-eggs/
8-
dist/s
8+
dist/
99

1010
# HAMS-generated data
1111
raft/data/cylinder/Output/Hams_format/
@@ -18,4 +18,7 @@ raft/BEM/
1818
raft/HullMesh.pnl
1919
raft/platform.gdf
2020
tests/BEM/
21-
tests/platform.gdf
21+
tests/platform.gdf
22+
23+
# Emacs
24+
*~

README.md

+48-7
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ RAFT v1.0.0 includes the capabilities described above, and further development i
77

88
## Getting Started
99

10-
New users of RAFT as a standalone model are recommended to begin by looking at the input file and script provided in the examples folder, and seeking further information from the [RAFT documentation](https://openraft.readthedocs.io/en/latest/). For use as part of the WEIS toolset, information will be provided once this capability is completed in the [WEIS documentation](https://weis.readthedocs.io/en/latest/).
10+
New users of RAFT as a standalone model are recommended to begin by looking at the input file and script provided in the examples folder, and seeking further information from the [RAFT documentation](https://openraft.readthedocs.io/en/latest/). For use as part of the WEIS toolset, information will be provided once this capability is completed in the [WEIS documentation](https://weis.readthedocs.io/en/latest/). For now, the following will help get started with running RAFT as a standalone model.
1111

12-
13-
### Prerequisites
12+
RAFT uses a number of prerequisites, or other python package dependencies, to run its calculations. The most notable ones are listed below:
1413

1514
- Python 3
1615
- NumPy
@@ -19,13 +18,55 @@ New users of RAFT as a standalone model are recommended to begin by looking at t
1918
- YAML
2019
- MoorPy (available at https://github.com/NREL/MoorPy)
2120
- pyHams (available at https://github.com/WISDEM/pyHAMS)
22-
- CCBlade and WISDEM* (available at https://github.com/WISDEM/WISDEM)
21+
- CCBlade or WISDEM* (https://github.com/WISDEM/CCBlade or https://github.com/WISDEM/WISDEM)
22+
23+
\* CCBlade is a module of WISDEM, but can be used separately. RAFT only requires CCBlade (and some additional related functions) out of the larger WISDEM code. New users can install either CCBlade or WISDEM, but for highest efficiency, we recommend installing CCBlade, without the entire WISDEM installation.
24+
25+
To install all required python packages to run RAFT, follow the steps below.
26+
27+
1. Install most of the required python packages to run RAFT from the "requirements" yaml.
28+
29+
(base) PS ANY_PATH> conda env create -f raft-env.yaml
30+
31+
This will create a new python virtual environment on a new user's local machine called "raft-env"
32+
33+
2. Activate the new virtual environment
34+
35+
(base) PS ANY_PATH> conda activate raft-env
36+
37+
This will activate the newly created virtual environment, where we will install the remaining dependencies
38+
39+
3. Install the RAFT package
40+
- Navigate to a directory of your choosing on your local machine and clone this RAFT repository to that new directory
41+
42+
(raft-env) PS YOUR_PATH> git clone https://github.com/WISDEM/RAFT.git
43+
44+
- Staying in the same directory, install the RAFT package in it's "editable" mode
45+
46+
(raft-env) PS YOUR_PATH/RAFT> pip install -e .
47+
48+
4. Repeat Step 3 two more times, one for CCBlade, and one for MoorPy
49+
50+
(raft-env) PS YOUR_PATH> git clone https://github.com/WISDEM/CCBlade.git
51+
(raft-env) PS YOUR_PATH/CCBlade> pip install -e .
52+
(raft-env) PS YOUR_PATH/CCBlade> cd ..
53+
(raft-env) PS YOUR_PATH> git clone https://github.com/NREL/MoorPy.git
54+
(raft-env) PS YOUR_PATH/MoorPy> pip install -e .
55+
56+
** If you are running into errors with installing CCBlade, make sure there is not a file called "_bem.cp39-win_amd64.pyd" inside of CCBlade/ccblade. Deleting this file will allow the above commands to run.
57+
58+
59+
This new raft-env should now be compatible to run RAFT standalone. Dependencies like CCBlade and MoorPy are still under development, which is why for now, it will be easier to install them in their editable forms.
60+
61+
The other main dependency, PyHAMS, is included within the raft-env.yaml file and is installed in Step 1.
62+
63+
Another point to note is that ```python setup.py develop``` has become outdated, and ```pip install -e .``` is preferred.
64+
65+
If you need to remove any virtual environment for any reason, you can run
2366

24-
\* RAFT uses CCBlade and currently requires additional related functions from the larger WISDEM code. We recommend installing WISDEM for the time being.
67+
conda env remove -n "name-of-the-virtual-environment"
2568

26-
### Installation
2769

28-
Download/clone and install this RAFT repository as well as that of [MoorPy](https://github.com/NREL/MoorPy), [pyHAMS](https://github.com/WISDEM/pyHAMS), and [WISDEM](https://github.com/WISDEM/WISDEM). To install RAFT in development mode, go to its directory and run ```python setup.py develop``` or ```pip install -e .``` from the command line.
2970

3071
## Documentation and Issues
3172

__init__.py

Whitespace-only changes.

designs/FOCTT_example.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1127,9 +1127,9 @@ platform:
11271127
CaEnd : 0.0 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
11281128
rho_shell : 7850 # [kg/m3]
11291129
# --- handling of end caps or any internal structures if we need them ---
1130-
cap_stations : [ 0 ] # [m] location along member of any inner structures (in same scaling as set by 'stations')
1131-
cap_t : [ 0.001 ] # [m] thickness of any internal structures
1132-
cap_d_in : [ 0 ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
1130+
cap_stations : [ 0, 1 ] # [m] location along member of any inner structures (in same scaling as set by 'stations')
1131+
cap_t : [ 0.001, 0.001 ] # [m] thickness of any internal structures
1132+
cap_d_in : [ 0, 0 ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
11331133

11341134

11351135
mooring:

0 commit comments

Comments
 (0)