Skip to content

feat(Inflow): add rotate_velocity_direction_with_mesh option#1995

Open
NasserFlexCompute wants to merge 4 commits intomainfrom
feat/rotate-velocity-direction-with-mesh
Open

feat(Inflow): add rotate_velocity_direction_with_mesh option#1995
NasserFlexCompute wants to merge 4 commits intomainfrom
feat/rotate-velocity-direction-with-mesh

Conversation

@NasserFlexCompute
Copy link
Copy Markdown
Contributor

@NasserFlexCompute NasserFlexCompute commented Apr 15, 2026

No description provided.

Add `rotate_velocity_direction_with_mesh` bool field to `Inflow` boundary
condition (default True). When enabled, the velocity direction vector rotates
with the mesh at each physical time step for boundaries inside rotating zones.

- Add field to `Inflow` model in surface_models.py
- Emit `rotateVelocityDirectionWithMesh: false` in translator only when
  overridden (solver default is true)
- Add unit test verifying translation for both default and disabled cases

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 15, 2026 18:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Inflow boundary condition option that controls whether a specified inflow velocity_direction is rotated along with the mesh in rotating zones, while keeping solver JSON output minimal by only emitting the solver key when overriding the default behavior.

Changes:

  • Add rotate_velocity_direction_with_mesh: bool = True to the Inflow surface model (only relevant when velocity_direction is set).
  • Update solver translation to emit rotateVelocityDirectionWithMesh: false only when the user explicitly disables the behavior.
  • Add a unit test covering both default (not emitted) and disabled (emitted as false) translation cases.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
flow360/component/simulation/models/surface_models.py Introduces the new Inflow model field with default True and description.
flow360/component/simulation/translator/solver_translator.py Emits rotateVelocityDirectionWithMesh only when rotate_velocity_direction_with_mesh is False (and velocity_direction is set).
tests/simulation/translator/test_solver_translator.py Verifies translation behavior for default vs explicitly-disabled cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flow360/component/simulation/models/surface_models.py Outdated
johnmoore4
johnmoore4 previously approved these changes Apr 16, 2026
@NasserFlexCompute NasserFlexCompute enabled auto-merge (squash) April 16, 2026 14:01
@NasserFlexCompute
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: NasserFlexCompute <95641637+NasserFlexCompute@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 17, 2026 21:31
@NasserFlexCompute NasserFlexCompute review requested due to automatic review settings April 17, 2026 21:31
Copy link
Copy Markdown

Copilot AI commented Apr 17, 2026

@copilot resolve the merge conflicts in this pull request

Done — I merged origin/main into this branch and resolved the conflict in flow360/component/simulation/models/surface_models.py. The conflict-resolution merge commit is 7de0b793.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7de0b79. Configure here.

Comment thread flow360/component/simulation/translator/solver_translator.py
@NasserFlexCompute NasserFlexCompute enabled auto-merge (squash) April 17, 2026 23:10
angranl-flex
angranl-flex previously approved these changes Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flow360/component/simulation/translator/solver_translator.py
Comment thread tests/simulation/translator/test_solver_translator.py
Comment thread pyproject.toml
Comment on lines 16 to 20
# -- Local dev (editable install, schema changes take effect immediately):
# flow360-schema = { path = "../../../../flex/share/flow360-schema", develop = true }
# -- CI / release (install from CodeArtifact, swap comments before pushing):
flow360-schema = { version = "~0.1.24", source = "codeartifact" }
flow360-schema = { version = "= 25.10.1b2", source = "codeartifact" }
pytest = "^7.1.2"
Copy link

Copilot AI Apr 18, 2026

Choose a reason for hiding this comment

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

pyproject.toml was updated to require flow360-schema = 25.10.1b2, but poetry.lock still pins flow360-schema to 0.1.26. This will make installs/CI non-reproducible (or fail) unless the lockfile is regenerated/updated to match the new dependency constraint.

Copilot uses AI. Check for mistakes.
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.

5 participants