Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions OWC/OrificeModel/TestOWC.m
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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

Expand Down
Binary file modified OWC/OrificeModel/mcrOrifice.mat
Binary file not shown.
23 changes: 10 additions & 13 deletions OWC/README.md
Original file line number Diff line number Diff line change
@@ -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