diff --git a/.github/workflows/run-tests-dev.yml b/.github/workflows/run-tests-dev.yml index 95bab2b5..c2148d4b 100644 --- a/.github/workflows/run-tests-dev.yml +++ b/.github/workflows/run-tests-dev.yml @@ -30,13 +30,13 @@ jobs: Free_Decay, Generalized_Body_Modes, Mooring, + Morison_Element, Multiple_Condition_Runs, Nonhydro_Body, Nonlinear_Hydro, Paraview_Visualization, Passive_Yaw, PTO-Sim, - Traditional_Morison_Element, Wave_Markers, WECCCOMP, Write_Custom_h5] diff --git a/.github/workflows/run-tests-master.yml b/.github/workflows/run-tests-master.yml index 28880679..eb9daa58 100644 --- a/.github/workflows/run-tests-master.yml +++ b/.github/workflows/run-tests-master.yml @@ -30,13 +30,13 @@ jobs: Free_Decay, Generalized_Body_Modes, Mooring, + Morison_Element, Multiple_Condition_Runs, Nonhydro_Body, Nonlinear_Hydro, Paraview_Visualization, Passive_Yaw, PTO-Sim, - Traditional_Morison_Element, Wave_Markers, WECCCOMP, Write_Custom_h5] diff --git a/Traditional_Morison_Element/README.md b/Morison_Element/README.md similarity index 100% rename from Traditional_Morison_Element/README.md rename to Morison_Element/README.md diff --git a/Traditional_Morison_Element/TestTraditionalME.m b/Morison_Element/TestMorisonElement.m similarity index 88% rename from Traditional_Morison_Element/TestTraditionalME.m rename to Morison_Element/TestMorisonElement.m index 92f4f7cc..83059477 100644 --- a/Traditional_Morison_Element/TestTraditionalME.m +++ b/Morison_Element/TestMorisonElement.m @@ -1,4 +1,4 @@ -classdef TestTraditionalME < matlab.unittest.TestCase +classdef TestMorisonElement < matlab.unittest.TestCase properties OriginalDefault @@ -9,7 +9,7 @@ end methods (Access = 'public') - function obj = TestTraditionalME + function obj = TestMorisonElement obj.testDir = fileparts(mfilename('fullpath')); end end @@ -50,13 +50,13 @@ function checkVisibilityRestored(testCase) end methods(Test) - function testTraditionalME(testCase) + function testMorisonElement(testCase) cd('morisonElement') wecSim cd(testCase.testDir) end - function testHydroBody(testCase) - cd('hydroBody') + function testMonopile(testCase) + cd('monopile') wecSim cd(testCase.testDir) end diff --git a/Traditional_Morison_Element/geometry/monopile.stl b/Morison_Element/geometry/monopile.stl similarity index 100% rename from Traditional_Morison_Element/geometry/monopile.stl rename to Morison_Element/geometry/monopile.stl diff --git a/Traditional_Morison_Element/geometry/tower.stl b/Morison_Element/geometry/tower.stl similarity index 100% rename from Traditional_Morison_Element/geometry/tower.stl rename to Morison_Element/geometry/tower.stl diff --git a/Traditional_Morison_Element/hydroData/bemio.m b/Morison_Element/hydroData/bemio.m similarity index 100% rename from Traditional_Morison_Element/hydroData/bemio.m rename to Morison_Element/hydroData/bemio.m diff --git a/Traditional_Morison_Element/hydroData/monopile.gdf b/Morison_Element/hydroData/monopile.gdf similarity index 100% rename from Traditional_Morison_Element/hydroData/monopile.gdf rename to Morison_Element/hydroData/monopile.gdf diff --git a/Traditional_Morison_Element/hydroData/monopile.out b/Morison_Element/hydroData/monopile.out similarity index 100% rename from Traditional_Morison_Element/hydroData/monopile.out rename to Morison_Element/hydroData/monopile.out diff --git a/Traditional_Morison_Element/hydroBody/monopile.slx b/Morison_Element/monopile/monopile.slx similarity index 100% rename from Traditional_Morison_Element/hydroBody/monopile.slx rename to Morison_Element/monopile/monopile.slx diff --git a/Traditional_Morison_Element/hydroBody/wecSimInputFile.m b/Morison_Element/monopile/wecSimInputFile.m similarity index 56% rename from Traditional_Morison_Element/hydroBody/wecSimInputFile.m rename to Morison_Element/monopile/wecSimInputFile.m index 5db96868..a16cd5a9 100644 --- a/Traditional_Morison_Element/hydroBody/wecSimInputFile.m +++ b/Morison_Element/monopile/wecSimInputFile.m @@ -2,14 +2,14 @@ % Traditional Morison Element case - hydro body %% Simulation Data -simu = simulationClass(); % Initialize Simulation Class -simu.simMechanicsFile = 'monopile.slx'; % Specify Simulink Model File +simu = simulationClass(); % Initialize Simulation Class +simu.simMechanicsFile = 'monopile.slx'; % Specify Simulink Model File simu.explorer = 'off'; simu.solver = 'ode4'; simu.rho = 1025; simu.cicEndTime = 30; -simu.rampTime = 100; % Wave Ramp Time [s] 200 -simu.endTime = 400; % Simulation End Time [s] 400 +simu.rampTime = 100; % Wave Ramp Time [s] 200 +simu.endTime = 400; % Simulation End Time [s] 400 simu.dt = 0.01; simu.stateSpace = 1; @@ -18,31 +18,33 @@ % waves = waveClass('noWaveCIC'); % waves.period = 5; -% Regular Wave -waves = waveClass('regular'); -waves.height = 2.0; -waves.period = 5.0; +% % Regular Wave +% waves = waveClass('regular'); +% waves.height = 2.0; +% waves.period = 5.0; -% % Irregular Waves -% waves = waveClass('irregular'); % Initialize Wave Class and Specify Type -% waves.height = 2.0; % Significant Wave Height [m] -% waves.period = 5.0; % Peak Period [s] -% waves.spectrumType = 'PM'; % Specify Spectrum Type -% waves.phaseSeed = 5; +waves = waveClass('irregular'); % Initialize Wave Class and Specify Type +waves.height = 2.0; % Significant Wave Height [m] +waves.period = 5.0; % Peak Period [s] +waves.spectrumType = 'PM'; % Specify Spectrum Type +waves.phaseSeed = 5; % Set Random Phase Seed +% Wave directionality was not included in BEM run +% waves.direction = [0,30,90]; % Wave Directionality [deg] +% waves.spread = [0.1,0.2,0.7]; % Wave Directional Spreading [%} -% waves.bem.range = [0 10]; % Not necessary to define wave frequency range without an .h5 / hydro body -% waves.waterDepth = 30; % Not necessary to define water depth without an .h5 / hydro body +% waves.bem.range = [0 10]; % Not necessary to define wave frequency range with an .h5 / hydro body +% waves.waterDepth = 30; % Not necessary to define water depth with an .h5 / hydro body %% Body Data % Monopile - diameter 10m, height 30m body(1) = bodyClass('../hydroData/monopile.h5'); body(1).geometryFile = '../geometry/monopile.stl'; -% body(1).name = 'monopile'; % Hydro body name defined by h5 file -body(1).nonHydro = 0; % Hydro body +% body(1).name = 'monopile'; % Hydro body name defined by h5 file +body(1).nonHydro = 0; % Hydro body body(1).mass = 'equilibrium'; % 1044536 body(1).inertia = [1.25 1.25 0.15]*1e9; -% body(1).centerGravity = [0 0 -15]; % Hydro body cg defined by h5 file -% body(1).centerBuoyancy = [0 0 -15]; % Hydro body centerBuoyancy defined by h5 file +% body(1).centerGravity = [0 0 -15]; % Hydro body cg defined by h5 file +% body(1).centerBuoyancy = [0 0 -15]; % Hydro body centerBuoyancy defined by h5 file % body(1).volume = pi*10^2*30; % Hydro body volume defined by h5 file % Morison Element Implementation not used for comparison with hydro body diff --git a/Traditional_Morison_Element/morisonElement/monopile.slx b/Morison_Element/morisonElement/monopile.slx similarity index 100% rename from Traditional_Morison_Element/morisonElement/monopile.slx rename to Morison_Element/morisonElement/monopile.slx diff --git a/Traditional_Morison_Element/morisonElement/wecSimInputFile.m b/Morison_Element/morisonElement/wecSimInputFile.m similarity index 65% rename from Traditional_Morison_Element/morisonElement/wecSimInputFile.m rename to Morison_Element/morisonElement/wecSimInputFile.m index d5e0b5c4..c6a49794 100644 --- a/Traditional_Morison_Element/morisonElement/wecSimInputFile.m +++ b/Morison_Element/morisonElement/wecSimInputFile.m @@ -2,14 +2,14 @@ % Traditional Morison Element case - no WEC-Sim hydro bodies %% Simulation Data -simu = simulationClass(); % Initialize Simulation Class -simu.simMechanicsFile = 'monopile.slx'; % Specify Simulink Model File +simu = simulationClass(); % Initialize Simulation Class +simu.simMechanicsFile = 'monopile.slx'; % Specify Simulink Model File simu.explorer = 'off'; simu.solver = 'ode4'; simu.rho = 1025; simu.cicEndTime = 30; -simu.rampTime = 100; % Wave Ramp Time [s] 200 -simu.endTime = 400; % Simulation End Time [s] 400 +simu.rampTime = 100; % Wave Ramp Time [s] 200 +simu.endTime = 400; % Simulation End Time [s] 400 simu.dt = 0.01; simu.stateSpace = 1; @@ -18,17 +18,19 @@ % waves = waveClass('noWaveCIC'); % waves.period = 5; -% Regular Wave -waves = waveClass('regular'); -waves.height = 2.0; -waves.period = 5.0; +% % Regular Wave +% waves = waveClass('regular'); +% waves.height = 2.0; +% waves.period = 5.0; -% % Irregular Waves -% waves = waveClass('irregular'); % Initialize Wave Class and Specify Type -% waves.height = 2.0; % Significant Wave Height [m] -% waves.period = 5.0; % Peak Period [s] -% waves.spectrumType = 'PM'; % Specify Spectrum Type -% waves.phaseSeed = 5; +% Irregular Waves +waves = waveClass('irregular'); % Initialize Wave Class and Specify Type +waves.height = 2.0; % Significant Wave Height [m] +waves.period = 5.0; % Peak Period [s] +waves.spectrumType = 'PM'; % Specify Spectrum Type +waves.phaseSeed = 5; % Set Random Phase Seed +waves.direction = [0,30,90]; % Wave Directionality [deg] +waves.spread = [0.1,0.2,0.7]; % Wave Directional Spreading [%} waves.bem.range = [0 10]; % Must define wave frequency range without an .h5 / hydro body waves.waterDepth = 30; % Must define water depth without an .h5 / hydro body @@ -38,7 +40,7 @@ body(1) = bodyClass(''); % no h5 file required for drag body body(1).geometryFile = '../geometry/monopile.stl'; body(1).name = 'monopile'; -body(1).nonHydro = 2; % Drag body +body(1).nonHydro = 2; % Drag body body(1).mass = 'equilibrium'; % 1044536 body(1).inertia = [1.25 1.25 0.15]*1e9; body(1).centerGravity = [0 0 -15]; diff --git a/Traditional_Morison_Element/plotTraditionalME.m b/Morison_Element/plotMorisonElement.m similarity index 100% rename from Traditional_Morison_Element/plotTraditionalME.m rename to Morison_Element/plotMorisonElement.m diff --git a/Traditional_Morison_Element/runTraditionalME.m b/Morison_Element/runMorisonElement.m similarity index 71% rename from Traditional_Morison_Element/runTraditionalME.m rename to Morison_Element/runMorisonElement.m index f202c9ab..ba130aac 100644 --- a/Traditional_Morison_Element/runTraditionalME.m +++ b/Morison_Element/runMorisonElement.m @@ -1,7 +1,7 @@ % Example running traditional Morison Element vs hydrodynamic body % comparison -casedir = {"morisonElement","hydroBody"}; +casedir = {"morisonElement","monpile"}; for ii = 1:length(casedir) cd(casedir{ii}) @@ -9,5 +9,4 @@ cd .. end -plotTraditionalME - \ No newline at end of file +plotMorisonElement \ No newline at end of file