Skip to content

Use FULL_TEST for the marine hydro example - #516

Open
maoji-y wants to merge 4 commits into
NatLabRockies:developfrom
maoji-y:restore-marine-example-duration
Open

maoji-y wants to merge 4 commits into
NatLabRockies:developfrom
maoji-y:restore-marine-example-duration

Conversation

@maoji-y

@maoji-y maoji-y commented Nov 16, 2026 •

Copy link
Copy Markdown

Description and Purpose

Use the FULL_TEST flag in Examples/26_marine_hydro.py, as in the active wake control, fixed-pitch MHK, and yaw control examples. The example runs for one simulated second by default. Set FULL_TEST = True for the 100-second run. The PR diff is now limited to the example and uses the original test harness.

Type of change

  • Code style update (renaming)

GitHub issues addressed

Fixes #507.

Examples/Testing

I verified the last timestamp in the OpenFAST output on Windows with Python 3.13, OpenFAST v5.0.0, and the ROSCO 2.10.6 controller.

Entry point Last timestamp
Direct invocation with FULL_TEST = False 1.00 s
Original execute_script("26_marine_hydro") with FULL_TEST = False 1.00 s
Example with FULL_TEST = True 100.00 s

All three runs terminated normally. Validation exercised the marine hydro example. The full example suite is left to CI.

Codex assisted with the patch and validation.

dzalkind and others added 3 commits September 29, 2026 13:26
* Increase number of available instances of filters, etc to 1024

* WindIO Support (NatLabRockies#492)

* Clean up examples to clarify inputs/outputs

* Change default ss_pcgain

* Add tuning input to change setpoint separation when tuning

* Fix directories in ex 06

* Bug fix: Use LSS speed throughout TRA subroutine

* Add setpoint separation to DISCON_dict

* Test build on macos-latest and not 13, those runners being depreciated

* Clarify DISCON description for SD_TimeActivate

* Remove macos-13 from publish CI

* Tidy example 02

* Increment version

* Update discons

* Add script for creating windio input yamls

* Create rosco vt from windio and functionize

* Add windio schema conversion to own file

* Make example self-contained in ROSCO

* Update inputs for openfast 4.2.0 (NatLabRockies#491)

* Update inputs for openfast 4.2.0

* Update openfast versions in environment

* Pull windIO yamls from their repos for example

* Revert to windIO versions because they have the updated control inputs

* Account for gearbox ratio in windio conversion (NatLabRockies#498)

* Account for gearbox ratio in windio conversion

* Pin openfast_io pip install

* Add windio yaml for nrel-5mw

* Fix typo while here

* OpenFAST 5.0 Support (NatLabRockies#503)

* Update RM1 model and control

* Update RM1 tuning yaml and SeaState input

* Add discon parameter sweep to CaseLibrary

* Make shorter MHK example

* Update inputs for openfast 4.2.0

* Update openfast versions in environment

* Disable cavitcheck, shutdown at 9999

* Tidy MHK example

* Increase generator inertia

* Set new tuning parameters for RM1

* Update DISCONs

* Update input files to openfast v5

* Update environment yaml

* Add discon_param sweep to CaseLibrary

* Update output file reader so it can grab partial lines without failing

* Read elastodyn file more robustly

* Skip blade input reading, unused

* Increase toml version

* Re-generate discons

* Add note about getting pre-compiled libraries from conda

* Re-generate registry

* Update NREL-5MW, RM1 models to OF 5.0

* Update NREL 2.8 MW

* Update toml, discons

* Update StC_DOF_MODE for OF5, add TEST_MODE

* Update FAST.Farm for OF5.0

* Pip install with no-deps

* Set default DISCON dict

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Restore explicit GenDOF setting in base_op_case

* Use generic DLL_Filename

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Use generic DISCON_LIB_PATH for external users with generic flag

* Update StC mode description

* Update python versions to >=3.11

* Try manylinux_2_28

* Skip 32-bit linux, not supported with numpy 2.5

* Fix toml format

---------

Co-authored-by: dzalkind <dzalkind@nrel.gov>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Update documentation errors (NatLabRockies#506)

* Update yaw/rad errors

* remove accidental mispelling

---------

Co-authored-by: dzalkind <dzalkind@nrel.gov>

* Fixed Blade Pitch Control Updates for MHKs (NatLabRockies#508)

* Account for gearbox ratio in windio conversion

* Add docs for building the docs

* Add more generic param_sweeps

* Clean up and sweep all cases in ex 31

* Add a few more checks to FBP modes

* Review MHK control docs

* Add cavitation check and docs

* Align VS_ControlMode with docs

* Try mamba install with fewer solves

* Re-organize example and docs to follow three main examples

* Add soft-start to FBP modes

* Update comment, defaults for MHK settings, VS_ControlMode

* Add variable-pitch section

* Copy-edit the marine_hydro docs

* Clarify 2- vs. 3-bladed remarks

* Fix and document v_rated change for FBP

* Fix Cp_op in below rated FBP

* Relocate min rotor speed limits to before they are used in all cases

* Fix comment, FULL_TEST

* Fix output name

* Try skipping the compiler on macoc-14

---------

Co-authored-by: dzalkind <dzalkind@nrel.gov>

* Deep-copy controller params for each sweep case

Controller.__init__ writes per-case OL_* DISCON overrides into the nested
open_loop dict, which was shared across sweep cases by the shallow merge,
so later cases could inherit an earlier case's open-loop file or indices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove toolbox cavitation check

The check needed the steady angle of attack at each blade section to be
more than a heuristic, which the toolbox does not have without CCBlade.
AeroDyn's CavitCheck does this properly, so drop the toolbox check and
keep the cavitation speed limit in the docs as design guidance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: dzalkind <dzalkind@nrel.gov>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Skylar A Gering <sgering@g.hmc.edu>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@dzalkind

Copy link
Copy Markdown
Collaborator

Thanks for picking this up. After a closer look, TEST_RUN = True was intentional. Other examples use the same pattern with FULL_TEST = False (e.g., 20_active_wake_control, 31_fixed_pitch_mhk, 33_yaw_control): they run short by default, both directly and in CI, and you flip the flag locally for the full run. #507 came from an automated review comment that read it as a leftover debug toggle.

I'd rather not special-case one script in test_examples.py. Could you reduce this PR to renaming the flag to match the other examples, and revert the test_examples.py change?

FULL_TEST = False   # True for the full 100 s run locally; False for a short CI run
...
if not FULL_TEST:
    r.wind_case_opts['TMax'] = 1.0

That would still close #507.

@maoji-y maoji-y changed the title Restore the 100-second marine hydro example Use FULL_TEST for the marine hydro example Nov 17, 2026
@dzalkind
dzalkind changed the base branch from main to develop November 17, 2026 20:29

This branch has not been deployed

No deployments
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.

TEST_RUN defaults to True in Examples/26_marine_hydro.py

2 participants