[FXC-5755] Allow "auto"-like symmetry plane detection in UserDefinedFarfield#1820
[FXC-5755] Allow "auto"-like symmetry plane detection in UserDefinedFarfield#1820sashok-flex merged 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
| ) | ||
| # 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 |
There was a problem hiding this comment.
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.


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_planeto be used whendomain_typeis unset, relying on auto symmetry detection from the geometry bounding box instead of requiring an explicit half-bodydomain_type.Updates validation so
GhostCircularPlane(name="symmetric")under user-defined farfield still requires GAI + beta mesher, but now permitsdomain_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.