Skip to content

Comments

[FXC-5755] Allow "auto"-like symmetry plane detection in UserDefinedFarfield#1820

Merged
sashok-flex merged 5 commits intomainfrom
sashok/symmPlaneUDF
Feb 19, 2026
Merged

[FXC-5755] Allow "auto"-like symmetry plane detection in UserDefinedFarfield#1820
sashok-flex merged 5 commits intomainfrom
sashok/symmPlaneUDF

Conversation

@sashok-flex
Copy link
Collaborator

@sashok-flex sashok-flex commented Feb 18, 2026

When using UserDefinedFarfield, the current validation does not allow the user to access the symmetry_plane unless they have explicitly set the domain_type to a half body type. Since we have automated symmetry plane detection for UserDefinedFarfields, this is unintuitive and should be corrected. The desired behavior is that the user can access the symmetry_plane even with domain_type unset, and the validation will then check the bounding box to see if an automated symmetry plane can be added based on planar_face_tolerance, identical to how AutomatedFarfield behaves in method=”auto”.

Two tests have been added that confirm the correct behavior of the code.

I discovered this behavior while debugging Maitham's DPW half body localTest. I wanted to set the max edge length on the symmetry plane, but I had to manually specify domain type. If you don't access symmetry_plane, then the case validates just fine and creates an auto symmetry plane as expected. But, if you access symmetry_plane, then it fails validation.


Note

Medium Risk
Changes validation rules around symmetry-plane ghost boundaries for user-defined farfields, which can affect whether previously-invalid configs now pass or produce different errors. Risk is mitigated by added tests covering both successful auto-detection and failure when the bbox cannot produce symmetric.

Overview
Allows UserDefinedFarfield.symmetry_plane to be used when domain_type is unset, relying on auto symmetry detection from the geometry bounding box instead of requiring an explicit half-body domain_type.

Updates validation so GhostCircularPlane(name="symmetric") under user-defined farfield still requires GAI + beta mesher, but now permits domain_type=None (and only errors when the bbox/tolerance implies the symmetric boundary won’t be generated). Adds/adjusts translator tests to cover the new pass/fail cases and verify ghost-surface replacement + full model validation behavior.

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

@sashok-flex sashok-flex enabled auto-merge (squash) February 19, 2026 19:34
@sashok-flex sashok-flex merged commit 2afa178 into main Feb 19, 2026
18 checks passed
@sashok-flex sashok-flex deleted the sashok/symmPlaneUDF branch February 19, 2026 19:42
Copy link

@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 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

"""
if self.domain_type not in ("half_body_positive_y", "half_body_negative_y"):
if self.domain_type not in (None, "half_body_positive_y", "half_body_negative_y"):
# We allow None here to allow auto detection of domain type from bounding box.
Copy link

Choose a reason for hiding this comment

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

Error message omits newly-valid auto-detection option

Medium Severity

The symmetry_plane property now allows domain_type=None for automatic detection, but the Flow360ValueError message still only mentions half_body_positive_y or half_body_negative_y as valid options. A user who sets domain_type="full_body" and tries to access symmetry_plane will be told only the half-body options work, without learning that simply unsetting domain_type (leaving it as None) would also work via auto-detection. The error message needs to mention the auto-detection option to match the updated behavior.

Fix in Cursor Fix in Web

)
# If domain_type is not set, we attempt to automatically detect it from the bounding box.
if param_info.farfield_domain_type is None:
continue
Copy link

Choose a reason for hiding this comment

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

CASE-level boundary collection misses auto-detected symmetry plane

High Severity

The PR enables domain_type=None auto-detection for UserDefinedFarfield at VOLUME_MESH level, but _collect_asset_boundary_entities in validation_simulation_params.py (line 443–445) was not updated. That function only adds the "symmetric" ghost entity when will_generate_forced_symmetry_plane() is True (explicit half-body), so with domain_type=None the "symmetric" boundary is absent from asset_boundary_entities. For comparison, AutomatedFarfield (line 430–436) conditionally adds "symmetric" via item.exists(param_info). At CASE-level validation, this omission means a user who assigns a symmetry BC will get a spurious "unknown boundary" error, and a missing symmetry BC won't be caught.

Additional Locations (1)

Fix in Cursor Fix in Web

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