Skip to content

Commit 05ccbc2

Browse files
dforbush2akeestekmruehljtgrasbMShabara
authored
Owc fix: no need for h5 (#81)
* try to update libraries again * fix simscapeinstrumentationlogging error * fix OWC case to not need custom h5 file * update readme and dependencies * clean up directory and add missing files * adding missing WAMIT hst for GBM * adding Floating OWC case back * adding BEM files for Floating OWC * updating input file * Update OWC to be consistent with flex body updates from variable mass * Resolves the lib conflicts * Resolves conflicts * Fixes a bug * Fixes a bug * Removes the Floating OWC from the testing * Fixes a bug in OWC products * Fixes a bug with TestOWC * Fixes a bug with products.txt --------- Co-authored-by: akeeste <akeeste@sandia.gov> Co-authored-by: Ruehl <kmruehl@sandia.gov> Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com> Co-authored-by: Shabara <mshabara@nrel.gov> Co-authored-by: Mohamed Shabara <84589678+MShabara@users.noreply.github.com>
1 parent 636fa33 commit 05ccbc2

27 files changed

Lines changed: 8754 additions & 62 deletions

.github/workflows/run-tests-reusable.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ jobs:
5353
ref: ${{ inputs.base_ref }}
5454
path: './WEC-Sim'
5555
- name: Check out MoorDyn
56-
if: matrix.folder == 'Mooring' || matrix.folder == 'OWC'
56+
if: matrix.folder == 'Mooring'
5757
uses: actions/checkout@v4
5858
with:
5959
repository: WEC-Sim/MoorDyn
6060
path: './MoorDyn'
6161
- name: Copy MoorDyn Files
62-
if: matrix.folder == 'Mooring' || matrix.folder == 'OWC'
62+
if: matrix.folder == 'Mooring'
6363
run: |
6464
cp * ../WEC-Sim/source/functions/moorDyn
6565
ls ../WEC-Sim/source/functions/moorDyn
-68.7 KB
Binary file not shown.

OWC/FloatingOWC_W2W/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ representation of their dynamic behavior. Additionally, the model accounts for t
1515

1616
An optimal control strategy is implemented to maximize turbine efficiency by dynamically adjusting system parameters based on operating speed.
1717

18-
**Relevant Citation(s)**
19-
Shabara, Mohamed A., et al. "Optimal Control of Floating Oscillating Water Column Wave Energy Converters." 2025 American Control Conference (ACC), IEEE, 2025.
18+
This model is based on the research detailed in:
19+
20+
Shabara, Mohamed A., et al. "Optimal Control of Floating Oscillating Water Column Wave Energy Converters." The 9th IEEE Conference on Control Technology and Applications (CCTA) 2025.
21+
22+
**Acknowledgment:** This material is based upon work supported by the U.S.Department of Energy’s Office of Energy Efficiency and Renewable Energy under the Water Power Technologies Office Award Number DE-EE0008895

_Common_Input_Files/Floating_OWC/geometry/Sparbuoy_Floater.stl renamed to OWC/FloatingOWC_W2W/geometry/Sparbuoy_Floater.stl

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

OWC/FloatingOWC_W2W/userDefinedFunctions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
];
5757

5858
% Load the STL file
59-
stlData = stlread('../../_Common_Input_Files/Floating_OWC/geometry/Sparbuoy_Floater.stl'); % Replace with the path to your STL file
59+
stlData = stlread('./geometry/Sparbuoy_Floater.stl'); % Replace with the path to your STL file
6060

6161
vertices = stlData.Points; % Extract vertices and faces from the STL data
6262
vertices(:,3) = vertices(:,3) + body(1, 1).centerGravity(3);

OWC/FloatingOWC_W2W/wecSimInputFile.m

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
simu.dt = 0.01; % Simulation time-step [s]
1414

1515
%% Wave Information
16-
% % noWaveCIC, no waves with radiation wecSimCIC
16+
% noWaveCIC, no waves with radiation wecSimCIC
1717
% waves = waveClass('noWaveCIC'); % Initialize Wave Class and Specify Type
1818

19-
% % Regular Waves
19+
% Regular Waves
2020
waves = waveClass('regular'); % Initialize Wave Class and Specify Type
2121
waves.height = 4.5; % Wave Height [m]
2222
waves.period = 11.2; % Wave Period [s]
@@ -62,17 +62,20 @@
6262

6363
%% Body Data
6464
% Floater
65-
body(1) = bodyClass('../../_Common_Input_Files/Floating_OWC/hydroData/floatingOWC.h5');
66-
body(1).geometryFile = '../../_Common_Input_Files/Floating_OWC/geometry/Sparbuoy_Floater.stl'; % Location of Geomtry File
65+
body(1) = bodyClass('./hydroData/floatingOWC.h5');
66+
body(1).geometryFile = './geometry/Sparbuoy_Floater.stl'; % Location of Geomtry File
6767
body(1).mass = 'equilibrium'; % Body Mass. The 'equilibrium' Option Sets it to the Displaced Water Weight.
6868
body(1).inertia = 1.0e+09*[1.5310 1.5310 0.1118]; % Moment of Inertia [kg*m^2]
6969
% body(1).quadDrag.cd = [1.25, 1.25, 1.25, 1.25, 1.25 , 0.1];
7070
% body(1).quadDrag.area = [250, 250, 201, 250, 250, 100];
7171

7272
% Spar/Plate
73-
body(2) = bodyClass('../../_Common_Input_Files/Floating_OWC/hydroData/floatingOWC.h5');
74-
body(2).geometryFile = '../../_Common_Input_Files/Floating_OWC/geometry/Sparbuoy_OWC.stl';
75-
body(2).mass = 'equilibrium';
73+
waterColumnMass = 4493450;
74+
waterColumnHeight = 50.69;
75+
76+
body(2) = bodyClass('./hydroData/floatingOWC.h5');
77+
body(2).geometryFile = './geometry/Sparbuoy_OWC.stl';
78+
body(2).mass = waterColumnMass;
7679

7780

7881

@@ -126,10 +129,8 @@
126129
airChamber(1).Ae = (pi / 4) * airChamber(1).owcDiameter^2; % Air chamber area - Circular in this model
127130
airChamber(1).rho_air = 1.25;
128131
airChamber(1).Vo = airChamber(1).Ae * airChamber(1).airChamberHeight; % Inital Volume of the air chamber
129-
% airChamber(1).mass = 4493450;
130-
airChamber(1).Mass = pi * (airChamber(1).owcDiameter^2)/4 * airChamber(1).airChamberHeight * 1025;
131-
Izz = 0.5* airChamber(1).Mass * (airChamber(1).owcDiameter/2)^2;
132-
Ixx = airChamber(1).Mass * (3 * (airChamber(1).owcDiameter/2)^2 + airChamber(1).airChamberHeight^2) /12;
132+
Izz = 0.5* waterColumnMass * (airChamber(1).owcDiameter/2)^2;
133+
Ixx = waterColumnMass * (3 * (airChamber(1).owcDiameter/2)^2 + waterColumnHeight^2) /12;
133134

134135
body(2).inertia = [Ixx Ixx Izz];
135136

0 commit comments

Comments
 (0)