Repository navigation
768 lines (764 loc) · 48.6 KB
/
Copy pathreference-model-baselines.yml
File metadata and controls
768 lines (764 loc) · 48.6 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
name: MATLAB reference model baselines
on:
push:
branches: [master]
paths:
- '.github/workflows/reference-model-baselines.yml'
- 'tests/matlab/reference_model_baseline.m'
- 'tests/test_live_sphere_io.py'
- 'tests/test_live_current_h5.py'
- 'tests/test_rm3_heave_dynamics_parity.py'
- 'tests/test_rm3_pto_pretension_parity.py'
- 'tests/test_rm3_multidof_parity.py'
- 'tests/test_rm3_b2b_parity.py'
- 'tests/test_rm3_b2b_fitted_force.py'
- 'tests/test_rm3_b2b_cic_parity.py'
- 'tests/test_rm3_radiation_diagnostic.py'
- 'tools/rm3_radiation_diagnostic.py'
- 'tests/test_rm3_end_stops_parity.py'
- 'tests/test_rm3_end_stops_step_diagnostic.py'
- 'tests/test_rm3_end_stops_source_convergence.py'
- 'tests/test_rm3_end_stops_trajectory_parity.py'
- 'tests/test_rm3_radiation_options_parity.py'
- 'tests/test_rm3_pto_extension_parity.py'
- 'tests/test_rm3_mcr_parity.py'
- 'tests/test_rm3_public_floating_joint_parity.py'
- 'tests/test_rm3_mcr_orchestration_parity.py'
- 'tests/test_rm3_mcr_seastate_parity.py'
- 'tests/test_rm3_mooring_source.py'
- 'tests/test_rm3_moordyn_source.py'
- 'tests/test_rm3_moordyn_replay.py'
- 'tests/test_rm3_moordyn_coupled_parity.py'
- 'tests/test_floating_owc_source.py'
- 'tests/test_floating_owc_joint.py'
- 'tests/test_floating_owc_moordyn_replay.py'
- 'tests/test_floating_owc_coupled_parity.py'
- 'tests/test_floating_owc_pto_parity.py'
- 'tests/test_floating_owc_vertical_motion.py'
- 'tests/test_floating_owc_chamber.py'
- 'tests/test_floating_owc_turbine.py'
- 'tests/test_rm3_mooring_parity.py'
- 'tests/test_rm3_public_mooring_parity.py'
- 'tests/test_sphere_mean_drift_source.py'
- 'tests/test_sphere_mean_drift_parity.py'
- 'tests/test_sphere_pto_config_parity.py'
- 'tests/test_sphere_reactive_pi_parity.py'
- 'tests/test_sphere_declutching_parity.py'
- 'tests/test_sphere_latching_parity.py'
- 'tests/test_case_dynamics_parity.py'
- 'tests/test_ellipsoid_nonlinear_hydro_parity.py'
- 'tests/test_sphere_variable_mass_parity.py'
- 'tests/test_sphere_direct_drive_parity.py'
- 'tests/test_rm3_direct_linear_generator_source.py'
- 'tests/test_rm3_direct_linear_generator_parity.py'
- 'tests/test_rm3_hydraulic_source.py'
- 'tests/test_rm3_hydraulic_parity.py'
- 'tests/test_oswec_hydraulic_source.py'
- 'tests/test_oswec_hydraulic_parity.py'
- 'tests/test_oswec_desalination_source.py'
- 'tests/test_oswec_desalination_membrane_parity.py'
- 'tests/test_oswec_desalination_accumulator_parity.py'
- 'tests/test_oswec_desalination_cylinder_parity.py'
- 'tests/test_oswec_desalination_network_parity.py'
- 'tests/test_cable_source.py'
- 'tests/test_mbari_cable_parity.py'
- 'tests/test_wavebot_impedance_source.py'
- 'tests/test_wavebot_impedance_parity.py'
- 'tests/test_wavebot_control_source.py'
- 'tests/test_wavestar_source.py'
- 'tests/test_wavestar_parity.py'
- 'tests/test_wavestar_fault_source.py'
- 'tests/test_wavestar_fault_parity.py'
- 'tests/test_wavestar_nmpc_source.py'
- 'tests/test_wavestar_nmpc_fine_diagnostic.py'
- 'tests/test_monopile_hydro_parity.py'
- 'tests/test_crank.py'
- 'tests/test_hydraulic_cylinder.py'
- 'tests/test_hydraulic_valve.py'
- 'tests/test_hydraulic_accumulator.py'
- 'tests/test_hydraulic_drive.py'
- 'tests/test_rm3_public_linear_generator_parity.py'
- 'tests/test_gbm_source_parity.py'
- 'tests/test_gbm_motion_parity.py'
- 'tests/test_owc_orifice_source.py'
- 'tests/test_sphere_mpc_source.py'
- 'tests/test_oswec_hinge_dynamics_parity.py'
- 'tests/test_oswec_nonhydro_parity.py'
- 'tests/test_oswec_hinge_pretension_parity.py'
- 'tests/test_oswec_irregular_wave_parity.py'
- 'tests/test_oswec_multi_wave_source.py'
- 'tests/test_oswec_multi_wave_parity.py'
- 'tests/test_oswec_full_directional_source.py'
- 'tests/test_oswec_full_directional_parity.py'
- 'tests/test_oswec_passive_yaw_parity.py'
- 'tests/test_oswec_passive_yaw_irregular_parity.py'
- 'tests/test_morison_fixed_parity.py'
- 'tests/test_morison_fixed_current_parity.py'
- 'tests/test_morison_moving_source.py'
- 'tests/test_sphere_moving_morison_parity.py'
- 'tests/test_sphere_wave_morison_parity.py'
- 'tests/test_sphere_normal_tangential_parity.py'
- 'tests/test_sphere_pto_morison_parity.py'
- 'tests/test_passive_yaw_configuration.py'
- 'tests/test_sphere_dynamics_parity.py'
- 'tests/test_sphere_elevation_import_parity.py'
- 'wecsim/dynamics/linearHeave.py'
- 'wecsim/dynamics/hingePitch.py'
- 'wecsim/environment/irregularWave.py'
- 'wecsim/hydrodynamics/morison/**'
- 'wecsim/dynamics/moorDyn.py'
- 'wecsim/dynamics/rm3Regular.py'
- 'wecsim/hydrodynamics/radiation.py'
- 'wecsim/dynamics/hardStops.py'
- 'wecsim/analysis/mcr.py'
- 'wecsim/dynamics/generalDynamics.py'
- 'wecsim/dynamics/caseDynamics.py'
- 'wecsim/control/controls.py'
- 'wecsim/dynamics/ptoConnections.py'
- 'wecsim/hydrodynamics/passiveYaw.py'
- 'wecsim/hydrodynamics/nonlinearHydro.py'
- 'wecsim/hydrodynamics/variableHydro.py'
- 'wecsim/components/directDrive.py'
- 'wecsim/components/directLinearGenerator.py'
- 'wecsim/components/hydraulic.py'
- 'wecsim/components/crank.py'
- 'wecsim/components/oswecHydraulic.py'
- 'wecsim/components/oswecDesalination.py'
- 'wecsim/components/desalination.py'
- 'wecsim/dynamics/cable.py'
- 'wecsim/dynamics/mbariCable.py'
- 'wecsim/control/wavebotImpedance.py'
- 'wecsim/control/wavebotControl.py'
- 'wecsim/dynamics/wavestar.py'
- 'wecsim/control/wavestarFault.py'
- 'wecsim/control/wavestarNmpc.py'
- 'wecsim/dynamics/friction.py'
- 'wecsim/hydrodynamics/fixedHydroMonopile.py'
- 'wecsim/components/rm3Hydraulic.py'
- 'wecsim/components/electricGenerator.py'
- 'wecsim/interface/api.py'
- 'wecsim/__init__.py'
- 'wecsim/interface/cli.py'
- 'wecsim/hydrodynamics/bodyClass.py'
- 'wecsim/dynamics/gbmFloating.py'
- 'wecsim/components/orifice.py'
- 'wecsim/components/floatingOwc.py'
- 'wecsim/dynamics/floatingOwcDynamics.py'
- 'wecsim/control/mpcPlant.py'
workflow_dispatch:
inputs:
model:
description: Run all models or a selected reference application
type: choice
options: [all, RM3_PTO_PRETENSION, MONOPILE_HYDRO, CABLE_SOURCE, WAVEBOT_IMPEDANCE, WAVEBOT_CONTROL, WECCCOMP_SOURCE, WECCCOMP_FAULT_SOURCE, WECCCOMP_NMPC_SOURCE, WECCCOMP_NMPC_FINE_DIAG, WECCCOMP_NMPC_FINE_CTRL_DIAG, OSWEC, OSWEC_Nonhydro, OWC_ORIFICE, FLOATING_OWC_SOURCE, FLOATING_OWC_PTO, RM3_MCR_ARRAY, SPHERE_ELEVATION_IMPORT, WAVE_MARKERS_RM3, WAVE_MARKERS_OSWEC, MORISON_FIXED, MORISON_FIXED_CURRENT, SPHERE_MOVING_MORISON, SPHERE_MOVING_MORISON_WAVE, SPHERE_MOVING_MORISON_CURRENT, SPHERE_MOVING_MORISON_NORMAL, SPHERE_PTO_MORISON_NORMAL, RM3_DD_PTO, RM3_HYDRAULIC_SOURCE, OSWEC_HYDRAULIC_SOURCE, OSWEC_DESALINATION_SOURCE, SPHERE_MPC, GBM_BARGE, SPHERE_REACTIVE_DDPTO, Sphere_PTO_Config, SPHERE_VARIABLE_MASS, ELLIPSOID_NLH_REG, ELLIPSOID_NLH_CIC, ELLIPSOID_NLH_ODE45, OSWEC_PASSIVE_YAW_IRR_CONT, OSWEC_PASSIVE_YAW_IRR_CONT_SEED2, OSWEC_PASSIVE_YAW_IRR_CONT_SEED3, OSWEC_PASSIVE_YAW_IRR, OSWEC_PASSIVE_YAW, OSWEC_VARIABLE_YAW_2DEG, OSWEC_VARIABLE_YAW_PUBLISHED, OSWEC_VARIABLE_YAW_IRREGULAR_120S, OSWEC_VARIABLE_YAW_IRREGULAR_600S, OSWEC_FULL_DIR, OSWEC_MULTI_WAVE, RM3_B2B, RM3_B2B_STATE_SPACE, RM3_Radiation_Options, RM3_MOORING_MATRIX, RM3_MOORDYN, SPHERE_MEAN_DRIFT, RM3_MCR_SEASTATE, RM3_END_STOPS, RM3_END_STOPS_STEP, RM3_END_STOPS_STEP_FINE, RM3_END_STOPS_STEP_FINER, RM3_END_STOPS_FULL_FINE, RM3_END_STOPS_FULL_FINER, RM3_END_STOPS_FULL_PAIR]
default: all
concurrency:
group: matlab-reference-baselines-${{ github.ref }}-${{ github.event.inputs.model || 'all' }}
cancel-in-progress: true
jobs:
baseline:
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_600S' && 150 || 60 }}
strategy:
fail-fast: false
matrix:
model: ${{ fromJSON(inputs.model == 'RM3_PTO_PRETENSION' && '["RM3_PTO_PRETENSION"]' || inputs.model == 'MONOPILE_HYDRO' && '["MONOPILE_HYDRO"]' || inputs.model == 'CABLE_SOURCE' && '["CABLE_SOURCE"]' || inputs.model == 'WAVEBOT_IMPEDANCE' && '["WAVEBOT_IMPEDANCE"]' || inputs.model == 'WAVEBOT_CONTROL' && '["WAVEBOT_CONTROL"]' || inputs.model == 'WECCCOMP_SOURCE' && '["WECCCOMP_SOURCE"]' || inputs.model == 'WECCCOMP_FAULT_SOURCE' && '["WECCCOMP_FAULT_SOURCE"]' || inputs.model == 'WECCCOMP_NMPC_SOURCE' && '["WECCCOMP_NMPC_SOURCE"]' || inputs.model == 'WECCCOMP_NMPC_FINE_DIAG' && '["WECCCOMP_NMPC_FINE_DIAG"]' || inputs.model == 'WECCCOMP_NMPC_FINE_CTRL_DIAG' && '["WECCCOMP_NMPC_FINE_CTRL_DIAG"]' || inputs.model == 'OWC_ORIFICE' && '["OWC_ORIFICE"]' || inputs.model == 'FLOATING_OWC_SOURCE' && '["FLOATING_OWC_SOURCE"]' || inputs.model == 'FLOATING_OWC_PTO' && '["FLOATING_OWC_PTO"]' || inputs.model == 'OSWEC' && '["OSWEC"]' || inputs.model == 'OSWEC_Nonhydro' && '["OSWEC_Nonhydro"]' || inputs.model == 'RM3_MCR_ARRAY' && '["RM3_MCR_ARRAY"]' || inputs.model == 'SPHERE_ELEVATION_IMPORT' && '["SPHERE_ELEVATION_IMPORT"]' || inputs.model == 'WAVE_MARKERS_RM3' && '["WAVE_MARKERS_RM3"]' || inputs.model == 'WAVE_MARKERS_OSWEC' && '["WAVE_MARKERS_OSWEC"]' || inputs.model == 'MORISON_FIXED' && '["MORISON_FIXED"]' || inputs.model == 'MORISON_FIXED_CURRENT' && '["MORISON_FIXED_CURRENT"]' || inputs.model == 'SPHERE_MOVING_MORISON' && '["SPHERE_MOVING_MORISON"]' || inputs.model == 'SPHERE_MOVING_MORISON_WAVE' && '["SPHERE_MOVING_MORISON_WAVE"]' || inputs.model == 'SPHERE_MOVING_MORISON_NORMAL' && '["SPHERE_MOVING_MORISON_NORMAL"]' || inputs.model == 'SPHERE_PTO_MORISON_NORMAL' && '["SPHERE_PTO_MORISON_NORMAL"]' || inputs.model == 'SPHERE_MOVING_MORISON_CURRENT' && '["SPHERE_MOVING_MORISON_CURRENT"]' || inputs.model == 'RM3_DD_PTO' && '["RM3_DD_PTO"]' || inputs.model == 'RM3_HYDRAULIC_SOURCE' && '["RM3_HYDRAULIC_SOURCE"]' || inputs.model == 'OSWEC_HYDRAULIC_SOURCE' && '["OSWEC_HYDRAULIC_SOURCE"]' || inputs.model == 'OSWEC_DESALINATION_SOURCE' && '["OSWEC_DESALINATION_SOURCE"]' || inputs.model == 'SPHERE_MPC' && '["SPHERE_MPC"]' || inputs.model == 'GBM_BARGE' && '["GBM_BARGE"]' || inputs.model == 'SPHERE_REACTIVE_DDPTO' && '["SPHERE_REACTIVE_DDPTO"]' || inputs.model == 'Sphere_PTO_Config' && '["Sphere_PTO_Config"]' || inputs.model == 'SPHERE_VARIABLE_MASS' && '["SPHERE_VARIABLE_MASS"]' || inputs.model == 'ELLIPSOID_NLH_REG' && '["ELLIPSOID_NLH_REG"]' || inputs.model == 'ELLIPSOID_NLH_CIC' && '["ELLIPSOID_NLH_CIC"]' || inputs.model == 'ELLIPSOID_NLH_ODE45' && '["ELLIPSOID_NLH_ODE45"]' || inputs.model == 'OSWEC_PASSIVE_YAW_IRR_CONT' && '["OSWEC_PASSIVE_YAW_IRR_CONT"]' || inputs.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED2' && '["OSWEC_PASSIVE_YAW_IRR_CONT_SEED2"]' || inputs.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED3' && '["OSWEC_PASSIVE_YAW_IRR_CONT_SEED3"]' || inputs.model == 'OSWEC_PASSIVE_YAW_IRR' && '["OSWEC_PASSIVE_YAW_IRR"]' || inputs.model == 'OSWEC_PASSIVE_YAW' && '["OSWEC_PASSIVE_YAW"]' || inputs.model == 'OSWEC_VARIABLE_YAW_2DEG' && '["OSWEC_VARIABLE_YAW_2DEG"]' || inputs.model == 'OSWEC_VARIABLE_YAW_PUBLISHED' && '["OSWEC_VARIABLE_YAW_PUBLISHED"]' || inputs.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_120S' && '["OSWEC_VARIABLE_YAW_IRREGULAR_120S"]' || inputs.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_600S' && '["OSWEC_VARIABLE_YAW_IRREGULAR_600S"]' || inputs.model == 'OSWEC_FULL_DIR' && '["OSWEC_FULL_DIR"]' || inputs.model == 'OSWEC_MULTI_WAVE' && '["OSWEC_MULTI_WAVE"]' || inputs.model == 'RM3_B2B' && '["RM3_B2B"]' || inputs.model == 'RM3_B2B_STATE_SPACE' && '["RM3_B2B_STATE_SPACE"]' || inputs.model == 'RM3_Radiation_Options' && '["RM3_Radiation_Options"]' || inputs.model == 'RM3_MOORING_MATRIX' && '["RM3_MOORING_MATRIX"]' || inputs.model == 'RM3_MOORDYN' && '["RM3_MOORDYN"]' || inputs.model == 'SPHERE_MEAN_DRIFT' && '["SPHERE_MEAN_DRIFT"]' || inputs.model == 'RM3_MCR_SEASTATE' && '["RM3_MCR_SEASTATE"]' || inputs.model == 'RM3_END_STOPS' && '["RM3_END_STOPS"]' || inputs.model == 'RM3_END_STOPS_STEP' && '["RM3_END_STOPS_STEP"]' || inputs.model == 'RM3_END_STOPS_STEP_FINE' && '["RM3_END_STOPS_STEP_FINE"]' || inputs.model == 'RM3_END_STOPS_STEP_FINER' && '["RM3_END_STOPS_STEP_FINER"]' || inputs.model == 'RM3_END_STOPS_FULL_FINE' && '["RM3_END_STOPS_FULL_FINE"]' || inputs.model == 'RM3_END_STOPS_FULL_FINER' && '["RM3_END_STOPS_FULL_FINER"]' || inputs.model == 'RM3_END_STOPS_FULL_PAIR' && '["RM3_END_STOPS_FULL_FINE", "RM3_END_STOPS_FULL_FINER"]' || '["MONOPILE_HYDRO", "CABLE_SOURCE", "WAVEBOT_IMPEDANCE", "WAVEBOT_CONTROL", "WECCCOMP_SOURCE", "WECCCOMP_FAULT_SOURCE", "SPHERE_ELEVATION_IMPORT", "MORISON_FIXED", "MORISON_FIXED_CURRENT", "SPHERE_MOVING_MORISON", "SPHERE_MOVING_MORISON_WAVE", "SPHERE_MOVING_MORISON_NORMAL", "SPHERE_PTO_MORISON_NORMAL", "RM3_DD_PTO", "RM3", "OSWEC", "OSWEC_Nonhydro", "GBM_BARGE", "SPHERE_VARIABLE_MASS", "SPHERE_REACTIVE_DDPTO", "OSWEC_FULL_DIR", "OSWEC_MULTI_WAVE", "OSWEC_PASSIVE_YAW", "Sphere", "SPHERE_MEAN_DRIFT", "RM3_B2B", "RM3_END_STOPS", "RM3_PTO_Extension", "RM3_Radiation_Options", "Sphere_Passive", "Sphere_PTO_Config", "Sphere_Reactive_PI", "Sphere_Declutching", "Sphere_Latching", "RM3_MCR", "RM3_MCR_ARRAY", "RM3_MCR_EXCEL", "RM3_MCR_MAT", "RM3_MCR_SEASTATE", "ELLIPSOID_NLH_REG", "ELLIPSOID_NLH_CIC", "ELLIPSOID_NLH_ODE45"]') }}
name: ${{ matrix.model }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
repository: WEC-Sim/WEC-Sim
ref: 0753b2e47f2457c078751dcfe5d251d1767b80ab
path: matlab-ref
filter: blob:none
sparse-checkout: |
source
examples/${{ matrix.model == 'RM3_PTO_PRETENSION' && 'RM3' || matrix.model }}
- uses: actions/checkout@v7
if: matrix.model == 'MONOPILE_HYDRO' || matrix.model == 'CABLE_SOURCE' || matrix.model == 'WAVEBOT_IMPEDANCE' || matrix.model == 'WAVEBOT_CONTROL' || matrix.model == 'WECCCOMP_SOURCE' || matrix.model == 'WECCCOMP_FAULT_SOURCE' || matrix.model == 'WECCCOMP_NMPC_SOURCE' || matrix.model == 'WECCCOMP_NMPC_FINE_DIAG' || matrix.model == 'WECCCOMP_NMPC_FINE_CTRL_DIAG' || matrix.model == 'OWC_ORIFICE' || matrix.model == 'FLOATING_OWC_SOURCE' || matrix.model == 'FLOATING_OWC_PTO' || matrix.model == 'SPHERE_ELEVATION_IMPORT' || matrix.model == 'WAVE_MARKERS_RM3' || matrix.model == 'WAVE_MARKERS_OSWEC' || matrix.model == 'MORISON_FIXED' || matrix.model == 'MORISON_FIXED_CURRENT' || matrix.model == 'SPHERE_MOVING_MORISON' || matrix.model == 'SPHERE_MOVING_MORISON_WAVE' || matrix.model == 'SPHERE_MOVING_MORISON_CURRENT' || matrix.model == 'SPHERE_MOVING_MORISON_NORMAL' || matrix.model == 'SPHERE_PTO_MORISON_NORMAL' || matrix.model == 'RM3_DD_PTO' || matrix.model == 'RM3_HYDRAULIC_SOURCE' || matrix.model == 'OSWEC_HYDRAULIC_SOURCE' || matrix.model == 'OSWEC_DESALINATION_SOURCE' || matrix.model == 'SPHERE_MPC' || matrix.model == 'GBM_BARGE' || matrix.model == 'SPHERE_REACTIVE_DDPTO' || matrix.model == 'SPHERE_VARIABLE_MASS' || matrix.model == 'ELLIPSOID_NLH_REG' || matrix.model == 'ELLIPSOID_NLH_CIC' || matrix.model == 'ELLIPSOID_NLH_ODE45' || matrix.model == 'Sphere' || matrix.model == 'SPHERE_MEAN_DRIFT' || matrix.model == 'Sphere_Passive' || matrix.model == 'Sphere_PTO_Config' || matrix.model == 'Sphere_Reactive_PI' || matrix.model == 'Sphere_Declutching' || matrix.model == 'Sphere_Latching' || matrix.model == 'RM3_B2B' || matrix.model == 'RM3_B2B_STATE_SPACE' || matrix.model == 'RM3_MOORING_MATRIX' || matrix.model == 'RM3_MOORDYN' || matrix.model == 'RM3_END_STOPS' || matrix.model == 'RM3_END_STOPS_STEP' || matrix.model == 'RM3_END_STOPS_STEP_FINE' || matrix.model == 'RM3_END_STOPS_FULL_FINE' || matrix.model == 'RM3_END_STOPS_FULL_FINER' || matrix.model == 'RM3_END_STOPS_STEP_FINER' || matrix.model == 'RM3_PTO_Extension' || matrix.model == 'RM3_Radiation_Options' || matrix.model == 'RM3_MCR' || matrix.model == 'RM3_MCR_ARRAY' || matrix.model == 'RM3_MCR_EXCEL' || matrix.model == 'RM3_MCR_MAT' || matrix.model == 'RM3_MCR_SEASTATE' || matrix.model == 'OSWEC_Nonhydro' || matrix.model == 'OSWEC_MULTI_WAVE' || matrix.model == 'OSWEC_FULL_DIR' || matrix.model == 'OSWEC_PASSIVE_YAW' || matrix.model == 'OSWEC_VARIABLE_YAW_2DEG' || matrix.model == 'OSWEC_VARIABLE_YAW_PUBLISHED' || matrix.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_120S' || matrix.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_600S' || matrix.model == 'OSWEC_PASSIVE_YAW_IRR' || matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT' || matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED2' || matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED3'
with:
repository: WEC-Sim/WEC-Sim_Applications
ref: d53d4d4c9eda2581f04204f5d394a6ef84bb099e
path: applications
filter: blob:none
lfs: true
sparse-checkout: |
PTO-Sim/RM3/RM3_DD_PTO
PTO-Sim/RM3/RM3_cHydraulic_PTO
PTO-Sim/OSWEC/OSWEC_Hydraulic_PTO
PTO-Sim/OSWEC/OSWEC_Hydraulic_Crank_PTO
Desalination
Cable
Load_Mitigating_Controls/CalcImpedance
Load_Mitigating_Controls/ControlTests
Load_Mitigating_Controls/hydroData
WECCCOMP/WECCCOMP
WECCCOMP/WECCCOMP_Fault_Implementation
WECCCOMP/WECCCOMP_Nonlinear_Model_Predictive
WECCCOMP/hydroData
WECCCOMP/geometry
Load_Mitigating_Controls/geometry
Morison_Element/morisonElement
Morison_Element/monopile
Morison_Element/hydroData
Morison_Element/geometry
_Common_Input_Files/Sphere
Free_Decay
Wave_Markers
_Common_Input_Files/RM3
_Common_Input_Files/OSWEC
Nonhydro_Body
Multiple_Wave_Spectra
Full_Directional_Waves
Passive_Yaw/PassiveYawOFF
Passive_Yaw/PassiveYawON
Passive_Yaw/PassiveYawRegression
Variable_Hydro/Passive_Yaw
Body-to-Body_Interactions/B2B_Case1
Body-to-Body_Interactions/B2B_Case2
Body-to-Body_Interactions/B2B_Case3
Body-to-Body_Interactions/B2B_Case4
Body-to-Body_Interactions/B2B_Case5
Body-to-Body_Interactions/B2B_Case6
End_Stops
Radiation_Force_Options
RM3_PTO_Extension
Controls/Passive (P)
Controls/Reactive (PI)
Controls/ReactiveWithPTO
Controls/Declutching
Controls/Latching
Multiple_Condition_Runs/RM3_MCROPT1
Multiple_Condition_Runs/RM3_MCROPT2
Multiple_Condition_Runs/RM3_MCROPT3
Multiple_Condition_Runs/RM3_MCROPT3_SeaState
Mooring/MooringMatrix
Mooring/MoorDyn
Mean_Drift
Variable_Hydro/Variable_Mass
Nonlinear_Hydro
Generalized_Body_Modes
Controls/MPC
OWC/OrificeModel
OWC/FloatingOWC
- uses: actions/checkout@v7
if: matrix.model == 'RM3_MOORDYN' || matrix.model == 'FLOATING_OWC_SOURCE' || matrix.model == 'FLOATING_OWC_PTO'
with:
repository: WEC-Sim/MoorDyn
ref: 34c0703c9a5b74fd2cc5bb52caaadaaa356d675e
path: MoorDyn
- name: Install pinned MoorDyn and compatible C++ runtime
if: matrix.model == 'RM3_MOORDYN' || matrix.model == 'FLOATING_OWC_SOURCE' || matrix.model == 'FLOATING_OWC_PTO'
run: |
mkdir -p matlab-ref/source/functions/moorDyn
cp -r MoorDyn/* matlab-ref/source/functions/moorDyn/
cp MoorDyn/linux_libraries/x86_64/libmoordyn.so* matlab-ref/source/functions/moorDyn/
library=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
test -f "$library"
strings "$library" | grep GLIBCXX_3.4.32
echo "LD_PRELOAD=$library" >> "$GITHUB_ENV"
- uses: matlab-actions/setup-matlab@v3
with:
release: R2025b
products: ${{ (matrix.model == 'WECCCOMP_NMPC_SOURCE' || matrix.model == 'WECCCOMP_NMPC_FINE_DIAG' || matrix.model == 'WECCCOMP_NMPC_FINE_CTRL_DIAG') && 'Simulink Simscape Simscape_Multibody Stateflow Control_System_Toolbox Optimization_Toolbox System_Identification_Toolbox Statistics_and_Machine_Learning_Toolbox' || matrix.model == 'WECCCOMP_FAULT_SOURCE' && 'Simulink Simscape Simscape_Multibody Stateflow' || matrix.model == 'OSWEC_DESALINATION_SOURCE' && 'Simulink Simscape Simscape_Multibody Simscape_Fluids' || matrix.model == 'OWC_ORIFICE' && 'Simulink Simscape Simscape_Multibody Signal_Processing_Toolbox Control_System_Toolbox' || matrix.model == 'SPHERE_MPC' && 'Simulink Simscape Simscape_Multibody Control_System_Toolbox Optimization_Toolbox Statistics_and_Machine_Learning_Toolbox' || matrix.model == 'WAVEBOT_CONTROL' && 'Simulink Simscape Simscape_Multibody DSP_System_Toolbox' || (matrix.model == 'SPHERE_REACTIVE_DDPTO' || matrix.model == 'Sphere_Passive' || matrix.model == 'Sphere_PTO_Config' || matrix.model == 'Sphere_Reactive_PI' || matrix.model == 'Sphere_Declutching' || matrix.model == 'Sphere_Latching') && 'Simulink Simscape Simscape_Multibody Control_System_Toolbox' || 'Simulink Simscape Simscape_Multibody' }}
- uses: matlab-actions/run-command@v3
with:
command: addpath('tests/matlab'); reference_model_baseline('${{ matrix.model }}')
- uses: matlab-actions/run-command@v3
if: matrix.model == 'CABLE_SOURCE'
with:
command: addpath('tests/matlab'); cable_step_refinement
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
- run: python -m pip install -e ".[excel]" pytest
- run: python -m pytest -q tests/test_monopile_hydro_parity.py
if: matrix.model == 'MONOPILE_HYDRO'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_MONOPILE_H5: applications/Morison_Element/hydroData/monopile.h5
- run: python -m pytest -q tests/test_cable_source.py tests/test_mbari_cable_parity.py tests/test_mbari_cable_step_parity.py
if: matrix.model == 'CABLE_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_CABLE_H5: applications/Cable/hydroData/mbari.h5
- run: python -m pytest -q tests/test_wavebot_impedance_source.py tests/test_wavebot_impedance_parity.py
if: matrix.model == 'WAVEBOT_IMPEDANCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVEBOT_H5: applications/Load_Mitigating_Controls/hydroData/waveBotBuoy.h5
WEC_SIM_WAVEBOT_MULTISINE: applications/Load_Mitigating_Controls/CalcImpedance/multisine3DOFA.mat
- run: python -m pytest -q tests/test_wavebot_control_source.py
if: matrix.model == 'WAVEBOT_CONTROL'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVEBOT_H5: applications/Load_Mitigating_Controls/hydroData/waveBotBuoy.h5
WEC_SIM_WAVEBOT_CONTROL_DIR: applications/Load_Mitigating_Controls/ControlTests
- run: python -m pytest -q tests/test_wavestar_source.py tests/test_wavestar_parity.py
if: matrix.model == 'WECCCOMP_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVESTAR_H5: applications/WECCCOMP/hydroData/wavestar.h5
- run: python -m pytest -q tests/test_wavestar_fault_source.py tests/test_wavestar_fault_parity.py
if: matrix.model == 'WECCCOMP_FAULT_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVESTAR_H5: applications/WECCCOMP/hydroData/wavestar.h5
- run: python -m pytest -q tests/test_wavestar_nmpc_source.py
if: matrix.model == 'WECCCOMP_NMPC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVESTAR_H5: applications/WECCCOMP/hydroData/wavestar.h5
- run: python -m pytest -q -s tests/test_wavestar_nmpc_fine_diagnostic.py
if: matrix.model == 'WECCCOMP_NMPC_FINE_DIAG'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVESTAR_H5: applications/WECCCOMP/hydroData/wavestar.h5
- run: python -m pytest -q -s tests/test_wavestar_nmpc_fine_control_diagnostic.py
if: matrix.model == 'WECCCOMP_NMPC_FINE_CTRL_DIAG'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_WAVESTAR_H5: applications/WECCCOMP/hydroData/wavestar.h5
- run: python -m pytest -q tests/test_morison_fixed_parity.py
if: matrix.model == 'MORISON_FIXED'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_morison_fixed_current_parity.py
if: matrix.model == 'MORISON_FIXED_CURRENT'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_morison_moving_source.py
if: matrix.model == 'MORISON_FIXED'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_moving_morison_parity.py
if: matrix.model == 'SPHERE_MOVING_MORISON'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_wave_morison_parity.py
if: matrix.model == 'SPHERE_MOVING_MORISON_WAVE'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_normal_tangential_parity.py
if: matrix.model == 'SPHERE_MOVING_MORISON_NORMAL'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_pto_morison_parity.py
if: matrix.model == 'SPHERE_PTO_MORISON_NORMAL'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_moving_morison_current_diagnostic.py
if: matrix.model == 'SPHERE_MOVING_MORISON_CURRENT'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_case_dynamics_parity.py
env:
WEC_SIM_REFERENCE_MODEL: ${{ matrix.model }}
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_ellipsoid_nonlinear_hydro_parity.py
if: matrix.model == 'ELLIPSOID_NLH_REG' || matrix.model == 'ELLIPSOID_NLH_CIC' || matrix.model == 'ELLIPSOID_NLH_ODE45'
env:
WEC_SIM_REFERENCE_MODEL: ${{ matrix.model }}
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_variable_mass_parity.py
if: matrix.model == 'SPHERE_VARIABLE_MASS'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_direct_drive_parity.py
if: matrix.model == 'SPHERE_REACTIVE_DDPTO'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_hydraulic_source.py tests/test_rm3_hydraulic_parity.py
if: matrix.model == 'RM3_HYDRAULIC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_RM3_H5: applications/_Common_Input_Files/RM3/hydroData/rm3.h5
- run: python -m pytest -q tests/test_crank.py tests/test_oswec_hydraulic_source.py tests/test_oswec_hydraulic_parity.py
if: matrix.model == 'OSWEC_HYDRAULIC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_OSWEC_H5: applications/_Common_Input_Files/OSWEC/hydroData/oswec.h5
- run: python -m pytest -q tests/test_crank.py tests/test_hydraulic_accumulator.py tests/test_oswec_desalination_source.py tests/test_oswec_desalination_membrane_parity.py tests/test_oswec_desalination_accumulator_parity.py tests/test_oswec_desalination_cylinder_parity.py tests/test_oswec_desalination_network_parity.py
if: matrix.model == 'OSWEC_DESALINATION_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_OSWEC_H5: applications/_Common_Input_Files/OSWEC/hydroData/oswec.h5
- run: python -m pytest -q tests/test_rm3_direct_linear_generator_source.py
if: matrix.model == 'RM3_DD_PTO'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_direct_linear_generator_parity.py
if: matrix.model == 'RM3_DD_PTO'
env:
WEC_SIM_RM3_H5: applications/_Common_Input_Files/RM3/hydroData/rm3.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_public_linear_generator_parity.py
if: matrix.model == 'RM3_DD_PTO'
env:
WEC_SIM_RM3_H5: applications/_Common_Input_Files/RM3/hydroData/rm3.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_gbm_source_parity.py
if: matrix.model == 'GBM_BARGE'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_gbm_motion_parity.py
if: matrix.model == 'GBM_BARGE'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_owc_orifice_source.py
if: matrix.model == 'OWC_ORIFICE'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_mpc_source.py
if: matrix.model == 'SPHERE_MPC'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_live_current_h5.py
if: matrix.model == 'RM3' || matrix.model == 'OSWEC'
env:
WEC_SIM_REFERENCE_MODEL: ${{ matrix.model }}
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
- run: python -m pytest -q tests/test_rm3_pto_pretension_parity.py
if: matrix.model == 'RM3_PTO_PRETENSION'
env:
WEC_SIM_RM3_H5: matlab-ref/examples/RM3/hydroData/rm3.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_heave_dynamics_parity.py
if: matrix.model == 'RM3'
env:
WEC_SIM_REFERENCE_MODEL: RM3
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_multidof_parity.py
if: matrix.model == 'RM3'
env:
WEC_SIM_REFERENCE_MODEL: RM3
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_b2b_parity.py
if: matrix.model == 'RM3_B2B'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_b2b_fitted_force.py
if: matrix.model == 'RM3_B2B_STATE_SPACE'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_b2b_cic_parity.py
if: matrix.model == 'RM3_B2B'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_radiation_diagnostic.py::test_pinned_bemio_radiation_transfer_matches_diagnostic_fixture
if: matrix.model == 'RM3_B2B'
env:
WEC_SIM_RM3_H5: applications/_Common_Input_Files/RM3/hydroData/rm3.h5
- run: python -m pytest -q tests/test_rm3_end_stops_parity.py
if: matrix.model == 'RM3_END_STOPS'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_end_stops_step_diagnostic.py
if: matrix.model == 'RM3_END_STOPS_STEP' || matrix.model == 'RM3_END_STOPS_STEP_FINE' || matrix.model == 'RM3_END_STOPS_STEP_FINER' || matrix.model == 'RM3_END_STOPS_FULL_FINE' || matrix.model == 'RM3_END_STOPS_FULL_FINER'
env:
WEC_SIM_REFERENCE_MODEL: ${{ matrix.model }}
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_end_stops_trajectory_parity.py
if: matrix.model == 'RM3_END_STOPS_STEP_FINE' || matrix.model == 'RM3_END_STOPS_STEP_FINER' || matrix.model == 'RM3_END_STOPS_FULL_FINER'
env:
WEC_SIM_REFERENCE_MODEL: ${{ matrix.model }}
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_radiation_options_parity.py
if: matrix.model == 'RM3_Radiation_Options'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_pto_extension_parity.py
if: matrix.model == 'RM3_PTO_Extension'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_mcr_parity.py
if: matrix.model == 'RM3_MCR'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_mcr_orchestration_parity.py
if: matrix.model == 'RM3_MCR_ARRAY' || matrix.model == 'RM3_MCR_EXCEL' || matrix.model == 'RM3_MCR_MAT'
env:
WEC_SIM_MCR_LABEL: ${{ matrix.model }}
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_public_floating_joint_parity.py
if: matrix.model == 'RM3_MCR_ARRAY'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_mcr_seastate_parity.py
if: matrix.model == 'RM3_MCR_SEASTATE'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_mooring_source.py
if: matrix.model == 'RM3_MOORING_MATRIX'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_mooring_parity.py
if: matrix.model == 'RM3_MOORING_MATRIX'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_public_mooring_parity.py
if: matrix.model == 'RM3_MOORING_MATRIX'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_rm3_moordyn_source.py
if: matrix.model == 'RM3_MOORDYN'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_floating_owc_source.py tests/test_floating_owc_joint.py tests/test_floating_owc_chamber.py tests/test_floating_owc_turbine.py tests/test_floating_owc_vertical_motion.py
if: matrix.model == 'FLOATING_OWC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_FLOATING_OWC_H5: applications/OWC/FloatingOWC/hydroData/floatingOWC.h5
- run: python -m pytest -q -s tests/test_rm3_moordyn_replay.py
if: matrix.model == 'RM3_MOORDYN'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MOORDYN_LIBRARY: matlab-ref/source/functions/moorDyn/libmoordyn.so
- run: python -m pytest -q tests/test_floating_owc_moordyn_replay.py
if: matrix.model == 'FLOATING_OWC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MOORDYN_LIBRARY: matlab-ref/source/functions/moorDyn/libmoordyn.so
WEC_SIM_FLOATING_OWC_H5: applications/OWC/FloatingOWC/hydroData/floatingOWC.h5
- run: python -m pytest -q tests/test_floating_owc_coupled_parity.py
if: matrix.model == 'FLOATING_OWC_SOURCE'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MOORDYN_LIBRARY: matlab-ref/source/functions/moorDyn/libmoordyn.so
WEC_SIM_FLOATING_OWC_H5: applications/OWC/FloatingOWC/hydroData/floatingOWC.h5
- run: python -m pytest -q tests/test_floating_owc_pto_parity.py
if: matrix.model == 'FLOATING_OWC_PTO'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MOORDYN_LIBRARY: matlab-ref/source/functions/moorDyn/libmoordyn.so
WEC_SIM_FLOATING_OWC_H5: applications/OWC/FloatingOWC/hydroData/floatingOWC.h5
- run: python -m pytest -q -s tests/test_rm3_moordyn_coupled_parity.py
if: matrix.model == 'RM3_MOORDYN'
env:
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MOORDYN_LIBRARY: matlab-ref/source/functions/moorDyn/libmoordyn.so
- run: python -m pytest -q tests/test_sphere_mean_drift_source.py
if: matrix.model == 'SPHERE_MEAN_DRIFT'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_mean_drift_parity.py
if: matrix.model == 'SPHERE_MEAN_DRIFT'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_hinge_dynamics_parity.py
if: matrix.model == 'OSWEC'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_nonhydro_parity.py
if: matrix.model == 'OSWEC_Nonhydro'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q -s tests/test_oswec_hinge_pretension_parity.py
if: matrix.model == 'OSWEC_Nonhydro'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_passive_yaw_parity.py
if: matrix.model == 'OSWEC_PASSIVE_YAW'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_passive_yaw_irregular_parity.py -k published_irregular
if: matrix.model == 'OSWEC_PASSIVE_YAW_IRR'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q "tests/test_oswec_passive_yaw_irregular_parity.py::test_continuous_heading_irregular_passive_yaw[1]"
if: matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q "tests/test_oswec_passive_yaw_irregular_parity.py::test_continuous_heading_irregular_passive_yaw[2]"
if: matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED2'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q "tests/test_oswec_passive_yaw_irregular_parity.py::test_continuous_heading_irregular_passive_yaw[3]"
if: matrix.model == 'OSWEC_PASSIVE_YAW_IRR_CONT_SEED3'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_irregular_wave_parity.py
if: matrix.model == 'OSWEC'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC
WEC_SIM_MATLAB_CORE_DIR: matlab-ref
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_multi_wave_source.py
if: matrix.model == 'OSWEC_MULTI_WAVE'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC_MULTI_WAVE
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_multi_wave_parity.py
if: matrix.model == 'OSWEC_MULTI_WAVE'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC_MULTI_WAVE
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_full_directional_source.py
if: matrix.model == 'OSWEC_FULL_DIR'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC_FULL_DIR
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_oswec_full_directional_parity.py
if: matrix.model == 'OSWEC_FULL_DIR'
env:
WEC_SIM_REFERENCE_MODEL: OSWEC_FULL_DIR
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_live_sphere_io.py tests/test_sphere_dynamics_parity.py
if: matrix.model == 'Sphere'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_elevation_import_parity.py
if: matrix.model == 'SPHERE_ELEVATION_IMPORT'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_wave_markers_parity.py -k RM3
if: matrix.model == 'WAVE_MARKERS_RM3'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_wave_markers_parity.py -k OSWEC
if: matrix.model == 'WAVE_MARKERS_OSWEC'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_passive_parity.py
if: matrix.model == 'Sphere_Passive'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_variable_yaw_heading_bank.py -k two_degree
if: matrix.model == 'OSWEC_VARIABLE_YAW_2DEG'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_variable_yaw_heading_bank.py -k published
if: matrix.model == 'OSWEC_VARIABLE_YAW_PUBLISHED'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_variable_yaw_heading_bank.py -k irregular_120s
if: matrix.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_120S'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_variable_yaw_heading_bank.py -k irregular_600s
if: matrix.model == 'OSWEC_VARIABLE_YAW_IRREGULAR_600S'
env:
WEC_SIM_APPLICATIONS_DIR: applications
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_pto_config_parity.py
if: matrix.model == 'Sphere_PTO_Config'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_reactive_pi_parity.py
if: matrix.model == 'Sphere_Reactive_PI'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_declutching_parity.py
if: matrix.model == 'Sphere_Declutching'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- run: python -m pytest -q tests/test_sphere_latching_parity.py
if: matrix.model == 'Sphere_Latching'
env:
WEC_SIM_SPHERE_H5: applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
WEC_SIM_MATLAB_MODEL_OUTPUT_DIR: matlab-reference-model-output
- uses: actions/upload-artifact@v4
if: always()
with:
name: matlab-${{ matrix.model }}-baseline
path: |
matlab-reference-model-output/
applications/_Common_Input_Files/Sphere/hydroData/sphere.h5
applications/Free_Decay/0m/etaData.mat
applications/_Common_Input_Files/RM3/hydroData/rm3.h5
applications/_Common_Input_Files/OSWEC/hydroData/oswec.h5
applications/Mean_Drift/hydroData/sphere.h5
applications/Variable_Hydro/Variable_Mass/hydroData/draft*.h5
applications/Nonlinear_Hydro/hydroData/ellipsoid.h5
applications/Nonlinear_Hydro/geometry/elipsoid.stl
applications/Generalized_Body_Modes/hydroData/barge.h5
applications/OWC/OrificeModel/hydroData/test17a_clean.h5
applications/OWC/FloatingOWC/hydroData/floatingOWC.h5
applications/Cable/hydroData/mbari.h5
applications/Load_Mitigating_Controls/hydroData/waveBotBuoy.h5
applications/WECCCOMP/hydroData/wavestar.h5
applications/Morison_Element/hydroData/monopile.h5
applications/Controls/MPC/coeff.mat
compare-end-stops-full:
if: inputs.model == 'RM3_END_STOPS_FULL_PAIR'
needs: baseline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v4
with:
pattern: matlab-RM3_END_STOPS_FULL_*-baseline
path: paired-output
merge-multiple: true
- uses: actions/setup-python@v7
with:
python-version: '3.12'
cache: pip
- run: python -m pip install -r requirements.txt pytest
- run: python -m pytest -q tests/test_rm3_end_stops_source_convergence.py
env:
WEC_SIM_END_STOPS_FINE_OUTPUT_DIR: paired-output/matlab-reference-model-output
WEC_SIM_END_STOPS_FINER_OUTPUT_DIR: paired-output/matlab-reference-model-output