forked from HaymanConsulting/seast-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plots.asv
25 lines (25 loc) · 3.18 KB
/
plots.asv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%% Just make sure that the different driver programs produce the same output files.
PlotFASToutput({'./current/5MW_OC4Semi-firstonly/SeaStSim/SeaSt_Driver.SeaSt.out','./current/5MW_OC4Semi-firstonly/HDSim/HD_Driver.SeaSt.out'},{'SeaStDvr','HDDvr'});
%% Now show that the original code and the new code produce the same results for the same Wave Kinematics (1st order only) specifications
%need to manually (or with a script) replace the new code's output channel headers specified below, so that the plotting script finds matching channels
%
%Replace: ... J1WaveElev J1WaveElv1 ... J1WaveElv2 J2WaveElev J2WaveElv1 J2WaveElv2
%With : ... Wave1Elev Wave1Elv1 ... Wave1Elv2 Wave2Elev Wave2Elv1 Wave2Elv2
PlotFASToutput({'./current/5MW_OC4Semi-firstonly/HDSim/HD_Driver.HD.out','./original/5MW_OC4Semi-firstonly/HDSim/hd_driver.HD.out'},{'SeaStDvr','OrigHDDvr'});
%% Now show that the original code and the new code produce the same results for the same Wave Kinematics (1st order + 2nd order) specifications
%need to manually (or with a script) replace the new code's output channel headers specified below, so that the plotting script finds matching channels
%
%Replace: ... J1WaveElev J1WaveElv1 ... J1WaveElv2 J2WaveElev J2WaveElv1 J2WaveElv2
%With : ... Wave1Elev Wave1Elv1 ... Wave1Elv2 Wave2Elev Wave2Elv1 Wave2Elv2
PlotFASToutput({'./current/5MW_OC4Semi-second/HDSim/HD_Driver.HD.out','./original/5MW_OC4Semi-second/HDSim/hd_driver.HD.out'},{'SeaStDvr','OrigHDDvr'});
%% This test case shows that given a periodic wave with a wavelength of 14.6 meters, we can use the new code's ability to displace the structure and use the displaced kinematics
% Test 1
% Displace one model 1/2 a wavelength (7.3 meters) compared to a baseline model with no displacement.
% Results should be that the wave kinematics are 180 degrees out of phase at the various member / joint locations
PlotFASToutput({'./current/Periodic/HDSim/HD_Driver_Zero_Disp.HD.out','./current/Periodic/HDSim/HD_Driver_7m_Disp.HD.out'},{'ZeroDisp','7m_Disp'});
% Test 2
% Displace one model a wavelength (14.6 meters) compared to a baseline model with no displacement.
% Results should be that the wave kinematics match at the various member / joint locations
PlotFASToutput({'./current/Periodic/HDSim/HD_Driver_Zero_Disp.HD.out','./current/Periodic/HDSim/HD_Driver_14m_Disp.HD.out'},{'ZeroDisp','14m_Disp'});
%% Verify New code matches original code for the OC4 Semi
PlotFASToutput({'./current/5MW_OC4Semi-firstonly/FASTSim/fast_driver_fixed_no_offset.out','./original/5MW_OC4Semi-firstonly/FASTSim/fast_driver_fixed_no_offset.out'},{'Current','Original'});