From e8cacc3364fbfbc84c5c6e60a3510b50e74aec90 Mon Sep 17 00:00:00 2001 From: Mathew Topper Date: Thu, 19 Sep 2024 16:23:49 +0100 Subject: [PATCH] Fix timeout in OWC MCR test on windows runners (#75) * Reduce number of cases in OWC mcr run to avoid timeout on windows runner. * Format README --- OWC/OrificeModel/TestOWC.m | 20 ++++++++++---------- OWC/OrificeModel/mcrOrifice.mat | Bin 301 -> 296 bytes OWC/README.md | 23 ++++++++++------------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/OWC/OrificeModel/TestOWC.m b/OWC/OrificeModel/TestOWC.m index 91cac69a..45872fd8 100644 --- a/OWC/OrificeModel/TestOWC.m +++ b/OWC/OrificeModel/TestOWC.m @@ -1,37 +1,37 @@ classdef TestOWC < matlab.unittest.TestCase - + properties OriginalDefault testDir h5Dir = 'hydroData' h5Name = 'test17a.h5' end - + methods (Access = 'public') function obj = TestOWC obj.testDir = fileparts(mfilename('fullpath')); end end - + methods (TestMethodSetup) function killPlots (~) set(0,'DefaultFigureVisible','off'); end end - methods(TestClassSetup) + methods(TestClassSetup) function captureVisibility(testCase) testCase.OriginalDefault = get(0,'DefaultFigureVisible'); - end - function runBemio(testCase) + end + function runBemio(testCase) cd(testCase.h5Dir); if isfile(testCase.h5Name) fprintf('runBemio skipped, *.h5 already exists\n') else bemio end - cd(testCase.testDir) - end + cd(testCase.testDir) + end end methods(TestMethodTeardown) @@ -40,11 +40,11 @@ function returnHome(testCase) end end - methods(TestClassTeardown) + methods(TestClassTeardown) function checkVisibilityRestored(testCase) set(0,'DefaultFigureVisible',testCase.OriginalDefault); testCase.assertEqual(get(0,'DefaultFigureVisible'), ... - testCase.OriginalDefault); + testCase.OriginalDefault); end end diff --git a/OWC/OrificeModel/mcrOrifice.mat b/OWC/OrificeModel/mcrOrifice.mat index 4e8ac6a3239442452018cf885419142626f7fee9..3410d55da3316ca9978fee5eae150fe73fa3888f 100644 GIT binary patch delta 113 zcmV-%0FM8y0;mFzI22Q5a3C=`ATT*PFgZFiG9WTAGBlAc%0*7 zU|=wjk6b-)`xz1Du%VeFfM!1@1BAmAZF6+{G!uIW9b%vK?D5_{&2%Wg#Gcmj5Z7=x T;HL!$&>{qA37j+l1lvmRm)C&*qPhbh|T==NzQ_7FP6KIz%xy?vVLP=1O1K+8j1 Y%i(~Z79c>25TGRp&@wn_03uvlBcgjP;{X5v diff --git a/OWC/README.md b/OWC/README.md index 29d038b4..6a42ea4a 100644 --- a/OWC/README.md +++ b/OWC/README.md @@ -1,20 +1,17 @@ # Oscillating Water Column -**Author:** Dominic Forbush +**Author:** Dominic Forbush -**Version:** WEC-Sim v5.0 +**Version:** WEC-Sim v5.0 -**Geometry** Cylinder Moonpool, WAMIT Test 17 geometry +**Geometry:** Cylinder Moonpool, WAMIT Test 17 geometry -**Dependencies:** +**Dependencies:** Control System Toolbox --> for tf() function - Control System Toolbox --> for tf() function +OWC example modeling an orifice for a floating body cylindrical OWC. Body has a +broken link to couple the GBM mode representing the heaving free surface to the +rigid body heave mode. Intended to demonstrate ways user can modify library +blocks to meet OWC modeling needs. -OWC example modeling an orifice for a floating body cylindrical OWC. -Body has a broken link to couple the GBM mode representing the heaving -free surface to the rigid body heave mode. -Intended to demonstrate ways user can modify library blocks to -meet OWC modeling needs. - -Run wecSimMCR for orifice area study in mcrOrifice.mat -which will work with the userDefinedFunctions.m +Run wecSimMCR for orifice area study in mcrOrifice.mat which will work with the +userDefinedFunctions.m