feat(Inflow): add rotate_velocity_direction_with_mesh option#1995
feat(Inflow): add rotate_velocity_direction_with_mesh option#1995NasserFlexCompute wants to merge 4 commits intomainfrom
Conversation
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
There was a problem hiding this comment.
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 = Trueto theInflowsurface model (only relevant whenvelocity_directionis set). - Update solver translation to emit
rotateVelocityDirectionWithMesh: falseonly 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.
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: NasserFlexCompute <95641637+NasserFlexCompute@users.noreply.github.com>
Done — I merged |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
There was a problem hiding this comment.
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.
| # -- 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" |
There was a problem hiding this comment.
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.

No description provided.