Skip to content

Commit 26963f1

Browse files
jtgrasbakeeste
andauthored
Fix failing tests on dev (#95)
* resolve moordyn file access * get MoorDyn test to run * Remove simu.cicDt setting * Update tests to close simulink model after running * Update desal sim model * Close models without saving * close without saving * Fix last few * Allow for tests to be run on workflow dispatch * Remove cicDt * Update broken library link for variable mass * update call to cleanBEM * fix cd issue with passive yaw test * fix passive yaw test plotting issue * improve test plotting * update passive yaw regression test data * Import MoorDyn for OWC and paraview folders * remove extra changes to mooring input files --------- Co-authored-by: akeeste <akeeste@sandia.gov>
1 parent 80c7c31 commit 26963f1

22 files changed

Lines changed: 88 additions & 30 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ jobs:
5454
ref: ${{ inputs.base_ref }}
5555
path: './WEC-Sim'
5656
- name: Check out MoorDyn
57-
if: matrix.folder == 'Mooring'
57+
if: matrix.folder == 'Mooring' || matrix.folder == 'OWC' || matrix.folder == 'Paraview_Visualization'
5858
uses: actions/checkout@v4
5959
with:
6060
repository: WEC-Sim/MoorDyn
6161
path: './MoorDyn'
6262
- name: Copy MoorDyn Files
63-
if: matrix.folder == 'Mooring'
63+
if: matrix.folder == 'Mooring' || matrix.folder == 'OWC' || matrix.folder == 'Paraview_Visualization'
6464
run: |
65-
cp * ../WEC-Sim/source/functions/moorDyn
65+
cp -r * ../WEC-Sim/source/functions/moorDyn
6666
ls ../WEC-Sim/source/functions/moorDyn
6767
shell: bash
6868
working-directory: './MoorDyn'

.github/workflows/wec-sim-dev-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Test WEC-Sim dev branch
22
on:
3+
workflow_dispatch: {}
34
repository_dispatch:
45
types:
56
- wecsim-dev

.github/workflows/wec-sim-main-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Test WEC-Sim main branch
22
on:
3+
workflow_dispatch: {}
34
repository_dispatch:
45
types:
56
- wecsim-main

Body-to-Body_Interactions/TestB2B.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,32 @@ function checkVisibilityRestored(testCase)
5353
function testB2B_Case1(testCase)
5454
cd('B2B_Case1')
5555
wecSim
56+
close_system('RM3',0)
5657
end
5758
function testB2B_Case2(testCase)
5859
cd('B2B_Case2')
5960
wecSim
61+
close_system('RM3',0)
6062
end
6163
function testB2B_Case3(testCase)
6264
cd('B2B_Case3')
6365
wecSim
66+
close_system('RM3',0)
6467
end
6568
function testB2B_Case4(testCase)
6669
cd('B2B_Case4')
6770
wecSim
71+
close_system('RM3',0)
6872
end
6973
function testB2B_Case5(testCase)
7074
cd('B2B_Case5')
7175
wecSim
76+
close_system('RM3',0)
7277
end
7378
function testB2B_Case6(testCase)
7479
cd('B2B_Case6')
7580
wecSim
81+
close_system('RM3',0)
7682
end
7783
end
7884
end

Desalination/OSWEC_RO.slx

2.16 KB
Binary file not shown.

Free_Decay/TestFreeDecay.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,31 @@ function checkVisibilityRestored(testCase)
5353
function testFree_Decay_0m(testCase)
5454
cd('0m')
5555
wecSim
56+
close_system('sphere',0)
5657
cd(testCase.testDir)
5758
end
5859
function testFree_Decay_1m(testCase)
5960
cd('1m')
6061
wecSim
62+
close_system('sphere',0)
6163
cd(testCase.testDir)
6264
end
6365
function testFree_Decay_1m_ME(testCase)
6466
cd('1m-ME')
6567
wecSim
68+
close_system('sphere',0)
6669
cd(testCase.testDir)
6770
end
6871
function testFree_Decay_3m(testCase)
6972
cd('3m')
7073
wecSim
74+
close_system('sphere',0)
7175
cd(testCase.testDir)
7276
end
7377
function testFree_Decay_5m(testCase)
7478
cd('5m')
7579
wecSim
80+
close_system('sphere',0)
7681
cd(testCase.testDir)
7782
end
7883
end

Mooring/MoorDyn/wecSimInputFile.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
%% Simulation Data
22
simu = simulationClass();
33
simu.simMechanicsFile = 'RM3MoorDyn.slx'; % WEC-Sim Model File
4-
simu.mode = 'accelerator';
4+
simu.mode = 'accelerator';
55
simu.explorer = 'off';
6-
simu.rampTime = 40;
6+
simu.rampTime = 40;
77
simu.endTime = 400;
8-
simu.dt = 0.01;
8+
simu.dt = 0.01;
99
simu.cicDt = 0.05;
1010

1111
%% Wave Information

Mooring/TestMooring.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ function testMoorDyn(testCase)
5656
"MoorDyn is not installed");
5757
cd MoorDyn
5858
wecSim
59+
close_system('RM3MoorDyn',0)
5960
cd(testCase.testDir)
6061
end
6162
function testMooringMatrix(testCase)
6263
cd MooringMatrix
6364
wecSim
65+
close_system('RM3MooringMatrix',0)
6466
cd(testCase.testDir)
6567
end
6668
end

Morison_Element/TestMorisonElement.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ function checkVisibilityRestored(testCase)
5353
function testMorisonElement(testCase)
5454
cd('morisonElement')
5555
wecSim
56+
close_system('monopile',0)
5657
cd(testCase.testDir)
5758
end
5859
function testMonopile(testCase)
5960
cd('monopile')
6061
wecSim
62+
close_system('monopile',0)
6163
cd(testCase.testDir)
6264
end
6365
end

Multiple_Condition_Runs/TestMultipleConditionRuns.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,22 @@ function checkVisibilityRestored(testCase)
5353
function testRM3_MCROPT1(testCase)
5454
cd RM3_MCROPT1
5555
wecSimMCR
56+
close_system('RM3',0)
5657
end
5758
function testRM3_MCROPT2(testCase)
5859
cd RM3_MCROPT2
5960
wecSimMCR
61+
close_system('RM3',0)
6062
end
6163
function testRM3_MCROPT3(testCase)
6264
cd RM3_MCROPT3
6365
wecSimMCR
66+
close_system('RM3',0)
6467
end
6568
function testRM3_MCROPT3_SeaState(testCase)
6669
cd RM3_MCROPT3_SeaState
6770
wecSimMCR
71+
close_system('RM3',0)
6872
end
6973
end
7074
end

0 commit comments

Comments
 (0)