Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions OSWEC_Optimization_Damping/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# MATLAB autosave/backup
*.asv
*.m~
*.bak

# MATLAB / Simulink generated files
*.slxc
slprj/
codegen/
work/
*.log
*.fig

# Temporary batch files
currentRun.mat
latest_run.mat
latest_damping_bounds.mat
oswec_batch.mat
oswec_results.mat
oswec_optimization_summary.mat

# Generated run outputs
runs/*
!runs/.gitkeep

# Generated damping-bound outputs
damping_bounds/*
!damping_bounds/.gitkeep

# Generated result files
oswec_*_optimization_summary.mat
oswec_*_optimization_summary.csv
oswec_*_full_run_results.csv
oswec_*_best_weighted_condition_results.csv
oswec_*_best_damping_by_condition.csv
oswec_*_weighted_vs_unweighted_power.png
oswec_*_failed_runs_by_damping.png
oswec_*_power_by_condition.png
oswec_*_weighted_contribution_best_damping.png

# Python cache
__pycache__/
*.pyc
.ipynb_checkpoints/

# Generated wave-condition files
wave_conditions/*.mat

# OS files
.DS_Store
Thumbs.db
Binary file added OSWEC_Optimization_Damping/OSWEC.slx
Binary file not shown.
21 changes: 21 additions & 0 deletions OSWEC_Optimization_Damping/README.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see readmes in other applications for an example format. This information is good, there are just a few other fields that we typically add

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**Author:** Rebekah A. Saucier

**Geometry:** OSWEC

**Original Version:** WEC-Sim v6.1

**Dependencies:**
* WEC-Sim
* MATLAB/Simulink
* Precomputed MHKiT wave-condition `.mat` files in `wave_conditions/`

**Description**

The **OSWEC_Optimization_Damping** example uses WEC-Sim multiple condition runs, MCR, to sweep PTO damping values for the OSWEC model. Representative wave conditions are precomputed from MHKiT/NDBC wave resource data and stored in `wave_conditions/`.

The input file expands the selected wave-condition file across user-defined PTO damping values. Running `wecSimMCR` simulates all wave-condition and damping combinations. The `userDefinedFunctions.m` file suppresses per-case plots during MCR runs and summarizes weighted mean power, unweighted mean power, AEP, and the best damping value.

To change the study, edit the selected wave-condition file and `dampingValues` in `wecSimInputFile.m`, then run:

```matlab
wecSimMCR
Loading
Loading