Skip to content

Correct OWC piston-force path and simulation step - #119

Closed
cmccomb wants to merge 5 commits into
WEC-Sim:devfrom
cmccomb:fix/owc-orifice-piston-force
Closed

cmccomb wants to merge 5 commits into
WEC-Sim:devfrom
cmccomb:fix/owc-orifice-piston-force

Conversation

@cmccomb

@cmccomb cmccomb commented Oct 22, 2026 •

Copy link
Copy Markdown

Summary

Include the orifice piston force in the generalized-body-mode (GBM) state input of OWC/OrificeModel/OWC_GBM.slx. Previously, the force reached the reported flexible-body acceleration while the state-space integration received wave excitation alone. The new sum sends excitation plus piston force to Product4/2; the existing flexible stiffness and damping remain in the state-space block.

Set simu.dt = 0.00015625 s in the published input, with simu.dtOut = 0.005 s. Explicit cicDt, nonlinearDt, and morisonDt values retain their original 0.005 s force-sampling clocks. WEC-Sim initialization overwrites the model's saved MaxStep with simu.dt, so changing the .slx setting alone was insufficient. A full audit at the old 0.005 s step found 1.687 m maximum surge and 1.62% PTO-work differences against a refined solver run, with identical waves and no Mach-limit events. The published-input run is being checked through cmudrc/wec-sim-python#627.

The model was edited and saved in MATLAB R2023b, matching the original model release. The reproducible signal-edit script asserts the original wiring. The model in this PR has SHA-256 5f9f1da3bf73e85b52224a3ff483991c3ec60774b92856e3c45cda4347927b59; its alternate configuration remains at the original settings, and the active one changes only MaxStep.

Validation

  • Started from Applications commit d53d4d4c9eda2581f04204f5d394a6ef84bb099e, with WEC-Sim core 0753b2e47f2457c078751dcfe5d251d1767b80ab and pinned cleaned Test 17a hydrodynamics.
  • The R2023b-saved signal correction passed a full 130 s hosted source run with MaxStep refined at runtime. Its six output arrays matched the prior R2025b-model CI run exactly, reproduced the archived baseline within 1e-9, and passed independent Python motion and air-system gates in cmudrc/wec-sim-python#627. Maximum Python/source surge difference was 2.246 mm; signed PTO work differed by 0.0717%; peak internal-air Mach was 0.155.
  • A direct saved-setting gate exposed WEC-Sim's MaxStep override. The full 130 s published-input run with preserved force clocks passed MATLAB simulation, fresh-source packing, and the independent Python motion, PTO, and air-system gate. Its six exported arrays reproduce the archived refined trace within 3.96e-11; source work is 864.422 J and peak Mach is 0.155. The final source workflow run also passes the strict 1e-9 archive assertion and fresh-source Python gate.

Related to cmudrc/wec-sim-python#622.

@cmccomb
cmccomb marked this pull request as draft October 22, 2026 23:40
@cmccomb cmccomb changed the title Include piston force in OWC OrificeModel GBM state input Correct OWC piston-force path and saved solver step Oct 22, 2026
@cmccomb cmccomb changed the title Correct OWC piston-force path and saved solver step Correct OWC piston-force path and simulation step Oct 22, 2026
@cmccomb
cmccomb marked this pull request as ready for review October 23, 2026 00:38
@cmccomb cmccomb closed this Oct 23, 2026
@cmccomb
cmccomb deleted the fix/owc-orifice-piston-force branch October 23, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant