Skip to content

[FXC-6076] Plumb rotor_disk_names into Custom Volume and Farfield Zone Translation#2028

Merged
shreyas-flex merged 3 commits intorelease-candidate/25.9from
shreyas/rotor-disk-in-custom-volumes259
May 4, 2026
Merged

[FXC-6076] Plumb rotor_disk_names into Custom Volume and Farfield Zone Translation#2028
shreyas-flex merged 3 commits intorelease-candidate/25.9from
shreyas/rotor-disk-in-custom-volumes259

Conversation

@shreyas-flex
Copy link
Copy Markdown
Contributor

@shreyas-flex shreyas-flex commented May 4, 2026

PR: Plumb rotor_disk_names into Custom Volume and Farfield Zone Translation

FXC: https://flow360.atlassian.net/browse/FXC-6076

Summary

_get_custom_volumes and _build_farfield_zone were calling _translate_enclosed_entity_name without rotor_disk_names, causing any Cylinder entity in a CustomVolume.bounding_entities to always translate to "slidingInterface-<name>" -- even when it's actually a rotor disk (defined via AxisymmetricRefinement). This made the companion C++ fix in VolumeMultiZoneUtils.h unreachable, since the patch name mismatch ("slidingInterface-foo" vs "rotorDisk-foo") prevented the custom zone exclusion logic from working.

Changes

flow360/component/simulation/translator/volume_meshing_translator.py

  • _build_farfield_zone(volume_zones) -> _build_farfield_zone(volume_zones, rotor_disk_names=None): forwards to _translate_enclosed_entity_name so that rotor-disk cylinders in farfield enclosed_entities get the "rotorDisk-" prefix.
  • _get_custom_volumes(volume_zones) -> _get_custom_volumes(volume_zones, rotor_disk_names=None): forwards to _translate_enclosed_entity_name so that rotor-disk cylinders in CustomVolume.bounding_entities get the "rotorDisk-" prefix.
  • Both call sites in get_volume_meshing_json now pass the already-computed rotor_disk_names list.

tests/simulation/translator/test_volume_meshing_translator.py

Added test_custom_volume_with_rotor_disk_cylinder which verifies that when a Cylinder is used as an AxisymmetricRefinement and also placed inside a CustomVolume, both the custom zone and farfield zone patch lists contain "rotorDisk-bet_disk" (not "slidingInterface-bet_disk").

Test Plan

  • test_custom_volume_with_rotor_disk_cylinder passes
  • Existing test_farfield_enclosed_entities_unwraps_custom_volume_with_cylinder still passes (this test uses RotationVolume, not AxisymmetricRefinement, so the cylinder correctly remains "slidingInterface-")
  • All other test_volume_meshing_translator tests pass unchanged

Note

Low Risk
Low risk: narrowly forwards existing rotor_disk_names into zone patch-name translation and adds a focused regression test; main impact is patch naming in translated meshing JSON for cylinders used as rotor disks.

Overview
Fixes volume-meshing translation so cylinders that are rotor disks (from AxisymmetricRefinement) are named with the rotorDisk- prefix not only in sliding-interface enclosedObjects, but also when referenced inside CustomVolume.bounding_entities and farfield enclosed_entities.

This threads rotor_disk_names through _get_custom_volumes and _build_farfield_zone to _translate_enclosed_entity_name, and adds a regression test asserting both the custom zone and generated farfield zone emit rotorDisk-<name> patches (and not slidingInterface-<name>).

Reviewed by Cursor Bugbot for commit edc8bdb. Bugbot is set up for automated code reviews on this repo. Configure here.

@shreyas-flex shreyas-flex merged commit cc01495 into release-candidate/25.9 May 4, 2026
18 checks passed
@shreyas-flex shreyas-flex deleted the shreyas/rotor-disk-in-custom-volumes259 branch May 4, 2026 18:58
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