Skip to content

feat(BETDisk): add collective_pitch field [SCFD-7370]#1938

Merged
benflexcompute merged 2 commits intorelease-candidate/25.9from
SCFD-7370/add-collective-pitch-to-betdisk
Mar 27, 2026
Merged

feat(BETDisk): add collective_pitch field [SCFD-7370]#1938
benflexcompute merged 2 commits intorelease-candidate/25.9from
SCFD-7370/add-collective-pitch-to-betdisk

Conversation

@benflexcompute
Copy link
Copy Markdown
Collaborator

@benflexcompute benflexcompute commented Mar 27, 2026

Summary

  • Add optional collective_pitch field to BETDisk model, allowing users to apply a uniform twist offset to all blades without modifying BET source files
  • Applied in the translator layer so solver JSON format is unchanged — no solver-side changes needed
  • Field defaults to None and is excluded from serialized JSON via exclude_none, preserving forward compatibility with older SDK versions

Test plan

  • test_betdisk_collective_pitch_offsets_twists — verifies pitch correctly offsets all twist values
  • test_betdisk_collective_pitch_none_matches_zero — verifies None produces identical output to no offset
  • test_betdisk_collective_pitch_excluded_from_serialization_when_none — verifies forward compat (no collectivePitch key in JSON when None)

Ref: https://flow360.atlassian.net/browse/SCFD-7370

🤖 Generated with Claude Code


Note

Medium Risk
Medium risk because it changes BETDisk translation output by modifying all translated twist angles when collective_pitch is set, which can affect simulation results; behavior is guarded by an optional field and covered by targeted tests.

Overview
Adds an optional collective_pitch field to BETDisk (and its input cache and constructors) to represent a uniform pitch offset without modifying source BET files.

Updates the solver translator so each translated twists[].twist value is offset by collective_pitch (defaults to 0 when unset), while keeping solver JSON schema unchanged and ensuring collective_pitch=None remains excluded from serialization.

Extends converter reference fixtures and adds tests to validate cache round-tripping and translation behavior for set vs unset pitch.

Written by Cursor Bugbot for commit fcecb67. This will update automatically on new commits. Configure here.

Adds an optional `collective_pitch` angle to BETDisk that applies a uniform
offset to all blade twist values during solver translation. This allows users
to adjust rotor collective pitch directly without modifying BET source files.

The field defaults to None and is excluded from serialized JSON via
exclude_none, preserving forward compatibility with older SDK versions.

Ref: SCFD-7370

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64988cd0b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…ache

Ensure collective_pitch persists through multi-constructor round-trips
(from_xrotor, from_c81, from_dfdc, from_xfoil) by adding it to:
- BETDiskCache
- _update_input_cache field validator list
- All from_* constructor signatures

Updates ref JSON files to include the new nullable field.

Ref: SCFD-7370

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@benflexcompute benflexcompute merged commit b38a2ea into release-candidate/25.9 Mar 27, 2026
18 checks passed
@benflexcompute benflexcompute deleted the SCFD-7370/add-collective-pitch-to-betdisk branch March 27, 2026 19:54
github-actions bot pushed a commit that referenced this pull request Mar 27, 2026
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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