Skip to content

Add VGOSWEC capture-efficiency sweep/plot workflow (VGM-0/10/20/45/90, T=2–7 s) - #32

Merged
salhus merged 6 commits into
mainfrom
copilot/compute-capture-efficiency
Jul 9, 2026
Merged

Add VGOSWEC capture-efficiency sweep/plot workflow (VGM-0/10/20/45/90, T=2–7 s)#32
salhus merged 6 commits into
mainfrom
copilot/compute-capture-efficiency

Conversation

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR adds a dedicated capture-efficiency analysis path for tuned exc_ff_pid across all five VGOSWEC flap variants on a shared T=2.0..7.0 s grid, with η(T)=P_capture(T)/P_opt(T) and explicit reactive-limited masking where P_opt is undefined.

  • New analysis driver (scripts/capture_efficiency_sweep.py)

    • Runs per-flap headless sweeps using merged tuned configs (vgoswec_{0,10,20,45,90}_exc_ff_pid.yaml), no gain retuning.
    • Computes P_capture(T) as steady-state mean absorbed power from the second half of each run.
    • Writes per-flap CSVs: analysis/capture_efficiency_VGM{0,10,20,45,90}.csv with:
      T_s, omega_rads, P_capture_W, P_opt_W, B55_Nmsrad, F_exc_Nm, eta, masked.
    • Generates per-flap figures and cross-flap summary:
      analysis/figures/capture_efficiency_VGM{...}.png, capture_efficiency_summary.png.
    • Supports --plot-only to regenerate figures from committed CSVs.
  • Hydrodynamic P_opt implementation

    • Uses H5 body/flap pitch terms directly:
      • body1/hydro_coeffs/radiation_damping/components/5_5
      • body1/hydro_coeffs/excitation/mag at DOF5 (index 4), direction 0
    • Applies WEC-Sim/BEMIO de-normalization:
      • B55 = B55_norm * rho * omega
      • |F_exc| = mag * rho * g * A, with A = 0.014 m (H=0.028 m)
    • Evaluates P_opt = |F_exc|^2 / (8*B55) only where defined.
  • Reactive-limited masking and presentation

    • Masks periods with B55 <= 1e-4 (includes non-positive B55), sets P_opt/eta undefined there.
    • Shaded/hatched masked regions in plots.
    • Explicit VGM-0 annotation near resonance for reactive-limited undefined efficiency (B55 → 0).
  • Documentation updates

    • analysis/README.md: method, formulae, CSV schema, masking rationale, regeneration commands, VGM-0 caveat.
    • docs/CONTROLLERS.md: capture-efficiency sweep section aligned with H5 source/de-normalization/masking conventions.
# Core denominator + mask logic used in the new sweep
B55 = B55_norm * rho * omega
F_exc = exc_mag * rho * g * A  # A = H/2 = 0.014 m
masked = B55 <= 1e-4
P_opt = np.where(~masked, (F_exc**2) / (8.0 * B55), np.nan)
eta = np.where(~masked, P_capture / P_opt, np.nan)

Copilot AI changed the title [WIP] Compute and plot capture efficiency for VGOSWEC flap-angles Add VGOSWEC capture-efficiency sweep/plot workflow (VGM-0/10/20/45/90, T=2–7 s) Jul 9, 2026
Copilot finished work on behalf of salhus July 9, 2026 22:11
Copilot AI requested a review from salhus July 9, 2026 22:11
@salhus
salhus marked this pull request as ready for review July 9, 2026 22:12
@salhus
salhus merged commit 568b683 into main Jul 9, 2026
@salhus
salhus deleted the copilot/compute-capture-efficiency branch July 10, 2026 18:38
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.

2 participants