Skip to content

Commit 40fb6a4

Browse files
jleonqujtgrasb
andauthored
OSWEC Test Case - Irregular Waves (WEC-Sim#1516)
* Commenting line 221 in InitializeWecSim.m and adding V4.0 results for the OSWEC Test * Update original data with proper phase * Update org file and syntax * fix orig data * fix phase? * Update spread comparison * fix wave class in org mat * fix spectral moment calculation --------- Co-authored-by: jtgrasb <87095491+jtgrasb@users.noreply.github.com>
1 parent 307a6d3 commit 40fb6a4

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

examples/OSWEC/wecSimInputFile.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
waves.period = 8; % Peak Period [s]
2626
waves.spectrumType = 'PM'; % Specify Spectrum Type
2727
waves.direction = [0,30,90]; % Wave Directionality [deg]
28-
waves.spread = [0.1,0.2,0.7]; % Wave Directional Spreading [%}
28+
waves.spread = [0.1,0.2,0.7]; % Wave Directional Spreading [%]
2929

3030
% % Irregular Waves with imported spectrum
3131
% waves = waveClass('spectrumImport'); % Create the Wave Variable and Specify Type

source/functions/initializeWecSim.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,6 @@
235235

236236
end
237237

238-
toc
239-
240238
%% Pre-processing start
241239
tic
242240
fprintf('\nWEC-Sim Pre-processing ... \n');
Binary file not shown.

tests/RegressionTests/IrregularWaves/irregularSpread_OSWEC/runLoadIrregularSpread_OSWEC.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
Rel.WEC_Sim_org.time=B1.WEC_Sim_org.time;
5757
Rel.WEC_Sim_org.pitch=B1.WEC_Sim_org.pitch-B2.WEC_Sim_org.pitch;
5858
% Spectrum
59-
Sp.WEC_Sim_org.m0 = calcSpectralMoment(waves.omega,waves.spectrum,0);
60-
Sp.WEC_Sim_org.m2 = calcSpectralMoment(waves.omega,waves.spectrum,2);
59+
Sp.WEC_Sim_org.m0 = calcSpectralMoment(waves.w,waves.S,0);
60+
Sp.WEC_Sim_org.m2 = calcSpectralMoment(waves.w,waves.S,2);
6161

6262
clear Pshift1 Pshift2
6363

0 commit comments

Comments
 (0)