Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase 2 Starting Point #251

Merged
merged 84 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
35384db
Fix variable ballast l_fill in RAFT
dzalkind Apr 13, 2023
9d8324f
Clarify draft/freeboard margins, include waves
dzalkind Apr 14, 2023
9da7361
Remove waves from draft/freeboard margins
dzalkind Apr 17, 2023
f379bfa
Add RAFT natural periods for constraints
dzalkind Apr 28, 2023
de0ac65
Add max_nac_accel as RAFT constraint
dzalkind May 8, 2023
acfcbde
Fix F_lines0 to be ndof size
dzalkind May 9, 2023
95d8c2d
Increase max NNODES and NELEM to work with more columns
dzalkind May 9, 2023
ae39b59
Allow user inputted Hub, RefHt GridHeight, Width
dzalkind May 16, 2023
6a78a08
Reduce mins for HubHt, GridHeight, Width so legal in schema
dzalkind May 19, 2023
41b8aba
Put openfast_runs in same directory as analysis outputs
dzalkind May 26, 2023
44fdccb
Fix PropD and PropThck in openmdao_openfast
dzalkind May 23, 2023
5a86fec
Make period solve component separate from other floating outputs
dzalkind May 26, 2023
eddf282
Sync File I/O with ROSCO: some helpful updates
dzalkind Jun 12, 2023
d52d49b
weis reader and writer more robust
ptrbortolotti Jun 23, 2023
c665715
Pull ROSCO 2.8.0
dzalkind Jun 15, 2023
794f0b4
Merge branch 'openfast3p5p0' into ptfm_updates
dzalkind Jul 13, 2023
ed72247
Merge remote-tracking branch 'upstream/iea22' into ptfm_updates
dzalkind Jul 13, 2023
534dc8b
Make ROSCO tuning yaml and OF input dir relative to modeling input
dzalkind May 26, 2023
10213dc
Remove dev-branch from ROSCO
dzalkind Jul 13, 2023
00b254d
Remove WISDEM subtree
dzalkind Nov 13, 2023
1b39725
Pull dz_floatse WISDEM
dzalkind Nov 13, 2023
2cbb32e
Squashed 'WISDEM/' content from commit 0e9caf931
dzalkind Nov 13, 2023
a076603
Update file paths, turbsim grid size
dzalkind Nov 13, 2023
b883827
Read RayleighDamp using read_array
dzalkind Nov 14, 2023
1ad14ef
Update DISCON examples to ROSCO 2.8.0
dzalkind Nov 14, 2023
e775509
Define n_full in weis
dzalkind Nov 14, 2023
049ab92
[WISDEM] Get correct mass density attribute from MoorPy
dzalkind Nov 14, 2023
79a0e99
Fix TurbSim grid for example 06
dzalkind Nov 14, 2023
3fa07a3
Fix file paths so they are relative to options file
dzalkind Nov 14, 2023
1eea77f
Use promoted names from rotorse
dzalkind Nov 14, 2023
d1d8661
Revert PropD, T in HydroDyn, check later
dzalkind Nov 14, 2023
f351642
Catch extra exception
dzalkind Nov 14, 2023
b567ce8
Fix paths for IEA-15 semi example
dzalkind Nov 14, 2023
1a7e92f
Look for potential files with relative paths to modeling input
dzalkind Nov 14, 2023
2b529dc
Merge remote-tracking branch 'upstream/develop' into phase2
dzalkind Nov 14, 2023
29dc955
Pull RAFT ctopt
dzalkind Nov 14, 2023
f4793a1
Squashed 'RAFT/' changes from 34677ef9e..340a606ff
dzalkind Nov 14, 2023
d63837f
Squashed 'MoorPy/' changes from 4d6bd4f94..1a39ae042
dzalkind Nov 14, 2023
22f2d0e
Pull MoorPy dev
dzalkind Nov 14, 2023
a8a3868
Update output pickles for post processing
dzalkind Nov 14, 2023
9b1d0bd
[WISDEM] Update mooring line params
dzalkind Nov 14, 2023
25a1ec2
Squashed 'pyHAMS/' changes from ed65dbe00..427ac445d
dzalkind Nov 14, 2023
23e416b
Pull pyHAMS develop
dzalkind Nov 14, 2023
8d96479
Squashed 'RAFT/' changes from 340a606ff..9ddb012de
dzalkind Nov 15, 2023
d5c34bc
Pull RAFT ctopt
dzalkind Nov 15, 2023
e61f409
Update postprocessing outputs
dzalkind Nov 16, 2023
816e0ba
Try mamba environment
dzalkind Nov 16, 2023
f3b15dd
Skip SS_Fitting for now, looks like pyHAMS not installed
dzalkind Nov 17, 2023
e58172a
Revert l_fill of RAFT ballast to relative values
dzalkind Nov 21, 2023
93b3175
Skip 03_ freq examples as it's already tested
dzalkind Nov 21, 2023
3fca786
Conda install pyhams
dzalkind Nov 21, 2023
db6c8c8
Update modeling option paths, make relative to self
dzalkind Nov 21, 2023
066bd0e
Remove specific turbsim grid size
dzalkind Nov 21, 2023
25ee62a
push fix to example 08, grid size turbsim
ptrbortolotti Nov 22, 2023
ab8695b
Remove manually set turbsim Grid sizes
dzalkind Nov 27, 2023
27cde9d
Point example 15 to correct ROSCO yaml
dzalkind Nov 27, 2023
045bcee
Merge remote-tracking branch 'upstream/phase2' into phase2
dzalkind Nov 28, 2023
6629910
Squashed 'WISDEM/' changes from 0e9caf931..7059d6158
dzalkind Nov 28, 2023
aef55d9
Pull dz_floatse
dzalkind Nov 28, 2023
740a7b4
Try mamba for CI
dzalkind Nov 28, 2023
726c041
Re-fill ballast sections in raft based on section length
dzalkind Nov 30, 2023
e25ce0d
Skip example 04 until we resolve multiple variable ballasts
dzalkind Nov 30, 2023
93df6ba
Update linearization readme
dzalkind Nov 30, 2023
2d752fb
Squashed 'RAFT/' changes from 9ddb012de..fe82f93f2
dzalkind Dec 1, 2023
f2f39d0
Pull RAFT ctopt
dzalkind Dec 1, 2023
df9d975
Try conda installing mpi packages
dzalkind Dec 1, 2023
9a9f60f
Skip other examples for now to debug
dzalkind Dec 1, 2023
13c265a
Revert "Skip other examples for now to debug"
dzalkind Dec 1, 2023
9f3d4fd
shifting to ruamel.yaml by conda-forge request
gbarter Dec 5, 2023
2afe131
try approach that works for wisdem
gbarter Dec 5, 2023
7138c45
fix broken syntax
gbarter Dec 5, 2023
c91a70b
Cast raft_cases, so it's easier to save as an input yaml
dzalkind Dec 6, 2023
15a71c1
fix bug with DT_Out, which is a number, nto a str
ptrbortolotti Dec 14, 2023
24ea956
Flush and close OF input files, seems to fix kestrel issue
dzalkind Dec 19, 2023
ddf70b6
Remove numpy from lists of dicts
dzalkind Dec 19, 2023
c1f1599
Merge remote-tracking branch 'upstream/phase2' into phase2
dzalkind Dec 19, 2023
900a88d
Give a cross sectional HD member property to OF at each joint location
dzalkind Dec 20, 2023
bcc010e
Clean up comment around member cross section properties
dzalkind Dec 20, 2023
88c58c5
Add documentation for constraints that can come from RAFT/OF
dzalkind Dec 20, 2023
a8edbed
Ensure some level is enable for rotor_overspeed merit figure
dzalkind Dec 20, 2023
a2c5424
fix coveralls issue in CI
gbarter Dec 21, 2023
126800b
Make wave_seeds input consistent
dzalkind Dec 22, 2023
d77db57
Merge remote-tracking branch 'upstream/phase2' into phase2
dzalkind Dec 22, 2023
6f43945
Fix zeta_max typo
dzalkind Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 21 additions & 20 deletions .github/workflows/CI_WEIS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ jobs:
# # if: false == contains( matrix.os, 'windows')
# uses: awvwgk/setup-fortran@main

- uses: actions/checkout@v3
- uses: actions/checkout@v4

# This is the more official way to do miniconda, but it messes with the GitHub worker environment and shell quite a bit
- uses: conda-incubator/setup-miniconda@v2
- name: Install conda/mamba
uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
#miniconda-version: "latest"
#miniforge-version: "latest"
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
#auto-update-conda: true
# To use mamba, uncomment here, comment out the miniforge line
# mamba-version: "*"
miniforge-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
activate-environment: test
Expand All @@ -45,26 +43,27 @@ jobs:
- name: Add dependencies mac specific
if: contains( matrix.os, 'mac')
run: |
mamba install -y petsc4py mpi4py openmpi compilers
conda install -y petsc4py mpi4py openmpi compilers

# Install dependencies of WISDEM specific to windows
- name: Add dependencies windows specific
if: contains( matrix.os, 'windows')
run: |
mamba install -y m2w64-toolchain libpython
conda install -y m2w64-toolchain libpython

# Install dependencies of WEIS specific to ubuntu
- name: Add dependencies ubuntu specific
if: contains( matrix.os, 'ubuntu')
# (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries
# Mpi only seems to work with the shell command though, so instead rely on system compilers
run: |
mamba install -y petsc4py mpi4py openmpi
conda install -y petsc4py mpi4py openmpi
python -c "import platform; print(platform.node())"

- name: Show custom environment
run: |
mamba list
conda list
which -a gfortran
printenv | sort

# Debugging session
Expand All @@ -80,19 +79,21 @@ jobs:
# List the collected tests for debugging purposes
- name: List tests
run: |
pytest weis --collect-only
pytest --collect-only weis

# Run all tests within WEIS, but not computationally expensive examples
- name: Run tests within WEIS
run: |
pytest weis --cov-config=.coverageac --cov=weis
pytest --cov-config=.coverageac --cov=weis -p no:warnings --disable-warnings weis

# Run coveralls
- name: Run coveralls
if: contains( matrix.os, 'ubuntu')
if: contains( matrix.os, 'ubuntu') && contains( matrix.python-version, '3.10')
uses: coverallsapp/github-action@v2
# This also works, https://github.com/AndreMiras/coveralls-python-action
#uses: AndreMiras/coveralls-python-action@develop
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
#env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#run: |
# coveralls --service=github

72 changes: 48 additions & 24 deletions .github/workflows/run_exhaustive_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,47 @@ jobs:
python-version: ["3.9","3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Even miniconda gets bogged down- try mamba
- name: Install Conda environment with Micromamba
uses: mamba-org/provision-with-micromamba@main
- name: Install conda/mamba
uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
# To use mamba, uncomment here, comment out the miniforge line
#mamba-version: "*"
miniforge-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
environment-name: test
channels: conda-forge
extra-specs: |
python=${{ matrix.python-version }}
mpi4py
petsc4py
openmpi
sel(osx): compilers
sel(win): m2w64-toolchain
sel(win): libpython`
activate-environment: test
auto-activate-base: false

#miniforge-variant: Mambaforge
#channels: conda-forge
#extra-specs: |
# python=${{ matrix.python-version }}
# mpi4py
# petsc4py
# openmpi
# sel(osx): compilers
# sel(win): m2w64-toolchain
# sel(win): libpython`

# # Even miniconda gets bogged down- try mamba
# - name: Install Conda environment with Micromamba
# uses: mamba-org/provision-with-micromamba@main
# with:
# environment-file: environment.yml
# environment-name: test
# channels: conda-forge
# extra-specs: |
# python=${{ matrix.python-version }}
# mpi4py
# petsc4py
# openmpi
# sel(osx): compilers
# sel(win): m2w64-toolchain
# sel(win): libpython`

# This is the more official way to do miniconda, but it messes with the GitHub worker environment and shell quite a bit
#- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -80,13 +104,13 @@ jobs:
# conda install -y m2w64-toolchain libpython

# Install dependencies of WEIS specific to ubuntu
#- name: Add dependencies ubuntu specific
# if: false == contains( matrix.os, 'windows')
# # (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries
# # Mpi only seems to work with the shell command though, so instead rely on system compilers
# run: |
# conda install -y petsc4py mpi4py openmpi
# python -c "import platform; print(platform.node())"
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
# (if you use the shell here, cannot use 'compiler' package otherwise get link problems to system libraries
# Mpi only seems to work with the shell command though, so instead rely on system compilers
run: |
conda install -y petsc4py mpi4py openmpi
# python -c "import platform; print(platform.node())"

- name: Show custom environment
run: |
Expand All @@ -105,7 +129,7 @@ jobs:
- name: Test postprocessing notebooks
run: |
cd examples/16_postprocessing
gdown --no-check-certificate 1_FJaN-W1DoPNmO6YLSjnftvq6-7bn4VI
gdown --no-check-certificate 1AtLjjX5xpPqlHkfwDqeUj6VBMOYWcjmV
unzip outputs
treon plot_FAST.ipynb
treon rev_DLCs_WEIS.ipynb
Expand All @@ -122,7 +146,7 @@ jobs:
- name: Run parallel examples rotor optimization
run: |
cd examples/05_IEA-3.4-130-RWT
mpirun -np 2 python weis_driver.py
mpiexec -np 2 python weis_driver.py

# Run scripts within dac folder
# - name: Run examples distributed aerodynamic control
Expand All @@ -134,5 +158,5 @@ jobs:
- name: Run examples design of experiments
run: |
cd examples/09_design_of_experiments
mpirun -n 2 --bind-to core python DOE_openfast.py
mpiexec -n 2 --bind-to core python DOE_openfast.py
python postprocess_results.py
30 changes: 30 additions & 0 deletions MoorPy/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## Description
_Describe the bug here_

### Steps to reproduce issue
_Please provide a minimum working example (MWE) if possible_

1. …
2. …
3. …

### Current behavior

### Expected behavior


### Code versions
_List versions only if relevant_
- Python
- …
14 changes: 14 additions & 0 deletions MoorPy/.github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

# Description of feature
Describe the feature here and provide some context. Under what scenario would this be useful?

# Potential solution
Can you think of ways to implement this?
28 changes: 28 additions & 0 deletions MoorPy/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Delete the text explanations below these headers and replace them with information about your PR.
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.

## Purpose
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.

## Type of change
What types of change is it?
_Select the appropriate type(s) that describe this PR_

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (non-backwards-compatible fix or feature)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Documentation update
- [ ] Maintenance update
- [ ] Other (please describe)

## Testing
Explain the steps needed to test the new code to verify that it does indeed address the issue and produce the expected behavior.

## Checklist
_Put an `x` in the boxes that apply._

- [ ] I have run existing tests which pass locally with my changes
- [ ] I have added new tests or examples that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation
79 changes: 79 additions & 0 deletions MoorPy/.github/workflows/CI_MoorPy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI_MoorPy

# We run CI on push commits and pull requests on all branches
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_pip:
name: Pip Build (${{ matrix.os }}) - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
id: cp
with:
python-version: ${{ matrix.python-version }}
update-environment: true

- name: Pip Install MoorPy
run: |
'${{ steps.cp.outputs.python-path }}' -m pip install -vv -e .[test]

- name: Test run
run: |
cd tests
'${{ steps.cp.outputs.python-path }}' -m pytest .


build_conda:
name: Conda Build (${{ matrix.os }}) - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: checkout repository
uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
channels: conda-forge
activate-environment: test
auto-activate-base: false

# Install
- name: Conda Install MoorPy
run: |
python -m pip install -e . -vv

- name: Test run
run: |
cd tests
pytest .

44 changes: 44 additions & 0 deletions MoorPy/.github/workflows/Publish_MoorPy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and upload to PyPI

# Build on every branch push, tag push, and pull request change:
#on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
on:
push:
pull_request:
release:
types:
- published

jobs:
build_and_upload_pypi:
runs-on: ubuntu-latest

# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
id: cp
with:
python-version: "3.11"
update-environment: true

- name: Install pypa/build
run: |
python -m pip install build

- name: Build a binary wheel and a source tarball
run: |
python -m build .

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
Loading
Loading